Easy | General |

Light bulbs are numbered 1 to 100, and kept off initially. First person comes and toggles all the bulbs which are multiple of 1, i.e. he switches all bulbs to on. Second person toggles all multiples of 2, i.e he turns of even bulbs. Third person comes and toggles all multiples of 3. This process continues till 100 persons pass. After this, how many bulbs are ON?

Hint

Consider the bulb number 9.

Answer

10 bulbs

Solution

We notice that for a perfect square (like 9), the number of factors are always odd, for example:

Number of factors of (16) = # [1,2,4,8,16] = 5

Note that for non-square numbers, factors are even.

As a factor toggles the state of a bulb, bulb number 9 will be toggled by 1,3 & 9. Thus bulb number 9 will switch ON, OFF, ON respectively. Note that odd number of factors cause bulb 9 to be ON at the end.

We note that for odd number of factors is the cause of bulb staying on at the end. Similarly every squared digit bulb will be switched on, and rest will remain off after all factors toggle. Thus the bulbs 1,4,9....81,100 are ON, at the end. Hence 10 bulbs are on.

Number of factors of (16) = # [1,2,4,8,16] = 5

Note that for non-square numbers, factors are even.

As a factor toggles the state of a bulb, bulb number 9 will be toggled by 1,3 & 9. Thus bulb number 9 will switch ON, OFF, ON respectively. Note that odd number of factors cause bulb 9 to be ON at the end.

We note that for odd number of factors is the cause of bulb staying on at the end. Similarly every squared digit bulb will be switched on, and rest will remain off after all factors toggle. Thus the bulbs 1,4,9....81,100 are ON, at the end. Hence 10 bulbs are on.

Easy | General |

Without explicitly calculating, find out which is bigger: e^Pi or Pi^e?

Answer

e^Pi

Solution

This is a common placement test question. Since e^x = 1 + x…., we have e^x>1+x. Now, conveneintly choosing x = (Pi / e -1) and solving, we get e^Pi > Pi^e.

Another way is to observe for f(x) = x^(1/x), differentiating: f'(x) = f(x)*(1/x^2)*(1- ln x); f is decreasing for x > e so pi^(1/pi) < e^(1/e); hence e^(pi)> pi^(e)

Another approach is to assume e^Pi > Pi^e <=> Pi*lne > e*ln Pi <=> lne/e > lnPi/Pi. Now, notice that f(x) = lnx/x is decreasing function since f'(x) is negative in range (e<x<pi), hence above assumption is true!

Another way is to observe for f(x) = x^(1/x), differentiating: f'(x) = f(x)*(1/x^2)*(1- ln x); f is decreasing for x > e so pi^(1/pi) < e^(1/e); hence e^(pi)> pi^(e)

Another approach is to assume e^Pi > Pi^e <=> Pi*lne > e*ln Pi <=> lne/e > lnPi/Pi. Now, notice that f(x) = lnx/x is decreasing function since f'(x) is negative in range (e<x<pi), hence above assumption is true!

Easy | General |

100 pirates stand in a circle. They start shooting alternately in a cycle such that 1st pirate shoots 2nd, 3rd shoots 4th and so on. They continue in circle till only one pirate is left. Which position should Captain Jack Sparrow stand to survive?

Solution

This is not a puzzle at all, this is apti/maths question, but has become quite common. You can calculate for a N=100, 73rd position is safe. For a general N, find largest m such that 2^m < N. Take t = N-2^m. Then Safe position is 2*t + 1. Please learn this formula. No need to prove it using strong induction. Proof: http://en.wikipedia.org/wiki/Josephus_problem#k.3D2

Source: Written Tests

Enable Like and Comment Easy | General |

In a dark room, there is a deck of 52 cards, with exactly 10 cards facing up, rest facing down. You need to split this into two decks with equal number of cards facing up!

Hint

The question can be solved even when up facing cards are 11. The split decks need not have equal number of up-facing cards.

Solution

Create a deck of k cards randomly from the original 52-card deck, (k=10 here) and then turn over the k-card deck. Goal is achieved!

Source: Quant Interview

Enable Like and Comment Easy | General |

You are in a game against devil, on a perfectly round table and with an infinite pile of pennies. He says, "OK, we'll take turns putting one penny down, no overlapping allowed, and the pennies must rest flat on the table surface. The first guy who can't put a penny down loses." You can go first. How will you guarantee victory?

Hint

Try the problem if coins have unit radii, and table has radius 1 & 3.

Solution

You place a penny right in the center of the table. After that, whenever the devil places a penny on the table, mimic his placement by placing a penny diametrically opposite and at same distance from center. If he has a place to place a penny, so will you. The devil will run out of places to put a quarter before you do.

Latest solved Puzzles

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

© BRAINSTELLAR |