Warning: From this page, things will get much harder.
You don’t need to understand everything immediately. Even if you don’t completely get it, please keep reading.
Looking for some other page?
Let me give you a hint to reproduce the “Repeat” feature using a lunchbox.
Let’s take a look at this lunchbox:
This looks really complicated…
Now, here’s a question: What happens when you run it?
Well… there’s no way I can figure it out in my head. It’s too complicated.
I figured it out! I think the result will be a lunchbox that can be converted to .
Correct. Saya, You’re exactly right!
What? How is it possible that you figured it out so quickly?
Saya, did you solve it all in your head?
Not really. Actually, I used a trick. Let me explain.
First: Take a look at the top section.
Oh! The top section is actually a lunchbox that can be converted to .
Yes. So we’ll replace this section with .
Second: Take a look at the middle-right section.
The middle-right section is actually a lunchbox that can be converted to .
Yes. So we’ll replace this section with .
I see…
Now, take a look at this section.
This looks like Saya’s lunchbox that can reproduce the “Plus 1” feature .
Exactly. So we’ll replace this with .
Hmm… it’s getting much simpler.
Finally, take a look at the bottom-right section.
Oh! This looks exactly like the one we saw on the last page: a lunchbox that reproduces the “Conditional” feature .
Exactly. So we’ll replace it with the “Conditional” feature .
Here’s how we’re going to replace it:
After the replacement, it’ll look like this:
Wow, it’s much simpler now!
Let’s run it. Press Run !
From here, it’s simple.
Press Run !
See, the final result is .
Hmm… You’re right.
But… isn’t that cheating?
Saya’s method was to replace each section with the corresponding mathbox features…
But I’m wondering: Would the result also be if we run the original lunchbox directly?
Let’s check!
Let’s run the original lunchbox directly.
The final result is a lunchbox that can be converted to .
The result is the same as using Saya’s method.
So… I guess Saya’s method was right…?
Yes! Saya’s method was the correct approach.
Let’s step back and review what we learned so far.
Saya solved the problem by replacing parts of a lunchbox with the corresponding mathbox features, like this:
As we saw earlier: If you replace parts of a lunchbox with the corresponding mathbox features, the result will be the same.
And I encourage you to replace parts of a lunchbox as much as possible to make it simpler. (like Saya did)
But I still don’t get it: How is this related to reproducing the “Repeat” feature using a lunchbox?
It looks like Saya noticed something:
Hey, I think I figured out how to reproduce the “Repeat” feature !
Wow, really?
Yes, let me explain.
First: Take a look at this mathbox with the “Repeat” feature .
This mathbox repeats three times and calculates .
I figured out how to reproduce this behavior using a lunchbox.
Really? Please show me how!
Here’s the lunchbox we used earlier on this page.
We’ll make some changes to this lunchbox to reproduce the “Repeat” feature .
Here, I just added some items to this lunchbox. The yellow background indicates the added items.
Hmm… ok, what’s so special about this lunchbox?
It turns out that:
Therefore, it becomes like this:
Wow, really?
If that’s true, that means we’ve reproduced the “Repeat” feature .
But does it really work?
We need to run it to see if it’s correct.
Yes, let’s run on the next page to check.