0

Published on Sunday, January 29, 2012 in , ,

It wasn't that long ago when remembering passwords was a problem most people only ran across in spy movies.

These days, with various assorted internet accounts everywhere, remembering your password, as well as making it difficult to figure out, is becoming more and more of a challenge. Fortunately, there are many memory techniques that can help.

The first rule of internet security is that you can never reach a level where you are absolutely secure. All you can ever do is decrease your risk of a breach.

Last August, XKCD put the problem into an amusing and accurate perspective:

Yes, you've probably often heard that using regular words all in lower case is a bad idea. However, that advice generally refers to using a single regular word. A longer password comprised of multiple words isn't found in any dictionary, and the length alone make it harder to achieve through sheer guessing.

The "bits of entropy" referred to in the above cartoon can be thought of as a way to score the difficulty of uncovering a password. The following Wolfram|Alpha widget accepts a given length of password, and will then generate a password of that length, as well as how long passwords of that type would take to crack:

The XKCD password above, "correcthorsebatterystaple", is 25 characters long. Try putting in 25 and see how long Wolfram|Alpha thinks that would take to crack!

If everyone used that exact phrase, however, it would become well known, and thus easier to discover. Fortunately, the comic inspired this password generator, so you can get your own unique phrase.

While passwords of this type are a good idea, they're unfortunately not always possible to use. Strangely, there are many places that limit your character range and password length. Obviously, maximizing the mixture of digits and upper- and lower-case letters, while staying away from words found in the dictionary.

The trick with this approach becomes memorizing the password. An iOS app called PasswordGear offers an ingenious mnemonic solution, in which each letter and number is transformed into a memorable image as described in the video below. Even if you don't have an iOS device, you can still apply the approach on your own.

0

## Happy 25th birthday, Square One TV!

Published on Thursday, January 26, 2012 in , , , ,

25 years ago today, Square One TV debuted on PBS! As a budding math geek, this show was a must-watch for me.

If you're not familiar with Square One TV, it was a show teaching math using comedy skits, music videos, guest stars, and whatever else to teach mathematical concepts. Everything from basic arithmetic to geometry to somewhat-advanaced algebra was covered in a way that was fun and interesting.

My favorite music video they ever did is a great example of this. It was called “Change Your Point of View.” Although largely about solving math problems by looking at the problem from different perspectives, it's also great advice for any type of problem:

To give you an idea of the comedy skits they used, here's a skit called The Adventures of Spade Parade, in which they have to figure out which consultant is which:

Magician Harry Blackstone, Jr. even had his own recurring segment, in which he would perform and teach mathematically-based magic:

Like many PBS shows, Square One TV was 30 minutes long (no commercials meant 30 minutes of content), and broadcast 5 episodes a week. The show itself had a rather unusual format, however. The first 20 minutes would consist of skits, songs, and other segments like the ones above.

The last 10 minutes of the show would always be an episode of Mathnet, a sort of Dragnet parody following the adventures of detectives Kate Monday (later replaced by Pat Tuesday) and George Frankly. A new adventure would start on Monday, and would be continued on each day, winding up on the following Friday.

To get a better idea, you can actually find full episodes online. Here's the very first episode of Square One TV. The very first skit, a song about the concept of infinity, recurs throughout the episode, as if it continued forever. The show's producers even convinced PBS to continue the gag even after that first show was over.

The Mathnet episode, “The Case of the Missing Monkey,” guest stars a young Yeardley Smith, better known today as the voice of Lisa Simpson. This adventure continues in the second episode, and the third episode. I can't find the fourth and fifth episodes online yet, but you can see the rest of the same case in the 39th episode and the 40th episode, when it was re-run.

The show had a good long run, and broadcast its last new show on May 6, 1994, seven years later. Happy 25th birthday, Square One TV!

0

## Chinese Remainder Theorem

Published on Sunday, January 22, 2012 in , , , ,

I've talked about the modular arithmetic before, especially as it related to the day for any date feat.

In this post, we're going to take it out of the calendar feat's shadow, and give it a starring role in its own feat!

If you remember doing division before you learned about fractions, you remember doing problems such as 21 ÷ 4 = 5 remainder 1. Modular arithmetic is simply focusing on the remainder exclusively. 21 modulo 4, for example, just equals 1, because when you divide 21 by 4, 1 is the remainder.

If we're talking at 10 AM, and I agree to call you in 5 hours, then you know to expect a call from at 3 PM. You did 10 + 5 = 15, but you know that hours aren't numbered any higher than 12, so you just subtracted 15 - 12 to get 3. This is modular arithmetic, and is also why it has the nickname “clock arithmetic.”

