Back to List

Sandwich Engineering - Chapter 4

Author: Youngjin Kang

Date: January 26, 2025


Manufacturing of a Sandwich

Sandwich Engineering - Chapter 4 (Figure 1)

So far, I have only been explaining what a sandwich "is", not how it can be produced.

"How to make a sandwich?" is an indispensable question, and we must be able to answer it in order to be able to enjoy a sandwich as our lunch menu.


Sandwich Transformation

If we want to understand the way in which a sandwich is being made, we should first learn how one type of sandwich can be transformed into another. Let us revisit our cheese sandwich example to see what I mean by this.

Sandwich Engineering - Chapter 4 (Figure 2)

As you can tell from the picture above, a cheese sandwich is the result of making a stack out of a piece of bread, a slice of cheese, and another piece of bread. Suppose that we have made this sandwich already. In which ways will we be able to modify it?

Here is a simple example. Let us take off the top piece of bread. This will change this "cheese sandwich" into a "cheese open sandwich".

Sandwich Engineering - Chapter 4 (Figure 3)

It can no longer be just called "sandwich"; instead, it is now required to be called an "open sandwich" because its upper portion is not being closed by a piece of bread.

This is an example of a transformation. Removing the topmost item from the stack turned our cheese sandwich into a "cheese open sandwich". Such a process can be expressed as an arrow (see the diagram below).

Sandwich Engineering - Chapter 4 (Figure 4)

The opposite scenario is equally feasible. We can add back the piece of bread to the top of the "cheese open sandwich", thereby recovering our original cheese sandwich.

Sandwich Engineering - Chapter 4 (Figure 5)

Here is another example. What if we wish to convert our cheese sandwich into a "double-cheese sandwich" instead, by putting an extra slice of cheese in it?

Sandwich Engineering - Chapter 4 (Figure 6)

This one is a bit tricky. Previously, we were simply dealing with the uppermost part of the sandwich, so every related action could take place immediately. In contrast, we cannot convert our cheese sandwich into a "double-cheese sandwcih" just by fiddling with its topmost ingredient. The following image shows what needs to be achieved.

Sandwich Engineering - Chapter 4 (Figure 7)

We are trying to put a slice of cheese in between the existing cheese and the bread which sits on top of it. Can we do this by removing the top bread? No, because it will merely turn the sandwich into an open sandwich. What about stacking cheese on top of the sandwich? No, because it will make the top bread be "stuck" between the two slices of cheese.

The solution must be pretty simple as long as we think of it as a multi-step procedure. First, we just take out the top bread to expose the cheese. Next, we add an extra slice of cheese on top of the existing cheese. Finally, we put back the top piece of bread.

Sandwich Engineering - Chapter 4 (Figure 8)

These three steps, when executed in the right order, will transform the cheese sandwich into a "double-cheese sandwich".

The diagram below is a more comprehensive illustration of what can happen between a "cheese sandwich" and a "double-cheese sandwich". Note that there are two intermediate states between the former and the latter.

Sandwich Engineering - Chapter 4 (Figure 9)

Reversible VS Irreversible

There are processes, however, which cannot be reverted. Imagine that we are trying to turn a cheese sandwich into a "cheese & hot sauce sandwich" - that is, a sandwich made up of a slice of cheese and a bit of hot sauce spread upon it. The following image shows the steps required to carry out this job.

Sandwich Engineering - Chapter 4 (Figure 10)

It is almost identical to the list of steps we saw before. The only difference is that, instead of putting an extra slice of cheese, we just put some hot sauce in it.

But be careful! The process of putting hot sauce is irreversible because it is in a liquid form. Take a look at a more comprehensive diagram which is shown below.

Sandwich Engineering - Chapter 4 (Figure 11)

