Showing posts with label Medium. Show all posts
Showing posts with label Medium. Show all posts

Thursday, 10 October 2013

Coin Tossing Experiment

Consider a coin tossing experiment. Let X be the number of heads if you toss a coin for 99 times. Let Y be the number of heads if you toss a coin for 100 times. What is the probability that X is less than Y?

Tuesday, 17 September 2013

House with too many doors

Have a look at the house plan at the right hand side, with five rooms and sixteen doors in total. The intention is to make a run through the rooms and pass each of the sixteen doors exactly once.
How many ways can it be done?

Saturday, 14 September 2013

Taxi Service

Mr. Kothari runs a taxi service in Ahmedabad. Every day, he travels from Ahmedabad to one nearby city and back. All the cities are less than 100 km away from Ahmedabad. Everyday morning, Mr. Kothari fills his car’s fuel tank to the brim. On a full tank, the car can travel maximum 250 km. Unfortunately, Mr. Kothari forgot to fill his tank today. What is the probability that he will run out of fuel during the day?

Thursday, 18 July 2013

Maximize the product

Using the digits 1 up to 9, two numbers must be made. The product of these two numbers should be as large as possible. All digits must be used exactly once.
What are these 2 numbers?

Thursday, 7 March 2013

Hole and the Board - 2

Cut this board into only 2 pieces so that they fit into the given hole.




Thursday, 7 February 2013

Descending down a building

You need to descend down a 200m building but you only have a 150m long rope. There is a hinge present at  the top and also at the 100m level of the building. How will you descend down?

Saturday, 26 January 2013

6 Colored balls

We have two red, two green and two yellow balls. For each color, one ball is heavy and the other is light. All heavy balls weigh the same. All light balls weigh the same. How many weighing on a beam balance are necessary to identify the three heavy balls?

Tuesday, 23 October 2012

2n digit number

i) Consider a 4 digit number abcd. Will there exist a 'k' such that
abcd = k*ab*cd
If so, find the k and abcd?
ii) Now, consider a 6 digit number abcdef. Will there exist a 'k' such that 
abcdef = k*abc*def
If so, find the k and abcdef?
iii) Using these 2 results, what can you conclude about a existence of a 'k' for a generic 2n digit number?

Maximum and Minimum of array

Find the maximum and minimum of an array of 'n' numbers using only 3n/2 comparisons.

PS: This question was given to us in the DS class.

Saturday, 20 October 2012

Color matching in concentric circles

A circle is divided into 8 equal sectors. Half are coloured red and half are coloured
blue. A smaller circle is also divided into 8 equal sectors, half coloured red and half
coloured blue. The smaller circle is placed concentrically on the larger. Prove that
no matter how the red and blue sectors are chosen it is always possible to rotate the
smaller circle so that at least 4 colour matches are obtained.

Saturday, 13 October 2012

Monte Hall Variant - 2

Continuing to the previous problem, if each door contain a car with probability 'p'.
What will be your decision to the options listed in previous post?
Also, at what value of 'p' will you change your option?

Sunday, 16 September 2012

13 coins

You are given 13 coins out of which one is defected. You don't know the defect 'heavy' or 'light'. Also you are given an authentic coin. You are allowed to use weighing balance 3 times. Give a strategy to find the defected coin and its defect.

NOTE: This is in continuation to the puzzle "Balls and Weighing Balance". If you are asked to only the defected coin, you can do so without the authentic coin also. But to find the defect, you need to figure out a new strategy making use of authentic coin.
Just, to avoid confusion, total coins would be 14(13 + 1authentic coin)

Grid Infection

In an n by n grid of squares, two squares are neighbors if they share an edge. Initially, some squares are "infected". At successive clock ticks, an uninfected square gets infected if at least two of its neighbors are infected. How many squares must initially be infected so that all squares eventually get infected?

Fox in a Hole

Consider 'n' holes in a line. One of them is occupied by a fox. Each night, the fox moves to a neighboring hole, either to the left or to the right. Each morning, you get to inspect a hole of your choice. What strategy would ensure that the fox is eventually caught?

Poison in Drink????

There was a booz party going on with many guests. Some of the guests left early after enjoying their drinks. While the others drank overnight. Next morning, news came out that everyone in the booz party died due to poison. Only those who left did not died. Figure out the source of poison when the same drink drank by the early leavers were able to survive. It has nothing to do with the quantity of poison consumed.

Monday, 13 August 2012

Varaint of a 10 digit number

Consider a 10-digit number A written as a_1a_2...a_10. A contains each of the digits from 0 to 9 exactly once. The number a_1 is divisible by one. The number a_1a_2 is divisible by two. The number a_1a_2a_3 is divisible by three, and so on...What is A?

A 10 digit number

Consider a 10-digit number A written as a_0a_1a_2...a_9. Now, suppose a_0 is the number of times the digit '0' appears in A; a_1 is the number of times '1' appears in A, and so on... a_9 is the number of times '9' appears. What is A?

Bulbs & Switches

Suppose you have 'n' lightbulbs and 'n' switches that correspond to each of the lightbulbs. Initially, all the lightbulbs are turned off. After you flip a switch, the corresponding lightbulb turns on. If you flip the same switch again, the lightbulb turns off. Each switch corresponds to only 1 lightbulb and vice versa. After 'k' random switches are flipped, what is the expected number of lightbulbs turned on?

Saturday, 11 August 2012

Pieces of a Stone

Consider a stone of 'n' kg. What is the minimum number of pieces should the stone be broken so that you can measure all the weights from 1 to 'n' kg in a weighing balance (taraju)? What should be the weight of the each individual piece?

Thursday, 9 August 2012

Four Digit Whole Number

Find a four digit number 'n' such that the last 4 digits of n^2 are same as that of n