practice problems - pending
Q. Find the last digit of (((3^13) ^ 13) ^ 13...)
Solution:
Powers of 3 cycle with a period of 4
So 3^13 mod 10 = 3
And again it's the power 13 and so on.
So mod 10 will always be 3.
Answer: 3
Q. floor(x) = -(ceiling(-x))
True or False?
True.
You can try with 0, +ive, -ive integers. +ive, -ive fractional numbers.
Q. The square of a number ending with 25 , must end with 625 . True or false?
True
Solution:
(100x + 25) = 10000x + 5000x + 625 mod 1000 = 625 always
Q. 2x = ceil(x) + floor(x.floor(x))
Find the number of non integer solutions for x.
LHS is an integer.
So x is either an integer or integer + .5
We need to find non-integer solutions so consider x = n + 0.5
2n + 1 = n + 1 + floor((n + 0.5).n)
n = floor(n^2 + 0.5n) = n^2 + floor(0.5n)
Case 1:
If n is even integer, RHS > LHS except when n = 0
n = 0 => x = 0.5
Case 2:
n is odd.
n = n^2 + n/2 - 1/2
n^2 -n/2 - 1/2 = 0
2n^2 - n - 1 = 0
2n(n-1) -1(n-1) = 0
n = 1/2,1
n is an integer so n = 1
x = 1.5
So 2 solutions:
0.5,1.5
Q. 2x = floor(abs(x)) - abs(floor(x))
How many integers are in the range of this function?
Where x is any real number.
Solution:
Only 2 integers are in its range. 0 and -1
Try cases:
0,
positive,negative integer
positive,negative fractional numbers
Comments
Post a Comment