Wolfram Computation Meets Knowledge

Design & Visualization

Retreat from Blenheim

When last seen in the whereabouts of the Marlborough Maze, I was slinking off stage left, having been upstaged by Jon McCloone and his mix of image processing and graph theory alchemy. In a comment on my post, Jaebum Jung showed similar methods. Me, I only wanted to compute a bunch of distances from the entrance, then walk the maze. But I was not at that time able to show which was the shortest path, or even to prune off the dead ends. I'm over that lapse now. In this post I will provide brief Mathematica code to take the grid of maze pathway distances that I computed, and get the hopeless paths to melt away. Technically this is referred to as a retraction—not in the sense of an apology, but, rather, topology.
Education & Academic

Breaking Secret Codes with Mathematica

Mathematica can make you feel like a computational superman. Armed with that attitude and some schoolboy knowledge of cryptography, I turned my attention to cipher breaking this week, only to discover buried kryptonite. The weakness of ciphers (where you swap every occurrence of a particular letter in your message with the same different letter) is that they don't change the patterns of letters. The simplest attack that exploits this fact is frequency analysis. The most common letter in English is "e", and so it follows that the most common character in an encoded message (assuming the message is written in English) will correspond to "e". And so on through the alphabet. Mary Queen of Scots famously lost her head when Queen Elizabeth's spymaster broke Mary's cipher using frequency analysis. I figured that if sixteenth century spies could do it by hand, I should be able to automate it in Mathematica in about 10 minutes.
Leading Edge

Stabilized Inverted Pendulum

Can you balance a ruler upright on the palm of your hand? If I concentrate, I can just barely manage it by constantly reacting to the small wobbles of the ruler. This challenge is analogous to a classic problem in the field of control systems design: stabilizing an upside-down (“inverted") pendulum. One of the best things about Mathematica is that it makes specialist areas like control systems accessible to non-specialists. This lets you freely combine and develop new ideas without needing to be an expert in everything. It also makes Mathematica a great platform for learning and exploring new areas. Using the new control systems features (one of several new application areas integrated into Mathematica 8), I've been experimenting with models of stabilized inverted pendulums. I'm no expert in control theory, but you'll see that one doesn't need to be.
Education & Academic

The Benefits of Free-Form Input for Precollege Teachers

After talking with community college educators recently at the national AMATYC conference in Boston, I'm reminded, once again, that time is the most valuable commodity in a teaching setting. It takes time to plan a lesson for students, time to refine this lesson such that it has the most impact, and time to plan what technology will accompany a lesson and how to guide students through the process of using that technology. Any wrinkles with using the technology will greatly distract students from the course concept at hand. As a concrete example, community college faculty are used to explaining to students the four menus, and roughly eight steps, to visualize a function and its derivative using a calculator, which is a significant time investment. (The examples are from my own TI calculator I've kept all these years.) It seems that most community college educators know how powerful and useful Mathematica can be to support lectures or individual student projects. But this year, more than anything else, we talked about how Mathematica 8's new free-form input will reduce or eliminate a teacher's preparation time and will help students who are new users access Mathematica's powerful functionality immediately.
Announcements & Events

Future Directions of Wolfram Technologies

"Bursting with technology" is how Stephen Wolfram described Wolfram Research during his opening keynote at the Wolfram Technology Conference in October. The recent release of Mathematica 8 marks the beginning of a whole new way to compute and program thanks to its free-form linguistic input. Additionally, the ever-growing Wolfram|Alpha computational knowledge engine has doubled in content since its launch in May 2009 and continues to become more ubiquitous in the world. Stephen says you will soon "see a lot of different directions emerge" based on the technology and technology platforms that Mathematica and Wolfram|Alpha provide.
Education & Academic

Fixing Bad Astrophotography Using Mathematica 8 and Advanced Image Deconvolution

Here is a shot I took of M27, the famous Dumbbell Nebula, with my home-brew 90mm astrograph and inexpensive equatorial mount. Actually, it isn't a single shot, but a combination of about 30 fairly short exposures, added together. Adding together short subframes rather than taking a single longer exposure makes it possible to create astrophotos without additional equipment for "guiding" the telescope. Guiding means applying small corrections, either manually or automatically, during the exposure to compensate for imperfections in either the mount's alignment away from the polar axis or the mount's drive mechanism. Combining the subframes has the additional benefit of reducing noise and increasing the signal to produce a result similar to a much longer exposure. Before we go further, it's fun to look up information about M27 using the new Wolfram|Alpha features built in to Mathematica 8.
Design & Visualization

The Battle of the Marlborough Maze at Blenheim Palace Continues

Regular readers of the Wolfram Blog will have seen that the item that I wrote on solving mazes using morphological image processing was thoroughly beaten by the much smarter and better read, Daniel Lichtblau from our Scientific Information Group in his post "Navigating the Blenheim Maze”. Always up for a challenge (and feeling a little guilty about the rather hacky and lazy way I tried to deal with loops and multiple paths the first time), I am back for another go. My first approach with any new problem is to think about the nearest available Mathematica command. In the new Mathematica 8 features is a graph theory command FindShortestPath. That certainly sounds promising. Mixing image processing and graph theory may sound complicated, but one of the central strengths of Mathematica's integrated all-in-one design is that different functionality works together, and in this case it proves to be quite easy.
Computation & Analysis

The Mathematica One-Liner Competition

Your assignment: Write a simulation of spherical particles coalescing under gravitational attraction. Limit the approach distance by a secondary repulsive force that acts over short distances. Produce an animation of the dynamic system starting with 15 particles in randomized positions. Formulate your solution in 140 characters or less. Sound challenging? A 138-character solution was Stephan Leibbrandt's winning entry in the Mathematica One-Liner Competition that was a part of this year's Wolfram Technology Conference.
Computation & Analysis

The Legacy of TRON

Editorial note: A future post will explore some of the contributions to the visual arts and media facilitated by Mathematica. The year 1982 saw a lot of important movies: Blade Runner, E.T.: The Extra-Terrestrial, Poltergeist, Star Trek II: The Wrath of Khan, The Thing, Mad Max 2: The Road Warrior, Pink Floyd The Wall, First Blood, Conan the Barbarian, Fast Times at Ridgemont High, The Dark Crystal, and TRON. I used Mathematica functionality to turn the TRON logo into something you can manipulate. You can download my notebook to play with the logo. (Mathematica Home Edition could be used to do this as well.)