Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
How much change is in a vending machine? (pagetable.com)
33 points by wglb on July 4, 2010 | hide | past | favorite | 18 comments


I'm a big fan of estimation:

If you've ever seen the guys refilling the machine, you know it's got a slot for every drink button. There are about eight buttons on the average machine, and I'm guessing that each row holds about a case of soda -- 24 units (cans or bottles).

So, that's 192 refreshing beverages per machine.

Now, they don't just wait until everything is empty to refill, and not every customer is going to pay with two $1 bills. So, let's make a couple of assumptions:

1. They refill the machine when it's about half-empty, so you only need change for about half of what the machine holds.

2. If you put in $2, you get back $0.75 in change (if the soda is $1.25), but we don't need to do that every time.

3. Given the usage patterns that I've observed, I'm figuring that we only need to provide change for about every third bottle, so we need about a quarter for every drink unit that we sell.

Put those together, and you get $24 in change.


This assumes that the change dispenser is emptied at the same time that the machine is refilled. This is a reasonable assumption, but not a self-evidently correct one.


I know in the grocery store (in the US) where I worked in high school, this was incorrect. The store was responsible for sticking the change, the armored truck was responsible for collecting the receipts, and the vendor was responsible for stocking the product. Granted, this is the most complex case and relies on the abnormal relationship that vendors have with supermarkets, but I would suspect that it represents a nontrivial percentage of machines.


I love that. I had to do a similar calculation for how much change would be needed for a film festival. I was a volunteer that handled the cash and we needed to know how many $1, $5, $10 and $20 bills to have on hand so that we could always accept cash when people bought tickets.

I did a similar calculation making reasonable assumptions (most people buy two tickets at a time, most people pay with a $20 bill, etc.). It was fun and worked out quite accurately.

Best part was taking the actual funds collected and reevaluating to minimize the amount of cash needed.


In most vending machines, inserting a coin and then hitting the change return button will return a different coin than the one that was inserted. Do this a large number of times and you will likely see all the coins. (Also useful for collecting the state quarters.)


When I was a high school student, a friend found a brute force attack that worked on the machine in our campus (ie. kicking it right below where the coins go).

I can say he reached a similar result.


I'm not interested in this question per se, however I am interested in vending machine design. It is only recently that some vending machines are able to take my money AND dispense my purchase (soda pop) fairly near waist level (3-4ft from the ground). However, the change dispenser of this machine is still less that 12" from the ground meaning serious bending over or kneeling to obtain the change. Why cannot change be dispensed at the same height as money in and product out - especially if there is a separate dispenser for it?


The design for the change dispenser is predicated on the same design principle as the soda dispenser: maximize the storage for items to be dispensed and utilize gravity to do the dispensing. If you move the slot up, you either change the dispensing mechanism or you reduce the quantity stored.


Lets find out by tipping it over!


I don't know why this was modded down--it's a valid solution in the finest tradition of the Gordian Knot: http://en.wikipedia.org/wiki/Gordian_Knot


Sorry, I don't know what you mean. I just left my comment, which was just a joke about tipping over the vending machine, a common practice when you want to find out whats in it. Sorry for any confusion.


Wikipedia is down, so I'll tell the story as far as I remember it:

There was an infamous knot called the Gordian Knot. It was an actual knot, very difficult to untie. There was some prophecy or other that the person who was able to solve the Gordian Knot (by presenting the two separated ends of the knot) would rule all of Asia or something. Anyway, Alexander the Great faced the knot, carefully considered the problem for a minute or two, drew his sword, and cut it in half.

So a Gordian Knot is something that seems to be a complex intellectual puzzle you can spend a lot of time and effort meticulously working at, or you can just "cheat" and get the same result out of it, and it doesn't really matter in the end. There's a similar joke about a mathematician, a physicist, and an engineer finding the height of a building--the mathematician measures the building's shadow and the angle of the sun and derives the answer with trigonometry, the physicist drops a stopwatch off the roof and derives the height from the time on the stopwatch when it hits the ground and breaks, and the engineer steps inside and asks the superintendent how tall the building is.


"Wikipedia is down, so I'll tell the story as far as I remember it..."

Your introduction warmed my heart. An air-conditioning plant fails in Florida and the art of storytelling from memory is rekindled.


ah, I see what you mean. Thanks.


Vending machines in Ireland(my home country) don't have a change button, they have a return coin button(no notes usually). And once you have bought something, if there is no change in the machine it won't give you any back.

Some vending machines have small lcd's that say no change when out, most don't. And a can that should have cost Euro0.80 has now cost Euro1 or if your unlucky then Euro2(if you used the two Euro coin).


Why not just wait until the guy who changes the food comes in and ask him?


You could offer a barometer in exchange.


this references the "barometer problem" legend:

http://www.snopes.com/college/exam/barometer.asp




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

Search: