3 March 2015

Starting Tuesday with a puzzle and an early morning flight…

There is a box with 99 white balls and 101 black balls in it. And you have a lot of white and black balls outside the box. 

You pick two balls at random from the box. If they are a black and a white, you throw the black ball out and put the white ball back in the box. If however, you got two whites or two blacks then you throw both of them out and instead put back a black one from the pile outside.

Now, you keep doing this till you have one ball left in the box.

What color is the ball?

26 February 2015

Whoa! What the heck happened?

This will knock your socks off. I found this on the internet.

Look at the picture on the top. If you do not believe the rest of the puzzle, take a printout on your printer. Now divide the picture horizontally as the line in the middle shows. Look at the top half. Divide it into two parts as the vertical line shows.

Now exchange the position of the two parts on the top. Keep the lower half as is. You get the picture in the bottom portion.

If you do not believe me, carefully check that the bottom half is exactly the same in both pictures and the top right is exactly the same in the top picture as the top left in the bottom picture and vice versa.

So far so good? Count the number of people in the top picture ….15, right?

Now count the number of people in the bottom picture!

Let me repeat the subject line…

Whoa! What the heck happened? 🙂

(null)

6 February 2015

Chessboard puzzle

Here is a simple or complex – depending upon your perspective – puzzle. It is complex if you try to enumerate all possibilities. There is a very simple and elegant way though.

As always, if you are reading this on FB, do not post your answer on Comments section. Sent me a message.

Question: In a simple 8 by 8 chessboard, how many rectangles are there?

As you can imagine a rectangle can be one square by one square – and there are 64 of them – (squares are rectangles) or two squares by one square (and there are quite a few of them) or three squares by five squares and such….

30 January 2015

Puzzle from India

I was enroute from India to USA when I got a call from one of my nephews with the following math problem he was stuck with. I am posting that as the puzzle of this week.

There is a jar with 50 pieces of paper written “1” thru “50” in them. You pick 5 of them at random and lay them out in increasing sequence. What is the probability that the middle number is 30?

1 January 2015

So, that is how I spent my first hours of the New Year!!

I was wondering how to start the year. Figured, let’s do something different.
So, I sat down with the last puzzle I had given and after two hours of putting pen to the paper, finally solved the probability problem. Whew!!! hopefully that would be some mental exercise for the little of whatever remains of the grey cells. Here is the answer…..

(BTW, anybody who cares to actually go thru the solution, please let me know if I have made any calculation errors. I am sure about the logic. And I have double checked the LCMs, GCMs and all that… just in case, I still made a silly mistake, point it out please)

The three people A,B,C get a random sequence, of which there can be 6. Let’s look at those 6 cases one by one.

CASE 1. Sequence: ABC.
Note that A, who goes first, would ether shoot B or C (random). If he shoots B, B is dead (since A is a sure shot). Prob of B surviving is 0. C then shoots at A. Chance of A being shot is 1/2 which means C survives. But if C misses (prob 1/2), A will for sure shoot him in his chance next. So, A, B and C prob are 1/2, 0, 1/2

If A shoots at C, C is dead, B then shoots at A. Prob of A surviving is 1/5 (since B is 80% accurate) but after that A will, for sure, kill B. So, the prob of A, B and C surviving are 1/5, 4/5, 0

Since the target for A is chosen in random, both the cases are equally likely. Therefore weighting the prob equally between the two events, the Case 1 prob for A, B and C surviving are 7/20, 2/5, 1/4. [7/20 equals half of 1/2 plus half of 1/5 etc etc etc)

CASE 2. Sequence: ACB.
You will note that this is same as Case 1. A either shoots B dead first and C shoots at A or A shoots C dead first and then B shoots at A. If A survives in either case, he finishes off C or B as the case might be. Exact situation as above. So the prob for A, B and C are 7/20, 2/5, 1/4.

Before I go to next cases, let us look at the pattern where A is dead (unlike the above case). So we have B and C and one of them will go first.

PATTERN X:
B and C are there alive and B shoots first. The prob of B surviving is when
(*) B shoots C dead with first shot – 4/5 OR
(*) B misses (1/5), but then C misses too (1/2) and then in the second chance, B succeeds (4/5) OR
(*) the same sequence as before except in the last step B misses (1/5) and then again C misses (1/2) and in the third chance B succeeds (4/5) and so on.
That prob would be 4/5 + 1/5×1/2×4/5 + 1/5×1/2×1/5×1/2×4/5 + …. which equals to (4/5) x (1+1/10 + 1/100+…) which equasl to (4/5) x 1.11111… which equals to 0.888888… which is 8/9. So B is 8/9 and C is 1/9.

