Posts

Behind Unfair The Number of Visits


What's the story behind the title?

The man arrives at Middletown train station at a completely random time of the day. 

Let's take a look at what happens when he arrives at random time of the day.

After arrival on the station, he is likely to get the train in next hour for sure.

After arriving at random time, there are 80% chances that the first train arriving at the station is heading towards Northtown and 20% chances are there the train is heading towards the Southtown. 

That is there has to be 80% minutes of hour (80% of 60 = 48 minutes) where the first train after is heading towards Northtown and 20% minutes of hour where the next train is heading towards Southtown (20% of 60 = 12 minutes).

So, the trains heading towards the Southtown must be scheduled 12 minutes apart from train heading towards the Northtown.

For example, if trains heading to Northtown are scheduled at 9:00 AM, 10:00 AM, 11:00 AM.......etc then the trains to the Southtown must be scheduled at 9:12 AM, 10:12 AM, 11:12 AM.....etc.

With arrival in 48 minutes past 9:12 AM, 10:12 AM etc, he must be getting the Northtown train and if arrived in 12 minutes past 9:00 AM,10:00 AM etc, he would be getting the Southwest train.

Remember, the timing given are for examples only. The Northwest trains may be scheduled at 9:48 AM, 10:48 AM,......etc and Southwest may be scheduled at 10:00 AM, 11:00 AM.

Key is they leave 12 minutes apart, so that 60 minutes of hour are divided into 48 minutes ahead of Northwest train and 12 minutes ahead of Southwest train. 

Behind Unfair Number of Visits

Challenge of Father to Son

A man told his son that he would give him $1000 if he could accomplish the following task. 

The father gave his son ten envelopes and a thousand dollars, all in one dollar bills. He told his son, "Place the money in the envelopes in such a manner that no matter what number of dollars I ask for, you can give me one or more of the envelopes, containing the exact amount I asked for without having to open any of the envelopes. If you can do this, you will keep the $1000."

When the father asked for a sum of money, the son was able to give him envelopes containing the exact amount of money asked for. 

How did the son distribute the money among the ten envelopes?

Challenge of Father to Son


THIS is how son accepts the challenge!

Son's Response to the Father's Challenge


What was the challenge?

For a moment, let's suppose father had given $30 to son and provided 5 envelopes and put the same challenge.
----------------------------------------------------------------------------------------------------
Here, use of the binary number system helps in matter.

The son would distribute 15 dollars into 4 envelops like - 

2^0 = 1, 2^1 = 2, 2^2 = 4, 2^3 = 8.


Now, for any amount asked between 1 to 15, son can produce some of these 4 envelops wherever 1 is there in envelop column for that particular amount.

For example, if father asks for $10 (Binary - 1010), son would give envelop 4 and 2 (8+2=10).

After putting $15 dollar in 4 envelops, he puts remaining $15 in 5th envelop so that he can cover rest of amount between 16 to 30.

If father asks amount greater than 15 then he would take envelop of $15 first and depending on how much the amount asked is greater than this $15 he would pick some of those 4 envelops.

For example, if father asks for $24, then he picks envelop 5 having $15 and envelops for amount 24 - 15 = 9 (Binary - 1009) i.e. envelop 4 and 1 (8+1=9)  i.e. total of 15 + 9 = 24.

So, what we observe from this is that the number of envelops needed for such arrangement is equal to the number of binary bits needed to represent the amount itself or nearest power of 2 greater than the amount.

In above case, to represent 30 in binary we need 5 bits or nearest power of 2 greater than 30 is 32 which needs 5 bits for representation.

-----------------------------------------------------------------------------

Now, let's turn to the actual challenge where father has asked son to distribute $1000 rightly in 10 envelopes. 

The reason for selecting 10 as a number of envelops is clear now as 1000 needs 10 bits in binary or nearest power of 2 greater than 1000 is 1024 which needs 10 bits for binary representation.

