Showing posts with label Wolfram. Show all posts
Showing posts with label Wolfram. Show all posts

Tuesday, October 8, 2013

Five More Methods for Computing the Sierpinski Triangle

   In a previous post (see An Iconic Image of Deterministic ChaosFebruary 23, 2013), I shared a Scratch project that used mathematician Michael Barnsley’s Collage theorem to compute the Sierpinski triangle.
   I know five other methods for computing the same image;
(1) by playing the Chaos game, 
(2) by coloring the odd numbers in Pascal’s triangle, 
(3) using recursion and the initiator-generator method, 
(4) using the Lindenmayer L-system method, and 
(5) by using Wolfram’s linear cellular automaton, Rule 90.
   It’s the last method, Wolfram’s Rule 90, that is the subject of this post. Here is Rule 90.

   For any three-cell group, the state of the center cell, in the next generation, is determined by the black and white pattern of the three cells. Examine Rule 90 and you will find that the center cell transforms to a black cell in the next generation if the XOR operator (black = 1 or white = 0) of the left and right cells returns a 1 (black).
   You can view this project in action by clicking on this link. You do not need to have Scratch installed as the program will run in your browser.
http://scratch.mit.edu/projects/11024434/

   If you would like a detailed walk-through of Wolfram’s Rule 90, in a PDF file, email your request to:

Thursday, April 18, 2013

Tur-mites and the XOR Gate


   I have just returned from a long vacation where I did not have Internet access for two weeks. Thanks for checking this blog in the interim.
    The type of programming Scratchers do reflects their personal interests. That’s why the Scratch community, as an educational community, is so large. I get excited about certain math topics and I tend to focus on those topics until I’m enticed away by a new interest.  Brian Hayes calls this inquisitive programming.
   Lately, I’ve been exploring cellular automatons. My Langton’s Ant Scratch project is an example of a cellular automaton. Langton’s ant moves on a square grid according to a simple rule and is a two-dimensional, two-color, cellular automaton (CA).
    A. K. Dewdney is a computer science professor that wrote the Computer Recreations column in Scientific American magazine and has authored several books about the joys of computer programming.
In his column, Two-dimensional Turing machines and tur-mites make tracks on a plane, found in the September 1989 issue of Scientific American, he discusses a multi-colored tur-mite I call Dewdney’s tur-mite.
   To view my scratch project that codes Dewdney’s tur-mite, click on this link.
http://scratch.mit.edu/projects/40908756/

   I am also working on a Scratch project that implements Wolfram’s (of Mathematica fame) rule L90, one-dimensional cellular automaton. When the one-dimensional iterations of rule L90 are successively stacked, the Sierpinski triangle pattern is produced. The single operator in the code is an XOR logic gate. Scratch has AND, OR, and NOT logic operators but not an XOR operator. The XOR operator eXcludes the case when the two inputs to the OR operator are 1 (true). In other words, XOR (1,1) = 0.


   I’ve gotten as far on this project as creating the XOR operator in Scratch. To view the XOR gate, click on this link.

http://scratch.mit.edu/projects/popswilson/3270654

   I will soon have a PDF file that describes the math and programming techniques for both Langton’s Ant and Dewdney’s Tur-mite ready for distribution upon request.
   I will post the complete rule L90 project when it has been completed.