x

# The 3 wallets problem

by

This post was released for Issue 17 of Bitcoin Magazine as part of a series of articles about puzzles and games that started with Issue 12.

Here I present a few challenges for bitcoin hoarders, about keeping bitcoins in separate wallets according to some restrictions. Have fun solving them!

Suppose that I have 10 bitcoins and I want to store them in 2 separate wallets (A and B) without splitting coins (that is, not using fractional units). Keeping a wallet empty is allowed. It’s easy to figure out that there are 11 ways of doing so: (0,10), (1,9), (2,8), (3,7), (4,6), (5,5), (6,4), (7,3), (8,2), (9,1) and (10,0).

Figure 1: Example of legal distribution

Challenge 1: Now suppose that I have 1,000 bitcoins¹. How many ways of distributing them among the two wallets are there?

Now suppose that, for security reasons, I don’t want to keep more than 800 bitcoins in a single wallet.

Figure 2: Example of legal distribution.

Figure 3: Example of illegal distribution (there are more than 800 bitcoins in the right wallet).

Challenge 2: How many ways of distributing those 1,000 bitcoins are there now?

Now suppose we add a 3rd wallet and I have no capacity restrictions. Remember that keeping some wallets empty is legal.

Challenge 3: How many ways of distributing those 1,000 bitcoins among the 3 wallets are there?

Figure 4: Example of a legal distribution for 3 wallets and 1,000 bitcoins.

Let’s add a capacity restriction of 800 bitcoins per wallet once again.

Challenge 4: How many ways of distributing those 1,000 bitcoins among the 3 wallets are there now?

Now for those that have cheated by using a computer to solve the previous challenges…

Challenge 5: How many ways of distributing 21 million bitcoins among 3 wallets with a maximum allowed capacity of 10 million each are there?

And now for those that have solved all the challenges so far, suppose that wallet A has a maximum allowed capacity of 5 million bitcoins, wallet B has a maximum allowed capacity of 10 bitcoins and wallet C has a maximum allowed capacity of 15 million bitcoins.

Challenge 6:  How many ways of distributing those 21 million bitcoins among the 3 wallets are there now?

And finally, let’s add a fourth wallet and remove the capacity restrictions.

Challenge 7:  How many ways of distributing those 21 million bitcoins among the 4 wallets are there now?

Please post your answers in my forum:

http://nestorgames.freeforums.org/bitcoin-magazine-puzzles-f16.html

... and I will reward the best post with a copy of one of my games. I’m looking forward to discussing your findings. Thank you for reading and for your donations!

You might also enjoy my previous posts:

- Bitcoinstellations

- Rise of the machines- Creativity as problem solving- The Bitcoin Maze- The Bitcoin Harvest------------------------------------------------------------------------------------------1. Unfortunately I don't!

### Op Ed: With Bitcoin, Anarchy Is the Point, Not the Problem

In a SXSW panel discussion, IBM’s Christopher Ferris asked bitcoiner Jimmy Song if he was arguing for anarchy over a regulated financial system . In this op ed, Kyle Torpey posits, "Yes! That’s the whole point!"

Kyle Torpey

### Op Ed: Hanging Money Launderers Out to Dry: The Role of KYC/AML in Blockchain

In this op ed, CoolBitX CEO Michael Ou argues that "anonymity contributes to cryptocurrency’s notorious volatility and makes it that much less likely that digital currencies will become stable stores of value."

Michael Ou

### Bitcoin Price Analysis: Slow Grind Could Lead to Short Squeeze

Last Friday, we discussed a macro resistance level bitcoin would likely test. The level was tested three times prior and immediately rejected. Now, for the fourth time, we find ourselves situated above the level as we wait to see if our support holds.

Bitcoin Schmitcoin

### Bitcoin Price Analysis: Could Three Times Be the Charm for This Resistance Level?

Bitcoin remains in its tightly coiled range as the market continues its sideways trend for the third week in a row.

Bitcoin Schmitcoin