When I first started thinking about the Data Drop, I viewed it mainly as a convenience—a means to get data from here to there. But now that we’ve built the Data Drop, I’ve realized it’s much more than that. And in fact, it’s a major step in our continuing efforts to integrate computation and the real world.

So what is the Wolfram Data Drop? At a functional level, it’s a universal accumulator of data, set up to get—and organize—data coming from sensors, devices, programs, or for that matter, humans or anything else. And to store this data in the cloud in a way that makes it completely seamless to compute with.

Our goal is to make it incredibly straightforward to get data into the Wolfram Data Drop from anywhere. You can use things like a web API, email, Twitter, web form, Arduino, Raspberry Pi, etc. And we’re going to be progressively adding more and more ways to connect to other hardware and software data collection systems. But wherever the data comes from, the idea is that the Wolfram Data Drop stores it in a standardized way, in a “databin”, with a definite ID.

Here’s an example of how this works. On my desk right now I have this little device:

Every 30 seconds it gets data from the tiny sensors on the far right, and sends the data via wifi and a web API to a Wolfram Data Drop databin, whose unique ID happens to be “3pw3N73Q”. Like all databins, this databin has a homepage on the web: wolfr.am/3pw3N73Q.

The homepage is an administrative point of presence that lets you do things like download raw data. But what’s much more interesting is that the databin is fundamentally integrated right into the Wolfram Language. A core concept of the Wolfram Language is that it’s knowledge based—and has lots of knowledge about computation and about the world built in.

For example, the Wolfram Language knows in real time about stock prices and earthquakes and lots more. But now it can also know about things like environmental conditions on my desk—courtesy of the Wolfram Data Drop, and in this case, of the little device shown above.

Here’s how this works. There’s a symbolic object in the Wolfram Language that represents the databin:

And one can do operations on it. For instance, here are plots of the time series of data in the databin:

And here are histograms of the values:

And here’s the raw data presented as a dataset:

What’s really nice is that the databin—which could contain data from anywhere—is just part of the language. And we can compute with it just like we would compute with anything else.

So here for example are the minimum and maximum temperatures recorded at my desk:

(for aficionados: MinMax is a new Wolfram Language function)

We can convert those to other units (% stands for the previous result):

Let’s pull out the pressure as a function of time. Here it is:

Of course, the Wolfram Knowledgebase has historical weather data. So in the Wolfram Language we can just ask it the pressure at my current location for the time period covered by the databin—and the result is encouragingly similar:

If we wanted, we could do all sorts of fancy time series analysis, machine learning, modeling, or whatever, with the data. Or we could do elaborate visualizations of it. Or we could set up structured or natural language queries on it.

Here’s an important thing: notice that when we got data from the databin, it came with units attached. That’s an example of a crucial feature of the Wolfram Data Drop: it doesn’t just store raw data, it stores data that has real meaning attached to it, so it can be unambiguously understood wherever it’s going to be used.

We’re using a big piece of technology to do this: our Wolfram Data Framework (WDF). Developed originally in connection with Wolfram|Alpha, it’s our standardized symbolic representation of real-world data. And every databin in the Wolfram Data Drop can use WDF to define a “data semantics signature” that specifies how its data should be interpreted—and also how our automatic importing and natural language understanding system should process new raw data that comes in.

The beauty of all this is that once data is in the Wolfram Data Drop, it becomes both universally interpretable and universally accessible, to the Wolfram Language and to any system that uses the language. So, for example, any public databin in the Wolfram Data Drop can immediately be accessed by Wolfram|Alpha, as well as by the various intelligent assistants that use Wolfram|Alpha. Tell Wolfram|Alpha the name of a databin, and it’ll automatically generate an analysis and a report about the data that’s in it:

Through WDF, the Wolfram Data Drop immediately handles more than 10,000 kinds of units and physical quantities. But the Data Drop isn’t limited to numbers or numerical quantities. You can put anything you want in it. And because the Wolfram Language is symbolic, it can handle it all in a unified way.

The Wolfram Data Drop automatically includes timestamps, and, when it can, geolocations. Both of these have precise canonical representations in WDF. As do chemicals, cities, species, networks, or thousands of other kinds of things. But you can also drop things like images into the Wolfram Data Drop.

Somewhere in our Quality Assurance department there’s a camera on a Raspberry Pi watching two recently acquired corporate fish—and dumping an image every 10 minutes into a databin in the Wolfram Data Drop:

In the Wolfram Language, it’s easy to stack all the images up in a manipulable 3D “fish cube” image:

Or to process the images to get a heat map of where the fish spend time:

We can do all kinds of analysis in the Wolfram Language. But to me the most exciting thing here is how easy it is to get new real-world data into the language, through the Wolfram Data Drop.

Around our company, databins are rapidly proliferating. It’s so easy to create them, and to hook up existing monitoring systems to them. We’ve got databins now for server room HVAC, for weather sensors on the roof of our headquarters building, for breakroom refrigerators, for network ping data, and for the performance of the Data Drop itself. And there are new ones every day.

Lots of personal databins are being created, too. I myself have long been a personal data enthusiast. And in fact, I’ve been collecting personal analytics on myself for more than a quarter of a century. But I can already tell that March 2015 is going to show a historic shift. Because with the Data Drop, it’s become vastly easier to collect data, with the result that the number of streams I’m collecting is jumping up. I’ll be at least a 25-databin human soon… with more to come.

A really important thing is that because everything in the Wolfram Data Drop is stored in WDF, it’s all semantic and canonicalized, with the result that it’s immediately possible to compare or combine data from completely different databins—and do meaningful computations with it.

So long as you’re dealing with fairly modest amounts of data, the basic Wolfram Data Drop is set up to be completely free and open, so that anyone or any device can immediately drop data into it. Official users can enter much larger amounts of data—at a rate that we expect to be able to progressively increase.

Wolfram Data Drop databins can be either public or private. And they can either be open to add to, or require authentication. Anyone can get access to the Wolfram Data Drop in our main Wolfram Cloud. But organizations that get their own Wolfram Private Clouds will also soon be able to have their own private Data Drops, running inside their own infrastructure.

So what’s a typical workflow for using the Wolfram Data Drop? It depends on what you’re doing. And even with a single databin, it’s common in my experience to want more than one workflow.

It’s very convenient to be able to take any databin and immediately compute with it interactively in a Wolfram Language session, exploring the data in it, and building up a notebook about it

But in many cases one also wants something to be done automatically with a databin. For example, one can set up a scheduled task to create a report from the databin, say to email out. One can also have the report live on the web, hosted in the Wolfram Cloud, perhaps using CloudCDF to let anyone interactively explore the data. One can make it so that a new report is automatically generated whenever someone visits a page, or one can create a dashboard where the report is continuously regenerated.

It’s not limited to the web. Once a report is in the Wolfram Cloud, it immediately becomes accessible on standard mobile or wearable devices. And it’s also accessible on desktop systems.

You don’t have to make a report. Instead, you can just have a Wolfram Language program that watches a databin, then for example sends out alerts—or takes some other action—if whatever combination of conditions you specify occur.

You can make a databin public, so you’re effectively publishing data through it. Or you can make it private, and available only to the originator of the data—or to some third party that you designate. You can make an API that accesses data from a databin in raw or processed form, and you can call it not only from the web, but also from any programming language or system.

A single databin can have data coming only from one source—or one device—or it can have data from many sources, and act as an aggregation point. There’s always detailed metadata included with each piece of data, so one can tell where it comes from.

For several years, we’ve been quite involved with companies who make connected devices, particularly through our Connected Devices Project. And many times I’ve had a similar conversation: The company will tell me about some wonderful new device they’re making, that measures something very interesting. Then I’ll ask them what’s going to happen with data from the device. And more often than not, they’ll say they’re quite concerned about this, and that they don’t really want to have to hire a team to build out cloud infrastructure and dashboards and apps and so on for them.

Well, part of the reason we created the Wolfram Data Drop is to give such companies a better solution. They deal with getting the data—then they just drop it into the Data Drop, and it goes into our cloud (or their own private version of it), where it’s easy to analyze, visualize, query, and distribute through web pages, apps, APIs, or whatever.

It looks as if a lot of device companies are going to make use of the Wolfram Data Drop. They’ll get their data to it in different ways. Sometimes through web APIs. Sometimes by direct connection to a Wolfram Language system, say on a Raspberry Pi. Sometimes through Arduino or Electric Imp or other hardware platforms compatible with the Data Drop. Sometimes gatewayed through phones or other mobile devices. And sometimes from other clouds where they’re already aggregating data.

We’re not at this point working specifically on the “first yard” problem of getting data out of the device through wires or wifi or Bluetooth or whatever. But we’re setting things up so that with any reasonable solution to that, it’s easy to get the data into the Wolfram Data Drop.

There are different models for people to access data from connected devices. Developers or researchers can come directly to the Wolfram Cloud, through either cloud or desktop versions of the Wolfram Language. Consumer-oriented device companies can choose to set up their own private portals, powered by the Wolfram Cloud, or perhaps by their own Wolfram Private Cloud. Or they can access the Data Drop from a Wolfram mobile app, or their own mobile app. Or from a wearable app.

Sometimes a company may want to aggregate data from many devices—say for a monitoring net, or for a research study. And again their users may want to work directly with the Wolfram Language, or through a portal or app.

When I first thought about the Wolfram Data Drop, I assumed that most of the data dropped into it would come from automated devices. But now that we have the Data Drop, I’ve realized that it’s very useful for dealing with data of human origin too. It’s a great way to aggregate answers—say in a class or a crowdsourcing project—collect feedback, keep diary-type information, do lifelogging, and so on. Once one’s defined a data semantics signature for a databin, the Wolfram Data Drop can automatically generate a form to supply data, which can be deployed on the web or on mobile.

The form can ask for text, or for images, or whatever. And when it’s text, our natural language understanding system can take the input and automatically interpret it as WDF, so it’s immediately standardized.

Now that we’ve got the Wolfram Data Drop, I keep on finding more uses for it—and I can’t believe I lived so long without it. As throughout the Wolfram Language, it’s really a story of automation: the Wolfram Data Drop automates away lots of messiness that’s been associated with collecting and processing actual data from real-world sources.

And the result for me is that it’s suddenly realistic for anyone to collect and analyze all sorts of data themselves, without getting any special systems built. For example, last weekend, I ended up using the Wolfram Data Drop to aggregate performance data on our cloud. Normally this would be a complex and messy task that I wouldn’t even consider doing myself. But with the Data Drop, it took me only minutes to set up—and, as it happens, gave me some really interesting results.

I’m excited about all the things I’m going to be able to do with the Wolfram Data Drop, and I’m looking forward to seeing what other people do with it. Do try out the beta that we launched today, and give us feedback (going into a Data Drop databin of course). I’m hoping it won’t be long before lots of databins are woven into the infrastructure of the world: another step forward in our long-term mission of making the world computable…

Of course, related to all of this is the public controversy over the International Astronomical Union’s (IAU) “demotion” of Pluto from planet status. Regardless of your view on the matter, Pluto is still there, just as it always was, and nothing has changed concerning its existence. It doesn’t really matter what we call it. I won’t go into great detail to explain why Pluto was demoted, but we can use the Wolfram Language to explore some of the primary reasons.

One of the requirements for being labeled a planet according to the IAU definition is that the object must have cleared its orbit of other bodies. Planets have typically either absorbed or thrown out intruders so that they dominate their orbital zones. In the case of Ceres and Pluto, both bodies violate this requirement. Here is a graphic showing the orbit paths of Jupiter and Mars in orange, several large asteroids in blue, and the orbit of Ceres in red. As you can see, Ceres lies in the asteroid belt between Mars and Jupiter, along with many other objects, all classified as dwarf planets, asteroids, minor planets, or small solar system bodies, depending on your preference (or in the case of Ceres, by IAU definition).

A similar analysis can be done for Pluto. In the following example, you can see that all of the planets’ orbits (in orange) are relatively nice and concentric until you get to Pluto (in red), which crosses Neptune’s orbit. In addition, there are a number of other known “Plutoids” (in blue) that cross orbits with Pluto. And in fact, there are many more such objects. So if Pluto is a planet, then all of these objects, and many more, could potentially be declared planets, and that would be a nightmare for educational books to keep up with. The traditional question of “How many planets are there in the solar system?” becomes a large number that keeps growing as more objects are discovered.

Something else that is interesting to explore is size. Many people don’t really comprehend the sizes of Ceres and Pluto. The only size restriction provided by the IAU definition for a planet is that the body must be large enough for gravity to have pulled it into a spherical shape. This seems to be the case for both Ceres and Pluto, but this alone doesn’t make them planets. But it’s still interesting to visualize the sizes of these bodies by comparing them to something we are more familiar with. We can make use of `GeoGraphics` to put the size of these bodies into perspective. Here is a 2D map of the United States, with Texas highlighted in red. The inner disk represents the size of Ceres projected against Texas, the middle disk represents the size of Pluto, and the outer disk represents the size of our Moon. So the cross-section of Ceres is about the same size as Texas. Both Ceres and Pluto are noticeably smaller than our Moon.

With a bit more exploration, we can move this visualization into three dimensions by using texture mapping to move the above map onto a sphere.

First, we define a couple of geographic entities we will need:

Next, we use `GeoGraphics` to construct our 2D map and then convert it to an image:

Then we obtain several radius values we need, making sure they are all using the same units:

For positioning things, it’s useful to determine a center point for our map:

We need to position Ceres, Pluto, and the Moon near the center point of the map and offset them to appear as if they are sitting on the surface of Earth at that point:

We can apply the map as a texture on a sphere that represents the Earth using `ParametricPlot3D`:

Finally, we can combine the pieces and compare the sizes of Ceres, Pluto, and the Moon to the Earth:

In the coming days and weeks, the Dawn spacecraft will provide us with the first close-up views of the dwarf planet Ceres. Later this year when New Horizons passes Pluto, we will get our first close-up views of the more controversial member of this group of objects. Nothing we discover will result in Pluto being reinstated as a planet, as the reasons for its demotion are still there. But we will obtain more data on these small objects than has ever been gathered before, and it will give us a new understanding of these often under-appreciated members of our solar system. Dwarf planets are worthy of study regardless of what they are called.

Download this post as a Computable Document Format (CDF) file.

]]>Readers with a sharp eye can see that the set of points in the two images below is the same, so the images are just different visualizations of the same data. The data shows the 68 spots where Waldo hides in the special edition of seven classic Waldo books. Big thanks go to Ben Blatt, who sat for three hours in a Barnes & Noble bookstore with a measuring tape painstakingly constructing this fabulous dataset. Ben’s study had a follow up by Randal Olson from Michigan State University, who suggested a different approach based on the density of Waldo spots and a shortest path algorithm. In this post, I will go over both of these approaches and suggest alternatives—these are the final results:

I start with getting coordinates for Waldo’s hideouts from all seven classic puzzles. Ben Blatt indicated where they are on a single image. After importing the data, you will see a schematic of a dual-page of an open puzzle book with all hideouts marked with red spots. Each spot has text inside labeling the book and the page of the puzzle it belongs to. The text is not important to us and, moreover, needs to be removed in order to obtain the coordinates.

With Wolfram Language image processing tools, it’s easy to find the coordinates of the red spots. Some spots overlap, so we need robust segmentation to account for each spot separately. There are different approaches, and the code below is just one of them. I’ve arranged it so you can see the effects, step-by-step, of applications of image processing functions. `Binarize` is used to reduce complex RGB image data to a simple matrix of 0s and 1s (binary image). Then `ColorNegate` followed by `FillingTransform` heal the small cracks inside the spots due to text labels. `Erosion` with `DiskMatrix` diminish and separate overlapping spots. Finally, `SelectComponents` picks only the spots, and filters out the other white pixels by specifying the rough number of pixels in a spot.

Getting spots’ centers in the image coordinate system is done with `ComponentMeasurements`. We also verify that we have exactly 68 coordinate pairs:

The precision of our routine is illustrated by placing blue circles at the coordinates we found—they all encompass the hideouts pretty accurately, even the overlapping ones:

Note a sizable textbox in the top-left corner, which is always present in the original puzzles too, deforming the data a bit. I will transition from the image coordinate system to the actual book one. A single Waldo puzzle takes a double-page spread measuring 20 by 12.5 inches:

Quoting Ben: “53 percent of the time Waldo is hiding within one of two 1.5-inch tall bands, one starting three inches from the bottom of the page and another one starting seven inches from the bottom, stretching across the spread…. The probability of any two 1.5-inch bands containing at least 50 percent of all Waldo’s is remarkably slim, less than 0.3 percent. In other words, these findings aren’t a coincidence.” This is a keen observation because it is not obvious from just looking at the scattered dataset. I can illustrate by defining a geometric region equal to a single 1.5-inch strip (note the handy new `ImplicitRegion` function):

To see which bands contain the most Waldos, I scan the double-page spread vertically in small steps, counting the percentage of points contained in the band. The percentage is shown in the left plot while the corresponding band position is shown in the right one. Clearly there are sharp peaks at 3 and 7 inches, which would amount to almost 50% if two identical bands were placed at the maxima.

Widening the bands or adding more of them would raise the percentage, but also add more area to cover during the search, so it would increase the search time too. The total percentage from two bands at the maxima amounts to about 47%, while Ben claimed 53%, which I attribute to errors in quite approximate data acquisition:

Randy had a deeper statistical and algorithmic take on the Waldo data. First he visualized the density of points with a smooth function. The higher the density, the greater the probability is of finding Waldo in the surrounding area. The density plot has a quite irregular pattern, very different from Ben’s two simple bands. The irregular pattern is more precise as a description, but harder to remember as a strategy. Then, Randy “decided to approach this problem as a traveling salesman problem: We need to check every possible location that Waldo could be at while taking as little time as possible. That means we need to cover as much ground as possible without any backtracking.”

I can get a similar plot of the density points right away with `SmoothDensityHistogram`. To that, I’ll add two more things. The first is a shortest tour through all the points (i.e., a traveling salesman problem solution) found with `FindShortestTour`:

It lists the order of consecutive locations to visit so the length of the tour is minimal (the first number is the tour’s length). This “tour” is a closed loop and is different from Randy’s open “path” from A to B. If we could remember the tour exactly, then we could always follow it and find Waldo quickly. But it’s too complex, so to better comprehend its shape, we can smooth it out with a spline curve:

If you compare the visualization above with the original plain scattered plot of points, you may get the feeling that there are more points in the scattered plot. This is an optical illusion, which, I suspect, is related to the different dimensionality of these two visualizations. Points along a curve are perceived as a one-dimensional object covering much less area than a scatter plot of points perceived as two-dimensional and covering almost all the area.

Such visualizations help to give a first impression of the data, the overall distribution, and patterns:

- Background density is a visual guide to remembering where finding Waldo is more probable.
- The line through the points is a guide to the optimal trajectory when you scan the puzzle with your eyes.

But these two must be related somehow, right? And indeed, if we make the probability density background “more precise” or “local and sharp,” it will sort of wrap around our tour (see image below). `SmoothDensityHistogram` is based on `SmoothKernelDistribution`, which is pretty easy to grasp. It is based on the formula

where kernel *k*(*x*) can be a function of our choice and *h* defines effective “sharpness” or “locality” of the resulting density function. You see below that by making our distribution sharper by decreasing *h*, we localize the density more around the shortest tour. I have also chosen a different kernel “`Cosine`” function and changed several minor visual settings (for the tour, spline, and density) to show flexible options for tuning the overall appearance to anyone’s liking.

By getting the spline from the tour and widening it, we could get closer to the pattern of the density (the regions of thick-enough spline would overlap where the density is higher). And vice versa, by localizing the density kernel, we can get the density to envelope the spline and the tour. It is quite marvelous to see one mathematical structure mimic another!

