quote:
Originally posted by Chrono
bah sorry, i thought those where regular parenthesis 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
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
You suck at induction
...
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
+ 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...