PATTERN Y:
B and C are there alive but this time C shoots first. The prob of C surviving is when
(*) C succeeds with first shot (1/2) OR
(*) C misses (1/2) but then B also misses (1/5) and then C succeeds in second shot (1/2) OR
(*) same sequence as above except join the last step C misses (1/2) and then B misses again (1/5) and C succeeds in the now third shot (1/2).
That prob would work out to be 1/2 + 1/2×1/5×1/2 + 1/2*1/5*1/2*1/5*1/2+….. which is equal to (1/2) x (1 + 1/10 + 1/100 +…) which is equal to 1/2 x 1.1111… which is equal to 0.55555… which is 5/9. So B and C’s prob are 4/9 and 5/9

Let’s get back to our original cases.

CASE 3. Sequence: BAC.
B can shoot at A first. If he misses (1/5), then now it becomes ABC which is CASE 1. So A, B, C prob are 1/5 of CASE 1 which is 7/100, 2/25 and 1/20.
If however, he did kill A (4/5) now it is he and C left, which C going first – in other words, PATTERN Y. Multiplying PATTERN Y by 4/5, now we have A, B and C as 0, 16/45 and 4/9.
Adding these two cases, we get A, B and C as 7/100, 98/225 and 89/180

Or, B could have shot at C. If he did succeed (4/5), next A is going to shoot him dead. So the prob of surviving (after factoring is the 4/5 prob) are 4/5, 0, 0.
But if he failed in shooting C (1/5), now we have CASE 2!!! Therefore the prob are (1/5 of CASE 2) = 7/100, 2/25 and 1/20.
Adding the above two, we have 87/100, 2/25 and 1/20.

Since B would have picked A or C in random, the probability for CASE 3 is the average of the above two which would work out to be 47/100, 58/225, 49/180

CASE 4. Sequence BCA
I will come to this case later.

CASE 5. Sequence CAB
If C shoots at A then it could either be he succeeds (1/2) and then we have PATTERN X. Thus prob = 1/2 of (0, 8/9 and 1/9) = 0, 4/9 and 1/18
or C could have missed A (1/2) and then we have CASE 1!! Thus prob would be 7/40, 1/5 and 1/8.
Adding the above two, we have 7/40, 29/45 and 13/72

Or, if C shot at B first then it could have been that he either succeeded (1/2) in which case A would kill him next making the prob of A, B and C being 1/2, 0, 0
If C missed (1/2) then we again have CASE 1. Thus as calculated before, the prob are 7/40, 1/5 and 1/8.
Adding the above two, we have 27/40, 1/5 and 1/8.

Since C would have picked A or B in random, we weigh the above two cases equally and now have this Case prob as 17/40, 19/45 and 11/72.

CASE 6. Sequence CBA
If C shoots at B first and succeeds (1/2), A will shoot him dead for sure next. Thus we have the prob as 1/2, 0, and 0
If C however missed B (1/2), we have CASE 3!!!. That would be 1/2 of CASE 3 which is 47/200, 29/225 and 49/360
Combined, the prob are 147/200, 29/225 and 49/360

On the other hand, if C shot at A first,
If C succeeded (1/2), then we have PATTERN X which means the prob is 1/2 of PATTERN X making it 0, 4/9 and 1/18
If C however failed (1/2), we have now CASE 3!! Thus the prob would be 47/200, 29/225 and 49/360
Combined, the prob are 47/200, 129/225 and 69/360

Since C would have picked A or B at random, we average the above two to get the rolling prob: 97/200, 79/225 and 59/360

Now let’s go back to
CASE 4. Sequence BCA
If B shoots at A first and succeeds (4/5), we have PATTERN Y. Prob then is 0, 16/45 and 4/9
But if B failed in killing A (1/5), then we have CASE 5!! Prob then is 1/5 of CASE 5 which is 17/200, 19/225 and 11/360
Together that would be 17/200, 99/225 and 171/360

If B shoots at C first and succeeds (4/5), then next A will for sure kill him making the prob 4/5, 0, 0
But if B failed in shooting C dead (1/5), we have CASE 5 again! Prob, as above is 17/200, 19/225 and 11/360
Together that would be 177/200, 19/225 and 11/360

Since whether B shot at A first or C first was random, averaging the above two, we get the CASE 4 prob as 97/200, 59/225 and 91/360

