18 August 2016

Puzzles!!! After a long time!! 2 for 1!!!

Headed to DC on a Thursday. Which always reminds me of those puzzles I used to post every Thursday on my way out of DC. Posting puzzles after a long time. And since one good turn deserves another, I will post two…

First a warmup one…

1. Assuming you are as old as me (which is about 50), what is the probability that you have seen in your life somebody (human being) with more than average number of legs?

a) Certainly
b) Very likely
c) As likely as not (50-50)
d) Unlikely
e) Impossible

Now for an interesting one…

2. In my running trail, there is a spot where I have to climb up ten stairs. At any step, I can jump up one stair or two stairs. How many different ways can I climb up those ten stairs?

If you are reading this on Facebook, just send me personal message with your answer – I will let you know if you got it and post your name as somebody who got it right. There might be some time gap – I have a long night in front of me today.



Posted August 18, 2016 by Rajib Roy in category "Puzzles

7 COMMENTS :

  1. By Rajib Roy on

    Solution 1.
    If you thought the answer is unlikely or impossible, that is because you might have jumped to the conclusion that the average number of legs for a human being you have seen is 2. That is the overwhelming majority but that is not the average. You probably have seen somebody with one leg or maybe even no legs. Which means the average number of legs you have seen per person is a number teeny weeny bit smaller than 2. Given that you see people wth two legs most of the time, the answer to the question is (a) Certainly

    Reply
  2. By Rajib Roy on

    Solution 2.
    Believe it or not this is actually a Fibonacci sequence problem. Actually two of them.

    Let’s think of the tenth step. How could we have gotten there? Either we came from the ninth step or the eighth step. From ninth step, we had only one way to go to the tenth step. From eighth step, we had two ways to go – a direct jump to tenth step or take a step to 9 and then go to 10. But remember, this case is already covered when we discussed how can we go from ninth step to tenth step.

    So, if F(10) is the number of ways you can reach the tenth step, it is really the number of ways you can reach the ninth step (and then hop once) F(9) plus the number of ways you can reach the eighth step (then you jump straight to tenth step) F(8). Again, the other way of going from eighth step to tenth step via stepping on ninth first is already covered in F(9) by definition.

    F(10) = F(9) + F (8)

    By similar logic, F(9) = F(8) + F(7) and F(8) = F(7) + F(6) and so on…

    Thus,
    F(10)
    = F(9) + F(8)
    = F(8) + F(7) +F(8)
    =2 F(8) + F(7)
    = 2 F(7) + 2 F(6) + F(7)
    = 3 F(7) + 2 F(6)
    = 5 F(6) + 3 F(5)
    = 8 F(5) + 5 F(4)

    … do you clearly see the two Fibonacci sequences now?

    = 13 F(4) + 8 F(3)
    = 21 F(3) + 13 F(2)
    = 34 F(2) + 21 F(1)

    We cannot go any further since F(0) is undefined.

    F(2) = how many ways can we reach the second step? – 2 (one and then one OR jump two straightaway)
    F(1) = 1 since there is only one way to go to the first step.

    So 34 * 2 + 21 * 1 = 89 is the answer.

    Reply
  3. By rajibroy (Post author) on

    Solution 1.
    If you thought the answer is unlikely or impossible, that is because you might have jumped to the conclusion that the average number of legs for a human being you have seen is 2. That is the overwhelming majority but that is not the average. You probably have seen somebody with one leg or maybe even no legs. Which means the average number of legs you have seen per person is a number teeny weeny bit smaller than 2. Given that you see people wth two legs most of the time, the answer to the question is (a) Certainly

    Reply
  4. By rajibroy (Post author) on

    Solution 2.
    Believe it or not this is actually a Fibonacci sequence problem. Actually two of them.

    Let’s think of the tenth step. How could we have gotten there? Either we came from the ninth step or the eighth step. From ninth step, we had only one way to go to the tenth step. From eighth step, we had two ways to go – a direct jump to tenth step or take a step to 9 and then go to 10. But remember, this case is already covered when we discussed how can we go from ninth step to tenth step.

    So, if F(10) is the number of ways you can reach the tenth step, it is really the number of ways you can reach the ninth step (and then hop once) F(9) plus the number of ways you can reach the eighth step (then you jump straight to tenth step) F(8). Again, the other way of going from eighth step to tenth step via stepping on ninth first is already covered in F(9) by definition.

    F(10) = F(9) + F (8)

    By similar logic, F(9) = F(8) + F(7) and F(8) = F(7) + F(6) and so on…

    Thus,
    F(10)
    = F(9) + F(8)
    = F(8) + F(7) +F(8)
    =2 F(8) + F(7)
    = 2 F(7) + 2 F(6) + F(7)
    = 3 F(7) + 2 F(6)
    = 5 F(6) + 3 F(5)
    = 8 F(5) + 5 F(4)

    … do you clearly see the two Fibonacci sequences now?

    = 13 F(4) + 8 F(3)
    = 21 F(3) + 13 F(2)
    = 34 F(2) + 21 F(1)

    We cannot go any further since F(0) is undefined.

    F(2) = how many ways can we reach the second step? – 2 (one and then one OR jump two straightaway)
    F(1) = 1 since there is only one way to go to the first step.

    So 34 * 2 + 21 * 1 = 89 is the answer.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.