📈 #39 How a small bakery leads me to think about computational complexity theory
Without getting lost in the complex world of optimization algorithms.
On Friday, I entered a small bakery, and my feverish mind couldn't stop thinking about the optimization problems this small business could face.
There was everything on the counter, and I bought some tea pastries, and since they had artisan ice cream, I took the opportunity to have one.
The thing is, I started thinking about ingredients for making the pastries, the size of the ovens, the cooking time, how to calculate a fair price for each item, and how, given the final price, I would try to maximize profits...
In short, a madness that lasted as long as the ice cream survived in my hands.
But a madness that I wanted to share with you so that you could see, here at Feasible:
🧁 How I would maximize profits in a small bakery
📈 What would happen if I could sell non-whole parts of any pastry
🔢 How the problem would change if I could only make and sell whole pieces
So... Let's go for it!
🧁 Maximization of profits in a small bakery
Put yourself in the baker's shoes.
Every morning, you wake up at 3 AM. You shower, have a coffee, and arrive at the bakery in no time because it is very close to your home.
You turn on the oven, make sure you have all the ingredients, organize the work for that day, and start preparing different doughs.
Bread, tea pastries, croissants, cookies, cakes...
You let all the doughs bake, give each one a final touch, and place them on the counter just 5 minutes before opening at 8:00.
Given that the oven has a maximum size and you want to sell as much as possible, how do you ensure that this happens?
To keep it simple, let's say that day you're only going to make cookies and cakes.
Cookies are sold for 1€, while the cakes are sold for 10€.
However, the oven has a maximum capacity of 17.5 units. Since the cakes are larger than the cookies, the cakes occupy 7 units each while the cookies occupy 1 unit.
Additionally, chocolate chips for the cookies have become very expensive due to inflation, which limits the production of cookies to a maximum of 3.5. It's a bit odd to have only half a cookie, I know, but it could simply be a smaller cookie than usual.
In this scenario, if you assume that you will sell all the cookies and cakes you make, what could you do to maximize the day's revenue?
Keep reading with a 7-day free trial
Subscribe to Feasible to keep reading this post and get 7 days of free access to the full post archives.