Tuesday, July 23, 2013

"We're playing a game. Cards numbered from 1-10 are placed in a hat. whatever card is drawn is the paid out amount. how much should i charge you to play this game? If you can redraw by placing the first card back into the hat, what is the new price?"


Tuesday, March 19, 2013

How many passes does it take to fill in slots so that max number of people are happy


 There are 5 slots(1,2,3,4,5) and 5 people(A,B,C,D,E). Each of them provide their preferences. A=1, B=2, C=3, D=4, C=4. Given an arbitary starting sequence say BCDEA, going clock wise: how many passes does it take to fill in those slots so that max number of people are happy. People are happy if A gets 1, B gets 2, C gets 3, etc. Remember D and E cannot be kept happy together at the same time because both of them prefer Slot-4.
So Question is : Can you do better than N passes?

Suppose you reach your home and noticed that the light bulb in your corridor is not working. What will you do in such a situation?


Saturday, November 3, 2012

If 1.5 dogs eat 1.5 pounds of meat in 1.5 days, how much will 16 dogs eat in 4 days?

1.5 dogs eat 1.5 pounds of meat in 1.5 days this means that 1.5 dogs eat 1 pound of meat/day
or to get rid of the decimal, 3 dogs eat 2 pounds of meat/day so 16 dogs would eat 32/3 pounds of meat/day
because 2*16/3=32/3 so in 4 days they will have eaten 128/3 pounds of meat because 4*32/3=128/3

the answer is therefore 128/3 pounds of meat which can written as 42 2/3 .

we love comment so lets us know if any thing wrong or other way to approach the same :)

Sunday, September 30, 2012

How will you represent (3AC)14 in base 7 numeral system.


It can be done using this formula!
If a no X is represented in base 14 as
X = an a(n-1) a(n-2) .... a(0)
then in base 7 we can write it as
X=.....rqp
where
p=(2^0)a(0)%7;
q=((2^1)a(1) + p/7)%7
r=((2^2)a(2) + q/7)%7
..........
nth term=((2^n)a(n) + (n-1)th term/7)%7
(will go further because a no. in base 14 will require more digits in base 7).
The logic is simple, just based on properties of bases, and taking into account the fact that 7 is half of 14. Else it would have been a tedious task.
Eg. here it is given 3AC.
C =12;
so last digit is (2^0 * 12)%7 = 5
A=10
next digit is (2^1 * 10 + 12/7)%7 = (20+1)%7=21%7=0
next is 3;
next digit is (2^2 * 3 + 21/7)%7 = (12+3)%7=15%7=1
next is nothing(0);
next digit is (2^3 * 0 + 15/7)%7 = (0+2)%7=2%7=2
Hence, in base 7 number will be, 2105.

Now try how you can perform any base to any other base conversion ?

You are given n dice. Each die has m sides i.e has values from 1 to m. Given m,n,x calculate the probability that the sum of all the dice is greater than or equal to x.

Example  n=4 m=2 x=8 ans: 1/16=0.0625  n=2 m=6 x=3 ans:35/36=0.972