Leo’s been reading an Algebra book, and giving me problems from it.
[Teaching principle : Don’t give kids problems; Instead, let them give YOU problems, at least for a long time into a new subject. Pretend to struggle, and show your work in detail. Get things wrong occasionally. This models how to do the problem, correct mistakes, and shows that mistakes are no big deal. And if you make it look fun enough, you being an idiot will keep their attention for hours! Eventually you can expand the game to you asking THEM question!]
One of the problems had to do with farm animals. MineCraft has many funny creatures. Early on Leo’s exploration, he and I would play together in worlds he was creating . In order to be maximally annoying, I would flood his creations with animals — pigs, mostly. Leo dubbed this a “Livestock Crisis”, and would get very upset at me; Success! 🙂
Anyway, this created an excellent opportunity to do some on-the-spot MineCraft Math!
We started with the problem of how many pigs you could fit into a pen of a particular size, like this one (note the curious chicken!):
This isn’t a completely trivial problem because you have to calculate the inner area, not the outer area, and then divide by the area taken up by a pig. Okay, it’s pretty trivial (but not for a 7 year old)!
In the example above, the outer area is 10×14 block, and the walls are 1 block thick. We assumed that a pig is 2×1 blocks. We calculated the area for this problem: (14-(2*1))x(10-2*1)) => 12*8 => 96sqbks (square blocks). So, you should be able to get 96/(2*1) => 48 pigs into that space.
Here’s 48 pigs:
Uh oh. That definitely doesn’t look right! Hmmm.
Before trying to fix it, let’s turn the whole thing into a formula: Let L and W be the length and width of the outer wall of the pen, and T be the wall thickness. And let A (or P for a pig) be the ground area of an animal. Taking our math above:
(14-(2*1))x(10-2*1)) => 12*8 => 96sqbks, and
96/(2*1) => 48
and just replacing the right symbol for each number:
96/P=>96/2=>48 … Voila … well, sort of, but it didn’t work.
So, the only thing that we made a rough estimate of in the above was the ground area of a pig. We guessed 2×1 = 2sqblks. But in reality, a pig is 0.625 blocks wide and 1.25 blocks long, which is only 0.78sqblks!
Okay, so let’s use our formula to make a new estimate. Mostly things are the same:
But the pig (P) is WAY smaller:
So the result is WAY bigger!
96/0.78=123 pigs !!!
(It jut occurred to me that I should be teaching Leo dimensional (i.e., unit) analysis at the same time… Oh well, next time!)
Okay, so 123 pigs … well, here’s about 123 pigs.
We actually lost count a couple of time, so we don’t really know how many pigs are in this pic, but it’s definitely about 123, probably only +- 1 or 2. And yeah, that looks WAY better!
For the record, again not that you can read this, here’s the white board recording our process:
Notice our incorrect analysis of pig size at the top, and the 3D model of the pen at the bottom. (We very quickly realized that the height isn’t relevant, except that pens have to be 2 blocks high to keep the animals from escaping!) At one point I also tried to simplify the polynomial product by multiplying it out by FOIL. I was so pleased with myself demonstrating how to simplify the expression in this way that it was a bit of an embarrassing letdown, not to mention confusing to Leo, when I got to the end and the multiplied-out form was not nearly as nice as the factored form! I guess that trick is really only useful for complex moduli, as in quantum mechanics.
Down the left side is another problem we did once we had the formula, applying it to 3×2 cows in a 100×100 pen with 2 block thick walls. Ready? 644 cows!
 I’ve just now raised this to the level of a “principle”, but don’t listen to me; I’m just making this up as I go along; What to I know about teaching!?
 One of the great things about MineCraft is that it’s designed for users to play collaboratively in the same world. (In the iOS version of MineCraft this is incredibly simple if you’re on the same LAN; When you create a world, it automatically starts it as a server, and opens a port to it, and anyone else on the same LAN can just connect directly to it. This is quite impressively well implemented!