So, the son puts 256, 128, 64, 32, 16, 8, 4, 2, 1 dollars in 9 envelops (envelop numbered as Envelop 9, Envelop 8.........Envelop 1 in order)
 and 1000 - 511 = 489 dollars in 10th envelop.

First 9 envelops will cover amounts from 1 to 511 and for amounts greater than 511 inclusion of 10th envelop having 489 dollars is mandatory.

Again selection of envelops for the amount 511 to 1000 depends on how much the amount exceeds the $489. The binary representation of that difference and selection of envelop accordingly is all that needed.
 
----------------------------------------------------------------------------------------------------

Let's make sure this distribution with couple of examples.

If father asks for amount of $109 (binary - 1101101) then son picks 

Envelop 1($1) + Envelop 3 ($4) + Envelop 4 ($8) + Envelop 6 ($32) + 
Envelop 7 ($64) i.e. having amount = 1 + 4 + 8 + 32 + 64 = 109 dollars.

If father asks for $525 then son gives $489 via Envelop 10 and rest of amount 
530 - 489 = 40 (Binary - 101000) in form of Envelop - 6 ($32) and Envelop 4 ($8).   

----------------------------------------------------------------------------------------------------
 

The Secret Word - Puzzle

A teacher writes six words on a board: “cat dog has max dim tag.” She gives three students, Albert, Bernard and Cheryl each a piece of paper with one letter from one of the words.

Then she asks, “Albert, do you know the word?” Albert immediately replies yes.

She asks, “Bernard, do you know the word?” He thinks for a moment and replies yes

Then she asks Cheryl the same question. She thinks and then replies yes

What is the word?

The Secret Word


THIS must be the given word! 

The Secret Word - Solution


What was the puzzle?

A teacher writes six words on a board: CAT, DOG, HAS, MAX, DIM, TAG 

--------------------------------------------------------------------------------------------------

1. Albert knows the word right away because he must have received unique letter from above words. Had he received the letter A then he wouldn't have figured out the exact word as A appears in CAT, HAS, MAX and TAG. 

Similarly, he must not have received letters T, D, M and G as those appears multiple times in the list of words.


That is, he must have letter from unique letters C, O, H, S, X, I as they appears only once in the above list of words.

With that the word TAG is eliminated out of the race since any of unique letters doesn't appear in the word TAG.

--------------------------------------------------------------------------------------------------

2. Now, words left are - CAT, DOG, HAS, MAX, DIM 

In a moment of thinking, Bernard can conclude that the TAG can't be the word and Albert must have got some unique letter from the given words.

After providing letter from C, O, H, S, X, I to Albert, teacher provides letter from rest of letters to Bernard.


Now, if she had given letter -

A - Bernard wouldn't have idea whether the word is CAT, HAS or MAX

D - Bernard wouldn't have idea whether the word is DOG or DIM

M - Bernard wouldn't have idea whether the word is MAX or DIM

That is she must had given letter from unique letters T, O, G, H, S, X.

So, at start, if she provides letter I to the Albert then she can't provide D or M of word DIM to Bernard to give him equal chance to identify the word. 

Hence, the word DIM is also eliminated out of race.

If she had provided letter O to Bernard, then Albert would have been with either D or G with which he wouldn't have been able to figure out the exact word whether it is DOG/DIM or DOG/TAG respectively. Hence, Bernard must not be with letter O.

If Bernard is with letter X then Albert must had either M or A with which he couldn't have figured out the exact word among MAX/DIM or CAT/HAS/TAG/MAX. Hence, Bernard can't have X as well. With that MAX is also eliminated.

Now, if Bernard has letter - 

T - Albert might be with C

G - Albert might be with O

H - Albert may have S

S - Albert may have H. 

--------------------------------------------------------------------------------------------------

3. The words left are - CAT, DOG, HAS.

Again, in a moment of thinking, Cheryl deduced list of 3 possible words as above.

Now, if she had letter A then she wouldn't have idea of exact word whether it is CAT or HAS. 


