What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » General » General Chit Chat » Math: Proof Help

Math: Proof Help
Author: Message:
Volv
Skinning Contest Winner
*****

Avatar

Posts: 1233
Reputation: 31
35 / Male / Flag
Joined: Oct 2004
RE: Math: Proof Help
Ok, now I'm not sure the norm for calculating for all integers (usually induction questions ask for all positive XOR negative integers). But this is how I would do it:

Prove true for n = 0

LHS:
= floor(0/2) + floor[(0+1)/2]
= floor(0) + floor(0.5)
= 0

RHS:
= n
= 0

LHS = RHS, therefore true for n = 0


Now, assume true for n = k
i.e.
floor(k/2) + floor[(k+1)/2] = k
NOTE: This rearranges to floor(k/2) = k - floor[(k+1)/2] used later in our proof.

Prove true for n = k + 1
i.e. Prove floor[(k+1)/2] + floor[(k+2)/2] = k + 1
LHS:
= floor[(k+1)/2] + floor[(k+2)/2]
= floor[(k+1)/2] + floor(k/2 + 2/2)
= floor[(k+1)/2] + floor(k/2 + 1)
= floor[(k+1)/2] + floor(k/2) + 1
= floor[(k+1)/2] + k - floor[(k+1)/2] + 1  <------- we assumed that it's true for n = k so sub in the assumption here (the bolded part above)
= k + 1
= RHS

Therefore if it is true for n = k, then it is also true for n = k + 1
Therefore since it is true for n = 0, it must also be true for n = 0 + 1 = 1, and since it is true for n = 1 it must also be true for n = 2, and so on for all positive integers n >= 0.

Now we've proven it for positive integers (and 0), we want to prove it for negative integers too (so as to include all possible integers n as requested in the question)

Therefore:
Prove true for n = k - 1
i.e. Prove floor[(k-1)/2] + floor(k/2) = k - 1
LHS:
= floor[(k-1)/2] + floor(k/2)
= floor[(k-1)/2] + k - floor[(k+1)/2]   <---- we just substituted in our assumption again for floor(k/2)
= k + floor[(k-1)/2] - floor[(k+1)/2]
= k + floor(k/2 - 1/2) - floor(k/2 + 1/2)

        DETOUR:
        Now, we know that k is an integer, if it is an odd integer then k/2 would be: x + 1/2 where x is an integer (eg. 5/2 = 2 + 1/2)
        floor(x + 1/2 - 1/2) = floor(x ) = x
        floor(x + 1/2 + 1/2) = floor(x+1) = x + 1
        Therefore floor(x + 1/2 - 1/2) - floor(x + 1/2 + 1/2) = -1

        If k were an even integer, then k/2 would be: x where x is an integer (eg. 4/2 = 2)
        floor(x - 1/2) = x - 1
        floor(x + 1/2) = x
        Therefore floor(x - 1/2) - floor(x + 1/2) = -1

        So for any integer k, floor(k/2 - 1/2) - floor(k/2 + 1/2) = -1

        Now back to our proof:

= k + floor(k/2 - 1/2) - floor(k/2 + 1/2)
= k - 1
= RHS

There if it is true for n = k, then it is also true for n = k - 1
Therefore since it is true for n = 0, it must also be true for n = 0 - 1 = -1, and since it is true for n = -1 it must also be true for n = -2, and so on for all negative integers n < 0

Now we've proven it for negative integers as well as the positive integers (and 0) earlier.
Therefore, it is true for all integers n (positive, negative, 0)

This post was edited on 05-19-2008 at 09:46 AM by Volv.
05-19-2008 09:36 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Math: Proof Help - by -dt- on 05-19-2008 at 04:59 AM
RE: Math: Proof Help - by Chrono on 05-19-2008 at 05:33 AM
RE: Math: Proof Help - by -dt- on 05-19-2008 at 05:45 AM
RE: Math: Proof Help - by Chrono on 05-19-2008 at 05:51 AM
RE: Math: Proof Help - by ShawnZ on 05-19-2008 at 05:58 AM
RE: Math: Proof Help - by Chrono on 05-19-2008 at 06:02 AM
RE: Math: Proof Help - by Volv on 05-19-2008 at 09:36 AM
RE: Math: Proof Help - by markee on 05-19-2008 at 09:43 AM
RE: Math: Proof Help - by Basilis on 05-19-2008 at 10:33 AM
RE: Math: Proof Help - by Volv on 05-19-2008 at 10:52 AM
RE: Math: Proof Help - by Chrono on 05-20-2008 at 01:27 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On