So finally (phew) we have the following:

Sequence and prob of A or B or C surviving as:

ABC: 7/20, 2/5, 1/4
ACB: 7/20, 2/5, 1/4
BAC: 47/100, 58/225, 49/180
BCA: 97/200, 59/225, 91/360
CAB: 17/40, 19/45, 11/72
CBA: 97/200, 79/225, 59/360

Since that above are all equally likely, we finally take the average of those six cases to get to the final answer of A, B and C as: 513/1200 , 471/1350 and 483/2160 !!

Phew!!! Ok! Now I am ready for the New Year.

Category: Puzzles | LEAVE A COMMENT
29 December 2014

Probability Puzzle

This is an interesting probability problem. There are multiple variations of this. I am presenting a simple version.

There are three persons A, B and C who are aiming to settle a dispute the old dueling style except there are three of them. Here are the rules..

a. At random, it is decided what will be the sequence in which they will fire
b. When a person’s chance comes, that person is given at random the target (one of the other two) to shoot at
c. A is a sure shot (100% chance he will shoot the person dead), B is less so – has 80% chance of succeeding and C is a neophyte – 50-50 chance that he will succeed with a shot.
d. They keep on with this sequence of shooting till one man is left.
e. There are no other extraneous conditions – e.g. no stray bullets etc etc.
f. What are the probabilities of A, B and C surviving?

20 October 2014

Royters News – Microsoft

Microsoft CEO Satya Nadella reportedly said that there will be “new battles in stores” in an interview yesterday.

And my first reaction was “What? People are already fighting outside the stores for the new iPads?” 🙂

Nadella maintained a studious silence when asked in a follow up question regarding what kind of respectable distance was Microsoft planning to watch the battles from. 🙂

Now, that is “good karma” 🙂

8 October 2014

Puzzle time!!!

Found this interesting problem. See if you can solve this…
Four tanks going in a line on a very narrow bridge encounter four friendly tanks in a line coming from the other side. Unfortunately, they see each other only when there is exactly one tank worth of distance between the two leading tanks from either side. And there is no space on the bridge to go around each other.

Now here is a problem – None of the tanks can reverse. However, a tank can climb over another tank as long as there is space for the tank to land on the bridge after climbing over a tank. A tank cannot climb over more than one tank at a time. (meaning it has to come down to the bridge after climbing one tank). Also no tank can take the weight of more one one tank on top of it. (meaning you cannot have three tanks on top of each other).

How can the two sets of four tanks sort out the problem and eventually proceed their own way?

18 September 2014

Puzzle time!!!

It has been two weeks since I left home. India trip, a week of business meetings and I am finally on my flight back home… It has been a long time since I posted a puzzle on my flight back home on a Thursday evening… so here goes the next one…

[Remember the rules – do not post your answers as Comments in FB. Either message me on FB or write a comment in my blogsite www.rajibroy.com]

A hotel wing has 17 consecutive rooms numbered 1 thru 17. Each of the rooms are connected to the two adjoining room(s) thru keyed (internal) doors and to the corridor with one (external) keyed door. Of course the two end rooms have only one internal door. A fugitive is holed up in one of the rooms. He has one of the two master keys that can open up the (internal) doors to the adjoining room(s). However, for security purpose, the key, once operated, is inactive for 24 hours. And the key has to be used once every 24 hours – else it gets completely deactivated. In other words, the fugitive has to shift to the next room every day using the internal door – on any one side, unless he is in room 1 or 17, in which case he has only one choice.

There is a detective who suspects that the fugitive is holed up there. He has the other master key. This key also works in the same way except it works only on the external door of the rooms (that opens to the corridor). Thus, the detective can open the external door of any room. If he finds the fugitive there, he apprehends him. If not, he has to immediately shut the door and stay in the corridor (so that the fugitive cannot escape thru the corridor). The detective, can choose to open the same room on consecutive days, if he so desires.

So day after day, this is what happens – the detective opens a room, checks for the fugitive and closes the door if he does not find him. The fugitive, meanwhile, day after day shifts to the room on the left or the right – once a day (as mentioned, unless he is in one of the end rooms, in which case, he can go in only one way).

Now, the detective’s assignment runs out in 30 days. So, he has to apprehend the fugitive within that time period or else he is recalled and the fugitive escapes.

Can you come up with a strategy for the detective (what logic will he follow to open doors) that will guarantee that he will catch the fugitive before he is recalled?