Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

I need some help stepping through this example. I have added a file of the problem to make it clear what is being asked.

Untitled.pdf

Untitled.pdf

Experts Exchange Solution brought to you by

Enjoy your complimentary solution view.

Get every solution instantly with Premium.
Start your 7-day free trial.

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

So to solve for the base case do you simply just choose a number to see if it is true?

The base case in this case is for n = 0. Can you prove that the statement is true for n = 0 ?

How did you get to that ?

What does :

L0 + L1 + ... + Ln = L(n+2) - 1

become for n = 0 ?

I plugged 1 in for L1

I plugged 0 in for n

so I got 2 + 1 + 0 = 0 + 2 -1

so no, n is not >= to 0

You also know that L0 + ... + Ln = L(n+2) - 1 for some n

Can you now prove it for n+1?

i.e. that

L0 + ... + L(n+1) = L(n+3)

>> I plugged 2 in for L0

>> I plugged 1 in for L1

>> I plugged 0 in for n

That's not how it works ... The left side of :

L0 + L1 + ... + Ln = L(n+2) - 1

is the sum of all sequence elements up to and including the item with index n. What would the sum be of all sequence elements when n = 0 ?

L0 + L1 + ... + Ln is a notation that stands for the sum of all Lx for x ranging from 0 to n.

What would be that sum for n = 0 ?

ie. what would be the sum of all Lx for x ranging from 0 to 0 ?

L0 when n=0

L0 + L1 when n=1

L0 + L1 + L2 when n=2

L0 + L1 + L2 + L3 when n=3

L0 + L1 + L2 + L3 + L4 when n=4

etc.

Maybe you should read up a bit on summations :

http://en.wikipedia.org/wiki/Summation

so that you can at least understand the mathematical notation used.

Btw, don't read too much of it, just the first few paragraphs, up to and including the one talking about the "index of summation".

L0

the range from 0 to 1 is (0,1) so when n=1, the sum is

L0 + L1

the range from 0 to 2 is (0,1,2) so when n=2 the sum is

L0 + L1 + L2

the range from 0 to 3 is (0,1,2,3) so when n=3 the sum is

L0 + L1 + L2 + L3

The distance is not a constant distance. I know how to do summations, but not making my own or this complicated.

Do you understand the notation by what ozo wrote in http:#24762431 ?

"I know how to do summations, but not making my own or this complicated."

I don't plan on adding anything, except to wonder if the difficulty is who to listen to and how it relates to your then most recent posting.

My suggestion is to address your postings directly to the expert to whom you are speaking.

That's all I have to say.

WaterStreet,

Core Zone Advisor

EE's Other Zone

Ok, then could you get back to http:#24762261, and continue from there ?

WaterStreet, thanks for keeping us in check ;)

Refer back to ozo's post http:#24762431 to know what the notation L0 + L1 + ... + Ln stands for for different values of n.

would be the formula for the sum of

(a+0*d) + (a+1*d) + (a+2*d) + ... (a+(n-1)*d)

or

sum(i=0 ... n-1 : a+i*d)

The sum in question here is

L0 + L1 + ... + Ln

or

sum(i=0...n : Li)

I explicitly told you what that sum was for various n in

http:#2476243

But what is L0 + L1 + ... + Ln for n = 0 ? Refer to ozo's post http:#24762431 to know ...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trialsum(i=0...n : Li) may be less misleading in that sense, but is also more abstract, which may make it less intuitive.

You can just take our word that

L0 + L1 + ... + Ln

means

L0

when n=0

...

and that

L0 + L1 + ... + Ln

means

L0 + L1 + L2 + L3

when n=3

and that

L0 + L1 + ... + Ln

means

L0 + L1 + L2 + L3 + L4

when n=4

but doesn't matter as much whether you believe us for n=0 and n=1

as long as you can extend it to larger n, and can do the inductive step

from some n for which

L0 + L1 + ... + Ln = Ln+2 - 1

is true to the next value of n

Ln-2 + Ln-1 =Ln (1)

show

L0 + L1 + L2 + L3+ Ln = Ln+2 - 1

(A) Base case

True for n=0 as

L2 - 1 = 3 -1 = 2 = L0

(B) Assume true for n

ie that L0 + L1 + L2 + L3+ Ln = Ln+2 - 1 (2)

then

L0 + L1 + L2 + L3+ Ln + Ln+1

= Ln+2 - 1 + Ln+1 (by inductive assumption eqn (2) )

= Ln+3 - 1 ( by eqn 1 )

Hence if true for n true for n+1, since true for n=0 by inductive assumption true for all n

Proved

First, show that it's true for some value of n >=2, say n = 2.

L0 + L1 + L2 = 2 + 1 + 3 = 6 = 7 - 1 = L4 - 1. True.

(L0 + L1 + L2) + L3 = 6 + 4 = 10

(L4 - 1) + L3 = 7 + 4 = 11 , which means (L3 + L4 - 1) = L5 - 1

QED

Math / Science

From novice to tech pro — start learning today.

Experts Exchange Solution brought to you by

Enjoy your complimentary solution view.

Get every solution instantly with Premium.
Start your 7-day free trial.

So, how far did you get ?

Can you prove the base case (n = 0) ?

Can you prove the step ?