Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think it obvious that he did not sort the bills. The article say that he and his wife spend all their time going through stacks of bills, stopping only to eat and bathe (and they couldn't even check all the money in time). If they sorted the money it would have taken him looking at under 20 bills to determin if he had the matching bill or not.


So they lost because that was what happens when a hacker doesn't take the time to learn about algorithms and data structures, eh?

I think you could probably, after some practice, radix-sort bills into a 10×10 array by a digit pair at about 4Hz by hand, maybe 1Hz at the outset. 100k / 4Hz would be about 7 hours, so your initial sort pass (with piles averaging 1000 bills) would take 7 to 28 hours. A second sort pass over the next most significant digits would take another 7 hours, and then the bills would be sorted into groups of about 10. At that point you'd want to put the money into, say, a thousand or ten thousand envelopes, organized into drawers or folders or something, so that when the DJ calls the number, you open the right drawer, pick out the right envelope, and scan through the five, ten, or twenty bills in there to find the right one, if you have it.

You could do the passes lazily, too. Spend the 7 (or 28) hours to do the first sorting pass into piles of 1000. Then, when the DJ reads out the number, pick out the right pile of 1000 and spend 4 minutes sorting it into 100 piles of 10 or so, which you then stuff into 100 envelopes, possibly calling the DJ at the time. If the DJ calls another number with the same leading two digits, you're prepared; if not, hey, it's 4 minutes.

So you're right.

Sad. He legit hacked the Press Your Luck show by figuring out hidden patterns that he could use to do the apparently impossible. Too bad he didn't have the knowledge to hack the DJ's contest.

Sadder still that he let the money come ahead of his girlfriend.


I certainly agree with you that sorting makes sense, and that sounds like a logical algorithm. I think 4Hz, or even 1Hz, is wildly optimistic though. 100,000 bills is bags and bags of cash. You're going to be spending a lot of time dealing with the envelopes and folders and things. You're certainly not going to be able to make 10 piles of 10,000 bills each in front of you. As soon as you get more than a few bills in a pile you'll need to spend time straightening them, putting them in envelopes or whatever, pulling more bills out of the bags, etc. Not to mention resting your hands and eyes. You could make it easier with cash trays or something to keep them from flying all over the place as you sort, but even so, there's no way you're going to be firing out more than one a second continuously for hours.


I wasn't suggesting making 10 piles; I was suggesting making 100 piles. (With cash trays with cubbyholes you could reasonably do 1000.)

You can take, say, 300 bills in your off hand, use your thumb to flip each new one, and use your good hand to take it from the handful and place it into one of the 100 piles within arm's reach on the table, according to the digits you saw on it while your hand was returning from placing the last one. If you're doing this in 800ms, then when your hand is empty, you have spent 240 seconds and can easily spend 10 seconds picking up and riffling another 300 bills, bringing you to 270. After two hours of this, you have sorted 8000 bills into 100 piles of 80 or so bills; you should now take a ten-minute break. After another two hours, you should spend five minutes putting those 100 piles into envelopes so they don't fall over, and take another ten-minute break. (Or a half-hour break for lunch, which I wasn't counting as part of the workday.)

That's what 1Hz looks like, and I think you can get to that speed pretty much right off the bat, especially since accuracy is not crucial here (unlike in almost all cash-handling operations!). And yeah, 4Hz sounds "wildly optimistic", but it isn't, really. That kind of speed improvement for manual movements with experience is common for assembly-line tasks. Watch the knife movements of a sous-chef on video, and consider that every one of their movements is irrevocable; they don't get a chance to spend time straightening crooked cuts.


That's still a lot of bill sorting though. Not sure if you can demand sequential bills from the bank, but getting your bills pre-sorted might have been the best option, then it's just a matter of looking at the first and last bills.. Could have even just left it at the bank knowing the digit range and avoided the whole theft problem.


Oh sure, and take all the fun out of the problem by invoking an oracle....


hey lateral solutions are the most fun.

some other obvious ideas:

- only the serial numbers matter not the physical bills, write them down on a ledger with an index

- bill reading machine with simple ocr, scans all serial numbers into a db

- solve the opposite problem: given the dj's serial number, is it possible to track down that particular bill? Arbitrage the opportunity by running the same contest in other states for a lower sum




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: