Wolfram Computation Meets Knowledge

Best of Blog

Best of Blog

Exploring a Boxing Legend’s Career with the Wolfram Language: Ali at 75

Muhammad Ali (born Cassius Marcellus Clay Jr.; January 17, 1942--June 3, 2016) is considered one of the greatest heavyweight boxers in history, with a record of 56 wins and 5 losses. He remains the only three-time lineal heavyweight champion, so there's no doubt why he is nicknamed "The Greatest." I used the Wolfram Language to create several visualizations to celebrate his work and gain some new insights into his life. Last June, I wrote a Wolfram Community post about Ali's career. On what would have been The Greatest's 75th birthday, I wanted to take a minute to explore the larger context of Ali's career, from late-career boxing stats to poetry. First, I created a PieChart showing Ali's record:
Best of Blog

Mersenne Primes and the Lucas–Lehmer Test

Introduction

A Mersenne prime is a prime number of the form Mp = 2p – 1, where the exponent p must also be prime. These primes take their name from the French mathematician and religious scholar Marin Mersenne, who produced a list of primes of this form in the first half of the seventeenth century. It has been known since antiquity that the first four of these, M2 = 3, M3 = 7, M5 = 31 and M7 = 127, are prime.
Best of Blog

Finding Pokémon GO’s Shortest Tour to Compute ’em All!

There's a Computed Pokémon nearby! Here is a Poké Spikey. This will help you catch ’em all! In this blog post I will share with you several data insights about the viral social media phenomenon that is Pokémon GO. First I will get you familiarized with the original 151 Pokémon that have now invaded our real world, and then I'll show you how to find the shortest tour to visit your nearby gyms.
Best of Blog

Finding the Most Unhygienic Food in the UK

The UK, like many other countries, runs a food hygiene inspection system that tries to ensure that establishments with poor hygiene standards improve or are shut down. As is often the case, the data collected for operational reasons can provide a rich source of insight when viewed as a whole. Questions like "Where in the UK has the poorest food hygiene?", "What kinds of places are the most unhygienic?", and "What kinds of food are the most unhygienic?" spring to mind. I thought I would apply Mathematica and a little basic data science and provide the answers. The collected data, over half a million records, is updated daily and is openly available from an API, but this API seems to be targeted at performing individual lookups, so I found it more efficient to import the 414 files from this site instead.
Best of Blog

Aspect Ratios in Art: What Is Better Than Being Golden? Being Plastic, Rooted, or Just Rational? Investigating Aspect Ratios of Old vs. Modern Paintings

Paintings of the great masters are among the most beautiful human artifacts ever produced. They are treasured and admired, carefully preserved, sold for hundreds of millions of dollars, and, perhaps not coincidentally, are the prime target of art thieves. Their composition, colors, details, and themes can fascinate us for hours. But what about their outer shape---the ratio of a painting's height to its width? In 1876, the German scientist Gustav Theodor Fechner studied human responses to rectangular shapes, concluding that rectangles with an aspect ratio equal to the golden ratio are most pleasing to the human eye. To validate his experimental observations, Fechner also analyzed the aspect ratios of more than ten thousand paintings. We can find out more about Fechner with the following piece of code:
Best of Blog

2 Pi or Not 2 Pi?

Three months ago the world (or at least the geek world) celebrated Pi Day of the Century (3/14/15...). Today (6/28) is another math day: 2π-day, or Tau Day (2π = 6.28319...). Some say that Tau Day is really the day to celebrate, and that τ(=2π) should be the most prominent constant, not π. It all started in 2001 with the famous opening line of a watershed essay by Bob Palais, a mathematician at the University of Utah: "I know it will be called blasphemy by some, but I believe that π is wrong." Which has given rise in some circles to the celebration of Tau Day—or, as many people say, the one day on which you are allowed to eat two pies. But is it true that τ is the better constant? In today's world, it's quite easy to test, and the Wolfram Language makes this task much simpler. (Indeed, Michael Trott's recent blog post on dates in pi—itself inspired by Stephen Wolfram's Pi Day of the Century post—made much use of the Wolfram Language.) I started by looking at 320,000 preprints from arXiv.org to see in practice how many formulas involve 2π rather than π alone, or other multiples of π. Here is a WordCloud of some formulas containing 2π:
Best of Blog

Find Waldo Faster

Martin Handford can spend weeks creating a single Where's Waldo puzzle hiding a tiny red and white striped character wearing Lennon glasses and a bobble hat among an ocean of cartoon figures that are immersed in amusing activities. Finding Waldo is the puzzle's objective, so hiding him well, perhaps, is even more challenging. Martin once said, "As I work my way through a picture, I add Wally when I come to what I feel is a good place to hide him." Aware of this, Ben Blatt from Slate magazine wondered if it's possible "to master Where's Waldo by mapping Handford's patterns?" Ben devised a simple trick to speed up a Waldo search. In a sense, it's the same observation that allowed Jon McLoone to write an algorithm that can beat a human in a Rock-Paper-Scissors game. As Jon puts it, "we can rely on the fact that humans are not very good at being random."
Best of Blog

Extending Van Gogh’s Starry Night with Inpainting

Can computers learn to paint like Van Gogh? To some extent---definitely yes! For that, akin to human imitation artists, an algorithm should first be fed the original artists' creations, and then it will be able to generate a machine take on them. How well? Please judge for yourself. Second prize in the ZEISS photography competition Recently the Department of Engineering at the University of Cambridge announced the winners of the annual photography competition, "The Art of Engineering: Images from the Frontiers of Technology." The second prize went to Yarin Gal, a PhD student in the Machine Learning group, for his extrapolation of Van Gogh's painting Starry Night, shown above. Readers can view this and similar computer-extended images at Gal's website Extrapolated Art. An inpainting algorithm called PatchMatch was used to create the machine art, and in this post I will show how one can obtain similar effects using the Wolfram Language.