Go4Expert

Go4Expert (http://www.go4expert.com/)
-   $1 Daily Competition (http://www.go4expert.com/contests/daily-competition/)
-   -   Cut the chain | 12 Sep 2009 (http://www.go4expert.com/contests/cut-chain-12-sep-2009-t19398/)

shabbir 12Sep2009 18:53

Cut the chain | 12 Sep 2009
 
A Man has 23-link chain. He lives in a house whose rent is worth one link for one day. What is the fewest number of cuts he can make in the chain for paying rent for each day.

SaswatPadhi 12Sep2009 19:47

Re: Cut the chain | 12 Sep 2009
 
2 cuts.

He would cut link no. 4 and 11. ( counting from the same end ) :)

SaswatPadhi 12Sep2009 19:59

Re: Cut the chain | 12 Sep 2009
 
Explanation ::

After cutting links 4 and 11, he would be left with :
(A) Two chains of 1-link length each : link 4 and link 11.
(B) One chain of 3-link length : link 1~3
(C) One chain of 6-link length : link 5~10
(D) One chain of 12-link length : link 12~23

He then pays the 2 chains in (A) for the first 2 days.
On day 3, he gets back the 2 chains and gives (B) chain as rent.
Then pays 2 (A) chains for next two days.
And gets back 2 (A) chains + the (B) chain on day 6 and gives (C) chain as rent.
Then pays the 2 (A) chains and the (B) chain as rent for next 5 days.
And gets back all chains and pays the (D) chain as rent.

Then, he repeats the above steps till day 23.

:)

shabbir 13Sep2009 11:19

Re: Cut the chain | 12 Sep 2009
 
Quote:

He then pays the 2 chains in (A) for the first 2 days.
Why. He need to Pay Daily Or else he could pay all 23 at one go.

SaswatPadhi 13Sep2009 18:10

Re: Cut the chain | 12 Sep 2009
 
Of course he could have, and so there is no point of all this.
So, obviously I meant that only (one link/day), just I am lazy to type :p

OK. Let's have it your way :

Explanation ::

After cutting links 4 and 11, he would be left with :
(A) Two chains of 1-link length each : link 4 and link 11.
(B) One chain of 3-link length : link 1~3
(C) One chain of 6-link length : link 5~10
(D) One chain of 12-link length : link 12~23

He then pays the 2 chains in (A) for the first 2 days (one chain on each day).
On day 3, he gets back the 2 chains and gives (B) chain as rent.
Then pays 2 (A) chains for next two days (one chain on each day).
And gets back 2 (A) chains + the (B) chain on day 6 and gives (C) chain as rent.
Then pays the 2 (A) chains (one chain on each day) for day 7 and 8.
On day 9, he pays (B) chain as rent and gets back the 2 (A) chains.
He then pays the 2 (A) chains (one chain on each day) for next 2 days (till day 11).
And gets back all chains and pays the (D) chain as rent on day 12.

Then, he repeats the above steps till day 23.

Phew... > 100 chars added.

shabbir 13Sep2009 18:52

Re: Cut the chain | 12 Sep 2009
 
OK Got it.

naimish 15Sep2009 14:13

Re: Cut the chain | 12 Sep 2009
 
Congrs SP :D

SaswatPadhi 15Sep2009 17:56

Re: Cut the chain | 12 Sep 2009
 
Thanx naimish :happy:

naimish 16Sep2009 08:12

Re: Cut the chain | 12 Sep 2009
 
:welcome: SP :lol:


All times are GMT +5.5. The time now is 21:12.