Navigation Links

Responsive Topnav Example

Resize the browser window to see how it works.

Tuesday, March 29, 2016

Grandma and Cake – Logical Puzzle

Puzzle: 

You are on your way to visit your Grandma, who lives at the end of the valley. It’s her anniversary, and you want to give her the cakes you’ve made. Between your house and her house, you have to cross 5 bridges, and as it goes in the land of make believe, there is a troll under every bridge! Each troll, quite rightly, insists that you pay a troll toll. Before you can cross their bridge, you have to give them half of the cakes you are carrying, but as they are kind trolls, they each give you back a single cake.

How many cakes do you have to leave home with to make sure that you arrive at Grandma’s with exactly 2 cakes?

Solution:

2 Cakes

How?
At each bridge you are required to give half of your cakes, and you receive one back. Which leaves you with 2 cakes after every bridge.

Hint:-

Let u initially start wid 'x' cakes
. After first bridge u have x/2+1

After second bridge x+6/4
After crossing third x+30/16
After fourth bridge x+62/32
After fifth bridge x+126/64...

Now we know we hv exactly 2 cakes after crossing fifth bridge.. so put it equal to 2

u get x=2...

So, we start with 2 from grandma, the troll will take one cake to make it 1 and then double it => which makes it 2 again.
This shows that 2 remains 2 only (no effect of bridges) and even if the question had asked for 1000 bridges, we'll have 2 cakes.

No comments:

Post a Comment