Well, while nice looking, this image is not terribly useful unless you have a good visual memory. Let’s think of potential improvements. Currently I have a closed loop for the shortest tour, and this means going once from the left to right page and then returning back. Could I find a one-way shortest path that traverses once from left to right? This is what Randy Olson did with a genetic algorithm, and what I will do with a modified `FindShortestTour` that *artificially sets the distance between the start and end points to zero*. Thus, `FindShortestTour` is forced to draw a link between the start and end and then traverse all the rest of the points. Finally, the fake zero-length start-end link is removed, and I get a disconnected start-to-end point path.

I will also get rid of the single outlier point in the top-left corner and sort points in order of increasing horizontal coordinate. The outlier does not influence much, and even when it’s the solution, it can be easily checked because the area above the textbox is small.

Next I will find a shortest path from the bottom-left to bottom-right corners. And again, I will choose different visual options to provide an alternative appearance.

Randy used a similar but different path to devise a less-detailed schematic trajectory and instructions for eye-scanning the puzzle.

When you have a dual-page book spread, isn’t it natural to think in terms of pages? People habitually examine pages separately. Looking at the very first density plot I made, one can see that there’s a big density maximum on the left and another one stretched toward the right. Perhaps it’s worth looking at the same analysis done for each page independently. Let’s split our points into two sets belonging to different pages:

We walk through the same steps, slightly changing visual details:

And indeed, a simple pattern emerges. Can you see the following two characters on the left and right pages correspondingly: a slanted capital L or math angle “∠” and Cyrillic “И”?

I would suggest the following strategy:

- Avoid the very top and very bottom of both pages.
- Avoid the top-left corner of the left page.
- Start from the left page and walk a capital slanted “L” with your eyes, starting with its bottom and ending up crossing diagonally from the bottom left to top right.
- Continue on the right page and walk the capital Cyrillic “И”, starting at the top left and ending at the bottom right via the И-zigzag.
- If Waldo is not found, then visit areas in steps 1) and 2).

These two approaches of density and shortest path make a full turn and lead me back to the original simpler band idea. Those who prefer something simpler might notice that in the density plot above, there are two maxima on each page along the diagonals mirroring each other across the vertical page split. There are quite a few points along the diagonals, and we could attempt to build two bands of the following geometry:

I compare this region to the original *Slate* design using `RegionMeasure`. We see that my pattern is 6% larger in area, but it also covers 7.4% more of Waldo’s positions than Blatt’s region, and it provides a simpler and shorter one-way scanning of the puzzle instead of walking from left to right twice along two bands.

So, concerning the strategy, imagine two squares inscribed in each page and walk their diagonals, scanning bands about 2.8 inches thick. This strategy not only tells you where to look for Waldo first, it tells you where to look if you failed to find him: along the other two diagonals. This can be seen from our split-page density plot above and my final visualization below showing diagonal bands covering all four maxima:

The traveling salesman problem is NP-complete; thus, it is possible that the worst-case running time for any algorithm solving it grows superpolynomially (even exponentially) with the number of points. While `FindShortestTour` can work with large datasets, the way we adapted `FindShortestTour` (which by default returns a “loop” path) to a shortest disconnected path between two given points is a bit dodgy. We can force `FindShortestTour` to work properly on the dataset by considering all Waldo positions as vertices of a `Graph`.

In general, `FindShortestTour` on a set of points in *n*-dimensional space essentially finds the shortest tour in a `CompleteGraph`. Now if I want such a path with the additional constraint of start and end points, I can augment the graph with an extra vertex that joins the given start and end points in question. The distance to the extra vertex does not really matter. * FindShortestTour will be forced to pass through the section start-extra-end points.* This works with any connected graph, not necessarily a complete graph, as shown below:

After finding the tour on the augmented graph, I remove the extra vertex and its edges, and so the shortest tour disconnects and goes from the start to end points.

I will build a symmetric `WeightedAdjacencyMatrix` by computing the `EuclideanDistance` between every two points. Then I’ll simply build a `WeightedAdjacencyGraph` based on the matrix and add an extra vertex with fake unit distances. Before I start, here is a side note to show how patterns of data can appear even in such an abstract object as `WeightedAdjacencyMatrix`. Old and new (sorted) orders of points are visually drastically different, while the matrix in both cases has the same properties and would generate the same graph.

On the left, points are unsorted, and on the right, points are sorted according to the shortest tour. The brighter colors are pairs of most remote points. Now let’s define the whole function that will return and visualize a shortest tour based on a network approach:

Applying this to the Waldo dataset, we get a beautiful short path visual through a complete graph:

By the way, the latest Wolfram Language release has the state-of-the-art `FindShortestTour` algorithm. To illustrate, I’ll remind you of a famous art form when a drawing is made of single line with no interruption or a sculpture from a single wire piece. The oldest examples I know are simultaneously the largest ones—mysterious Nazca Lines from Peru that could measure hundreds of feet in span. Here is, for instance, an aerial image of a 310-foot-long hummingbird (Nazca Lines cannot be perceived from the ground—they are that large). Adjacent to it is a one-line drawing by Pablo Picasso.

Picasso’s art is more complex, but it’s pretty easy to guess that humans will have a harder and harder time drawing a subject as the line gets longer and more intricate. But as it turns out, this is exactly where `FindShortestTour` excels. Here is a portrait computed by `FindShortestTour` spanning a single line through more than 30,000 points to redraw the *Mona Lisa*. The idea is quite simple: an image is reduced to only two colors with `ColorQuantize`, and then `FindShortestTour` draws a single line through the coordinates of only dark pixels.

So why isn’t it simply a chaos of lines rather than a recognizable image? Because in a shortest tour, connecting closer neighbors is often less costly. Thus, in the *Mona Lisa* one-liner, there are no segments spanning across large white spaces.

My gratitude goes to Martin Handford, Ben Blatt, and Randy Olson, who inspired me to explore the wonderful Waldo patterns, and also to many creative people at Wolfram Research who helped me along the way. Both Ben and Randy claimed to verify the efficiency of their strategies by actually solving the puzzles and measuring the time. I do not have the books, but hope to do this in future. I also believe we would need many people for consistent benchmarks, especially accounting for different ways people perceive visually and work through riddles. And most of all, I am certain we should not take this seriously.

We did attest that humans are bad at being random. But that is not a bad thing. One who is good at exhibiting patterns is likely apt at detecting them. I would speculate further and say that perhaps a sense of deviation from randomness is at the root of our intelligence and perception of beauty.

Download this post as a Wolfram notebook. ]]>

*The Imitation Game* is in essence a rather accurate summation of the life and brilliant work of Alan Turing, even while some aspects of the movie are clearly fictional. Turing was in many ways a victim of his great achievements—he was forbidden from telling of his accomplishments during the war to anyone, including his family. Imagine you have the chance to save the world—and you do so—but you are required to keep it confidential; that was the case of Turing and his colleagues at Bletchley Park. He was also prosecuted toward the end of his life in an unfair turn of events. Nevertheless, Turing was never engulfed by his circumstances and remained interested in what can be considered the greatest questions in science and beyond, from what intelligence is in both humans and machines to what mechanisms nature harnesses to produce forms and shapes, and ultimately life itself.

