Hard | Discrete Maths |

We have a beam balance (with two pans to compare weights) and a positive integer N. How do we select fewest number of pebbles to weigh all possible integers from 1 to N

Solution

We will require the set (1,3,9.....3^x )

where x is lowest integer with 3^x > N. This is true because each number now has exactly one ternary representation. Any 2*3^i can always be represented as 3^(i+1) - 3^i. So, there is a unique way of representing a number in the form of sigma s_i*3^i where s_i belongs to {0, 1, -1}. So, this is optimal

Verify that this can be used to weigh all integers from 1 to N

Number of pebbles = log_{base:3} (2N+1)

Solution by Palak Bhushan

If each weight w_i has k copies, then 2k+1 combinations can be weighed using them (from -k*w_i to 0 to k*w_i). So, if we choose w_i = (2k+1)^{i-1}, i=1...p, then everything till k*((2k+1)^p - 1)/((2k+1)-1) = ((2k+1)^p-1)/2 can be weighted, thus requiring p=log_{2k+1} (2N+1) number of distinct weights.

where x is lowest integer with 3^x > N. This is true because each number now has exactly one ternary representation. Any 2*3^i can always be represented as 3^(i+1) - 3^i. So, there is a unique way of representing a number in the form of sigma s_i*3^i where s_i belongs to {0, 1, -1}. So, this is optimal

Verify that this can be used to weigh all integers from 1 to N

Number of pebbles = log_{base:3} (2N+1)

Solution by Palak Bhushan

If each weight w_i has k copies, then 2k+1 combinations can be weighed using them (from -k*w_i to 0 to k*w_i). So, if we choose w_i = (2k+1)^{i-1}, i=1...p, then everything till k*((2k+1)^p - 1)/((2k+1)-1) = ((2k+1)^p-1)/2 can be weighted, thus requiring p=log_{2k+1} (2N+1) number of distinct weights.

Source: leino

Enable Like and Comment Hard | Discrete Maths |

Several gas stations on a circular trek have between them just enough gas for one car to make a complete round trip. Prove that if you start at the right station with an empty tank you shall be able to make it all the way around.

Hint

Induction

Solution

Take N=2 gas stations. Assume their capacities are x1 and x2 (in terms of distance). Now, x1+x2 = 1. Assume y1 and y2 be clockwise distances from 1 to 2 and 2 to 1 (clockwise), y1+y2 = 1. Hence we cant have x1<y1 and x2<y2 both. Thus, let x1 >= y1. In this case we start with station 1 and complete the journey. Assume the path is possible for N=K stations, we want to prove for N = K+1 stations, using same argument as above, xi>=yi for some i, and hence reaching xi with zero fuel ensures reaching x(i+1). Thus we merge xi and x(i+1), and the problem is reduced to N=K stations, which we assumed!

Another method is to imagine having a big tank with enough gas for a round trip and enough room for going through the motions of emptying every gas station on your way. Start at any station and mind to record the amount of gasoline on reaching gas stations on your way around. At the end of the trip, when you pull into the station of departure with the original amount of gas, check your list. The station marked with the least number is the one where you want to start on an empty tank.

Another method is to imagine having a big tank with enough gas for a round trip and enough room for going through the motions of emptying every gas station on your way. Start at any station and mind to record the amount of gasoline on reaching gas stations on your way around. At the end of the trip, when you pull into the station of departure with the original amount of gas, check your list. The station marked with the least number is the one where you want to start on an empty tank.

Source: P. Winkler

Enable Like and Comment Hard | Discrete Maths |

Can you pack 53 bricks of dimensions 1x1x4 into a 6x6x6 box? The faces of the bricks are parallel to the faces of the box

Hint

See its cousin called Domino Covering in which two opposite corners of a checkerboard are removed.

Answer

No!

Solution

Divide the volume of 6x6x6 box into 2x2x2 mini cubes. Imagine each of these mini cubes is either fully red or fully blue such that it forms a 3D checkerboard pattern on the box. This will restrict 14-13 restriction on cube colors, say 14 blue and 13 red. Now, putting bricks into box, parallel to faces, each brick will be half blue and half red, so 52 bricks fill all the red cubes and there is no way to place a 53rd brick.

Source: Xinfeng Zhou

Enable Like and Comment Hard | Discrete Maths |

An optimist and a pessimist are examining a sequence of real numbers. The optimist remarks, ‘Oh jolly! The sum of any eight consecutive terms is positive!’ But the pessimist interjects, ‘Not so fast, the sum of any five consecutive terms is negative.’ Can they both be right? Atmost how large can this sequence be?

Hint

One easy proof is to construct rows, starting from ai, and satisfying one of the sum properties - optimist or pessimist. The column sum can follow the other property. Try making a contradiction.

Answer

11

Solution

Suppose such a sequence with terms {ai} has length 12

a1+a2+...+a5<0

a2+a3+...+a6<0

..

a8+a9+...+a12<0

Note that rows sums are negative and column sums are positive. This is contradiction to the total sum! So max length of sequence is 11. This sequence can be constructed but we wont cover the instruction. Example: 1 at positions 1,3,4,6,8,9,11 and -1.6 at positions 2,5,7,10.

a1+a2+...+a5<0

a2+a3+...+a6<0

..

a8+a9+...+a12<0

Note that rows sums are negative and column sums are positive. This is contradiction to the total sum! So max length of sequence is 11. This sequence can be constructed but we wont cover the instruction. Example: 1 at positions 1,3,4,6,8,9,11 and -1.6 at positions 2,5,7,10.

Source: Arthur Engel

Enable Like and Comment Hard | Discrete Maths |

We want to construct a structure made as follows: imagine that two long cylindrical pillars each with radius 1 intersect at right angles and their centers also intersect. What is the volume of this intersection?

Answer

16/3

Solution

If you cut the intersection by a horizontal plane at distance z from center, the cut will be a square with side-length 2*sqrt( 1-z^2). Integrate to get volume 16/3.

Another way is to imagine the largest possible sphere inscribed at the center of intersection. The sphere should have a radius of 1. At each cut perpendicular to the z-axis, the circle from the sphere is inscribed in the square from the intersection as well, So Area of cut-circle = (Pi/4)*Area of cut-square. This is true for all z, hence Volume of sphere = (Pi/4)*Volume of Intersection, this also gives 16/3

Another way is to imagine the largest possible sphere inscribed at the center of intersection. The sphere should have a radius of 1. At each cut perpendicular to the z-axis, the circle from the sphere is inscribed in the square from the intersection as well, So Area of cut-circle = (Pi/4)*Area of cut-square. This is true for all z, hence Volume of sphere = (Pi/4)*Volume of Intersection, this also gives 16/3

Latest solved Puzzles

Color Switches Weird Sequences Intersecting Pillars Consecutive sums Scaling a Square Difficulty Level

© BRAINSTELLAR |