index.html ?> Rounder Router

Rounder Router

Illustrating a "quasirandom" model of diffusion by Jim Propp. The applet demonstrates three-state and two-state versions of the same model.

In the three-state model, if n particles are added to the top brick of the triangle, round(n/3) of them go down to the left, and round(2n/3) go down to the right. Particles that go left of the leftmost bricks are "absorbed". Others continue down the pile. The number of particles that don't fall off the left after n are added at the top-- call that f(n)-- approaches n/2. Strangely, f(n) >= n/2, never less, until the first time at n = 5495 (see wandergraph.jpg).

If you look at where particles go when added incrementally, it depends on how many particles have arrived at a brick previously, mod 3. If that's zero, I color the brick cyan, and the next particle goes right. One: magenta, left. Two: yellow, right.

In the two-state model, floor(n/2) particles go left and ceil(n/2) go right. Click on the "flag" in the upper right to toggle between models. Click anywhere else on the applet to pause or continue.

"source code for the applet on the right", "sound" => "source code for wav/aiff output (and input)", "wander.tgz" => "sources of everything (+applet .jar), but not wandergraph.jpg or generated files", "wander6" => "Python program to print record-breakers and stats for f(n) - n/2", "wander6b.txt" => "table from wander6 (reformatted by hand)", "wander7.c" => "Generate stream of 2^27 characters-- '=' if f(n)==f(n-1), '>' if f(n)==f(n-1)+1.", "wander7out.gz" => "gzipped output of wander7", "wandergraph.jpg" => "graph of max and min of f(n)-n/2, and 'necessary length of table'", "wandersweep.c" => "Turn wander7out into audio, with sample rate sweeping from 1000Hz to ~20MHz.", "wandersweep.mp3" => "the audio" ); $subst_url = array( "wander7out.gz" => "http://www.mac-guyver.com/math-fun/wander/wander7out.gz", "wandersweep.mp3" => "http://www.mac-guyver.com/math-fun/wander/wandersweep.mp3" ); echo "\n"; exec( "/bin/ls -ld Makefile applet sound w*.jpg *.mp3 w*[56] w*6b.txt w*7out.gz *[7p].c *.tgz", $lines ); foreach( $lines as $line ) { echo "\n"; $parts=explode( " ", $line ); foreach( $parts as $path ) { } ; // Empty loop leaves path as last part $pieces=explode( "/", $path ); foreach( $pieces as $file ) { } ; // Empty loop leaves file as last part $size=ceil( filesize($file) / 1024 ); echo '\n"; if( isset( $cmt[$file] ) ) { echo "\n"; } echo "\n\n"; } echo "
'; if( isset( $subst_url[$file] ) ) $url = $subst_url[ $file ]; else $url = $file; if( $line[0]=="d" ) { echo "$file/"; } else { echo "$file (${size}K)"; } echo "$cmt[$file]
\n"; ?>

This page was made with a php script. Last change
--Steve Witham Up to my home page.
The Rounder trademark belongs to Rounder Records.

Your browser does not support Java, so nothing is displayed.