Wolfram's Rule 34 in XKCD

TheoryCellular Automata

Theory Problem Overview


The hover "joke" in #505 xkcd touts "I call rule 34 on Wolfram's Rule 34".

I know what rule 34 is in Internet terms and I've googled up who Wolfram is but I'm having a hard time figuring out what Wolfram's Rule 34 is.

So what exactly is this "Rule 34"?

Here's the comic: http://xkcd.com/505/.

Theory Solutions


Solution 1 - Theory

Wolfram has organized the 256 possible 1-D cellular automata based on nearest neighbors in this way:

RULES:
0:        0        0        0
1:        0        0        1
2:        0        1        0
3:        0        1        1
4:        1        0        0
5:        1        0        1
6:        1        1        0
7:        1        1        1

If you're evaluating a stage in a cellular automaton (CA) that follows rule 2, then whenever a three-bit string matches rule 2's configuration, the center bit becomes (or stays, in this case) true on the next iteration.

A CA's rules are described as a bitstring. Say it's rule 110 (my favorite). In binary, 110 is 01101110. The digit of least significance is zero. This means that if the cell and its neighbors match rule 0 above, it turns white/negative/0/false/whatever. The second least significant digit is one, so if the cell and its neighbors match rule 1 above, it turns black/positive/1/true/whatever`, etc. etc. until you see that, for rule 110, if a cell and its neighbors match rules 1,2,3,5,6, then the cell turns black. Otherwise, it turns white. A while back, I wrote some JS code to allow me to play around with these unique CA:

http://lucasoman.com/files/projects/caeditor/caed.php

As you can see by playing with it, you can randomly toggle any block, which alters every block below it according to the rules. It's kind of a neat way to see the chain reaction caused by aberrations in the process.

Hope this helps.

Solution 2 - Theory

What a perfect self fulfilling meme. XKCD is popular enough that people will search for something obscure that is referenced. Above is posted a note that spammers are using W's-34 in headers to redirect searches. As, spammers sometimes work for porn sites, the author created w-34 related porn by merely calling 34 on it. Holy recursion batman.

Solution 3 - Theory

"I call rule 34 on Wolfram's Rule 34"

The first "rule 34" refers to the rule 34 of the Internet mentioned in http://xkcd.com/305/ the second "rule 34" is Wolfram's cellular automata theory.

Solution 4 - Theory

In frames 9-13 and 19-20 in the xkcd comic, you can see some patterns generated by the rules. The thing we want to know is what's funny about "I call rule 34 on Wolfram's rule 34"?

I'm not totally sure what the significance of rule 34 is (except the Internet porn joke on xkcd 305 [credit to Jason Slocomb's comment]), but the point of the comic was that some poor dude is simulating our entire universe using a Turing machine. The idea of a Turing machine is essentially that a table of data can be used to run computations on other data (i.e. a program is the first table and the input and output are the other table).

The first table (the program) gives rules that tell the machine what to do with the data. Wolfram claimed to have boiled down everything to the smallest number of rules possible to be able to carry out all possible computations (a universal computer).

He said it needs 2 states and 3 colors or something (I might have the order backward). I think the states refers to ( 0 / 1 ) and the colors refer to the kind of operations you perform. If you studied some assembly this will make more sense.

The most elementary computation is when 2 bits of data get compared to yield a third. These are called boolean operations. There are 8 possible:

0;0 -> 0
0;0 -> 1
0;1 -> 0
0;1 -> 1
1;0 -> 0
1;0 -> 1
1;1 -> 0
1;1 -> 1

You can do all of this with a single "color" of comparing (like an XOR circuit for example) and even merge this operation with the write operation. Then by keeping 2 control bits somewhere (o and 1 at the beginning of your memory) you can accomplish writing a plain 0 or 1 by comparing those bits to themselves or each other. If you link a bunch of XOR circuits together in different patterns you can achieve all 8 outcomes. Wiki XOR for more on that.

But most programs require another very important feature: you have to jump to different parts of the program and then jump back. so jumping is an entirely different color.

And of course you have to read bits from memory.

So all in all Wolfram said he could make any program (that means all conceivable programs exhaustivally) out of just 3 "colors".

Stephen Wolfram has done extensive empiric research on these Turing patterns; staring at them, meditating on them, cataloging them, and comparing them by studying hundreds of pictures and graphs of their implications and so on.

So the punchline of the joke, I presume, is either just that when the poor guy moving rocks gets to the part of his universe simulation dealing with the research work of Wolfram, and all the brain activity involved etc, the rock patterns get really recursive, or it has something to do with rock simulations of Internet porn involving Wolfram's cellular automaton rules??!!?

Recursively patterned rock-Internet porn simulations? Internet pornography with rock-simulations?

Something like that I suppose.

Solution 5 - Theory

It took me a moment to get this, but the joke is a pun on two different Rule 34's. The first is xkcd's Rule 34 ("If you can imagine it, there is porn of it") coined in this comic. The second is Wolfram's Rule 34 explained expertly above. So the cartoonist is saying that there must, somewhere, be cellular automata-themed porn. It doesn't have much to do with this specific comic other than the narrator's use of a cellular automaton.

Solution 6 - Theory

If you want to look at the source:

The book contains thousands of nice little diagrams.

Solution 7 - Theory

Rule 34 refers to a set of rules developed by Stephen Wolfram for cellular automata. You may be familiar with Conway's Game of Life, which can be used to model computations. Wolfram has a similar method of computation using cellular automata, defined by a number of rules; Rule 34 is but one rule for defining how the computation takes place. The "game" itself is defined in Wolfram's Atlas of Simple Programs.

If you want more information, including some helpful links, you should check out this blog post, as well as this one. Sadly, since the XKCD cartoon came out, a lot of people have searched on this rule in Google, resulting in a lot of spammers who are trying to take advantage of the search term, so direct information on Wolfram's Rule 34 is difficult to find.

Solution 8 - Theory

Rule 34 is one of the 256 elementary cellular automata (in 1-dimension).

Solution 9 - Theory

Solution 10 - Theory

Wolfram Alpha has a good description of it here.

Solution 11 - Theory

Solution 12 - Theory

The rule indicated by the pattern of the rocks in the comic, however, is rule 126.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJoe ZackView Question on Stackoverflow
Solution 1 - TheoryLucas OmanView Answer on Stackoverflow
Solution 2 - TheoryMario CorsettiView Answer on Stackoverflow
Solution 3 - TheoryAlexView Answer on Stackoverflow
Solution 4 - Theoryjayagopal dasView Answer on Stackoverflow
Solution 5 - TheoryPaulView Answer on Stackoverflow
Solution 6 - TheoryChristian LescuyerView Answer on Stackoverflow
Solution 7 - TheorymipadiView Answer on Stackoverflow
Solution 8 - TheoryJoseph DaigleView Answer on Stackoverflow
Solution 9 - TheoryKennyView Answer on Stackoverflow
Solution 10 - TheoryJeff MoserView Answer on Stackoverflow
Solution 11 - TheoryJason SlocombView Answer on Stackoverflow
Solution 12 - TheoryDjuraView Answer on Stackoverflow