February 4, 2013 — Oleksandr Pavlyk, Kernel Technology

On January 23, 1913 of the Julian calendar, Andrey A. Markov presented for the Royal Academy of Sciences in St. Petersburg his analysis of Pushkin’s Eugene Onegin. He found that the sequence of consonants and vowels in the text could be well described as a random sequence, where the likely category of a letter depended only on the category of the previous or previous two letters.

At the time, the Russian Empire was using the Julian calendar. The 100th anniversary of the celebrated presentation is actually February 5, 2013, in the now used Gregorian calendar.

WolframAlpha["(Julian calendar January 23, 1913) plus 100 years",  {{"CorrespondingGregorianDate", 1}, "ComputableData"}]

Tuesday, February 5, 2013

To perform his analysis, Markov invented what are now known as “Markov chains,” which can be represented as probabilistic state diagrams where the transitions between states are labeled with the probabilities of their occurrences.

Andrey A. Markov and a Markov Chain

Read More »


December 20, 2012 — Paul-Jean Letourneau, Senior Data Scientist, Wolfram Research

This year is the 100th birthday of Alan Turing, so at the 2012 Wolfram Science Summer School we decided to turn a group of 40 unassuming nerds into ferocious hunters. No, we didn’t teach our geeks to take down big game. These are laptop warriors. And their prey? Turing machines!

In this blog post, I’m going to teach you to be a fellow hunter-gatherer in the computational universe. Your mission, should you choose to accept it, is to FIND YOUR FAVORITE TURING MACHINE.

First, I’ll show you how a Turing machine works, using pretty pictures that even my grandmother could understand. Then I’ll show you some of the awesome Turing machines that our summer school students found using Mathematica. And I’ll describe how I did an über-search through 373 million Turing machines using my Linux server back home, and had it send me email whenever it found an interesting one, for two weeks straight. I’ll keep the code to a minimum here, but you can find it all in the attached Mathematica notebook.

Excited? Primed for the hunt? Let me break it down for you.

The rules of Turing machines are actually super simple. There’s a row of cells called the tape:

Tape

Read More »


November 14, 2012 — Jon McLoone, International Business & Strategic Development

Update: See our latest post on How the Wolfram Language Measures Up.

I stumbled upon a nice project called Rosetta Code. Their stated aim is “to present solutions to the same task in as many different languages as possible, to demonstrate how languages are similar and different, and to aid a person with a grounding in one approach to a problem in learning another.”

After amusing myself by contributing a few solutions (Flood filling, Mean angle, and Sum digits of an integer being some of mine), I realized that the data hidden in the site provided an opportunity to quantify a claim that I have often made over the years—that Mathematica code tends to be shorter than equivalent code in other languages. This is due to both its high-level nature and built-in computational knowledge.

Here is what I found.

Large tasks - Line count ratio

Mathematica code is typically less than a third of the length of the same tasks written in other languages, and often much better.

Read More »


July 26, 2012 — Daniel Lichtblau, Scientific Information Group

With the 2012 Olympics upon us, and records waiting to be broken, it might be a good time to consider some aspects of track and field. I need to write this now, because once the track part of the Games is underway, I fully intend to spend quality time with a television set. Why do I like track? Well, what school sport might one take up if one is (read: was) scrawny and not very (read: very not) coordinated?

I will focus on men’s track, but the gist of this almost certainly applies to women’s as well. We’ll look at speeds of world records and how they change as the distances get longer. I’ll start with a Demonstration by my Wolfram Research colleague Sy Blinder, “How Fast Can You Run?” The Demonstration shows that speeds follow an interesting pattern, which is covered by me here. Along the way I will also inadvertently reveal that I know nothing whatever about data modeling.

To underscore the comment about records being broken, I will point out that several of the record times listed in Blinder’s Demonstration are already out of date. Below is a current list, of the form {distance, time} measured in {meters, seconds}. I omitted the less common distances because they might not be indicative of the best possible efforts, even among elite athletes.

dtlist = {{100, 9.58`}, {200, 19.19`}, {400, 43.18`}, {800, 101.01`}, {1500, 206.`}, {1609.344`, 223.13`}, {3000, 440.67`}, {5000, 757.35`}, {10000, 1577.53`}, {42195, 7380}}; distances = dtlist[[All, 1]];

Read More »


June 28, 2012 — Vitaliy Kaurov, Technical Communication & Strategy

I was browsing Mathematica user communities for original projects and came by the following question: “How can I calculate a jigsaw puzzle cut path?” Such creative problems are in abundance at our user forums, the Wolfram Demonstrations Project, and The Mathematica Journal, which tells me that Mathematica, at its heart, is a conduit for creativity: it’s a programing language that likes the challenge of convoluted problems and inspires elegant, often unexpected solutions.

In its essence, a jigsaw puzzle is a tiling or tessellation, which means there are no gaps or overlaps between the pieces. Moreover, every piece is unique and has a definite place in the puzzle. Uniqueness is achieved by making a piece be a part of a large image, have a specific shape, or a combination of these. There are many approaches to producing such patterns. For instance, this single mathematical formula from our graphics examples produces a beautiful tessellation:

