Review: Presh Talwalkar's "Infinite Tower"

Published on Thursday, January 31, 2013 in , , , , ,

Cover of Infinite Tower ebookPresh Talwalkar, of the Mind Your Decisions blog, has released a new ebook full of math puzzles!

It's called What do an Infinite Tower, a Classic Physics Puzzle, and Coin Flipping Have in Common?, also known as the Infinite Tower ebook, for short.

Disclaimer: I was provided with the book by the author without charge for the purposes of review. The thoughts below are purely mine as a result of going over the ebook on my own time for the purpose of informing Grey Matters readers.

Certainly, the first thing that catches your eye is the long and unusual name. The title comes from 3 puzzles in the ebook that share a common basis. Presh Talwalkar presents these puzzles and explains them in his post announcing the ebook release.

That post, in fact, is a good introduction to the style of the book. Generally, each puzzle is introduced on 1-2 pages, and the answers are provided on following pages, so as to give you an opportunity to stop and think about it.

Yes, you could just flip to the answers on the next page right away, but this will rob you of one of the true values of the ebook. Each puzzle offers the thinker what Martin Gardner dubbed an aha! moment, a moment where insight reveals a clarity that simplifies either the problem itself, or the approach of solving the problem. Helping you experience many aha! moments for yourself is the real value.

You might expect such a book to be organized, perhaps by theme, such as, say, coin puzzles vs. sequence problems there, or by puzzle type, such as arithmetic puzzles vs. probability puzzles. Instead, the problems are roughly arranged in order of complexity of solution. In other words, only the simplest insights are needed to solve the first ones, but you need to be wary of mental traps in the latter puzzles.

Some might complain that chapters would be better organized, but even if you forget the location of a puzzle, a search can find it easily enough. With the puzzles being in order of complexity, a simple glance at the page number can give you a sort of rating, as in, "Oh, I've done pretty well with these puzzles, and I'm halfway through the book. That's a good sign!"

Incuded at the end of the ebook is bonus, but it's not a bonus puzzle. It's an article on the friendship paradox that's also available on Presh's blog here. If you're not already familiar with Mind Your Decisions, this is a good introduction to it. As with many posts there, it gets you pondering, and there's more information available online, including at TED.com and phys.org.

All in all, Infinite Tower is an enjoyable way to challenge yourself with math puzzles at your own pace. If you don't have a Kindle or Kindle app, Infinite Tower is also available as a PDF file.

If you enjoy it, you may also want to check out Presh Talwalkar's other book, Math puzzles: classic riddles in counting, geometry, probability, and game theory.


A Treat For James Burke Fans

Published on Sunday, January 27, 2013 in , ,

The Day The Universe Changed LogoAs many regular Grey Matters readers already know, I'm a big fan of James Burke's documentaries, especially Connections and The Day The Universe Changed.

So, I was naturally thrilled to discover the recent updates on JamesBurkeWeb's YouTube channel!

JamesBurkeWeb has added new versions of Connections and The Day The Universe Changed, as well as some of his other series, that are a big improvement over the previously-posted versions.

The most noticeable improvement is that each episode is now available as a single video. For example, the first episode of Connections, “The Trigger Effect”, was originally posted as five 10-minute videos. The new version is just a single 4912-minute video. This makes each episode much easier to watch and embed.

There's another, more subtle change, as well. If you add up the segmented versions of the videos, you'll notice each episode runs a total of about 45 minutes. The single version videos, however, are roughly 49-50 minutes each!

This is because the segmented versions were taken from broadcasts on The Science Channel, who edited the episodes to allow for commercials. The newly-uploaded complete episodes seem to be from the original broadcasts, and have all the original footage.

As an example, below is a segment from part 1 of the “Trigger Effect” playlist, starting from 7 minutes into the episode, and playing for about 30 seconds:

From the newer version of the same episode, here's a segment starting and ending at roughly the same points as the earlier one. Note both that it starts almost a full minute later into the episode (7:58, as opposed to 7:00), and contains an entire missing segment not shown in the version above:

Even if you've watched the episodes available before, take the time to watch all the newer episodes. You may discover some new surprises, or, if you're old enough to remember the original airings, even re-discover some forgotten segments.


Math vs. Sorcery

Published on Thursday, January 24, 2013 in , , , , ,

Scam School logoImagine you and a friend are performing some of the feats you've learned from, say, here on Grey Matters, on Scam School or from James Grime, and you're accused of witchcraft! You're hauled off by the authorities, and given a test to see if there's a supernatural connection between the two of you.

You and your friend are put in separate rooms, and each of you is given a single playing card taken from a shuffled deck. You must state whether you believe that your friend has been dealt a card of the same color or a different color. Naturally, your friend is asked the same question.

The judgement of the outcome, however, is very harsh. If both you and your friend make correct statements, that is considered sufficient proof of supernatural powers, and you are put to death. If both you and your friend make incorrect statements, you are released and the charges of witchcraft are dropped. If one makes a correct statement and the other makes an incorrect statement, the results are considered inconclusive, and the two of you are tested again, up to 26 times (since a pair of cards are used each time, and there's 26 pairs of cards in a standard deck).

Considering that, at any point when your guesses match, you would be put to death, it's probably a good idea at this point to consider probabilities of survival.

If you and your friend just make random guesses as to the other's card, what are the chances of surviving?

Technically, if the cards aren't returned to the deck after each round of guessing, you'd have to do some math to work out the probabilities of the distribution of cards remaining in the deck at each point, but we're not going to take that consideration. In our calculations, we'll assume that the cards from each round are returned to the deck, and the deck is shuffled again. In mathematical terms, the dealing of 2 cards in each round will be considered an independent event, as opposed to a dependent event.

If you and your friend make a random guess on the first round, there's a 25% chance of you both being correct, and therefore being killed. There's a 25% chance of you being set free, and a 50% chance of being required to take another test.

Note that this means you have a 75% chance of surviving the first round, but only a 50% chance of being required to being submitted to another round of testing.

That's simple enough, but how do we take the 2nd round into account? For the second round, you still have a 25% chance of dying, but you only have a 50% of getting to that test in the first place. You add the 25% of dying in the first round to the 50% × 25% chance of dying in the second round. We work this out as .25 + (.50 × .25) = .25 + .125 = .375, or a 37.5% chance of being killed by the end of a second round.

For a third round, the logic is the same, and the equation becomes .25 + (.50 × .25) + (.502 × .25) = .25 + .125 + (.25 × .25) = .25 + .125 + .0625 = .4375, or a 43.75% chance of dying after 3 rounds.

Notice that each time, the chance of dying is increasing, so already this test doesn't look promising. Also note that the 50% chance for any given step is effectively the number of the round minus 1. This is even true for round 1, since 120 = 1 (Why is that, anyway?).

So, for 26 rounds, we have .25 + (.50 × .25) + (.502 × .25) + ... + (.5024 × .25) + (.5025 × .25). The mathematical shorthand for this is:

Running this through Wolfram|Alpha, we find that the probability of being put to death by the 26th round is 0.499999992549419403076171875, or a roughly 49.99% chance. That's not much better than a “heads you live, tails you die” coin flip.

Is it possible to improve on the 50/50 odds of survival? Fortunately, yes it is, and Scam School's Brian Brushwood, with the help of a friend, prove they can survive through all 26 rounds. Can you guess how they do it before their secret is revealed?

With all the complex math, it seems like the answer should be equally complex, but the answer is dead simple. When you think about it, they approach used in the video above must ALWAYS render the test inconclusive, thus allowing them to live through 26 tests.

You might notice that, contrary to the initial description of the problem, the cards aren't returned to the deck before the next round. However, the strategy nullifies the chances of dying in the first place, so the importance of the changing deck composition isn't important any longer.

If you have any thoughts about this puzzle or the math behind it, let's hear about it in the comments!


Finding Easter

Published on Sunday, January 20, 2013 in , , , , ,

Frode Steen's moon photoOn this blog, you can learn any number of feats, including determining the day of the week for any date, and more recently, finding the moon phase for any date.

In a recent comment, regular Grey Matters reader Jay suggested mixing the two, and teaching Conway's method for finding Easter in a given year. Just as you requested, Jay, here it is!

WHEN IS EASTER? Easter is held on the first Sunday following the first full moon following the vernal equinox. It's this detailed definition that makes finding the date of Easter in your head for a given year so impressive. There seems to be an impossible amount of information to know off the top of your head in order to determine the correct date.

If you've practiced both the day for any date feat and the moon phase for any date feat, you should have little trouble performing this feat. The only other thing you need to know is your multiples of 19 from 0 to 190 from memory.

A NOTE ON PRESENTATION: Since you'll be effectively combining 2 other feats, speed shouldn't be the focus of your presentation. If you've ever watched Dr. Arthur Benjamin's TED performance, you've seen the speed with which he squares 2-, 3-, and 4-digit numbers. Notice that, when he squares 5-digit numbers, he doesn't focus on speed, but rather the process itself. Even if aspects of the process aren't clear, he makes it fun just to see the process in action.

That's also a good idea for the Easter date feat. It will allow you do seemingly nonsensical math out loud, yet still entertain the audience and get the right result.

THE PROCESS: The process can be broken down into 2 large steps. First, you find the date of the paschal full moon (the first full moon after the vernal equinox). The next step simply involves determining the day of the week for that date, and then working out the date of the following Sunday.

The only thing you need to start is a year. In this tutorial, I'll assume you're given a year in the 1900s or 2000s. Other centuries will be discussed later. We'll use 1980 as our example year, in order to make the tutorial clearer.

STEP 1: To start, subtract 1900 from the given year, whether that year is in the 1900s or 2000s. If the remaining digits are 19 or more, subtract the nearest multiple of 19 that is equal to or less than those digits. In our 1980 example, 1980 - 1900 = 80, and the nearest multiple of 19 is 76, so we figure 80 - 76 = 4.

It's important to note that we're NOT using the special positive/negative year key taught in the moon phase tutorial.

The next step is to add 1, so our example becomes 4 + 1 = 5. After that, multiply by 11. As it happens, this is easy in this case, as 5 × 11 = 55. You want to be very sure you are comfortable quickly multiplying by 11. If you don't already know how to do this, watch the video below and then try the practice exercises here:

At this point, starting with 1980 has given us 55, but we've only taken the last 2 digits into consideration. To compensate for the century, subtract 6, regardless of whether the year is in the 1900s or the 2000s. In this case, 55 - 6 = 49.

If the number is 30 or more, you can subtract the nearest multiple of 30 equal to or less than the number you have. In this case, the closest multiple of 30 that is equal to or less than 49 is 30, so we work out 49 - 30 = 19.

This final number is how many days the paschal full moon is before April 19th, which you may also need to consider as being “March 50th.” Since we have 19, we could try subtracting that from April 19th, but April 19th - 19 days = April “0th”, which doesn't make any sense. Instead, we do March “50th” minus 19 and get March 31st.

So, in our example, we've determined that March 31st was the date of the paschal full moon in 1980. Verbally, this might sound something like, “1980? Let's see that's 4...5...55 minus 6 is 49...19 days before April 19th, which is March 31st.” Note that you don't have to explain each step, just run through the calculations and let your audience wonder about the numbers. The idea is to make the seemingly nonsensical calculations fun for your audience.

Quick review:
1 - Subtract 1900 from the year, then subtract the largest multiple of 19 that is equal to or less than the last 2 digits of the year: X = (year - 1900) mod 19
2 - Add 1: X + 1
3 - Multiply by 11: 11(X + 1)
4 - Subtract 6 to compensate for the century: (11(X + 1)) - 6
5 - Subtract the nearest multiple of 30 equal to or less than the current number: ((11(X + 1)) - 6) mod 30
6 - Subtract the number you now have from either April 19th or March 50th to get the date of the paschal full moon: (April 19th/March 50) - (((11(X + 1)) - 6) mod 30)

Now, you're ready for the next step.

STEP 2: At this point, you simply use your preferred version of the day of the week for any date feat to work out the day of the week for this date. Personally, I use Day One, but any version will work. At this point, you should have told your audience that March 31, 1980 is a Monday.

From there, work out the date of the following Sunday, and that will be Easter! In our example, it's a little tricky since we;re on the border between 2 months. In this case, the easiest solution is to go 1 day back from Monday (to Sunday, March 30th) and then ahead a week (March “37th” = 37 - 31 = April 6th).

You can have them type Easter 1980 into Wolfram|Alpha to verify for themselves that April 6th, 1980 was indeed the correct date for Easter that year.

ADDITIONAL NOTES: If you know you're always going to be dealing with dates in the 1900s and 2000s, and therefore always subtracting 6, you can simplify from (((11(X + 1)) - 6) mod 30) to the much simpler ((11X + 5) mod 30), thus saving a few steps.

The century adjustment for both the 1900s and 2000s as discussed above, is -6. The proper adjustment for other centuries can be found using this formula in Wolfram|Alpha.

For the 2100s, you'd set h=21, for the 2200s you'd set h=22, etc., and c will be the century adjustment. When working with other centuries, you'll also want to find an easy multiple of 19 to subtract to make things easier. For example, for dates in the 2100s, you could subtract 2090 from the year, since 1900 + 190 = 2090.

To find an easy way to deal with a given century, you can use this Wolfram|Alpha calculator. For the 2100s, you'd set h=21 (just as in the previous calculator), and the calculator returns two new numbers, c=-2100 and d=10. This means that, for years in the 2100s, all you have to do is subtract 2100 and then add 10 to adjust for the proper part of the 19-year cycle.

Since the year gets reduced to multiples of 19, you shouldn't be surprised to discover that there's a 19-year cycle of dates for the paschal full moon. This table gives the dates for the paschal full moon for the years 2014-2032. Each number on the chart that's less than 20 refers to that date in April (8 on the chart, for example, means April 8th). Each number on the chart that's greater than 20 refers to a date in March (23 on the chart, for example, refers to March 23rd). The 0 on the chart refers to “April 0th”, which is really March 31st.

If you're comfortable with memory systems, you could just memorize the paschal full moon dates associated with each year in the 19-year cycle, simplifying the process even more!

What happens if the paschal full moon falls on a Sunday? In that case, Easter wil be on the following Sunday.

If the formula tells you that April 19th was the date of the paschal full moon, step back one day to April 18th. Similarly, if the formula returns April 18th, and your year calculation, after reducing it and adding 1, is 12 or more, step back 1 day to April 17th. Otherwise, always stay on the final date you get.

Try calculating the Easter date for random years, and taking all the rules we've talked about into account, and you'll develop this skill quicker than you ever thought possible!


Yet Still More Quick Snippets

Published on Thursday, January 17, 2013 in , , , , , ,

Luc Viatour's plasma lamp pictureIt's time to introduce 2013 to our tradition of snippets!

This month, we'll explore a wide variety of unusual mathematical treats,

My post about making math visual with Wolfram|Alpha may have been slightly ahead of its time. Wolfram|Alpha's latest blog posts cover the use of equations to draw pictures and the visualization of basic arithmetic problems.

• James Grime is back, and he's covering a topic that is near and dear to his heart. In the video below, he talks about the Enigma machines that the Germans used to code messages during World War II, and the race to break this allegedly unbreakable code:

If you enjoyed this, there is another video detailing the flaw that allowed the Enigma codes to be broken, as well as some tidbits and outtakes.

• I've always encouraged people to learn at least a few amazing feats. Cracked.com is now doing the same thing, albeit with a harsher title, "5 So-Called Signs of Genius That Any Idiot Can Learn." Grey Matters readers will be familiar with many of these, if not all of them. Looking around the web, you can find many examples of such feats, including quickly multiplying by 9, dividing by 9, squaring numbers, and more!

* I'll wind up these snippets with some offbeat links. First, here's a very unusual magic square, featuring resistors that form a magic square if wired in parallel. If your resistor math is a little rusty, here's a short video to get you up to speed.

And because I'm a fan of iOS apps that help you train your brain, check out becomeananny.com's list of 10 iPhone apps that boost brain function.


Last Digit Trick

Published on Sunday, January 13, 2013 in ,

Procsilas Moscas' number grid pictureQuick, without using a calculator, what's the last (rightmost) digit of 11,467,51934,573?

Believe it or not, after reading and practicing the techniques in this post, you should be able to answer that quickly!

I'll start with the good news. When you're looking solely for the last digit of any exponential expression of the form xy, in which x and y are positive integers (whole numbers), it turns out that you can reduce x to a number from 0 to 9, reduce y to a number from 1 to 4, and get the same answer. If these two steps are done properly, you can easily work out the answer in your head.

PREREQUISITES: In order to perform this, you should be able to instantly identify every multiple of 4 less than 100, know the squares of every number from 0 to 9, and know the cubes of every number from 0 to 9. If you've practiced and perform the root extraction feat and the 2-digit squaring feat, you're probably more than ready to handle this mental math feat.

POSSIBLE SHORTCUT: If the rightmost digit of x is 0, 1, 5, or 6, then the answer's rightmost digit will be the same, regardless of the exponent. For example, 12376 to any whole positive power will end in a 6, because the number itself ends in a 6. Similarly, 8731 to any whole positive power will end in a 1, and so on. Because of this, you have a 40% chance of being able to give the answer without a single calculation!

ELIMINATE IRRELEVANT INFORMATION: If the number doesn't end in 0, 1, 5, or 6, you'll need to do a little more work. This first step can be done without thinking.

When given your xy expression, simply ignore all but the rightmost digit of x, and the two rightmost digits of y (due to the rule about divisblity by 4). The example problem given at the beginning of this post, 11,467,51934,573, reduces to the far simpler 973.

ELIMINATE MULTIPLES OF 4 IN Y: Once you get y down a number less than 100, as yourself whether y is a multiple of 4. If it is a multiple of 4, then you can simply think of the problem as being to the 4th power.

As an example, 239,478157,376 reduces to 876 in the first step. Since 76 is a multiple of 4, this second step reduces the problem to 84, which is a much more manageable problem.

If y isn't a multiple of 4, simply subtract the nearest multiple of 4 that is less than y. Returning to our reduced example of 973, we see that 73 is not a multiple of 4, so we subtract the nearest multiple of 4 less than 73, which is 72. 73 - 72 = 1, so the fearsome-looking 11,467,51934,573 will have the same last digit as the far simpler problem of 91.

WORK OUT THE LAST DIGIT OF THE REDUCED ANSWER: Once you've reduced x to a number from 0 to 9, and y to a number from 1 to 4, you should be able to get the last digit in your head.

If y reduces to 1, you're done! Any number to the first power it itself. 11,467,51934,573 reducing down to 91 means the rightmost digit will be 9. 62289,137 boils down to 21 (do you see why?), and so will be 2. This easy result will happen about 25% of the time.

If y reduces to 2, simply square the reduced x, and give its last digit. 50,34824,738 reduces down to 82, which is 64. The last digit of 64 is 4, so you give the answer as 4.

Similarly, if y reduces to 3, simply cube x and give the last digit of that answer. If the given problem reduces to say, 73, you should know that's 343, and so be able to give 3 as the last digit of the answer.

Taking a number to the 4th power may seem intimidating, but there's an easy way to handle this. For any problem x4, simply square x, and then square only the last digit of that answer. So, if you're confronted with, say, 84, do 8 squared, which is 64, and then take the rightmost digit of that answer, 4, and square it. 4 squared is 16, so you give the last digit, 6, as your answer. This is easier than trying to work out the full answer for 84, which is 4,096, yet you get the same last digit!

As you can see, even the toughest of exponential expressions can be made manageable with this technique. You can have the person giving you the problem verify your answer with Wolfram|Alpha, as in this example.

Also, the more you perform this, the more you'll acquaint yourself with the patterns of the various numbers. For example, 9 to an even power will end in 1, and 9 to any odd power will end in 9. 4 to any even power will end in 6, and 4 to any odd power will end in 4.

Play around with this routine, and you'll have a fun, easy, and impressive skill!


World Trip

Published on Thursday, January 10, 2013 in , , , ,

Google Map of the EarthThe year's just started, and already I've taken you on a long journey to the moon, so it's time to come back to Earth.

In this post, you'll get to know the Earth a little better than you did before. You're going to learn a simple and fun way to memorize the countries!

As you may have learned when memorizing U.S. states and capitals, there are many approaches that can be taken. For the countries of the world, the story approach is very popular.

South America only has 12 countries, so it's a good place to start introducing the technique. The video below, as well as all the videos in this post, were created and developed by YouTube user eveRideorg, who has done some very creative work putting them together:

See? That was short, fun, and most importantly, memorable. If you practice those mnemonics for a few days, you'll have South America memorizzed in no time!

Next, with a little help from a seal, a Yorkshire Terrier, and other amusing images, we'll move down to memorizing Central America and the larger Caribbean Islands:

If you can just picture that dog, you'll have many of the Central American countries memorized without effort! Geography often seems to kids as a chore, but hopefully you're starting to see how fun it can be!

Now that you have the basics down, it's time to move on to a larger challenge! Europe has many countries, but the story approach still works. In the following video, there are several smaller stories used to describe different sections of Europe. The stories can then be connected together to help you remember the entire continent.

At this writing, eveRideorg has only posted these 3 videos, but judging by the comments, there are plans to release more in the future. Asia and Africa should be especially interesting. It took about a year to create the above 3, so hopefully we can expect to see the rest before 2014!


A Long Maze Journey

Published on Sunday, January 06, 2013 in , , , ,

Dan Rollin's Polmaze! Solver articleBack when I first got into computers, I ran across a maze program in a magazine called Creative Computing. The clarity with which the maze algorithm was explained astounded me, especially considering the complexity.

This program actually had a surprising effect on much of my life, and appropriately enough, the story is filled with as many twists and turns as the mazes the program generates.

The first computer I ever owned was a Commodore 64, which I received for Christmas in 1982. I ran across the maze program that captivated (yes, I'm trying to avoid using the word amazing) me about a year later.

However, I didn't understand enough of the math or the Commodore 64's high resolution mode to translate the program. Writing the program would have to wait for another 5 years, until I got into a college whose computer lab had an Amiga.

After just being a pipe dream for 5 years, actually writing and solving the mazes was thrilling! I remember thinking that this program had been well worth the wait. In 1989, just a month before I finished saving for my own Amiga, I accidentally left the floppy disk and the magazine in the computer lab and never saw them again. I even checked with the computer lab's and school's lost-and-found dept. every day for the next week, but I then accepted it was gone.

It had been in the back of my mind for so long, though, that it managed to stay in my head for a long time after that. In 1993, when I found a book titled The Best of Creative Computing, Vol. 1, I immediately flashed back to the maze program, and bought it hoping it would be in there. Unfortunately, it wasn't.

A short time later, I ran across The Best of Creative Computing, Vol. 2 and had the same hopes, but the program wasn't included there, either. By the time I went back for The Best of Creative Computing, Vol. 3, the store no longer offered it, and I couldn't help but think that, with my luck, that the maze program would be in there.

At this point, the only details I remembered was that it was in Creative Computing and that it was a maze program. I didn't think of it again until 2006, when someone on a forum asked about computer algorithms for mazes. That got me searching for it online. I managed to find all 3 Best of Creative Computing books online for free and immediately plowed through Vol. 3, only to discover the program wasn't there, either. It did get me thinking about it again, and I'd search for the program online whenever it popped into my head.

In 2008, I came amazingly close when I discovered the full text of the article online at atarimagazines.com. It didn't include the helpful illustrations or the program listing I wanted, but it was a thrill just to read the explanation again. As an added bonus, I finally knew that the article had come from the December 1983 issue of Creative Computing, had started on page 294, and that it was written by Dan Rollins, who titled it Polymaze! Solver.

With the name, I tried more exact searches, but nothing showed up. Last year, when I first discovered archive.org's computer magazine archives, Creative Computing was the first thing I looked for, but it wasn't there.

Finally, late last month, I noted Creative Computing had finally been added. At that point, the December 1983 issue wasn't available, but at least they were actively adding issues. On New Year's Eve, October 1983 showed up, and on New Year's Day, November 1983 showed up. The suspense was killing me. Sure enough, on January 2nd, after 24 years of searching, I had finally found December 1983 issue of Creative Computing, including Polymaze! Solver complete with illustrations and program listings (found on pages 294-311)!

You're probably wondering what it was about this program that captivated me for 3 decades. As you can see from this blog, I love having fun with math, and this article did just that, and seemed to keep going and going! It started by showing how to randomly generate a rectangular maze so as to guarantee only one possible solution, then showed how to “stretch” the right side of the maze around to meet the left side, and it even taught an algorithm that allowed the computer to find the solution. I had never seen so much math put to such amazing and creative use!

Being able to access the magazine online has proved to provide an added bonus. Dan Rollins mentions some of his other articles at the start of the article, and now I can finally read those, as well. His other articles include Kwikmaze (80 Micro, November 1982), Bee Amazed (Creative Computing, June 1981) and Pocket Computer Fun (Creative Computing, December 1982).

With access to the original BASIC program, I'm now thinking it wouldn't be too hard to translate this into Javascript, especially for HTML5 browsers. Not only would it be a fun challenge to get it working on the web, but also playing it on the web, as well.

Once the various original features are working, there's still room for creativity. For example, if you remember games such as Doom and Duke Nukem, those used a technique called ray casting to create a quick-and-dirty realtime 3D experience. With a few lessons in ray casting math and some some ray casting lessons specifically in Javascript, this maze could have a whole new life.

Take the time to look around the resources and explore, especially if you're into computer programming. Magicians have a saying that applies here: “If you want to create something new, start by examining something old.”


Fly Me To The Moon

Published on Thursday, January 03, 2013 in , , , , , ,

Frode Steen's moon photoLast year, we lost Neil Armstrong. Also, a NASA engineer who had been hand-picked by Werner von Braun to help develop the Saturn V rocket, Jesco von Puttkamer, passed away even more recently.

These events, not surprisingly, inspired some curiosity about the moon, and led to the decision to add a new feat to the Mental Gym, estimating the phase of the moon for any date in the 1900s or 2000s!

You'll need to be familiar with the phases of the moon and other technical terms, so the first section teaches those basics, along with helpful mnemonics.

From there, the next section shows you how to adjust for the month and day. You then learn how to adjust for the century and the year. The year is the only real challenging part, but I do include shortcuts to make this easier.

The 4th section focuses on practice and presentation. Instead of designing a custom quiz for this, however, it turns out that Wolfram|Alpha works well as a quiz.

You start by having Wolfram|Alpha generate a random date. Use the formula to estimate the phase of the moon for that date, and then check yourself by clicking on the date. For example, if Wolfram|Alpha gives you Dec, 1, 2005, you'd work out that it's very close to a new moon, then click on that date, scroll to the bottom, and verify that there actually was a new moon on Dec. 1, 2005! The moon phase feature of Wolfram|Alpha is also handy for verifying the moon phase in performance, of course.

I also include plenty of tips and tools, including shortcuts and handling other centuries.

The method for estimating the phase of the moon is taught as a straightforward method, with little explanation. However, if you are curious, I include an entire section explaining the reasoning behind each part of the formula.

I'll wind up this moon post with a surprising video about the distance from the Earth to the moon, which you may find useful when you present this feat: