In this page, I’ll show you the most complicated lunchbox ever.
It will be hard, but you don’t need to understand everything. Even if you don’t fully get it, you should keep reading.
Looking for some other page?
On the previous page…
On the previous page, Saya came up with a lunchbox that might be able to reproduce the “Repeat” feature .
According to Saya, the above lunchbox will repeat three times, just like when using the “Repeat” feature .
Let’s see if this is actually true.
On this page, we’ll run the lunchbox that I came up with, and see what steps it goes through.
Yeah, we need to see what happens in between the beginning and the end.
Ok, let’s do it.
Press Run !
It’s so complicated…
It’s not too bad if you look carefully.
Take a look at this yellow section in the middle.
Let’s ignore this section for now. We don’t need to worry about it until later.
We’ll replace it with the “Ignore for Now” sign:
It’s much simpler now.
Now, let’s take a look at the bottom section of the “Conditional” feature :
Because is , which is NOT zero, it chooses .
We’ll now un-ignore the section we ignored earlier:
Let’s continue. Press Run !
Oh! This yellow section is exactly the same as the one we ignored last time.
Yes: This yellow section has appeared again.
Hmm… interesting.
Let’s ignore this section again:
I’ve highlighted the differences from the last time in yellow below. Take a look.
Pay attention to these two differences in particular:
I see, the number in went from to .
So it decreased by one.
Maybe: If we continue, maybe the number in will become next?
Let’s see if that turns out to be true.
Let’s continue. We’ll un-ignore the section we ignored earlier.
Press Run !
Again: The middle section is exactly the same as before. So we’ll ignore this again:
Let’s compare it with the previous iteration again.
I’ve highlighted the differences from the last time in yellow below.
Pay attention to these two differences in particular:
I’m seeing the pattern…
The number in has changed from to to . It’s decreasing by one.
So, maybe: will become next?
Let’s check.
We’re almost done. I just un-ignored the section we ignored earlier.
Press Run !
Again: The middle section is exactly the same as before. So we’ll ignore this again:
Let’s compare it with the previous iteration again.
I’ve highlighted the differences from the last time in yellow below.
finally became .
Exactly! So it now chooses , which is .
Wow! It’s now exactly like using the “Repeat” feature .
Yes. It then calculates , so…
The final result is .
That’s it! Let’s summarize what we’ve seen so far.
Here’s what happened:
So, we confirmed that: If you run the original lunchbox, it repeats three times on .
Therefore, this is exactly the same as this mathbox that uses the “Repeat” feature :
So: The above mathbox with the “Repeat” feature can be reproduced by the lunchbox we used on this page.
Now, here’s the important part. This mathbox has:
To reproduce this, we needed to put and on these two places:
Now, here’s a question: How can we reproduce this mathbox that calculates ?
Maybe: We change the previous lunchbox to use and instead, like this?
Exactly! That’s how you reproduce using a lunchbox.
For example: If you wanted to reproduce this mathbox that calculates …
You can reuse the earlier lunchbox: Just use for and for .
If you run the above lunchbox, it will repeat six times on :
I see…
Congratulations! You reproduced the “Repeat” feature successfully.
Yay!
By the way, here’s an additional question:
Can you figure out how to reproduce this mathbox that repeats instead of ?
Hmm… maybe: We use the same lunchbox as the last time, but use instead of ?
Correct! By doing so, you can reproduce a mathbox that repeats :
I see…
Hmm… it’s very interesting that we can reproduce the “Repeat” feature using a lunchbox.
Yeah. And now, I want to talk about an important point.
Take a look at the bottom half of the lunchbox that reproduces :
Now, take a look at the bottom half of the lunchbox that reproduces :
Notice that: Both cases have this bottom half in common.
Right, but what’s so special about it?
In fact: This bottom half is what makes reproducing the “Repeat” feature possible.
I see. So this lunchbox is necessary for reproducing the “Repeat” feature …
Yes. And this lunchbox has a special name, actually.
What’s the name?
It’s called “Y Combinator”.
“Y Combinator”? That’s a strange name…
But it’s really interesting to think that, such a simple lunchbox (with only two kinds of food items) can reproduce the “Repeat” feature .
It’s like magic!
Indeed!
Note: There are other lunchboxes that are called “Y Combinator”. If you’re curious, press “Continue reading” below. (It’s optional.)
After successfully reproducing the “Repeat” feature , the villagers are now demanding the devil to return it:
We reproduced the “Repeat” feature using a lunchbox.
Now, give it back to us!
Grr…
Will the villagers get it back? Check on the next page.