2024 Author: Malcolm Clapton | [email protected]. Last modified: 2023-12-17 03:44
This puzzle is often asked to solve in interviews. Check if you can beat her and win the employer's heart.
Three machines with ice cream, which operate on the principle of self-service, were delivered to the food court of the shopping center. Visitors take the cone and approach the machine with the taste they like: one gives out a vanilla dessert, the second a chocolate one, and the third fills the cone in a random way - either vanilla or chocolate. For any ice cream, you will give one coin.
Each vending machine has a sticker with the name of the offered flavor. True, there was some kind of malfunction at the plant, so all the stickers were mixed up. Now the wrong one hangs on each of the devices. How many coins do you need to spend to find out where is which machine?
First, let's give each of the machines a name:
1. "Vanilla".
2. "Chocolate".
3. "Random".
Now let's take one coin and put it into the slot machine with the "Random" sticker. The inscriptions always lie, which means that the vending machine definitely cannot dispense random ice cream. We can determine its true name based on the taste of the dessert that will be given to us. Let's say we were offered vanilla ice cream, so this is a machine called "Vanilla".
Then everything is simple. There are still machines with two stickers: "Chocolate" and "Vanilla". But we've already found the source of vanilla ice cream. Thus, there are only two options left: a device that gives out a random taste, and one that is guaranteed to fill the cone with only chocolate dessert.
Again, we remember that stickers are always deceiving us. So the vending machine labeled "Chocolate" can't really dispense chocolate ice cream. This is "Random".
The remaining device with the "Vanilla" sticker offers exclusively chocolate ice cream.
Answer: we only need one coin to understand what kind of ice cream the machines give out.
Show solution Hide solution
Recommended:
10 cool cold coffee recipes with chocolate, banana, ice cream and more
Cooling down and invigorating is incredibly easy. You just need to choose the iced coffee of your choice. It only takes a few minutes to cook
3 delicious homemade ice cream recipes
Coconut, strawberry with cookies and banana ice cream - your favorite dessert will be even tastier if you choose the ingredients that you like the most
Workout of the day to help you work out a slice of pizza or ice cream
We tell and show you how to burn calories and not torment yourself with guilt if you are tempted by something forbidden and tasty
15 homemade ice cream recipes that are much better than store-bought ice cream
Coconut, chocolate, banana, mint, with avocado, mango, condensed milk and other homemade ice cream from simple products without questionable additives
RECIPES: 3 Ingredient Homemade Ice Cream (no ice cream maker)
Here's how to make amazingly delicious homemade ice cream - so that you get the coveted creamy ice cream, not a simple lump of milk