Articles

Challenge 5 Answer


How much money?

Let's consider that when the man entered the first store he had N Real. So our goal is to find the value of N.

The problem is that in every store the man spent 1 real more than half of what I had on entering.

SHOP 1SHOP 2SHOP 3

The man came in with N.

The man SPENT:

(N / 2) +1.

Therefore the man STAYED with:

N - ((N / 2) +1)
= N- (N / 2) -1
= (2N-N-2) / 2
= (N-2) / 2

The man came in with (N-2) / 2

The man SPENT:

((N-2) / 2) / 2 + 1 = (N-2) / 4 + 1 = (N + 2) / 4

Therefore the man STAYED with:

(N-2) / 2 - ((N + 2) / 4)
= (2N-4-N-2) / 4
= (N-6) / 4

The man came in with (N-6) / 4

The man SPENT:

( (N-6) / 4 )/2 + 1
= (N-6) / 8 + 1
= (N + 2) / 8

Therefore the man STAYED with REAL ZERO, because the problem is that he spent all he had in the three stores. So we concluded that the money he CAME IN in store 3 any less the money he SPENT in store 3 equals ZERO:

(N-6) / 4 - ((N + 2) / 8) = 0

(2N-12-N-2) / 8 = 0

2N-12-N-2 = 0

N-14 = 0

N = 14

SO WHEN THE MAN ENTERED THE FIRST STORE HE HAD REAL 14 !!!

Workaround sent by Ilydio Pereira de Sá

We will represent through a flow, which occurred from its entry into the 1st store, to the exit at the last, and then through the backward flow by applying reverse operations. Remember that the amount you had when entering each store (which I will represent by N1, N2 and N3) is always divided by 2 and then subtracted from 1 dollar.
(N1) / 2 - 1 (left store 1 with N2)
(N2) / 2 - 1 (left store 2 with N3)
(N3) / 2 - 1 (left store 3 with zero, as he spent all he owned).
Applying inverse operations, we have from end to beginning:
(0 + 1) x 2 = 2
(2 + 1) x 2 = 6
(6 + 1) X 2 = 14
Soon, owned by entering the 1st store R $ 14.00.

Back to the statement