Is answer B?

The Gateway to Computer Science Excellence

0 votes

0

There are two ways:-

If base cases given then simply apply values: a0 = 0

Substitute n value = 0 , Now only second option holds good 2^0 - 1 = 1-1 = 0.

next method:-

Solving using linear homogeneous method. first form equation and then find the roots , apply the roots and create the recurrence equation.

This might be time consuming . there are several videos available in youtube

If base cases given then simply apply values: a0 = 0

Substitute n value = 0 , Now only second option holds good 2^0 - 1 = 1-1 = 0.

next method:-

Solving using linear homogeneous method. first form equation and then find the roots , apply the roots and create the recurrence equation.

This might be time consuming . there are several videos available in youtube

0 votes

Substituting x^2 for an+2, x ^1 for an+1 and x^0 for an,we get the equation,

x^2 -3x + 2 =0

roots of the above equation are 1,2

Therefore,characteristic equation will be,

an=c1(1)^n + c2(2)^n where c1,c2 are constants;

Substituting the value of n=0 and n=1,we get c1=-1 and c2=1;

Therefore, an=2^n-1

Hence (b)

x^2 -3x + 2 =0

roots of the above equation are 1,2

Therefore,characteristic equation will be,

an=c1(1)^n + c2(2)^n where c1,c2 are constants;

Substituting the value of n=0 and n=1,we get c1=-1 and c2=1;

Therefore, an=2^n-1

Hence (b)

52,315 questions

60,435 answers

201,769 comments

95,247 users