In: Computer Science
1. Give a direct proof that if n is an odd integers, then n3 is also an odd integer.
2. Give a proof by contradiction that the square of any positive single digit decimal integer cannot have more than two decimal digits.
Ans 1: For N to be an odd integer, N will be of the form 2n+1.
(2n+1)3= (2n)3+ (1)3 + 3*2n*1*(2n+1)
(2n)3 ---> even term
3*2n*1*(2n+1) -----> multiplication of even and odd is always even.
therefore, 3*2n*1(2n+1)+(2n)3 is an even term and adding 1 to this even term gives odd an odd number.
Hence, if n is odd integer, then its cube i.e. n3 is always an odd integer.
Ans 2: Assuming the square of the single digit number is of the form, 100*x +10*y +z, where x is not equal to 0.
For the above term to be minimum let x=1, y=0, z=0, then the resultant number is 1*100+0*10+0= 100
The square root of smallest 3 digit number 100, is 10 which is a smallest 2 digit number.
Since Square function is an increasing function, therefore the value for numbers less than 10 in a function of square will be less than 100.
Therefore, the above assumption does not hold true.
Hence, the square of any positive single digit decimal integer cannot have more than two decimal digits.