LibraryQuant puzzles

Reading a Ledger That Runs Below Zero

Quant puzzle · intro · free, full solution

The question

Three flatmates keep a jar for shared costs and a notebook beside it.

This morning the notebook reads minus 18 dollars.

Four things then happen, in this order.

  1. Each of the three flatmates puts 9 dollars into the jar.
  2. Going back through the book, a charge of 12 dollars is found to have been entered twice. One of the two entries should never have existed, so it is struck out.
  3. A bill for 30 dollars arrives for something already delivered, and is entered.
  4. The book also keeps a line per flatmate. Those three lines read minus 4, minus 26, and 15.

Three questions.

  1. What does the balance read after each of the first three steps?
  2. One flatmate looks at the strike-out in step two and says that removing a charge should push the balance down, because removing is a taking-away. What is the short answer?
  3. Somebody looks at the three personal lines and says the one reading minus 26 is best placed of the three, since 26 is the largest number on the page. Settle it.

Hint

Treat the balance as a position on a line, with debt on one side of zero. For the strike-out, ask what the struck charge had been doing to the kitty while it stood in the book.

The idea behind it

A sign records a direction and the digits record only a distance, so two signed amounts cannot be ranked by their digits. The second half is the strike-out: removing an entry that was working against the balance moves the balance the other way, which is all that two minus signs ever meant.

Worked solution

Walking the balance

Start at minus 18. That is not an error mark and not a smaller kind of number. It is a debt of 18 dollars written in one symbol instead of two words, which is what a negative number is.

Step one. Three lots of 9 dollars is 27 dollars going in. Start at minus 18 and move 27 to the right along the number line. The first 18 of those dollars clear the debt, and the remaining 9 are actually in the jar. The book reads 9.

Step two. A charge of 12 is struck out. Take that slowly in the next section. The balance reads 21.

Step three. A bill of 30 is entered, which moves 30 to the left. From 21 that lands on minus 9. The book reads minus 9, and the kitty is once again in debt, by 9 dollars.

Three readings: 9, then 21, then minus 9.

Line chart of Balance (dollars) against Step (0 is the start of the morning). Balance in the book. 0: −18; 1: 9; 2: 21; 3: −9. Reference line zero at y = 0.Balance (dollars)−20−1001020300123Step (0 is the start of the morning)three lots of 9 dollars ina charge of 12 struck outa bill of 30 enteredzeroLine chart of Balance (dollars) against Step (0 is the start of the morning). Balance in the book. 0: −18; 1: 9; 2: 21; 3: −9. Reference line zero at y = 0.Balance (dollars)−20−1001020300123Step (0 is the start of the morning)three lots of 9dollars ina charge of 12struck outa bill of 30 enteredzero
The kitty balance crosses zero twice, rising when money goes in or a wrong charge is struck out and falling when the bill arrives.

The strike-out

The objection sounds reasonable. The jar answers it, not a rule.

The charge of 12 took 12 dollars out of the shared money. It was entered twice, so the book recorded that departure twice while it only happened once. Striking out the extra entry does not remove 12 dollars from anybody. It removes a claim against the kitty that was never real, and the kitty is 12 dollars better placed than the page had been saying.

Written as arithmetic, the book subtracted a minus 12 and the balance went up by 12. That is the entire content of the rule about two minus signs meeting. Nothing mystical occurred. Removing something that was working against us works for us, and the notation is only reporting that.

The general shape: taking away an entry moves the balance the opposite way from the entry itself. Take away money paid in, the balance falls. Take away a debt, the balance rises.

Which flatmate is best placed

Not the one at minus 26. That flatmate is furthest from being square, in the direction nobody wants.

The digits in a signed amount say how far from zero it sits. The sign says which side of zero. Ranking three lines by their digits alone throws away the half of the information that decides the order. It produces the exact reversal we have here: minus 26 is the biggest distance and the worst position.

Ordered from best placed to worst: 15, then minus 4, then minus 26. The one holding 15 is the only one of the three in credit at all.

Two honest warnings before this gets carried too far.

The sign is a convention rather than a property of the money. This book records what the kitty holds, so a debt is negative. A flatmate keeping their own book, to track what the kitty owes them, would record the same situation with the signs the other way up, and that book would be just as correct. Nobody can read a ledger whose convention is unstated, which is why the convention is worth one sentence at the top of every page that has signs on it.

And zero is not a wall. The balance passed through it twice today without anything breaking. If a balance really could not go below zero, what would the notebook have written this morning?

One check

A line reads minus 7. A payment of 20 comes in, so it reads 13. Then a charge of 5 that was entered by mistake is struck out, so it reads 18. If those two came out at 13 and 18, this landed. If the strike-out pulled it down to 8, the strike-out section above is the cheap place to go back to.

In short

The book reads minus 18, then 9, then 21, then minus 9. Of the three personal lines the one holding 15 is the only one in credit, and the line at minus 26 is the worst placed of the three rather than the best.

Learn quant finance on Thuztra Learn

Thuztra Learn teaches the maths of quant finance from zero, in short lessons, for readers who are unsure of it. Three questions in the app build your quant roadmap, free. Membership is a paid subscription. See what Thuztra Learn is and what it costs, or see the whole Core quant curriculum.

Get the app and answer the three questions:

Download on the Microsoft Store Download for Android

On Android, the app is a direct download, not a Google Play listing. Which devices, and what each one needs.

Further reading

Related problems

Topics

Also in the library