If she had unique letter among C/T (or H/S), then either Albert or Bernard with letter A would have been unsuccessful in guess.

If she had letter O/G then either Albert of Bernard would have been with letter D by which they wouldn't know the exact word. 

Hence, Cheryl must had letter D and the word must be DOG.

Albert must have got letter O and the Bernard must have received letter G.

--------------------------------------------------------------------------------------------------

Knowing The Secret Word - Solution



"What day is it?"

A girl meets a lion and unicorn in the forest. The lion lies every Monday, Tuesday and Wednesday and the other days he speaks the truth. The unicorn lies on Thursdays, Fridays and Saturdays, and the other days of the week he speaks the truth. 

“Yesterday I was lying,” the lion told the girl. “So was I,” said the unicorn. 

What day is it?

"What day is it?"

It must be .... day of the week. Click to know.

"The day must be a Thursday!"


Little story behind the title! 

Lion lies on Mondays, Tuesdays, and Wednesdays and The Unicorn, on the other hand, lies on Thursdays, Fridays, and Saturdays.


That is on Sundays both must be telling the truth. 

Suppose Lion and Unicorn made those statements today.

Lion - “Yesterday I was lying,”  

Unicorn - “So was I,”  (“Yesterday I was too lying,” ) 

If it was Sunday today, then Lion's statement would have been lie as lion tells truth on Saturdays. But as per data, both must be telling the truth on Sundays. So it can't be Sunday today.

For rest of all days, one must be telling the truth and other must be lying.

---------------------------------------------------------------------------------------------------------------

CASE 1 : Lion is lying and Unicorn is truth teller.

For Unicorn's statement - “Yesterday I too was lying,” to be true it must be Sunday today. But on Sunday, lion also speaks truth. And lion's statement can't be true on Sunday as concluded earlier. 

Hence, today must be the case below.

------------------------------------------------------------------------------------
   
CASE 2 : Lion is truth teller and Unicorn is lying.

Again for Lion's statement - “Yesterday I was lying,” to be true it must be Thursday today. 

And if today is Thursday Unicorn is lying with it's statement - "“Yesterday I too was lying,” as it was Wednesday yesterday where Unicorn always tells truth on Wednesday. 

"The day must be a Thursday!"


Hence, today, on Thursday, Unicorn must be lying with his statement while Lion is telling the truth. Both are as per behaving the given data.

 

The Allotment Challenge?

Five bankers are sharing 12 golden ingots. They decide to proceed that way : 

The elder one will suggest an ingots allotment. The rest will vote for or against it. If the majority accepts, the sharing is ratified. If not, the elder will be dismissed. So, the sharing would be done between the remaining banker with the same rules. 

Knowing that they are set from left to right in a diminishing order of their ages, how would be the allotment ?


The Allotment Challenge?


THIS should be the UNDENIABLE Allotment!

Source 

The Undenial Allotment Proposition!


What were rules of allotment process?

The eldest should allot ingot like 9, 0, 1, 0, 2 among 5 bankers.

Let's name bankers as Banker 5, Banker 4 ...... Banker 1 according to decreasing order of their ages.

------------------------------------------------------------------------------

CASE 1 : 

Suppose there are only 2 bankers left then the youngest will always deny whatever elder offers so that he can take away all 12 ingots on his turn.

------------------------------------------------------------------------------

CASE 2 : 

If case is reduced to 3 bankers then the eldest knows that the youngest is not going to agree with him in any case. With that, the eldest will be dismissed and case reduced to CASE 1 where youngest can take away all. 

So, the eldest here proposes allotment as 11, 1, 0. The Banker 2 has no option than to accept this proposal otherwise he won't get anything if case is reduced to 2 bankers as in CASE 1 above.

------------------------------------------------------------------------------

CASE 3 : 

With 4 bankers, the eldest would propose allotment 9, 0, 2, 1.

In the case, Banker 3 will never accept any proposal as after banker 4 is dismissed he would be getting 11 ingots as in CASE 2 above.