At Bletchley Park, Turing, together with other mathematicians and engineers of great talent, made longstanding contributions to science and to human history by building the first automated machines to decipher encrypted messages. His work and the work at Bletchley led to what is today one of the greatest intelligence agencies—the UK Government Communications Headquarters (GCHQ). One can play with a computer program online to see the inner workings of the famous Enigma machine used by the Germans to encode their messages, which Turing and his team were able to crack. The example below from the Wolfram Demonstrations Project shows the inner workings of such an encryption machine that used cylinders to scramble and conceal the contents of messages during World War II.

Encryption with the Enigma Machine from the Wolfram Demonstrations Project by Gasper Zadnik

It is worth taking a minute to see how computers, and ultimately the human race, have come this far, with Turing himself playing a central role. Turing approached several scientific endeavors with incredible idiosyncrasy. When tackling what would become his most seminal work, which gave rise to the digital computer, Turing was actually not thinking of computers but of humans. Indeed, he asked how humans calculate and how much of that could be captured by mechanical calculation. By pursuing this idea to its final consequences, Turing revealed two incredibly powerful concepts of priceless intellectual value.

Turing first showed that either a human or computer with the same resources would find a fundamental limit on the sort of things that could be proven to be true or false about a theory. In other words, there are formally unanswerable questions whose answers are nevertheless known to be true or false; hence, truth and proof are separate concepts. Indeed, in this very technical formal approach, not all truths can be proven by mechanical means.

At the same time, Turing also found that he could build a single machine to do the work of any other computing machine; this is what we call a “computer” today. Computers that are capable of emulating any other computer are called “universal,” because they can do whatever any other machine can do. You can check email, watch videos, and play video games all on the same computer, as it can be reprogrammed to perform multiple tasks. That’s obvious to us now, but it wasn’t at all obvious to someone living in the 1930s.

An “a” machine, as Turing would first call it (for “automatic”), today known as a Turing machine, is the most basic unit of study in the field of theoretical computer science. The concept not only gave birth to the whole field but remains the object of reference for most purposes in computer science. For example, when you want to know how much memory one theoretically needs to perform a computation, a universal Turing machine is always the point of reference. An immediate follow-up question is whether this kind of “universal” computation occurs naturally in the world and is responsible for the complexity and structure we find in the universe.

One way to answer this question is to look at how many resources are required to build such universal computers. If it turns out that this type of computation is very easy to implement because it requires only a few simple resources, one might be persuaded that nature makes use of this computational resource to produce the shapes and patterns we find around us. And indeed, it turns out that the resources needed to implement a universal computing machine are so incredibly simple that they are available everywhere in nature. This was illustrated by a competition sponsored by Stephen Wolfram to prove whether an exceptionally simple Turing machine that he had found in his exploration of these computers in his book, *A New Kind of Science*, was actually capable of universal computation. The contest started and ended in a heated but rich discussion on the necessary and sufficient initial conditions for a system to become and be considered universal.

The machine above starts with an empty “tape” on which a reading “head” is placed; the head moves to the right or left and writes or deletes colors over time following the rules displayed at the bottom. While this small Turing machine requires a special initial condition to perform as a universal computer, it does not violate any previous result in the field, and thus meets the conditions for a system to be universal. An excellent place to learn about this rich computing model can be found here, and more about the smallest universal Turing machine here.

Another question related to Turing’s main interests is about the shapes and forms that emerge in nature all around us, especially in connection to life. By looking at another, but equivalent, type of computing program that Stephen Wolfram introduced in the 1980s called 1-dimensional cellular automata, one can quickly see that computer programs are incredibly rich in behavior, and that even the simplest computer programs can display an incredibly complex range of behavior. Below (see pyramidic figure) is a minimalistic computer program of this type with only three colors—an example of Wolfram’s 1-dimensional cellular automata—that starts from the simplest possible initial condition (a single dark cell at the top) and replaces the cell according to a simple set of rules (see top figure) that looks only at the neighbor’s colors to determine the color of the next central cell.

The program produces all sorts of simple and complex patterns that interact without destroying each other. There is even a small transient at the intersection of the rightmost fractal behavior and the middle one where regions of high complexity emerge just before dying out, whereas on the leftmost side there is a stripe of regular behavior feeding a seemingly never-ending, random-looking region that expands over time. The digital computers that humans produce may be simply imitating the computations that occur naturally throughout the universe, and that are, indeed, the very basis of how the universe functions.

Among the many interests of Alan Turing was the challenge of mathematical notation, which he explored in a manuscript, “Notes on the Foundations of Computer Science,” to be auctioned on April 13 of this year. Wolfram Research has built on Turing’s ideas since its beginning, and the topic of mathematical notation has also been key to the development of Wolfram *Mathematica* and the Wolfram Language. It is the Wolfram Language that enables Wolfram|Alpha, the world’s only computational knowledge engine, to understand queries in both formal and natural language. Stephen Wolfram has written and spoken extensively on these matters.

Recently Wolfram Research has taken an interesting direction toward pervasive computation (and related to Turing’s seminal idea of universal computation) with Wolfram Programming Cloud, bringing revolutionary technology to the real world for creating and deploying software and applications to anywhere, from anywhere. Also, the Wolfram Connected Devices Project takes us closer to the goal of injecting the power of universal computation even in the simplest devices from the Internet of Things, effectively making any physical device into a universal Turing machine. Devices like the Raspberry Pi mini-computer, already powerful in its own right, is made even more so by being shipped with the Wolfram Language and *Mathematica* preinstalled, enabling inquiry and exploration for the next generation of scientists and makers.

Much still remains to be discovered in connection to Turing’s main ideas, as it may turn out that the universe itself is some sort of universal Turing machine. In fact, as far-fetched as this might sound, it is exactly what classical physics prescribes: a fully deterministic world governed by computable rules and therefore emulative by a simple computer program such as a Turing machine. When physicists explain their ultimate quest for a theory of everything, they are endorsing just such an idea. Stephen Wolfram has his own approach to tackle this challenge and anticipates this being one of his next major projects as time permits.

Wolfram|Alpha shows a spike in the number of visits to the Wikipedia entry for Alan Turing on several important dates in modern history. First, the official public apology given by British Prime Minister Gordon Brown on September 10, 2009, and then around several academic events in late 2011 and early 2012. We see a great spike exactly on the 100th anniversary of his birthday on June 23, 2012—and by strange coincidence, as Stephen Wolfram notes in recognizing Turing’s 100th birthday, *Mathematica*’s anniversary also falls on June 23 (1988). Another spike occurs on December 24, 2013, when a posthumous royal pardon was granted for Turing’s 1952 conviction for homosexuality. More recently, there has been a steady increase due to the release of the movie *The Imitation Game*.

