Posts

practice problems pending

Q1. The two sides of a triangle are 2 cm and 7 cm. Find the number of possible lengths of the third side. (The length of three sides of the triangle is an integer value) Solution: a + 2 > 7 a + 7 > 2 7 + 2 > a => a < 9 a > -5 a > 5 => 5 < a < 9 => a = 6,7,8 Answer: 3 Q2. Only using triangle inequality The three sides of a triangle are 9 cm, 7 cm and 12 cm. Which of the following can be a median of the triangle? 12,14,15,16 Solution: If the median is falling upon side length 12,then the triangles are: 9,6,x(median length) 7,6,x Only value of x satisfying both triangle inequalities here is: 12(from the given options). Similarly, If the median is falling upon side length 9,then the triangles are: 12,4.5,y(median length) 7,4.5,y From the given options, none satisfies both. Similarly, If the median is falling upon side length 7,then the triangles are: 12,3.5,z(median length) 9,3.5,z From the given options, 12 satisfies both. So answer is 12. Though it's ...

practice problems

Image
Q. An integer is assigned to each vertex of a cube. The value of an edge is defined to be the sum of the values of the two vertices it touches, and the value of a face is defined to be the sum of the values of the four edges surrounding it. The value of the cube is defined as the sum of the values of its six faces. Suppose the sum of the integers assigned to the vertices is 34 . What is the value of the cube? Solution: Each vertex is part of 3 edges. Each edge is part of 2 faces. So each vertex gets added 6 times. 34*6 = 204 = Answer Q. Suppose you are asked to fill up a 5×5 grid with any 25 natural numbers such that the sum of numbers in each row is even and each column is odd. Do there exist such a configuration? Solution: No. If each row sum is odd, then total grid sum = odd + odd + odd + odd + odd = 5 odds added = odd But by the same logic for columns it's even. So no. Q. Solution: Factorize: How? Try with (x^(2^3) - y^(2^3)) which is x^8 - y^8 = (x^4 - y^4) (x^4 + y^4) = (x^...

practice problems

 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: ...

Why every integer is congruent to sum of its digits modulo 9

Let the number have 'k' digits. So the number is: d_k.10^k + d_(k-1).10^(k-1) ... d_0.10^0 Take mod 9. Any power of 10 mod 9 = 1 so the result is: d_k + d_(k-1) ... d_0 which is sum of its digits. So any 2 integers which have same digits will have same remainder upon division by 9.

practice problems pending

Q. Determine the smallest prime that does not divide any five-digit number whose digits are in a strictly increasing order. Solution: 2 doesn't work: 12346 3,5 don't work: 12345 7 doesn't work: 12348 (since 348-12 = 336 div by 7) 11 => abcde => a-b + c-d + e a-b <= -1 c-d <= -1 5<=e <= 9 Max sum = 7 Total sum can never be <= 0 because e + a + c > b + d always. Why? Because e > d c>b. So sum can never be 0 or multiple of 11. 11 is the answer. For finding the min value, also see: a + (c-b) + (e-d) 1     1           1 So min value is 3 Q. Suppose for some positive integers ( r ) and ( s ), the number ( 2^r ) is obtained by permuting the digits of the number ( 2^s ) in decimal expansion. Prove that ( r = s ). Solution: Since both the number have same number of digits('d') and same sum of digits, we use those properties. Sum of digits is same =>  2^r = 2^s mod 9 Why? Proof here. WLOG r >= s => 2^(r-s) =...

practice problems pending

Image
Q. How many non-negative integers can be written in the form: a7.3^7 + a6.3^6 ... a0.3^0 where a_i belongs to {-1,0,1} for i = 0 to 7 Solution: Let's say all a_i are 1 Then it's a GP: 3^7 + 3^6 .. 3^0 Sum = 1 * (3^8 - 1)/3-1 = (3^8 - 1)/2 So this is the max value of this expression. Similarly the min value will be: -(3^8 - 1)/2 So total possible integers in the min to max range =  (3^8 - 1)/2 - - (3^8 - 1)/2 + 1 = 3^8 - 1 + 1 = 3^8 Now, let's compute how many total ways are there to choose all possible combinations of a_i? Each a_i can be chosen in 3 different ways so 3^8. Aha! So number of ways to choose all a_i is same as the min to max range. Now, we have to prove that each different combination of a_i generates a distinct integer. Let's prove that by contradiction. Let a0.3^0 + a1.3^1 ... a7.3^7 = b0.3^0 + b1.3^1 ... b7.3^7 Then sigma[(ai-bi).3^i] = 0 where i from 0 to 7 Take mod by 3 => sigma[(ai-bi).3^i] = 0 mod 3 Let ai-bi = ci => c0.3^0 + c1.3^1 .. c7.3^7 ...

Chinese remainder theorem

A good video here .  How do you find 'x' s.t. x = 3 mod 11 x = 4 mod 7 x = 1 mod 5 First check that 5,7,11 are pairwise co-prime. Done. Then we write 'x' as sum of 3 numbers in a way that 2 of them disappear when taking mod by any of 5,7,11 So x = a.7.11 + b.5.11 + c.5.7 If I do x mod 5, I will get a.7.11 mod 5 and rest 2 numbers will disappear. Same for 7 and 11. Now I need to ensure that a.7.11 mod 5 = 1. For this we do trial and error and start with a = 1 a.77 mod 5 = a.2 mod 5 = 1 => a = 1,2 doesn't work. a = 3 works. b.55 mod 7 = 4 => b.6 mod 7 = 4 => b = 3 c.35 mod 11 = c.2 mod 11 = 3 => c = 1,2,3,4,5,6 don't work. c = 7 So x = 3.77 + 165 + 245 = 231 + 410 = 641 Test 641 mod 5 = 1 641 mod 7 = 4 641 mod 11 = 3 So it works. But there are multiple such solutions. They are of the form: 641 + lcm(5,7,11).k = 641 + 385k And smallest positive value would be 641 - 385 = 256