Thursday, January 12, 2012

You have a circle with radius r. What is the probability that a point lies more towards the circumference than towards the centre.



Solution
Probability of point lying close to circumference would be mean point is in the circle with area from r/2 from center till outside in the figure below it would be in blue part of the circle.

Probability = Area covered by circle from point r/2 towards circumference/ Area of the circle
In the above given circle formula would be = Area of blue circle/ Area of circle
= pi r pow 2/ 4 / pi r 2 = 1/4

minimize the time taken by all 4 to cross the bridge.

There is a bridge and to travel on it there should be a torch light available.
Only two persons can cross the bride at a time. There are 4 persons on the other side of the bridge. They require 1,2,5,10 minutes respectively to cross the bridge. How much time should it take for all 4 to go to the other side of the bridge.

Remember there is only one torch light. So if two persons cross the bridge with torch light, one has to come back with torch light for others to use torch light. If person with 1 min and 10 minutes cross the bridge together, they take 10 minutes together to cross the bridge(maximum of the time taken by two people).

Your criteria is to minimize the time taken by all 4 to cross the bridge.


How many regions (open or closed) can n straight lines give at the maximum?

Let f(n) denote the number of regions for n lines no three of which coincide in one point. This latter condition will guarantee the maximum. Obviously, f(0)=1, f(1)=2, f(2)=4, f(3)=7, etc.

Now, given n-1 lines, there are already f(n-1) regions. With the introduction of the n-th line, imagine the points of intersection of the pre-existing n-1 lines fall on one side of the n-th line. So, on one side of the n-th line -- where the points of intersection lie -- you still have f(n-1) regions, whereas on the other side of the n-th line, you now have n regions. So, for these n lines before us, the total number f(n) of regions must be equal to f(n-1)+n.

So, f(n)=f(n-1)+n. With the initial condition(s) given earlier, this gives us f(n)=1+n(n+1)/2.

find the optimal start point on the track such that you never run out of fuel and complete circuit.

You have a circular track containing fuel pits at irregular intervals. The total amount of fuel available from all the pits together is just sufficient to travel round the track and finish where you started. Given the the circuit perimeter, list of each fuel pit location and the amount of fuel they contain, find the optimal start point on the track such that you never run out of fuel and complete circuit.

Wednesday, January 4, 2012

You have a dice which has numbers from 1..6. Another dice is provided to you empty; you need to place numbers on this dice so that whenever both dices are used there is an equal probablity of getting a sum between 1.. 12

Solution::
T
otally there are 6*6 possible combinations from two dices. Since we need the sum from 1..12 with equal probability there should be three combinations among these 36 which sum up to each number in 1 to 12 to achieve a equal probability for all sums.

Other Dice Numbers Presently
_ _ _ _ _ _

G
etting 1 we need 0 on the other dice
Getting 12 we need 6 on the other dice

State of Numbers on other dice now
0 6 _ _ _ _

We need to get SUM=1 in three different combinations and only possibility is 1 and 0 on both dices so put two more 0's on second dice and we have three ways to get 1.

State of numbers on other dice now 0 6 0 0 _ _

Now all the sum's from 7 to 12 can be achieved with one of the numbers be 6 and using the other numbers from first dice. Eg:: 7 can be 1 and 6 from dice 1 and dice2 and if we put two more sixes in dice2 then again 1 and other 6's on dice2 give us 3 ways for seven
Similarly for 8 we can 2 from dice1 and the three sixes one by one we will have 3 ways for 8 and so on for all numbers from 7 to 12. Again we can use the three 0's on dice2 in the similar way we have used three sixes above for getting three ways for sum 1 to 6.

State of numbers on other dice now 0 6 0 0 6 6

Friday, December 9, 2011

In how many ways 3 identical coins can be placed in 5x5 grid so that no two coin come in same row and same column

First coin can be placed in one of 25 places. For second, only 16 places are possible because of the same column and same row condition. Similarly, only 9 places for third coin. So, total ways = 25 * 16 * 9. but since coins are identical you can't distinguish one from another and thus final answer is ( 25*16*9 ) / 3 = 1200.

Feel Free to Let Us Know Your Comment if anything wrong ?

Sunday, October 30, 2011

Two_envelopes_problem

  1. Someone gives you two envelopes with cash inside, and tells you that one of the envelopes has twice as much as the other. You're asked to pick an envelope and open it. You pick Envelope 1 and you open it to reveal $100. Awesome! And now that person asks you if you'd like to switch to Envelope 2, for a cost of merely $5. What should you do ?
  2. The basic setup: You are given two indistinguishable envelopes, each of which contains a positive sum of money. One envelope contains twice as much as the other. You may pick one envelope and keep whatever amount it contains. You pick one envelope at random but before you open it you are offered the possibility to take the other envelope instead.[3]
  3. The switching argument: Now suppose you reason as follows:

  1. I denote by A the amount in my selected envelope.
  2. The probability that A is the smaller amount is 1/2, and that it is the larger amount is also 1/2.
  3. The other envelope may contain either 2A or A/2.
  4. If A is the smaller amount the other envelope contains 2A.
  5. If A is the larger amount the other envelope contains A/2.
  6. Thus the other envelope contains 2A with probability 1/2 and A/2 with probability 1/2.
  7. So the expected value of the money in the other envelope is

    {1 \over 2} (2A) + {1 \over 2} ({A \over 2}) = {5 \over 4}A
  8. This is greater than A, so I gain on average by swapping.
  9. After the switch, I can denote that content by B and reason in exactly the same manner as above.
  10. I will conclude that the most rational thing to do is to swap back again.
  11. To be rational, I will thus end up swapping envelopes indefinitely.
  12. As it seems more rational to open just any envelope than to swap indefinitely, we have a contradiction
  1. The puzzle: The puzzle is to find the flaw in the very compelling line of reasoning above

  1. http://en.wikipedia.org/wiki/Two_envelopes_problem