Mathematical formula to produce a beautiful tessellation

Tessellation

However, since this question was asked on Mathematica Stack Exchange, a young, modern technical Q&A site, it was very specific in accordance with the community rules. Here are the author’s requirements:

  • All pieces must be unique to preclude placing a piece in the wrong spot.
  • Pieces must be interlocking such that each piece is held by adjacent pieces.
  • It must be possible to generate different paths (sets) for a specific shape that are not merely rotations or reflections of the first.

Additionally, the author of the question notes that he seeks original designs alternative to typical mass-produced shapes.

Read More »


June 14, 2012 — Paul-Jean Letourneau, Senior Data Scientist, Wolfram Research

Wouldn’t it be cool if you never had to remember another password again?

I read an article in The New York Times recently about using individual typing styles to identify people. A computer could authenticate you based on how you type your user name without ever requiring you to type a password.

To continue our series of posts about personal analytics, I want to show you how you can do a detailed analysis of your own typing style just by using Mathematica!

Here’s a fun little application that analyzes the way you type the word “wolfram.” It’s an embedded Computable Document Format (CDF) file, so you can try it out right here in your browser. Type “wolfram” into the input field and click the “save” button (or just press “Enter” on your keyboard). A bunch of charts will appear showing the time interval between each successive pair of characters you typed: w–o, o–l, l–f, f–r, r–a, and a–m. Do several trials: type “wolfram,” click “save,” rinse, and repeat (if you make a typo, that trial will just be ignored).

Read More »


April 5, 2012 — Paul-Jean Letourneau, Senior Data Scientist, Wolfram Research

In Stephen Wolfram’s recent blog post about personal analytics, he showed a number of plots generated by analyzing his archive of personal data. One of the most common pieces of feedback we received was that people wanted to know how they could perform the same kind of analysis on their own data. So in this blog post I’m going to show you how to analyze your email the same way Stephen Wolfram did.

Naturally, we did all the data cleaning and analysis for Stephen’s data in Mathematica, so we’ll be using Mathematica for everything here as well. All the code can be downloaded here.

Let’s start with that really cool diurnal plot Stephen did of his outgoing email. This plot shows the date and time each email was sent, with years running along the x axis and times of day on the y axis:

Plot showing the date and time each email was sent

Read More »


March 28, 2012 — Jon McLoone, International Business & Strategic Development

Several people have asked me to write about the virtual plaque that we made for the official opening of the Wolfram Research Europe office by UK Prime Minister David Cameron.

The concept that came out of the short brainstorming meeting was to have a button on an iPad that would trigger a video on our display board, leading to an image showing facts about the world at the moment of revelation.

David Cameron Plaque

This is the story of how we made it happen.

Read More »


February 2, 2012 — Christopher Carlson, Senior User Interface Developer, User Interfaces

I was amazed to see this tweet from our friends at the Museum of Mathematics:

A quick check with Mathematica verified that, yes indeed, 10*9*8+7+6-5+4*321 = 2012. Wow! How in the world did anyone discover that rare factoid? And how long will it be until another year arrives that can be similarly expressed?

That’s the sort of question that’s so easy to answer with Mathematica that I couldn’t not have a look. It turns out that what seemed to me like a rare jewel is as common as dirt. In fact, there is only one year in the next 100 that can’t be expressed by interspersing +, -, *, /, or nothing between the numbers in order from 10 to 1! In subsequent correspondence with George Hart, the museum’s Chief of Content, he told me that he learned the idea from Hans Havermann, who wrote about it in a blog post last year. I’ve discovered what he had up his sleeve: abundant computing.

Read More »


January 11, 2012 — Jon McLoone, International Business & Strategic Development

UPDATE: The solution to the puzzle and more comments from Jon have been added at the bottom of the post.

On the long flight to the recent Wolfram Technology Conference, I ended up on the puzzle page of a newspaper. My attention was drawn to a word ladder puzzle, where you must fill in a sequence of words from clues, but each word differs from the previous by only a single letter. Here, for example, is a simple puzzle already solved:

best from a position of superiority or authority
bast strong woody fibers obtained especially from the phloem of
from various plants
bash a vigorous blow
bath a vessel containing liquid in which something is immersed
(as to process it or to maintain it at a constant temperature or to lubricate it)
math a science (or group of related sciences) dealing with the logic
of quantity and shape and arrangement

I wasn’t going to do a blog entry on this, as it is a very similar task to my “Exploring Synonym Chains” post that I wrote some time ago, but that changed with a chance conversation at the (excellent) Technology Conference. Proving that one never stops learning, Charles Pooh, one of our graph theory developers, pointed out to me that my synonyms item could have been done much better. I had broken one of the very rules that I wrote about in my “10 Tips for Fast Mathematica Code” entry—”Use built-in functions.” I had effectively re-implemented the built-in Mathematica commands GraphPeriphery and GraphDiameter.

So, armed with these two new functions, let’s find the longest word ladder puzzle that can be made using Mathematica‘s English dictionary.

Read More »