Induction question

1 view
Skip to first unread message

Irwin Williams

unread,
Nov 10, 2010, 11:01:34 AM11/10/10
to design-and-analy...@googlegroups.com
Hey team,
I'm stuck with this induction proof:
So, far, given: 

T(1) = 2
T(n)= 2T(n/2)+2
= 2(2T(n/[2^2])+2) + 2
= [2^2]T(n/[2^2]) + [2^2] + 2
= [2^2](2T(n/[2^2])+2) + [2^2] + 2
= [2^3]T(n/[2^3]) + [2^3] + [2^2] + 2  
= [2^3]T(n/[2^3]) + [2^3] + [2^2] + 1 + 1
.
.
.
= [2^k]T(n/[2^k]) + 2^k - 1 + 1
= [2^k]T(n/[2^k]) + 2^k 

How then do I show this to be correct (the proof).
So far I have:

Let (n/[2^k]) = 1
=> n = 2^k
So, T(n) = nT(1) + n
Thus, T(n) = 2n.

Proof (by induction):
When n = 1, T(1) = 2.
Assume T(k) is true, yielding: T(n) = 2n
//THIS IS WHERE I'M STUCK



--
Irwin Williams
785-1268
________________________
*I am a software solutions developer.*
Do you see a man skilled in his work?
He will serve before kings; he will not
serve before obscure men.
Proverbs 22:29

Kyle E. deFreitas

unread,
Nov 10, 2010, 11:16:48 AM11/10/10
to design-and-analy...@googlegroups.com
Unfortunately I am also stuck there

help anyone?
--
Kyle deFreitas
St Vincent and the Grenadines
Contact #: 1-784-454-4037
or
1-868-722-5346

Irwin Williams

unread,
Nov 10, 2010, 11:19:17 AM11/10/10
to design-and-analy...@googlegroups.com
but you're stuck at the same place?
So we've been going down the same correct road?

Kyle E. deFreitas

unread,
Nov 10, 2010, 11:28:34 AM11/10/10
to design-and-analy...@googlegroups.com
Not exactly the same road
but stuck at the same place

the difference
is in the summation
at ** the series must start from 0 

\sum_{k=0}^{n} ar^k = ar^0+ar^1+ar^2+ar^3+\cdots+ar^n. \,

to apply the result

\sum_{k=0}^{n} ar^k = \frac{a(1-r^{n+1})}{1-r}.


T(1) = 2
T(n)= 2T(n/2)+2
= 2(2T(n/[2^2])+2) + 2
= [2^2]T(n/[2^2]) + [2^2] + 2
= [2^2](2T(n/[2^2])+2) + [2^2] + 2
= [2^3]T(n/[2^3]) + [2^3] + [2^2] + [2^1]

= [2^k]T(n/[2^k]) + 2^k + .. . + 2^2 + 2^1
= [2^k]T(n/[2^k]) + 2[2^k-1 + .. . + 2^1 + 2^0]  **

= [2^k]T(n/[2^k]) + 2[2^K - 1]

Let (n/[2^k]) = 1
=> n = 2^k

= T(n) = nT(1) + 2(n -1)
= T(n) = 2n + 2n - 2
= T(n) = 4n -2

but I having difficulty with the iductive step of the proof

regards

Irwin Williams

unread,
Nov 10, 2010, 11:53:51 AM11/10/10
to design-and-analy...@googlegroups.com

Kyle E. deFreitas

unread,
Nov 10, 2010, 12:34:22 PM11/10/10
to design-and-analy...@googlegroups.com
I think that proposed solution makes no sense to the problem

we are trying to show the relationship between

as we assumed that 
2T(k/2) + 2 = 4(k) - 2

we need to show that
2T(k+1/2) + 2 = 4(k+1) -2

but then i not that strong in math...so who am i to say, but his proposal sheds no light on the problem for me

Vincent Ramdhanie

unread,
Nov 10, 2010, 12:38:22 PM11/10/10
to design-and-analy...@googlegroups.com
I just posted a reply. I have no idea how much sense it makes though.

Irwin Williams

unread,
Nov 10, 2010, 1:04:25 PM11/10/10
to design-and-analy...@googlegroups.com
Vince, check this:

We know that T(1) = 2. We are trying to prove that T(n) = 4n-2.

This is trivially true for n = 1:


T(1) = 4(1) - 2
     = 4 - 2
     = 2

Assume


T(k) = 4k - 2
(FROM HERE, is where i diverge)

From the original definition:
T(k+1) = 2T( [k+1] / 2 ) + 2
//since we assumed up to T(k) is correct and (k+1)/2 is less than T(k), we substitute:

So, We have 2( 4( (k+1) /2) - 2  ) + 2
= 4(k+1)- 4 + 2
= 4(k+1) - 2
//Proven, since this answer is of the form we're looking for.

Kyle E. deFreitas

unread,
Nov 10, 2010, 1:12:38 PM11/10/10
to design-and-analy...@googlegroups.com
Das actually a really good solution

lol

Vincent Ramdhanie

unread,
Nov 10, 2010, 1:13:55 PM11/10/10
to design-and-analy...@googlegroups.com
cool

Irwin Williams

unread,
Nov 10, 2010, 1:14:40 PM11/10/10
to design-and-analy...@googlegroups.com
Vince, could you reply and update your answer so I can mark it accepted?

vramd...@gmail.com

unread,
Nov 10, 2010, 1:41:20 PM11/10/10
to design-and-analy...@googlegroups.com
Will do. Give me about 30 mins.

Sent from my BlackBerry® wireless device available from bmobile.


From: Irwin Williams <irwin.w...@gmail.com>
Date: Wed, 10 Nov 2010 14:14:40 -0400
Subject: Re: Induction question

Vincent Ramdhanie

unread,
Nov 10, 2010, 3:02:35 PM11/10/10
to design-and-analy...@googlegroups.com
Irwin,
I updated the answer with your modifications.
Thanks
Vincent
Reply all
Reply to author
Forward
0 new messages