Regardless of the outcome of the Oscars awards this Sunday, in a way, Alan Turing has already won. The achievements of Turing, widely considered to be the father of modern computing, are now known worldwide, in ironic contrast to the unfortunate circumstances that led to his death. While he accomplished much in his relatively short lifetime, the best way to remember Turing is by continuing to advance his greatest ideas with the same kind of eagerness that he always had toward scientific inquiry, and by finding answers in unexpected directions. At Wolfram Research, we strive to do exactly that.

]]>In 2012, when Michael started a Kickstarter campaign to fund the development of a Creative Commons licensed book about Modelica, I was the first person to back it, and Wolfram Research became one of the gold sponsors of the book. A new key feature in *SystemModeler* 4.0 is the full *Modelica by Example* book included in the product. This makes it much easier to get started learning Modelica.

I had the opportunity to ask Michael a couple of questions about the new book and Modelica.

Michael Tiller (left) and me, at the North American Modelica Users’ Group Conference at Georgia Tech in 2014.

**What is your background in Modelica?**

I started using Modelica around 1998, I think. At the time, I was already a very big fan of high-level modeling languages. As an undergraduate, I had used the MAST modeling language (in Saber) extensively. When I started working at Ford, I tried to apply modeling languages to modeling efforts in powertrain modeling.

I quickly ran into two issues. The first was that up until that point, the modeling languages I had looked at were mainly focused around modeling of electrical systems. I needed a modeling language that had a broader vision for modeling that included mechanical and, more importantly, fluid system dynamics. The other issue was having a modeling language that was open. Openness could help avoid vendor lock-in. But more importantly to me, I saw the ability to use a modeling language as a medium for capturing high-level knowledge. That knowledge could be used in a variety of different ways. Compiling the code into something that could be simulated was just part of the story. I wanted a language that was open so that people could plug new ideas and tools into the ecosystem and not have to wait for a single vendor to deliver those capabilities.

Both of these issues led me to Modelica. From there I worked with my colleagues at Ford to inject this technology into the modeling efforts that were underway at Ford. Along the way, I participated in the Modelica design group providing feedback from an industrial user’s perspective. I recognized that one big hindrance to the adoption of Modelica was the lack of a book on the topic. So in 2001, I published the first book on Modelica.

After Ford, I worked in engineering consulting. We used Modelica as one technology, among many, for helping customers to realize the advantages of engineering processes that were more model-based. In 2012, I started my current company, Xogeny, with the goal of helping engineering companies leverage all the amazing software technologies that are out there. That means going beyond just Modelica and FMI and expanding into lots of cloud and web technologies as well. My hope is that eventually engineers who develop models will have all the tools they need to make those models accessible to anyone who wants to use them and to really add value to the engineering process along the way.

**Why is Modelica important?**

Modelica is important because, as I mentioned previously, it captures a representation of people’s models in an open way and in a way that can be reasoned about. This comes from the fact that Modelica is a declarative language, not an imperative language. When you deal with typical programming languages, the imperative constructs (e.g., do this, now do that, now loop until this is true, then overwrite that result) make it nearly impossible to actually extract the high-level intention of the user (at least not without a tremendous amount of discipline). Modelica is not a language of statements and operations, it is a language of relationship: how variables relate to each other through an equation, how the values of a variable are related to a type (and its physical units), how a resistor is related to a capacitor through connections in a schematic diagram. The point is that the structure of the model and all of these relationships are always preserved in Modelica.

This property has been leveraged extensively to create very fast simulations by being able to reason about these relationships. We can see which variables depend on which other variables and use this to efficiently perform calculations, minimize the number of variables involved in solving nonlinear systems, recognize which signals are synchronized with other signals to ensure determinism in results, and so on.

That being said, I think there are other aspects of the engineering process that can benefit from this approach. So I don’t think we’ve fully leveraged the knowledge captured in Modelica models yet.

**Why is learning Modelica important?**

There are lots of approaches to simulation that kind of mirror computer programming where you start with some known values, then you compute something from those, then you compute something from those. Unfortunately, those kinds of approaches have limitations. But those limitations are very hard to see when you are just starting out. It is very common (both in engineering and in programming) for people to pick technologies that are easy to get started with, but don’t scale very well once you get into larger, more complex problem domains. But you can’t really blame people for taking the path of least resistance when trying to learn technologies. My goal, in writing both of my books, was to provide an easy path for people to learn about Modelica because, in my opinion, Modelica “has legs.” It can get you through those large and complex problems. But you have to learn it first before you can apply it to those kinds of problems.

This is an interesting and challenging question. The real advantages of Modelica are hard to explain to people at first, and often by the time they get to the point where they recognize the limitations of other technologies, they are so far down that road and so invested in them, they don’t have the option to switch technologies. That’s a big driver for me in trying to get people on the Modelica track from the start.

I think there is a bigger picture here, which is the value of standards in general. Many engineering companies want to focus on their core competency and want to “outsource” lots of stuff to vendors. But I feel like companies are more and more appreciating not just the cost in terms of dollars of this approach, but also the cost in terms of agility. They can’t change anything easily because of all the tear-up involved due to of vendor lock-in or just poor planning. The engineering community needs to start putting more focus on software and IT standards (and not just standards for fasteners, materials, etc).

**What is the purpose of the book?**

As I say in the dedication of the book, “I’m not interested in capitalizing on my knowledge of Modelica, I want to share it with others so they can experience the same joy I do in exploring this subject.” It is as simple as that. The nature of the Kickstarter project might give the appearance that this is some kind of business undertaking. But if that were the case, I wouldn’t be giving the book away on the web for free. The money was just to give me the freedom to really invest time in the project (and allow me to continue to invest time in it as it develops).

Excerpt from the *Modelica by Example* book inside *SystemModeler*.

**Any final thoughts?**

I hope the book excites people (students in particular) about modeling and simulation. I think Modelica is a great example of a technology that is open, scalable, and industrially proven. It isn’t the only one. For me, that is the most exciting part. There are so many amazing technologies out there that we can apply to engineering, and every day I jump out of bed excited to see how to do just that.