Here, you can clearly see that there is no arrow which lets you convert the "cheese & hot sauce open sandwich" back to "cheese open sandwich". This implies that once you put hot sauce on your "cheese open sandwich" and turn it into a "cheese & hot sauce open sandwich", you are unable to turn it back to "cheese open sandwich" by simply taking out the hot sauce (because you can't).

This make sense, doesn't it? Hot sauce is made of gooey liquid, so we cannot just grab it and throw it away once it sticks to the surface of the cheese.

In general, we should be able to say that each transformation is either reversible or irreversible.

It is "reversible" when it comes with a pair of arrows (creating a two-way road). In contrast, it is "irreversible" when it comes with only a single arrow (creating a one-way road).

Sandwich Engineering - Chapter 4 (Figure 12)

Building a Sandwich from Scratch

Let us push these minor details aside, and focus on what is of utmost importance - making a sandwich from scratch.

Suppose we are facing an empty table. What do we have to do in order to come up with something which can be referred to as a "sandwich"? One thing that is for sure is that we need to prepare some ingredients, and then stack them one by one.

First of all, we know that the bottommost part of a sandwich is always a piece of bread. So let us start by putting a piece of bread on the table.

Sandwich Engineering - Chapter 4 (Figure 13)

This single piece can technically be called an "empty open sandwich"; it is "open" because its top is not closed by another piece of bread, and it is "empty" because there is nothing above the bottom piece of bread.

If we put another piece of bread on top of it, it will become a (closed) sandwich. Since there will be nothing between the two pieces of bread, however, it will be called an "empty sandwich"; it is no longer "open", but it is still "empty".

Sandwich Engineering - Chapter 4 (Figure 14)

What if we put yet another piece of bread on top of this "empty sandwich"? Oh, in this case, our sandwich will no longer be empty because its inside will be filled with something. This "something", though, is just a piece of bread, so we will have to refer to the whole thing as a "bread sandwich".

Sandwich Engineering - Chapter 4 (Figure 15)

This kind of naming should make sense. When there is ham between two pieces of bread, we call it a "ham sandwich". And when there is cheese between two pieces of bread, we call it a "cheese sandwich". So, if there is bread between two pieces of bread, we ought to call it a "bread sandwich".

The series of stacking processes we have carried out so far can be summarized as the ones shown below.

Sandwich Engineering - Chapter 4 (Figure 16)

First, we started from nothing. We added a piece of bread on top of this "nothing" and turned it into an "empty open sandwich". We then added another piece of bread on top of it to turn it into an "empty sandwich", and then another piece of bread on top of it to turn it into a "bread sandwich".

Note that these 3 processes are all reversible because each of them has its own opposite action which reverts its effect.


Tech Tree of Sandwiches

If we just keep stacking pieces of bread and nothing else, we will eventually end up producing just a bunch of boring sandwiches, such as "double-bread sandwich", "triple-bread sandwich", and so on. We need something other than bread in our sandwich.

Fortunately, there are alternative ways in which a sandwich could be constructed. We've got a plethora of different choices, and bread is just one of them. On top of our first piece of bread, for example, we could have put a slice of cheese instead.

Sandwich Engineering - Chapter 4 (Figure 17)

See? Here are two alternative pathways, and we are free to choose one of them. If we choose to put a piece of bread upon the existing piece of bread, we will end up with an "empty sandwich". If we choose a slice of cheese, on the other hand, we will end up with a "cheese open sandwich".

The following diagram is a more comprehensive depiction of these two choices.

Sandwich Engineering - Chapter 4 (Figure 18)

We can keep expanding this "tech tree" of sandwiches, which contains innumerable choices (branches) from which all sorts of unique sandwich recipes are able to be conceived.

Sandwich Engineering - Chapter 4 (Figure 19)

What you are seeing above is an example of a tree involving multiple variants of "cheese sandwich". It is not hard to imagine that the tree will become more and more diversified as we introduce additional ingredients such as ham, sausage, avocado, potato, etc.

(Will be continued in Chapter 5)