# Wolfram|Alpha Now Includes Substitution Systems

When Wolfram|Alpha was introduced, Stephen Wolfram blogged about it being the first “killer app” that resulted from his work on *A New Kind of Science* (NKS). We can now use this application of NKS to further our exploration and study within the NKS field. For example, one class of systems discussed in NKS is that of substitution systems. Now that a host of string substitution systems have been integrated into Wolfram|Alpha, we can explore a variety of these systems—not just the ones that are well known.

A string substitution system is composed of two parts: a string and a set of rules. The string looks like a series of numbers, say “0″ and “1”. The rules describe what happens to each number in the string; for example, “1” -> “0” and “0” -> “10”. Under our rules, our example string, “1”, transforms to “0”. In true NKS fashion, repeated iteration of these simple rules can give interesting behavior. Our example, which seems deceptively simple, can model the Fibonacci numbers. We simply document the length of the string each time we apply the rules to find that the series of lengths obtained at the end of each substitution corresponds to the Fibonacci series: {1, 1, 2, 3, 5…}. We see this in the following result:

Similarly, there is a string substitution system that models the Cantor set. The rules that define this substitution system are 1->101 and 0->000:

So far, the examples we’ve shown have been neighbor-independent substitution systems. Wolfram|Alpha can also model neighbor-dependent string substitution systems. For example, see Wolfram|Alpha’s results for rules like 012->1, 2->10, 1->02 or 03->1, 2->13, 1->2, 3->01:

Here is a great example to try for yourself: 0->1, 1->12, 2->23, 3->124, 4->01.

Fantastic post! I’m having loads of fun with this functionality.

It is somewhat depressing to see the waning response here and on social media sites to your updates. Is this a case of consumer base mismatch? I evangelize for WA in my daily dealings with scientists and scientifically minded people. They seem very interested for the most part. Why aren’t they commenting on your blog posts and participating on your fora? Are they mostly of the generation before web media? Are most people of the web media generation not that scientifically minded? (I realize the intention as a practical tool, but realistically, at least for the moment, WA only holds true appeal for those who find inspiration in the same things the creators presumably do. You need some quality curators who care about inanities like sports scores if you want to broaden appeal.) Do failings of the application lead to them becoming disinterested?

I think that at least a couple of those are good questions and that you should be looking into them if you aren’t already.

Andrew B. has a good point about the possible customer base mismatch. A clue to the lack of comments may be in the fact that people do like learning about sites new to them early in the site viewing process. Much of the problem may have to do with poor re-placement of the Blog and Community links and FAQ’s within Resources at the very bottom of the Home Page. How about putting this back at the top of the Home Page like it was in the beginning? Can’t hurt, might help.

Andrew B.: I believe most of the people who like WolframAlpha bother less writing on the web about it than those who are afraid of it or don’t see the sense in it. As you pointed out, WolframAlpha is of most interest to scientifically educated people – yet those who aren’t probably make out a greater part of (earth as well as internet) population, and thus seem to be screaming more loudly.

Beautiful results. What’s nice about this is the visualizations that can be so darn tedious to code out, even when you know what you’re doing.

Just great… and unique to Wolfram|Alpha!

This is cool… I enjoy doing NKS kinds of experiments, and would like to see more of this kind of thing.

By the way, I would like to know, out of all the systems Stephen Wolfram has looked at, what does he consider to be the simplest that he has looked at that exhibits complex behavior? Is it some cellular automata, or might he consider for example consider say, some turing machine or perhaps a cyclic tag machine to be simpler?

Please give examples of the use of ‘Substitution systems’ in real life. I am sure they are there but cannot identify them.

Looking back at your example I now realize it suggests that a tree might follow the fibonacci rule when growing. As each stem grows it buds at constant intervals. Each bud point obeys the sequence. 0 means carry on in the same direction and 1 means change angle. I realize there is more to it than that but if trees were my field I would investigate the possibility.

With wolfram alpha I could rapidly try variations to cover 3D growth.

W!A’s answers will often contain 3D information. I suggest you consider whether it could be output to the new 3D displays becoming available making it more user friendly. For instance the subsitution system could be used to generate 3D output showing a tree growing in 3D not just 2D. I expect the software supplied for use with a 3D output device could enable the user to view the output from any direction. A 4th dimension could be added using time for the fourth dimension so that you could watch a video of the 3D image changing. This 4th dimension of the output need not really be time but any 4th dimension of the data.