Three friends are sharing a hotel room. The hotel manager tells them the bill for the night is $30, so each of the three friends pays $10. Later on, the manager realizes she made a mistake; the nightly rate is in fact only $25. So she gives $5 to the bellhop to take to their room. The bellhop figures that $5 is hard to split three ways, so he pockets $2, and returns $3 to the three hotel guests, $1 to each. Now each of the three friends have actually effectively paid $9, (since they each got back a dollar) and the bellhop got $2, for a total of $9+$9+$9+$2 = $29. But there were $30 at the beginning of the story. What happened to the extra dollar?
The point of this note is to explain a way of thinking about money and debts and obligations that makes answering this riddle completely straightforward. In fact, what it does is make the sneaky part of the riddle very hard to hide. Also it's useful in real life for things like keeping track of money you've loaned to friends, dividing bills on road trips, coordinating utility bill payments with roommates, and so on.
It's not a new way of thinking at all. It's double-entry bookkeeping, which got invented hundreds of years ago, probably in Italy, but depending on who you ask (or what you consider to be the fully working idea) it can be traced back to earlier times and other cultures.
But I'm going to try to put my own spin on it, and bias the description toward examples that I (and hopefully you) find relevant as an ordinary person. Most of the other explanations I've seen online and in textbooks are more about the accounting in a company, with revenues and profits and sales and inventory and so on. I don't have any of those things; I have things like gas bills and a checking account and paychecks and security deposits and personal income tax and friends that I owe money to.
So that's the plan: double-entry bookkeeping, for ordinary people. Plus there'll be some pretty diagrams to look at.
Money is conserved. Money is neither created or destroyed, but merely moves from place to place. One chunk of money moving from one place to another is called a transaction. The place the money moved from is called the source of the transaction, and the place it moved to is called the target.
You can group together sources and targets of transactions however you like. Such a grouping is called an account.
Negative numbers are ok.
That last one there is me (over)reacting to the standard terminology about 'debits' and 'credits' and 'debit accounts' and 'credit accounts'. I find it confusing and unnecessary to name them different things, no matter how useful it was back in the day when negative numbers were new and mysterious. We all learned about negative numbers in elementary school, so let's use them.
Suppose you have a collection of non-overlapping accounts that together cover all transactions. To put it another way, suppose you have a collection of accounts such that every endpoint of every transaction belongs to one of those accounts. Then the sum of all money in those accounts is zero.
This is a sort of global 'conservation law' that is derived from the 'local conservation' property that each transaction only subtracts money from one place and adds money somewhere else. It is where the name 'double-entry' in double-entry bookkeeping comes from, historically: if every account has its own account book, then every valid transaction causes two entries, one in the account it's taking money from, and the other in the account it's putting money into. And if you faithfully make double-entries for each transaction, then at the end of the day, all of your books are 'balanced', and all accounts sum to zero. So finally we can conclude that the trick of the 'missing dollar' comes from expecting the wrong sort of conservation law. It's not even clear what principle is behind it: the storyteller incorrectly adds up $9 + $9 + $9 + $2 (note how sneakily ignored the minus sign is on the -$9 gained by each hotel guest) and getting $29, and asks innocently why this is close (but not quite equal!) to the $30 that participated in a few transactions early on in the story. The 'riddle' is really just a bit of misdirection, persuading you that some fact that should hold has been violated. No such thing has happened! The Fact listed above is the thing that should hold, and it does. To be continued...