I think in broader terms, my hope is to demonstrate to people in the engineering world the power of open collaboration. Whether that is open source, creative commons, standardization, whatever. Engineering is too “closed.” Paranoia about intellectual property related issues is very strong, and it makes people afraid to collaborate and discuss. I think people are also hesitant to leverage more advanced software and IT technologies. I think that is partly because they haven’t been given enough training to appreciate the value of these technologies and feel competent to participate. But I also think engineering is too segregated from software and IT. For example, when I look at lots of companies, the IT operations are very strongly focused on making sure email works and the networks are functioning and viruses aren’t spreading. All that is important, but what I don’t see a lot of is IT organizations having responsibilities to support the engineering process. Most engineers I talk to feel like every time they go to IT departments, they are told “No” to anything they want to do. The engineers are subservient to the IT departments. I think that is crazy. After all, these are engineering companies. Engineering should be their top priority. So I think that mindset has to change, and the book, my blog, and various other things I’m doing are just trying to make the value for open collaboration and standards (among other things) so valuable that we can hopefully break down some of those barriers.

]]>

Computational Explorations in Magnetron Sputtering

Magnetron sputtering is a widely used industrial process for depositing thin films. E. J. McInerney walks you through the physics of magnetron sputtering in a step-by-step fashion using *Mathematica* syntax and functions. The reader is encouraged to explore this fascinating topic by actively following along with a series of simple computer models. By working through these models, readers can build their intuition of PVD processes and develop a deeper appreciation of the underlying physics.

Continuum Mechanics using *Mathematica*: Fundamentals, Methods, and Applications, second edition

In this second edition of *Continuum Mechanics using Mathematica*, Antonio Romano and Addolorata Marasco take a methodological approach that familiarizes readers with the mathematical tools required to correctly define and solve problems in continuum mechanics. It provides a solid basis for a deeper study of more challenging and specialized problems related to nonlinear elasticity, polar continua, mixtures, piezoelectricity, ferroelectricity, magneto-fluid mechanics, and state changes.

*Mathematica* Data Visualization: Create and Prototype Interactive Data Visualizations Using *Mathematica*

Nazmus Saquib begins by introducing you to the *Mathematica* environment and the basics of dataset loading and cleaning. You will then learn about different kinds of widely used datasets, time series, and scientific, statistical, information, and map visualizations. Each topic is demonstrated by walking you through an example project. Along the way, the dynamic interactivity and graphics packages are also introduced. This book teaches you how to build visualizations from scratch, quickly and efficiently.

Interactive Computational Geometry, A Taxonomic Approach

This ebook by Jim Arlow is an interactive introduction to some of the fundamental algorithms of computational geometry. The code base, which is in the Wolfram Language, is integrated into the text and is fully executable. This book is delivered as an interactive CDF (Computable Document Format) file that is viewable in the free CDF Player available from Wolfram, or can be opened in *Mathematica*. Readers are encouraged to have a copy of *Mathematica* in order to get the most out of this text.

学生が学ぶ*Mathematica*入門 (Introduction to *Mathematica* for Students)

Souji Otabe provides a quick introduction to *Mathematica* for students. Engineers and scientists need to know about symbolic computation, but they also need to know numeric computation to analyze experimental data. In this ebook, *Mathematica* is treated as a general problem-solving tool for science and engineering students. Readers will study basic operations of *Mathematica* first, and then they will learn how *Mathematica* can be applied to engineering and science.

Mathematik fur Informatiker (Mathematics for Computer Scientists) Band 2: Analysis und Statistik 3. Auflage

The second edition of Gerald and Susanne Teschl’s textbook introduces mathematical foundations that are concise, yet vivid and easy to follow. They are illustrated using numerous worked-out examples mixed with applications to computer science, historic background, and connections to related areas. The end of every chapter offers a self-test and warmup problems (with detailed solutions), as well as more advanced problems. Complementary sections introduce *Mathematica* to visualize the subjects taught, thereby fostering comprehension of the material.

Neoclassical Physics

In this introductory text by Mark A. Cunningham, physics concepts are introduced as a means of understanding experimental observations, not as a sequential list of facts to be memorized. Numerous exercises are provided that utilize *Mathematica* software to help students explore how the language of mathematics is used to describe physical phenomena. Students will obtain much more detailed information about covered topics and will also gain proficiency with *Mathematica*, a powerful tool with many potential uses in subsequent courses.

Pathways Through Applied and Computational Physics

This book is the collaborative effort of Nicolo Barbero, Matteo Delfino, Carlo Palmisano, and Gianfranco Zosi to illustrate the role that different branches of physics and mathematics play in the execution of actual experiments. The unique feature of the book is that all the subjects addressed are strictly interconnected within the context of the execution of a single experiment with very high accuracy, namely the redetermination of the Avogadro constant NA, one of the fundamental physical constants. Another essential feature is the focus on the role of *Mathematica*, an invaluable, fully integrated software environment for handling diverse scientific and technical computations.

Probability: An Introduction with Statistical Applications, second edition

Thoroughly updated, John J. Kinney’s second edition of this title features a comprehensive exploration of statistical data analysis as an application of probability. The new edition provides an introduction to statistics with accessible coverage of reliability, acceptance sampling, confidence intervals, hypothesis testing, and simple linear regression. Encouraging readers to develop a deeper intuitive understanding of probability, the author presents illustrative geometrical presentations and arguments without the need for rigorous mathematical proofs. This book features an appendix dedicated to the use of *Mathematica* and a companion website containing the referenced data sets.

Submissions aren’t limited to heart-themed programs, but check out these examples if you need a little inspiration:

To win, tweet your submissions to @WolframTaP by 11:59pm PDT on Saturday, February 14. So that you don’t waste valuable code space, we don’t require a hashtag with your submissions. However, we do encourage you to share your code with your friends by retweeting your results with hashtag #WLSweetTweet.

]]>For those of you who are interested, Wolfram|Alpha possesses a wealth of sports stats so that you can get all the cold, hard facts about the Patriots and the Seahawks.

And if you can’t wait for Sunday to get your next football fix, or find yourself suffering withdrawal afterward, VICTIV is doing very cool things with the Wolfram Language to run a fantasy sports league. Earl Mitchell delves into the step-by-step process for new users on his blog, The Rotoquant.

But some of you are probably just plain old tired of all this “Deflatriots” business and of having your television occupied by football games, news, talking heads, and commercials from September through February, because after a while, the teams start to blur together. Fortunately, with the help of the Wolfram Language, you can pick your team out of the crowd using this `Graph` of NFL logos we created by pulling the images from our Wolfram Knowledgebase and using `Nearest` to organize them by graphical similarity.

If you’re one of those who are weary of all the football hoopla, then let us soothe your soul with a time-honored and longstanding tradition of cuteness: Animal Planet’s Puppy Bowl XI.

With celebrities such as Katty Furry performing in the halftime show, it promises to be the most adorable sports game you’ll watch all year. The competition will be fierce, with 57 shelter-donated puppies—all up for adoption!—fighting for the honor to be the Bissel MVP (Most Valuable Puppy).

Past MVPs have included Max and Abigail, both Jack Russell Terriers, and the last MVP, Loren, was a Brittany, a breed not present in 2015′s lineup.