The Banker 2 will happily agree with the eldest as he would be getting 1 more ingot than the CASE 2. 

And Banker 1 knows he will be getting nothing if the case is reduced to 3 bankers as in CASE 2. So, he too will agree with the eldest in the case.

------------------------------------------------------------------------------

CASE 4 : 

With 5 bankers, the eldest i.e. Banker 5 should propose allotment 9,0,1,0,2.

Obviously, any how Banker 4 is going to deny any proposal as he wants the distribution among 4 bankers where he will be getting 9 ingots as in CASE 3 above. 

And if Banker 5 is eliminated and the case is reduced to CASE 3 where 4 bankers are left then Banker 3 knows he won't be getting anything. So, better he should be happily agree this proposition where he is getting at least 1 ingot.

Finally, offering Banker 5 one more extra ingot than the case where 4 bankers will be left, makes him in favor of this proposition.

Notice that the Banker 5 has to give 3 ingots at least to banker 2 to get his vote as he will be getting 2 ingots in case of 4 bankers as in CASE 3. Whereas, in the same case Banker 3 is not getting anything & would be happily agree if getting 1 ingot at least in this case. 


------------------------------------------------------------------------------

The Undenial Allotment Proposition!
 

Flipping The Unusual Coins

You have three coins. One always comes up heads, one always comes up tails, and one is just a regular coin (has equal change of heads or tails). If you pick one of the coins randomly and flip it twice and get heads twice, what is the chance of flipping heads again?

Flipping The Unusual Coins

Chances of flipping head again are - .......% Click to know!

Chance of Flipping Head Again


What was the problem?

For a coin to always show head on flip we assume both it's sides are heads and the coin which is showing tail always we assume both of it's sides are tails.

There is no way that you have selected tail only coin since there are 2 heads in first 2 flips.

So it could be either head only coin say D coin or regular fair coin say F.

Let H1 and H2 be the sides of head coin and H, T are side of fair coin.

If it's head only coin D, then possible scenarios on 2 flips are -

DH1 DH1
DH1 DH2
DH2 DH1
DH2 DH2

And if it's fair coin F then possible scenarios on 2 flips are -

FH FH
FH FT
FT FH
FT FT

There are total five combinations (all 4 of head coin + first one of fair coin) where there are 2 consecutive heads on 2 flips.

So, the chances that you have picked a head coin is (4/5) and that you picked fair coin is (1/5).

For head coin, the probability of getting head again is 1 and that for fair coin is (1/2).

Since you holding either head coin or fair coin,

Probability (Head on third flip) = 
Probability (You picked Head coin) x Probability (Head on head coin) + Probability (You picked fair coin) x Probability (Head on fair coin) 


Probability (Head on third flip) = (4/5) x 1 + (1/5) x (1/2)

Probability (Head on third flip) = 9/10.

Hence, the chance of flipping head again on third flip is 90%.

Chance of Flipping Head Again



Find Working Batteries for Flashlight

You have a flashlight that takes 2 working batteries. You have 8 batteries but only 4 of them work.

What is the fewest number of pairs you need to test to guarantee you can get the flashlight on?


Find Working Batteries for Flashlight


You need to test at least THESE pairs! 

Selection of Working Batteries for Flashlight


What was the task given?

Divide batteries into 3 groups - 2 of them having 3 batteries each and 1 with 2 batteries. 

Then the working pair of batteries has to be in 1 of these groups and now it's easier test to each group. That is 4 working pairs might be distribute as - 
(2,1,1) or (1,2,1) or (1,1,2).

If A, B and C are name of these groups then possible combinations for testing group A are - 

A1-A2, A1-A3, A2-A3

Similarly, for B group testing pairs are - 

B1-B2, B1-B3, B2-B3

And finally, if we don't find any working pair in above testings then the C1-C2 pair of group C has to be working pair.

You may find in the working pair in testing those 6 pairs from group A or B or can conclude that C1-C2 is the working pair. 


Selection of Working Batteries for Flashlight



Follow me on Blogarama