From The Sunday Times, 16th July 1978 [link]
Recently a hot-drink vending machine was installed in our office. Very nice it is too — completely up to date it was when it was bought. There are five switches, a slot for your money, and a button. The switches are labelled TEA, COFFEE, CHOCOLATE, MILK and SUGAR, and you select the combination you want, put in your money, press the button, and out comes your drink. Why, you can even have coffolatea if you want!
At least, this is the idea. Unfortunately, during the ten years it has been in store, “awaiting approval”, mice have chewed up the wiring. Mice with soldering irons, I should think. The result is now that no switch affects its “own” ingredient at all, but instead turns on two other ingredients, each ingredient being turned on by two different switches. However, if two switches are set which turn on the same ingredient, then they cancel each other out, and that ingredient doesn’t come out at all.
The result is somewhat chaotic, though occasionally some of the output is actually drinkable. For instance, when you ask for white sweet coffee, you get unsweetened milky tea; when you ask for sweet milky chocolate, you get sweet chocolate without milk; and when you ask for unsweetened milky tea you get a glorious gooey mocha — i.e. chocolate and coffee with milk and sugar.
Luckily, pressing the “deliver” button reinstates the original chaos, so that setting the same switches always gives the same results.
So, what is the easiest way to get white coffee without sugar? (i.e. Name the fewest switches that will deliver just coffee and milk).
This puzzle is included in the book The Sunday Times Book of Brain-Teasers: Book 1 (1980). The puzzle text above is taken from the book.
[teaser884]
Jim Randell 1:38 pm on 10 December 2021 Permalink |
This is an exercise is generating and solving simultaneous equations. No programming necessary.
If we suppose B lives a distance d from A.
Initially (at time 0) if the goods train passes A travelling south at speed 2v, then it reaches B at a time of (d / 2v).
At this time, the passenger train, with a speed of 3v passes B, heading north.
And the slow train, travelling at speed 2fv (i.e. some fraction of v), reaches A at a time of (d / 2fv).
And at this time a train travelling at 6fv passes A heading south.
These trains pass at time t1 at a point 25 km south of A:
And then at time (t1 + t2) the two trains pass A and B:
Equating these:
So A and B are 65 km apart, and f = 4/5.
We are not given any times, so we cannot determine the actual speeds of the trains.
Solution: Anton and Boris live 65 km apart.
LikeLike