It’s not unlikely that one of the eight Labrador Retrievers will take home the prize for the first time ever. Again using the Wolfram Language, here’s the breakdown of Puppy Bowl breeds:

But who knows, one of those Beagles could come out of the end zone and snatch the victorious touchdown from right under their wet noses. Are you ready for some puppy ball?

]]>

This hackathon was a race to the finish, requiring all the creativity and innovation each team could muster. “Using Wolfram was a no-brainer,” said Walch. “We needed a fast way to do computations off the device, and the Wolfram Language had so much of the functionality we needed built in already: from image processing to computing Fourier coefficients. Making the app in 36 hours would not have been possible without it!”

According to the MHacks project profile, with the use of the Wolfram Language and Wolfram Programming Cloud, “our fabulous new iOS App takes any input image, converts it into a line drawing, and computes its Fourier series expansion using the fast Fourier transform (FFT). Draw Anything creates step by step drawing guides by truncating the Fourier series at different lengths.”

“We ran our computations in the Wolfram Programming Cloud so that they would run quickly and efficiently, and so that the user would not experience any slow down in their device,” said Jacobs. “I am relatively new to programming, but it was incredibly easy for me to pick up the language and use it. I’m really looking forward to coming up with new projects to code in the Wolfram language!”

The designers also included a shout-out on their home page to Wolfram’s Michael Trott for his blog post that inspired the creation of the Draw Anything app.

At MHacks V, which was hosted by the University of Michigan and in part sponsored by Wolfram Research, teams of up to 4 members completed submissions that were judged on the usefulness, originality, technical difficulty, and design of their hacks. Including the winning hack, a total of 14 teams worked on projects involving Wolfram technologies.

The creator of one of those, WolfWeather, had this to say about using Wolfram tech: “…the language itself is something out of a science fiction movie being able to perform one hundred lines of code in two or three lines of code. I wanted to do something simple and fun, so I created WolfWeather. Its goals are straightforward: it gives users current weather updates, the time, date, weekday, the Zodiac year, and their GPS location. It also promotes the Wolfram Language and shows off a bit of the sheer power the language has as a knowledge base.”

*The Michigan Daily*‘s article on the event includes a brief interview with Jacobs and Walch, who revealed that they plan to continue developing Draw Anything and will be attending future hackathons, including TreeHacks and Seoul Global Hackathon.

Congratulations to team Draw Anything and all participants, and thank you, MHacks, for another unforgettable hackathon!

Got a hackathon coming up? Contact Wolfram to request our participation, or check out the resources on our hackathon page.

]]>Jacob Bernoulli was the first mathematician in the Bernoulli family, which produced many notable mathematicians of the seventeenth and eighteenth centuries.

Jacob Bernoulli’s mathematical legacy is rich. He introduced Bernoulli numbers, solved the Bernoulli differential equation, studied the Bernoulli trials process, proved the Bernoulli inequality, discovered the number ** e**, and demonstrated the weak law of large numbers (Bernoulli’s theorem).

Bernoulli’s treatise *Ars Conjectandi* (i.e. *The Art of Conjecturing*) was posthumously published in 1713, eight years after his demise, and was written in Latin, science’s *lingua franca* of the time. It is considered a seminal work of mathematical probability. Its importance is witnessed, in part, by its translations to French by G. Le Roy in 1801, and, recently, to English by E. D. Sylla in 2005.

*The Art of Conjecturing* comprises four parts. The first part reproduces Christiaan Huygens’ *De Ratiociniis in Ludo Aleae* (*On Reasoning in Games of Chance*), with extensive commentary from Bernoulli and detailed solutions of Huygens’ five problems, posed at the end of Huygens’ work with answers, but without derivations. In the first part, Bernoulli also derives the probability that at least *m* successes will occur in *n* independent trials with success probability of *p*:

The second part, “The Doctrine of Permutations and Combinations,” is devoted to combinatorics and to the study of figurate numbers, i.e. numbers that can be represented by a regular geometrical arrangement of equally spaced points:

It is here that Bernoulli introduces Bernoulli numbers. He starts by noting the identity among binomial coefficients , namely that .

Bernoulli knew that for a fixed *m*, binomial coefficient is a polynomial in *n*, namely

. This identity allows him to solve for . He gives a table of results for 0≤m≤10.

. This identity allows him to solve for . He gives a table of results for 0≤m≤10.

To reproduce Bernoulli’s table, define a function to construct equations for the sum of powers:

Solving for the sum of powers:

Bernoulli writes, “[*W*]*hoever has examined attentively the law of the progression herein can continue the Table further without these digressions for computations*” by making the following educated guess:

He notes that coefficients *B _{r+1}* do not depend on

These coefficients are the celebrated Bernoulli numbers, which have found their way into many areas of mathematics [e.g. see mathoverflow.net].

In the second part of his book, Bernoulli counts the number of permutations, the number of permutations in sets with repetitions, the number of choosing objects from a set, etc., which he later applies to compute probabilities as the ratio of the number of configurations of interest to the total number of configurations.

In part three, Bernoulli applies results from the first two chapters to solve 24 problems related to games of chance. A recurring theme in these problems is a sequence of independent 0 or 1 outcomes, which bears the name of Bernoulli trial, or Bernoulli process. I thought Jacob Bernoulli’s birthday anniversary to be an apt occasion to explore his problems with *Mathematica*.

For example, problem 9 asks to find the expected payout in a three-player game. Players alternately draw cards without replacement from a pack of twenty cards, of which ten are face cards. When the cards are exhausted, winnings are divided among all those who hold the highest number of face cards.

With c1, c2, and c3 denoting the number of face cards each player has, the payout of the first player is:

After the pack of twenty has been distributed, the first and the second players each receive seven cards, but the third one only receives six. The tally vector of face cards received by each player follows `MultivariateHypergeometricDistribution`:

This and other problems are stated and solved in the accompanying *Mathematica* notebook.

The concluding part four of *Ars Conjectandi* discusses uses of probability in civil, moral, and economic matters. Here Bernoulli argues that the probability reflects our incomplete knowledge of the state of the world, and unlike in a game of chance, where probabilities can be determined by finding the proportion that configurations of interest take in the whole set of possible configurations, the probabilities here cannot be a priori established. Bernoulli argues that these unknown probabilities can be inferred from past outcomes.

He proves the weak law of large numbers, asserting that the observed frequency of successes in *n* independent trials where the probability of success equals *p* will converge to *p* as the number of trials grows. Thus, you can estimate *p* arbitrarily accurately by running a sufficient number of trials. Specifically, for any *δ* and *ε*, there exists a large enough sample size *n* that:

The demonstration “Simulated Coin Tossing Experiments and the Law of Large Numbers” by Ian McLeod, among others, explores this convergence.

Download this post as a Computable Document Format (CDF).

Download Bernoulli problems as a *Mathematica* notebook.