43

The brilliant scientist you are, you have built a magic money machine, capable of materializing money out of nowhere! Here's how it works:

  • The machine has six boxes, numbered $1$ to $6$, each iniitally containing a single dollar coin.

  • Beneath each of the boxes $1$ through $5$ is a button labeled "Poof!". Pressing the "Poof!" button beneath box number $i$ will remove a coin from box $i$, and cause two coins to magically appear in box $i+1$.

  • Beneath each of the boxes $1$ through $4$ is a button labeled "Switch!". Pressing the "Switch!" button below box $i$ will cause a coin from box $i$ to disappear, and switch the contents of boxes $i+1$ and $i+2$.

  • An exception to the previous two rules: pressing a button beneath an empty box does nothing.

  • You may press the buttons as much as you like, but in order to collect the money inside, you must permanently break the machine.

Warren Buffet has heard of your machine, and will offer you one trillion dollars for it. Should you take this deal? Why or why not?

Source: I found this at The Puzzle Toad, but as Joe Z. points out, it was originally question 5 of the International Math Olympiad in 2010. The original phrasing was this: is it possible to make it so the first five boxes are empty, while the last has exactly $2010^{2010^{2010}}$ dollars?

Mike Earnest
  • 32,336
  • 6
  • 92
  • 237
  • I seem to remember this was a problem at the IOI? –  Apr 30 '15 at 03:55
  • Never mind, it was the IMO. Yeah, I've heard of this problem before although I've never actually seen the solution. –  Apr 30 '15 at 03:56
  • 1
    I really like the question. I've figured out how to make 50 million so far, but not a trillion. – Cubicon Apr 30 '15 at 04:02
  • I'm a bit conflicted as to whether to actually post an answer here; I was actually one of the people who submitted a solution back when submissions were open (i.e. before they posted that solution pdf). – Dennis Meng Apr 30 '15 at 04:12
  • @DennisMeng Go for it! That last comment was aimed at people who had not seen the problem before. – Mike Earnest Apr 30 '15 at 04:21
  • Well, looks like there's a solution already. Do you want me to put the best known limit as a community-wiki answer (with full sources and disclosure)? – Dennis Meng Apr 30 '15 at 04:23
  • 9
    If the subject of this question was truly a "brilliant scientist" that could make a machine which creates money from nowhere, wouldn't he have just made a machine with a single button that popped out coins all day long? Just a thought. :P – Cubicon Apr 30 '15 at 04:35
  • I now want a 'Poof!' button fitted to my desk. – Damien H Apr 30 '15 at 04:44
  • 7
    The Magic Money Machine - MMM. – Somnium Apr 30 '15 at 06:55
  • 1
    What do you mean by, "in order to collect the money inside, you must permanently break the machine?" In my reading, I didn't see anywhere that specified when a machine breaks, so it looks to me like you can never win because the machines don't have a breaking condition. – Kevin Apr 30 '15 at 07:06
  • 1
    @Kevin the "breaking condition" is being hit hard enough with a hammer. The intention of the last bullet point was to rule out the possibility of opening the machine to manually rearrange the money, while still allowing you to eventually obtain the money you created. – Mike Earnest Apr 30 '15 at 07:13
  • 1
    Thanks! I understand now. I read it as, "Before you can attempt to get the money, the machine must reach a broken state," not as, "Getting money out of the machine breaks it." – Kevin Apr 30 '15 at 07:20
  • I remember that IMO question! The answer (although I didn't get it) was really counterintuitive: it looks as though it's going to be impossible, but actually there's a constructive proof that it's possible. – Rand al'Thor Apr 30 '15 at 07:42
  • 11
    Don't take the deal! Mr. Buffet doesn't have a trillion dollars to give you! It's a trick! :) – Golden Dragon Apr 30 '15 at 12:29
  • 5
    Warren Buffet doesn't have a trillion dollars. And even if he did, you wouldn't be able to spend it without collapsing the currency, thus making your own holdings worthless. – Jiminion Apr 30 '15 at 13:45
  • 6
    Also, how much volume would a trillion dollar coins occupy? – Jiminion Apr 30 '15 at 13:47
  • 1
    ^ And how big are the boxes? – Warlord 099 Apr 30 '15 at 19:45
  • As stated, your poof rule is incorrect. It should be "Pushing the poof button beneath box number I will cause all coins to disappear from box i, and twice as many to appear in box i + 1." As stated, if there are 3 coins in box i, pushing poof causes one coin to disappear from i, leaving 2, and 2 to appear in i + 1. This produces an arithmetic, rather than geometric progression, and Warren's offer is quite reasonable, as long as the coins are not of very high value. – WhatRoughBeast May 03 '15 at 17:11
  • Is this American trillions (i.e. $$ 1,000,000,000,000$) or European ones ($$ 1,000,000,000,000,000,000$)? – Paŭlo Ebermann May 03 '15 at 20:15
  • @WhatRoughBeast the given rule allows to emulate your proposed rule (just press repeatedly until the box $i$ is empty) (at least assuming it takes zero time and efford to press a button), but not the other way around. – Paŭlo Ebermann May 03 '15 at 20:38

7 Answers7

100

Yes, you should definitely accept the deal.

The puzzle clearly states that pushing a button labeled "Poof!" will remove a coin (emphasis mine) from box $i$, and cause two coins to magically appear in another box. By means of swapping and poofing you can keep increasing the amount of money inside the machine to over one trillion coins, but this process takes time: pushing the "Poof!" button adds only one coin at a time, so in order to get one trillion, not counting the \$6 already inside, you'd need to push buttons no less than one trillion times.

Being the bright scientist that you are, you could create a machine that pushes a button, say, up to 100 times a second, if the button is extremely sensitive. Now ask yourself: how long would it take to push a button a trillion times? With basic maths, we find the answer to be $10^{10}$ seconds, or more than 300 years.

Unless you're also immortal, besides being such a genius, you won't be finished with that job in your lifetime. And even if you were immortal and could finish the job, the present value of that box is at most \$127.8 billion assuming an inflation rate of 2.5% and 100 button presses per second. (Increasing the button-press rate increases the present value; you'd need about 781 button presses per second to get it to \$1 trillion.) So get your trillion dollars quickly, as long as Warren Buffett is still alive and willing to pay for it, and retire for the rest of your life chilling out and solving puzzles.

GOTO 0
  • 13,549
  • 6
  • 47
  • 92
  • 2
    yesyesyes plus a trillion coins would weigh 8.1 billion kg, too much to carry to bank, inflation, a trillion dollars is too much to spend in one lifetime, etc etc etc – Mike Earnest Apr 30 '15 at 07:09
  • 9
    While I'm not sure that real world considerations have any merit on a Puzzling site, I find your logic irrefutable. +1. – Bill Michell Apr 30 '15 at 08:56
  • 1
    "By means of swapping and poofing you can keep increasing the amount of money inside the machine to over one trillion coins, " You haven't actually proven this. -1 –  Apr 30 '15 at 13:23
  • 14
    He doesn't want to prove it. He has proven to himself that he doesn't have the time to use it even if it were possible, therefore a single near instataneous transaction is perfect. – LeppyR64 Apr 30 '15 at 16:12
  • 4
    @JoeZ. But if you can't get to one trillion, that's even more reason to take the deal. Apply $(A \rightarrow B), (\neg A \rightarrow B) \vdash B$. You should still always take the deal. – Dorus Apr 30 '15 at 16:14
  • 3
    What if you link the button (s) to a 800GHz transistor? – March Ho Apr 30 '15 at 20:18
  • 1
    @JasonLepack So basically a present value argument? Makes sense, I guess. –  Apr 30 '15 at 21:36
  • 1
    -1 converted to +1 via editing. :P –  Apr 30 '15 at 22:50
  • 6
    Also, what is the effect of the existence of a money-making machine on the value of money? Would the very existence of this machine not lead to inflation, assuming that now more similar machines can be made? In which case the best course of action would be to take the one trillion and convert it asap out of money to goods which would resist inflation better. – Pranab May 01 '15 at 07:01
  • 1
    Also, is the machine big enough to contain so many coins? – vsz May 01 '15 at 18:27
  • 1
    Bravo, +1 for the real answer. Although, the question didn't actually state the terms under which Buffet would give the trillion dollars. Perhaps the fine print states he will pay you $1 per year for the next trillion years... – Michael May 02 '15 at 03:59
  • 1
    There's an even more important consideration no one has mentioned. Even if you could make more than $1 trillion in 1 year (perhaps if the box had a higher poof multiplier) what really matters is how long it will take you to make another box. If you can do it in a couple months take the money, invest it in non-duplicable assets, and make another one! – eMansipater Jan 23 '16 at 20:58
43

The answer, as I'm sure most people are guessing, is...

No. Don't sell!

Here's my solution:

Note, as I interpret the question, pressing "poof" adds two coins to the next box. May I be corrected if I'm wrong.

Solution:
1 1 1 1 1 1
0 3 0 3 1 1 (press poof on 1 and 3)
0 2 3 0 1 1 (press switch on 2)
0 2 0 6 1 1 (press poof on 3)
0 1 6 0 1 1 (press switch on 2)
0 1 0 12 1 1 (press poof on 3)
0 1 0 11 3 1 (press poof on 4)
0 0 11 0 3 1 (press switch on 2)
0 0 10 3 0 1 (press switch on 3)
0 0 10 0 6 1 (press poof on 4)
0 0 9 6 0 1 (press switch on 3)
0 0 9 0 12 1 (press poof on 4)
0 0 8 12 0 1 (press switch on 3)
... Each decrement of box 3 doubles the value of box 4, so once we've reduced box 3 to 0, box 4 will have 12 * 2 ^ 8 = 3072 in it.
0 0 0 3072 0 1 (press poof on 3)
0 0 0 3071 1 0 (press switch on 4)
0 0 0 3071 0 2 (press poof on 5)
...

As you can see, using the same logic as before, the final amount of money would be 2^3072, which is far more than a trillion (5.81 x 10^924, to be exact).
I'm sure this isn't even the highest value possible, but would answer the question.

PS: Don't trust Warren Buffett. He doesn't even have a trillion dollars!

Also, I apologise for the formatting. I'm new to SE.

Cubicon
  • 1,222
  • 11
  • 16
  • 1
    Your solution (and formatting) is excellent! – Mike Earnest Apr 30 '15 at 04:29
  • Thanks! I'm never sure about the formatting. I see lots of other answers on puzzling.SE that are so much fancier. – Cubicon Apr 30 '15 at 04:31
  • Maybe you can add a line in the end, that each decrement of box 4 would double the value of box 6 (that is what you mean, right?). It was at first a bit unclear to me, but excellent answer whatsoever. +1 – Mathias711 Apr 30 '15 at 06:24
  • I don't get how you come to the conclusion that the final amount is 2^3072 - you have 3071 coins in box 4. Where does 2^ come from? – F.P Apr 30 '15 at 10:11
  • @FlorianPeschka "Each decrement of box 3 doubles the value of box 4" – Taemyr Apr 30 '15 at 10:12
  • @Taemyr But box 3 is already empty, and box 4 has 3071 coins in it. I don't see the step that makes 3071 into 2^3072? – F.P Apr 30 '15 at 10:16
  • @FlorianPeschka Sorry, "using the same logic as before". Ie each decrement of box 4 doubles box 5. This incidently means that decrementing box3 to double box4 is wildly inefficient. – Taemyr Apr 30 '15 at 10:23
  • I though it 'added two' not doubled? ah no i see – Ewan Apr 30 '15 at 12:15
  • 3
    "Each decrement of box 3 doubles the value of box 4"? Each decrement of box 3 increases box 4 by 2. It doesn't double anything. – Holloway Apr 30 '15 at 14:43
  • @Trengot each decrement on box 3 mean a full cycle of poof on box 4 to 5 with a switch in the end (using box 3 coin) which will in fact double the value in box 4 – Rod Apr 30 '15 at 14:50
  • cheers @Rod, that makes more sense. – Holloway Apr 30 '15 at 14:55
  • I'm still not following the logic here. Pressing "Poof" on button 3 decreases 3 by 1 coin, and adds 2 coins to 4. Starting with 0 0 8 12 0 1 would mean box 4 contains 28 coins by the end of that step. There is no doubling going on here. – BlueBuddy Apr 30 '15 at 15:07
  • 1
    @Thebluefish - We're not pressing "poof" on box 3, we're pressing "poof" on box 4. If you exhaust the supply of coins in box 4, you'll have doubled that amount and added it to box 5. You'll end up with 0 0 8 0 24 1. Then you press "switch" on box 3. Every iteration of this loop will ultimately double the value in box 5. – Cubicon Apr 30 '15 at 15:23
  • That makes much more sense. The original wording made it sound like this was less of a loop and more of a single step. – BlueBuddy Apr 30 '15 at 15:24
  • I plugged 2^3072 into my calculator and got infinity. Impossible! – itriedacrab Apr 30 '15 at 15:52
  • 1
    @itriedacrab You need a better calculator - 2^3072 is only around 10^925 – Rob Watts Apr 30 '15 at 18:52
15

The machine is capable of making the following amount of money:

2*2^(2^...^2) dollars, where the tower is 2^...^2 + 1 twos high, where that tower is 16384 twos high.

Here is an explanation:

Let's start simple. It is clear that if box 5 contains n coins, and box 6 contains 0, then pressing Poof! n times on box 5 will result in box 5 containing 0 coins and box 6 containing 2n.

Thus we have the following rule, which we'll call Rule 5:

* * * * n 0 --> * * * * 0 2n

Now if box 4 contains n coins, and boxes 5 and 6 are empty, we can end up with 0 coins in boxes 4 and 6, and 2^n coins in box 5. To do this, we press Poof! on box 4 once, so that we have

* * * n-1 2 0

Then we apply Rule 5 and press Switch! on box 4, and repeat this process n-1 times. Since each time we apply Rule 5, we double what's in box 5, we end up with 2^n coins in box 5 in the end (after the final switch). Thus we have Rule 4:

* * * n 0 0 --> * * * 0 2^n 0

Now suppose we start with n coins in box 3, and boxes 4, 5, and 6 are empty. Then, similarly to the previous case, we press Poof! on box 3 once and then repeat the following until box 3 is empty: apply Rule 4, and press Switch! on box 3. At each step, the number of coins in box 4 will be 2 raised to the number of coins in box 4 from the previous step. Thus we have Rule 3:

* * n 0 0 0 --> * * 0 2^...^2 0 0, where the tower consists of n twos.

Here, it seems prudent to introduce some notation to simplify these expressions. I will use Knuth's up-arrow notation. The process of building a tower of exponentiation is called tetration, and I will use the symbol ^^ for it, so 2^^n is a tower of 2's that is n high. Thus Rule 3 can be better stated as

* * n 0 0 0 --> * * 0 2^^n 0 0

Similarly, by repeatedly applying Rule 3 and pressing Switch! on box 2, we could obtain Rule 2 that involves pentation, which is repeated tetration (so 2^^^n = 2^^(2^^...^^2) with n twos in total), but since we start with only 1 coin in box 1, this rule won't get applied exactly, so we'll skip it.

To obtain the promised amount, proceed as follows:

1 1 1 1 1 1
0 2 2 2 2 3 (Press Poof! on all 5 boxes)
0 2 2 2 0 7 (Poof! twice more on box 5)
0 2 2 1 7 0 (Press Switch! on box 4)
0 2 2 1 0 14 (Apply Rule 5)
0 2 2 0 14 0 (Press Switch! on box 4)
0 2 1 14 0 0 (Press Switch! on box 3)
0 2 1 0 2^14 0 (Apply Rule 4)
0 2 0 2^14 0 0 (Press Switch! on box 3)
0 1 2^14 0 0 0 (Press Switch! on box 2)
0 1 0 2^^(2^14) 0 0 (Apply Rule 3)
0 0 2^^(2^14) 0 0 0 (Press Switch! on box 2)
0 0 0 2^^(2^^(2^14)) 0 0 (Apply Rule 3)
0 0 0 0 2^(2^^(2^^(2^14))) 0 (Apply Rule 4)
0 0 0 0 0 2*2^(2^^(2^^(2^14))) (Apply Rule 5)

I believe that is the maximum amount of money you could potentially get out of this machine, but I'm not entirely sure.

Lothar Narins
  • 676
  • 6
  • 6
  • 8
    To give an idea of how fast tetration grows, suppose you were aiming for 2^^5 (much less than 2^^(2^14)). This is 2^(2^(2^(2^2)))=2^(2^(2^4))=2^(2^16)=2^65536 which is about 2*10^19729. That's way more than enough to give everyone currently alive on Earth a trillion dollars for every Planck time from the Big Bang to the heat death of the universe. – Rob Watts Apr 30 '15 at 18:45
9

Accept.

How would you legally own the money you created with the machine? If you just start to spend a lot of money (or just turn up at a bank with trillions of coins) and you can't prove where you got it from, you will be imprisoned for tax fraud. If you show them the machine, from the point of view of the government, you just made counterfeit money, so it will be confiscated and you will end up in jail. Unless you want to start a criminal enterprise and launder that money somehow, which, without good connections and experience in the criminal underworld only with a bunch of coins, will not be an easy and risk-free task. (The hundreds of years mentioned in GOTO 0's answer will be increased by orders of magnitude while you launder more than a trillion coins)

Much easier to just accept the one trillion dollars, which can happen legally, as you just sold a device to someone. You pay the taxes for it, and you have hundreds of billions of dollars left, which you now own legally.

vsz
  • 1,702
  • 1
  • 13
  • 21
  • If you're getting paid $1Tn and can't get past taxes you seriously need to reconsider your accountancy advice. – NPSF3000 May 04 '15 at 04:27
8

You reject the deal. Warren Buffet has only a small fraction of a trillion dollars. In fact, you'd need the top 22 richest people in the world's combined net worth to reach a trillion dollars. If this potential buyer is making an initial offer of more than 10x his available capital (and has to expect some negotiation), that should be a red flag that this will not end well for you.

(Of course, he could be lying by a factor of a thousand and you'd still become a billionaire, so you would have that going for you...)

corsiKa
  • 1,571
  • 1
  • 12
  • 16
5

Another reason you should take the deal is the fact that one trillion dollar coins will undoubtedly take up more space that your machine's 6th box can hold, let alone the amount of space that would be needed for the machine's other five boxes.

To help put it in perspective check out this link: http://www.kokogiak.com/megapenny/fourteen.asp

1,000,000,016,640 pennies occupy a space much larger than the Lincoln Memorial. Now keep in mind that each one dollar coin occupies even more space than a single penny.

Unless you spent tons of money creating an unfathomably large machine to hold all of these coins in the six boxes, I would definitely take the money being offered to you.

Warlord 099
  • 1,784
  • 1
  • 11
  • 13
-2

You accept the offer, but on grounds different to that of GOTO 0, which appears to be brute force logic but not an analysis of the underlying system.

Simply put, if you 'poof' a coin, the two coins created move over to the next box.

You can't swap the coins back because "pressing a button beneath an empty box does nothing." (Edit: it's also not possible because "Pressing the "Switch!" button below box i will cause a coin from box i to disappear, and switch the contents of boxes i+1 and i+2 ." - which isn't i itself but the next two boxes along) - swapping back is therefore not possible.

If you 'poof' the coins in box two (or swap them), they will eventually end up in box three, so on and so forth until they reach box 6.

Once all coins end up in box 6, as per the term "pressing a button beneath an empty box does nothing.", it's no longer possible to swap the coins back. They become trapped in box 6, with no 'poof' button.

Your total amount of earnings would be 63 dollars (presuming the condition that once all coins are inside box 6 result in the machine breaking).

So yes, accept the offer: the machine is a scam.

Layton
  • 13
  • 2
  • 1
    You need to use a bit of lateral thinking to see the algorithm for swapping coins in a way that allows you to get a lot of them. –  Apr 30 '15 at 13:24
  • The algorithm wouldn't exist, because swapping takes a coin from the current box, but does not swap back. So say you had boxes [1][2][3] - the coin in 1 would disappear, but the coins in 2 and 3 would swap (which doesn't move back into 1). Even if you 'poofed' a later box, like [5] - that coin disappears, and no coin can be recovered. – Layton Apr 30 '15 at 14:10
  • Have you read the way the algorithm does it in the solution? It takes a bit of time (until the third or fourth box) for the algorithm to really explode. –  Apr 30 '15 at 14:11
  • The gist of it you want to decrement the coins in the second and third boxes, and then spend one coin in the first box to switch them so that you can do it again. –  Apr 30 '15 at 14:12
  • It's a matter of observing the terms 'i', 'i+1' and 'i+2' (as a programmer it's easier to imagine). If i was 1, then 1+1 would be 2, and i+2 would be 1+2 thus 3. The coins can only ever move forward even if swapped, but never back, and always take a coin previous. Poofing only modifies the next box along, not the current one, which means a box cannot regain coins in order to enable the switch functionality (once it has no coins, the buttons don't work). 63 is the maximum coins you can get. – Layton Apr 30 '15 at 14:12
  • 1
    A box doesn't regain any coins, it just moves them along. Have you seen the above solutions? –  Apr 30 '15 at 15:02
  • 2
    This is very wrong. If you look at Lothar's proof, you'll see exactly how you can create more coins than there are Planck volumes in the observable universe. – Rob Watts Apr 30 '15 at 18:51
  • @Layton I thought the same for a bit, but your claim, "the coins can only move forward even if swapped" is not true. The key observation I made that changed my mind is that if box i+1 has fewer coins than box i+2, pressing "Switch!" on box i moves coins backwards! – Daniel Wagner May 01 '15 at 02:21