Showing posts with label Math. Show all posts
Showing posts with label Math. Show all posts

Friday, 16 December 2016

Burning Ropes with Time Measurement

Problem : There is this special kind of ropes made from some non-homogeneous material. Because of this special material, the rope takes exactly one hour to burn if lighted from one end. However, as the material is not uniform across the rope, different parts of rope may take different amount of time. So for example, one half may take 1 minute where as other half may take 59 minutes to burn.

you are given two such ropes  and you need to measure

1. 1hr
2. 45 minute
3. 30 minute
4. 15 minute


Solution

1. If we burn a single rope then we can measure 1 hr.

2. Burning of two ends of it at the same let you you measure 30 minutes.

3. Now start by lighting both ends of one rope and one end of other rope. when first rope is finished burning(in 30 minutes) then light other end of second rope ,in this way second rope half second rope is already burned so it will take more 15 minutes with both ends burning. so you can measure 45 minutes.

4.  When second rope is done burning then already 45 minutes has elapsed. 15 minutes has elapsed after first rope has completely burnt. so you can measure 15 minutes in this case.

Monday, 12 December 2016

100 people with sword puzzle

100 people standing in a circle in an order 1 to 100.
No.1 has a sword.
He kills next person (i.e. no. 2) and gives sword to next to next (i.e no.3).
All person does the same until only 1 survives.

Which number survives at the last?


Solution

Ans - 73
Explanation-

·         Attempt 1 : 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99
·         Attempt 2: 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93, 97
·         Attempt 3: 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, 97
·         Attempt 4: 9, 25, 41, 57, 73, 89
·         Attempt 5: 9, 41, 73
·         Attempt 6: 9, 73
·         Attempt 7: 73

Saturday, 10 December 2016

Cross the Bridge - How Farmer will cross the bridge.

A farmer is returning from market, where he bought a she-goat, a wolf and cabbage.
On the way home he must cross a river.
His boat is little, allowing him to take only one of the three things.
He can’t keep the she-goat and the cabbage together (because the she-goat would eat it), nor the she-goat with the wolf (because the she-goat would be eaten).
How many minimum trips for the farmer to get everything on the other side (without any harm)?
Crossing the river counts as one trip.

Solution -

1. Farmer crosses with goat.
2. Farmer returns alone.
3. Farmer crosses with cabbage
4. Farmer returns with goat.
5. Farmer crosses with wolf.
6. Farmer return alone.
7. Farmer crosses with goat.

So finally all are on other side of bridge. And total trips by Farmer are 7.

There are 25 horses. We have to find out the fastest 3 horses. In one race maximum 5 horses can run. How many such races are required in minimum to get the result?

Solution -

We can first do 5 races by taking 5-5 horses and get top horse in each raceLets say it looks like this
 O1, O2, O3, O4, O5
 T1, T2, T3, T4, T5
 TH1, TH2, TH3, TH4, TH5
 F1, F2, F3, F4, F5
 FV1, FV2, FV3, FV4, FV5
Here O1 > O2 > O3 > O4 > O5 same way for others.
Now lets take fastest horse in each race and then have one race between them, so have race in O1, T1, TH1, F1 and FV1.
Lets say O1, TH1 and F1 comes in top three(and O1 > TH1 > F1), then there are no chances that horses slower than T1 and FV1 can come in top 3 and we can also say that O1 is fastest horse and also F2-F5 horses are not among top 3.
Now we need to find second and third fastest horses
they can be from O2, O3, TH1, TH2 and F1, So we will have once more race among them to determine second and third position.
Thus a total of minimum 7 races are needed to find top 3 horses from 25 horses.

Thursday, 17 November 2016

Cross the Bridge - Minimum Time required

Minimum time required to Cross the Bridge

Four people are on one side of the bridge. Everyone must get across. 

Problem is that it’s dark and so you can’t cross the bridge without a flashlight and they only have one flashlight. Plus, at one time only 2 people can cross the bridge. the bridge is only big enough for two people to cross at once.

The Speed of four people is different as below: 

one person is so fast it only takes 1 minute to cross the bridge,
another 2 minutes,
third 5 minutes,
the last it takes 10 minutes to cross the bridge.

When two people cross the bridge together by sharing the flashlight, they both walk at the slower person’s speed. What is the minimum time required for all 4 to cross the bridge?

Solution -

Person A: 1 minute

Person B: 2 minutes

Person C: 5 minutes

Person D: 10 minutes

Let F represents Flashlight.

Person C and D are the slowest guys, if they don’t walk together that itself will make it 15 minutes, in this case (the best way to save time is):

A, D, F —-Bridge—-> = 10 min

<—-Bridge—-A, F = 1 min (returning with flash light) A, C, F —-Bridge—-> = 5 min

<—-Bridge—-A, F = 1 min A, B, F —-Bridge—-> = 2 min

That makes a total of 19 minutes, but that’s not what we want.

It means they both should walk together, in this case if they both are walking together, then there should be another person (because if one of them will bring it will take 5 minutes) to bring the flashlight back. So here is the solution…A, B, F —-Bridge—-> = 2 min

<—-Bridge—-A, F = 1 min C, D, F —-Bridge—-> = 10 min

<—-Bridge—-B, F = 2 min A, B, F —-Bridge—-> = 2 min

Total time = 17 minutes.

Color of Bear Puzzle

A Bear has fallen from a height of 10m from ground. It reached ground in sqrt(2) seconds. Luckily it didn’t get hurt. What color is the be...