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

Pages: (2): « First [ 1 ] 2 » Last »
Math: Proof Help
Author: Message:
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
35 / Male / Flag
Joined: Mar 2004
O.P. Math: Proof Help
Hi,

I have a math question that I'm having trouble proving

[Image: attachment.php?pid=908803]


I know it works for a few integers because I've tested it, but what I'm having problems with is proving that it works for all integers


Could anyone lend a hand and explain how i would prove this? (I'm assuming with proof by induction, but I suck at working out the inductive step :()

.jpg File Attachment: math.JPG (5.67 KB)
This file has been downloaded 394 time(s).
[Image: dt2.0v2.png]      Happy Birthday, WDZ
05-19-2008 04:59 AM
Profile PM Web Find Quote Report
Chrono
forum admin
*******

Avatar
;o

Posts: 6022
Reputation: 116
39 / Male / Flag
Joined: Apr 2002
Status: Away
RE: Math: Proof Help
i dunno if im missing something, but i dont see how would that be true at all O_o

what integers did you try? :P

Anyway, yeah, induction is the way to go for such kind of problems

This post was edited on 05-19-2008 at 05:34 AM by Chrono.
[Image: wdz_discrate.png]
05-19-2008 05:33 AM
Profile PM Web Find Quote Report
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
35 / Male / Flag
Joined: Mar 2004
O.P. RE: Math: Proof Help
quote:
Originally posted by Chrono
i dunno if im missing something, but i dont see how would that be true at all O_o

what integers did you try? [Image: msn_tongue.gif]

Anyway, yeah, induction is the way to go for such kind of problems
works for 1, 99, -10
[Image: dt2.0v2.png]      Happy Birthday, WDZ
05-19-2008 05:45 AM
Profile PM Web Find Quote Report
Chrono
forum admin
*******

Avatar
;o

Posts: 6022
Reputation: 116
39 / Male / Flag
Joined: Apr 2002
Status: Away
RE: Math: Proof Help
1/2 + 2/2 != 1

O_o
[Image: wdz_discrate.png]
05-19-2008 05:51 AM
Profile PM Web Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: Math: Proof Help
floor(1/2) = 0, floor (2/2) = 1, 0+1 = 1 :p
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
05-19-2008 05:58 AM
Profile PM Web Find Quote Report
Chrono
forum admin
*******

Avatar
;o

Posts: 6022
Reputation: 116
39 / Male / Flag
Joined: Apr 2002
Status: Away
RE: Math: Proof Help
bah sorry, i thought those where regular parenthesis :P My mistake

Edit:
Ok it's been a few years already since i solved these kind of problems for the last time, so i dunno if it's right :P

It works for 0:

floor(0) + floor(1/2) = 0

Now let's say it works for n

floor(n/2) + floor((n+1)/2) = n

then we can add 1

floor(n/2) + floor((n+1)/2) +1 = n+1

floor((n+2)/2) + floor((n+1)/2) = n+1

floor(((n+1)+1)/2) + floor((n+1)/2) = n+1

tadda :zippy:

This post was edited on 05-19-2008 at 06:21 AM by Chrono.
[Image: wdz_discrate.png]
05-19-2008 06:02 AM
Profile PM Web Find Quote Report
Volv
Skinning Contest Winner
*****

Avatar

Posts: 1233
Reputation: 31
34 / 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
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
35 / Male / Flag
Joined: Jan 2006
RE: Math: Proof Help
quote:
Originally posted by Chrono
bah sorry, i thought those where regular parenthesis :P My mistake

Edit:
Ok it's been a few years already since i solved these kind of problems for the last time, so i dunno if it's right :P

It works for 0:

floor(0) + floor(1/2) = 0

Now let's say it works for n

floor(n/2) + floor((n+1)/2) = n

then we can add 1

floor(n/2) + floor((n+1)/2) +1 = n+1

floor((n+2)/2) + floor((n+1)/2) = n+1

floor(((n+1)+1)/2) + floor((n+1)/2) = n+1

tadda :zippy:
You suck at induction :dodgy:

...
then we can add 1

floor(n+1/2) + floor(((n+1)+1)/2) = n+1
floor((n+1)/2) + floor((n+2)/2) = n+1
floor((n+1)/2) + floor(n/2 + 1) = n+1

floor(a + 1) = floor(a) + 1 as 1 is an integer

floor((n+1)/2) + floor(n/2) + 1 = n+1
floor(n/2) + floor((n+1)/2) + 1 = n+1

substitue n from (1)
n+1 = n+1
therefor true for n+1 for all n
take n=0 (as proven), then n=1 is also true, then n=2 is also true and so on and so forth

similarly the same can be proven for -1 using the same methods and thus applies from n=0, hence this is proven where n is any integer

EDIT: Volv gets full marks...

This post was edited on 05-19-2008 at 09:45 AM by markee.
[Image: markee.png]
05-19-2008 09:43 AM
Profile PM Find Quote Report
Basilis
Veteran Member
*****

Avatar
Olympiacos CFP

Posts: 1366
Reputation: 46
30 / Male / Flag
Joined: Dec 2007
RE: Math: Proof Help
Wow Volv. You left me ecstatic. (Y)
[Image: logo1nu1.png]
05-19-2008 10:33 AM
Profile PM Find Quote Report
Volv
Skinning Contest Winner
*****

Avatar

Posts: 1233
Reputation: 31
34 / Male / Flag
Joined: Oct 2004
RE: Math: Proof Help
:D
I think it would be possible to prove it logically rather than through induction as well:

Prove floor(n/2) + floor(n/2 + 1/2) = n

LHS:
If n is even then n/2 = x where x is a whole number (integer)
Therefore floor(n/2) + floor(n/2 + 1/2)
= floor(x) + floor(x + 1/2)
= x + x
= 2x
= n
= RHS

If n is odd then n/2 = x + 1/2 where x is a whole number (integer)
Therefore floor(n/2) + floor(n/2 + 1/2)
= floor(x + 1/2) + floor(x + 1/2 + 1/2)
= x + x + 1
= 2x + 1
= 2(x + 1/2)
= n
= RHS

Therefore for any odd or even numbers it will be true (i.e. true for all integers). You can say that 0 is included under even numbers or prove it manually.

I think this is probably a better proof than induction considering that my proof for negative numbers by induction required this sort of logical analysis anyway. I guess it depends on the topic you're studying and whether they've specified a certain method.

This post was edited on 05-19-2008 at 11:08 AM by Volv.
05-19-2008 10:52 AM
Profile PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« Next Oldest Return to Top Next Newest »


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