Let's try comparing the modular arithmetic patterns of two numbers, say, 2 and 4. Since 2 times 4 = 8, we'll compare the remainders as they run from 0 to 8:

$\begin{matrix} num&mod\2&mod\4 \\ 0 & 0 & 0\\ 1 & 1 & 1\\ 2 & 0 & 2\\ 3 & 1 & 3\\ 4 & 0 & 0\\ 5 & 1 & 1\\ 6 & 0 & 2\\ 7 & 1 & 3\\ 8 & 0 & 0 \end{matrix}$

What if I were to tell you that I was thinking of a number from 0 to 8. I then gave you a further clue that, when divided by 2, it has a remainder of 1, and when divided by 4, it has a remainder of 3, we run into a problem. Look at the chart. That description fits both 3 and 7, and there's no way to work out which of the two. The problem is that the pattern of remainders, when divided by 2 and 4, repeats 2 times from 0 to 8.

If we try this with, say, 3 and 6, and ran up to 18 (3 × 6) you can see in this chart that there are 3 times where a pattern of 3 remainders repeats.

If we want to identify a number by its remainders alone, is there some way to make sure that no repeating pattern emerges? Notice that, when we used 2 and 4 (and went up to 2 × 4, the remainder patterns repeated 2 times, and that 2 is the largest common factor of 2 and 4. Similarly, when we used 3 and 6 (and went up to 3 × 6), the remainder patterns repeated 3 times, and that 3 is the largest common factor of both 3 and 6.

If we want no repeating patterns, then what we're really saying is that, when performing modulo a and b, running from 0 up to a × b, we would like each number combination to only show up 1 time. For this to be true, we simply have to make sure that the greatest common factor of the numbers involved is 1!

This is the basic idea of the Chinese Remainder Theorem. Martin Gardner discusses this idea in more detail in his book Aha!: Aha! Insight and Aha! Gotcha (Spectrum). You can find the relevant pages online here and here, thanks to Google Books.

When using two numbers, it's pretty easy to make sure their only common factor is 1. If we use, say, 4 and 5, and go up to 20, we can already know that there won't be any repetitions, because the largest factor common to 4 (factors: 1, 2, 4) and 5 (factors: 1, 5) is 1.

The Chinese Remainder Theorem also tells us we can go further, and even use 3 or more numbers, and they won't repeat (up to a × b × c ×...) as long as their largest common factor is 1! The easiest way to do this, of course, is to turn to our old friend, prime numbers.

In the Martin Gardner book linked about, he talks about a version of a trick where someone thinks of a number from 1 to 1,000, and gives you the remainders after dividing by 7, 11, and 13. Since 7 × 11 × 13 = 1,001, you'll get a unique combination of remainders for any number given. But what about the version he mentions from 1 to 100 with 3, 5, and 7? What's the formula for that?

Let's take the approach in his article and apply it. For the remainder after dividing by 3, we need a multiple of 5 × 7 that's 1 greater than a multiple of 3. 35 doesn't work, because 34 isn't a multiple of 3. 70, being 69 + 1, works perfectly, though. OK, we start with 70 × a (or 70a for short).

What about 5? Let's look at the multiples of 3 × 7. There's 21...perfect! It's already 1 more than a multiple of 5. OK, now we've got 70a + 21b. What about 7? 3 × 5 = 15, and 15 is already 1 more than a multiple of 7. For all three numbers, we now have 70a + 21b + 15c. Divide that total by 105 (3 × 5 × 7), and the remainder will be the number you're looking for!

You could do that on a calculator, but if you're familiar at all with Grey Matters, you'll know that I encourage you to do things like that in your head. However, I understand that it can be tricky.

A magician named Tom Harris, back in 1958, proposed a different approach that required no calculation. You memorize the number combinations with help from the Peg/Major system, linking the combined numbers you get to the unique answer for that combination. For example, if someone gives you the numbers 1, 0, and 3, you would recall the phonetic equivalent “twosome”, and remember that you linked that to the word “toes,” which translates to 10.

This is a bit of work, but we have an advantage over someone trying to do this in 1958. Using a spreadsheet program makes an easy grid, and will handle listing the numbers from 1 to 100 for you, and will even handle working out the remainders for you. To find words for each combination, you can use some of the mnemonic generators listed here (My favorite for this would be pinfruit). Those familiar with the Peg System will already have 100 words ready for the answer numbers.

Naturally, I've developed a Wolfram|Alpha widget that can make things easier on your audience members:

I'll leave you with one last related challenge. James Grime needs help counting his juggling balls. Can you use what you've learned to help? When you're ready, here's the answer video.

2

## Day One

Published on Thursday, January 19, 2012 in , , , , , , , ,

Shortly after lifehacker linked to my Day of the Week For Any Date post last fall, I was inspired to see how much further I could minimize the required work.

Even I was surprised at the results of this effort, which I just released earlier this week as Day One.

Instead of giving a day of the week for any date verbally, you ask the spectator for a meaningful year and month, and instantly create a calendar for that month from memory! You then ask for the particular day, circle it, and give the calendar to the spectator as a souvenir. Ideally, of course, this is on the back of your business card.

Other methods used usually require the performer to stop and work through 100 years of mnemonics (to cover the century), and several steps of arithmetic. This also necessitates a 10 to 15 second pause. I was never happy with that pause, which is why I wanted to improve the current method I use.

Here's the teaser ad I created for Day One:

The math in Day One involves only a single subtraction, and even that isn't always needed! No, you won't need to memorize 100 year mnemonics, or even a third of that amount.

One of the things I'm proudest of, however, is that there's no conversion of the month, date, or year into a numeric code. Yes, there's conversion into mnemonic images, but your brain will handle these more naturally than abstract numbers.

The complete package includes the PDF notes themselves, a PDF template for the calendar used in this effect, 4 videos of animated mnemonics (each available in 800 by 600 and 480 by 360 resolutions), two quiz apps (both made to run in any browser and take advantage of touchscreen mobile devices when available), and a file of several relevant links to help you explore other ideas related to this routine.

Over at the Magic Cafe, some of my early testers provide some great reviews:

“I will most likely use this instead of the standard feat now. It offers something new and different in that you produce an entire month and calendar you can give away. So I would reasonably assert that if you have any interest in this type of feat, Day One is probably the most accessible and easy method to get into this. I honestly believe the entire concept, approach, and delivery of Day One is brilliant.”
-Jim Wilder

“I especially like Scott's brilliant idea of filling in the month calendars as a presentational ploy. This not only allows a very fast start to the effect but also gives something to hand the spectator at the end - especially useful if you print these calendars on the back of your business card. Of course this presentation can easily be adapted for other DFAD methods and I will certainly use this with my own Speed Dating system....Scott's instructions are very thorough and the ebook comes with an extremely impressive set of learning tools.”
-Michael Daniels (author of Speed Dating)

“What stands out most for me is that this is not just another "show off" effect, but it connects with people because they will get a present at the end of the routine. It reminds me of my own creation "Stigma Square". They would make a perfect couple! Imagine you have a piece of thick paper, you ask for the birthday of a spectator, then you produce the calendar month of his birth, and then on the back of this paper you create the matching Stigma Square. A complete little act of a math genius, fitting inside your pocket!

“BUT there is one really annoying part of "Day One": in my opinion it´s way too cheap! For this extensive work I would have taken at least the double price!”
-Nico Reuter (author of Stigma Square)

0

## 8 Queens Puzzle

Published on Sunday, January 08, 2012 in , , , , ,

Martin Gardner once said that no other geometrical pattern has been so thoroughly exploited for recreational purposes as the checkerboard.

That's especially true at Grey Matters, where you can find puzzles like the Knight's Tour, Knight Shift, and others. Today, however, we focus on the queens!

This week's episode of Scam School returns to the Stanford Chess Club with another classic chess puzzle, known as the Eight Queens Puzzle. If you're not familiar with how a queen moves and captures in chess, here's a brief article and a short video that will explain.

Once you understand the basics, watch the video below, put pause at the 1:45 mark, just as the chess club members start trying to solve the eight queens puzzle. After the pause, scroll past the video and try the puzzle here at the end of this post!

This online version of the puzzle was written by Patricio Molina, who has generously shared it. I've had to make a few modifications to the original version to get it to work on the blog, so you may want to compare it to the original version here.

To play the online version below, simply click on any empty square to place a queen there. Clicking on any square with a queen in it will remove that queen. If you place a queen so that it is attacking 1 or more queens, the squares of the attacking queens will turn red. Your goal, of course, is to place eight queens on the board so that none of them are attacking any of the other queens. You'll know you've done this when all the squares with queens on them turn green.

When you either succeed or decide to give up, finish watching the video above to find out who solved it first, and Brian Brushwood's simple method for being able to remember the placement.

Interestingly, there are 92 possible ways to solve the puzzle, but if you don't count patterns that are rotations or reflections of each other, there are only 12 unique solutions. If you're interested in memorizing more of these patterns, note that each of the 12 solutions has a queen on a border square that is forth from a corner, and that spacing the queens a knight's move apart is often helpful.

How did you do in solving the puzzle? Let me know in the comments.

# Eight queens puzzle

2

## Reviews: Stigma Square, E-Z Square 3 & 4

Published on Thursday, January 05, 2012 in , , , , , , , ,

You're probably wondering why I'm reviewing three books in one post. All three are concerned with magic square routines, and there's also been some mingling of influence among the books.

In addition, they all came to my attention nearly simultaneously. In fact, the author e-mailed me and offered to send me review copies of their books literally within minutes of each other.

### Introduction

All three of these books work to counter common problems with many magic squares. The first magic square routine most performers learn is similar to the Instant Magic Square I teach over in the Mental Gym.

Using numbers that are too low can result in duplicate numbers. Using numbers that are too high, as I've previously discussed in my post about Bill Fritz' free notes/screencasts, Magic Squares for the Mathematically Challenged, can result in numbers that expose the pattern by being in a different range than the others.

### Stigma Square

Nico Reuter's book, Stigma Square is focused on a birthday square presentation. Most such routines place the month in one square, the date in another square, and then split the 4-digit year up between 2 squares. Stigma Square's difference is that only the month and the date are placed in individual magic square cells, and the year is the magic total!

In the approaches where the year is in the magic square itself, the magic total is simply the sum of the numbers involved, so the total itself often has no relevance. Nico's approach makes the magic square more satisfying, as the starting point AND ending point are all relevant to the spectator's birthday. This also helps the routine feel more complete, from an audience standpoint.

The name Stigma Square comes from another unusual approach used here. Before the spectator is asked for their birthday, they're given a folded piece of paper, and told not to look at it for the time being. After the birthday is given, and the magic square created, the performer shows how all the various combinations add up to year the spectator was born, until he runs across some that don't match the year.

At this point, the performer reminds the spectator about the piece of paper given earlier. The piece of paper is shown to contain one more number, which is added to the magic square, and resolves the dilemma perfectly. The performer can then show further combinations that give the spectator's birth year. This twist is a nice take on the magician-in-trouble syndrome, and helps add drama.

The notes themselves are very clear, and take the reader clearly through each step. Once the square itself is explained, then the basic presentation is explained. The main presentation is focused on the speed with which the square is developed. There is an alternate presentation, based on a Doug Dyment idea, in which the square is developed more slowly, with spectators following each step in detail, and experiencing smaller moments of amazement that build up to the end.

The math involved isn't complex, and Nico clearly explains how to deal with even the largest numbers in a manner simple enough to do in your head. Not only are credits and references given as appropriate, but references to especially interesting routines for further reading are given throughout the book.

There's also a non-magic square bonus effect with a man-vs-calculator presentation that would make a good opener. The method is subtle, involves no sleight of hand, and went right past me until I read the method.

Nico has done a first run of only 50 copies, and only sells it directly. If you're interested, you can e-mail him about pricing and availablity at info@herr-der-zahlen.de.

### E-Z Square 3

The Werner Miller's E-Z Square book series is focused on teaching techniques, with less emphasis on presentation.

E-Z Square 3 concerns creating 4 by 4 magic squares in which the four corners or four center squares are given by the audience. These two techniques are taught separately, with detailed step-by-step illustrations, and simple graphics showing the arrangements that give the magic total.

Of the two approaches, a little experimentation has given me a preference for starting with the four center squares, as the pattern feels simple and more direct. For each reader, however, this will be a personal choice.

Also, variations of both techniques are taught. Besides starting with four given numbers, you can start with a given total, or even two given numbers and a total!

Starting with two given numbers and a magic total is also the starting point of Stigma Square, with which Werner Miller is familiar. In E-Z Square 3, he teaches a different way of creating a Stigma Square, including an alternative number placement and ending.

You might expect the teaching of a magic square to be hard to understand, but the clarity of the illustrations makes each step easy to grasp. Short of animating the illustrations, it's hard to see how to make them any clearer. Those concerned about the lack of a specific presentation shouldn't worry, as there are enough ideas to spark anyone's creativity, and get them thinking about their own unique presentation.

When it comes to the creation of the Stigma Square specifically, choosing between the two approaches will be up to each performer. Werner Miller's approach is more visual, while Nico's has a procedural rhythm to it.

E-Z Square 3, by Werner Miller, is available from Lybrary.com. That version is in English, and a German edition is also available.

### E-Z Square 4

Even when you're accustomed to the rest of the E-Z Square series, E-Z Square 4 can seem a little unusual at first.

The first routine in this book is “Détour Square”, in which the audience gives you four numbers to place in the top row. The remaining squares are filled out quickly, but only the rows and columns add to the same total. The diagonals give a different sum.

The performer then takes the same numbers and copies them into different locations on a second grid, and this time the rows, columns, AND diagonals all give the same total! This is quite a different take on the magic square, and its impressive that the magician can be restricted to the same numbers, yet still be able to develop an arrangement that improves on the original!

With an understanding of the first routine, the second routine, dubbed “Direttissima” shows how to achieve a similar resulting square in one step. Because of the wider varieties of arrangements possible with the first version, as well as the theatrical interest generated by the presentation, the Détour Square remains the more powerful of the two.

In the previously-mentioned Magic Squares for the Mathematically Challenged, Bill Fritz uses a presentation where he quickly writes down each number on a different Post-It Note, and stick them on the wall. He then takes a look at them, and re-arranges them as if a pattern is occurring to him. The ease of Werner Miller's method combined with the freedom of movement of Bill Fritz' presentation work quite nicely together.

The hallmark of all the E-Z Square is their clarity of magic square instruction, as well as a selection of variations that's enough to start your mind racing with presentational possibilities.

E-Z Square 4 closes with a bonus effect which combines puzzles, geometry, and magic squares in a way that can even fool the person performing the routine.

Like the rest of the series, Werner Miller's E-Z Square 4 is also available from Lybrary.com, and is available in German.

### Closing Thoughts

If you think that the only possibilities for magic square presentations are the “look how smart I am,” or “How fast can I do this?” variety, any or all of these books can give you a whole new respect for the genre. The magician-in-trouble aspect hasn't been used much in magic squares, and it's good to see these and other possibilities opened up.

If you're at all interested in performing magic squares, these 3 books are well worth the investment.

0

## New Sliding Calendar Puzzle!

Published on Sunday, January 01, 2012 in , , , , ,

It's January first, and the calendars around here are already mixed up!

It will take someone with a good mind for puzzles, and with a thorough knowledge of the calendar. It will take someone like...you, perhaps?

To kick off 2012, I posted a new puzzle in the Mental Gym, which I call the Sliding Calendar Puzzle! It's a blending of two feats already in the Mental Gym, the Day of the Week For Any Date tutorial and the 15 Puzzle tutorial.

When you first go to the link, it initially looks like a calendar, with a month and year above, and the days of the week just below that. Unfortunately, the days themselves are scrambled, as shown below.

Note that there are two different types of pieces. The blue numbered pieces act as the dates in the final solution, and of course need to be placed on the appropriate days. In the above December 2053 example, the blue piece marked “1” should go in the first row directly under Monday, since December 1st, 2053 is a Monday. Of course, all the remaining numbered tiles must fall in order and on their corresponding dates in the given month. When solving, it's important to note that the 1st of the month will always appear in the top row.

The puzzle itself is a 7×6-piece puzzle, with one square missing, so there are 41 pieces total. Since there are only 28 to 31 days in any given month, the white lettered tiles are used to fill up the otherwise empty spaces.

To make sure there's only one possible solution to the puzzle, these puzzles are placed in alphabetical order, reading left to right, then top to bottom. For example, if you're given a month that begins on a Tuesday, and is 30 days long, the goal would be to arrange the puzzle like this:

The A and B tiles take up the first two spaces, since the month starts on a Tuesday, and the letter tiles pick up from C, running in order through to K, after the last day of the month.

The puzzle will always give you the correct number of days for any given month. In the scrambled December puzzle up above, note that it has blue tiles marked 1 through 31, and white tiles lettered A through J. Compare that to the picture of the solved puzzle, which shows only 30 blue numbered tiles and lettered tiles marked A through K.

The puzzle also keeps track of how many moves you make, and how many seconds it's been since you moved your first tile.

Granted, you could cheat and refer to a perpetual calendar, which you can easily find online, but the real challenge is to do it WITHOUT referring to a calendar. One nice aspect of using your knowledge of the day for any date feat for this puzzle is that there's no time pressure. You can work out when the first day of the given month is, and then slide your first piece to start the clock.

The comments below the puzzle are open and I'm interested to hear how long it took you to solve. Leave your personal records, as well as any other comments or questions you have about it!

If you're curious, such puzzle calendars do exist in the real world, but I'm only aware of two sources. There's the mintpass calendar, which provides icons on the extra spaces for things such as date, birthdays, vacations, and so on. This one is far nicer than I am, as it provides a “HELP!” tab, which makes it easier to arrange the pieces as needed.

There's also the Puzzle Calendar by Yanko Design, in which the extra spaces are blank. However, the surface of all the sliding tiles, as well as the adjacent notepad, are made with a whiteboard surface, so you can add your own notes. The designers must really love the classic 15 puzzle, judging not only by their calendar, but this desk design, too.