just a bear whose intentions are good ([info]two_star) wrote,

look, say, walk

1, 11, 21, 1211, 111221, 312211...

Those are the first few numbers in the look-and-say sequence, so called because it is formed by looking at the previous number in the sequence and describing it by the lengths of runs of digits. (Thanks to [info]yhlee for bringing this sequence up.)

John Conway did some interesting work on this sequence, characterizing 92 "elements" or substrings that appear in look-and-say numbers, which have descendant strings that never interact with the descendant strings of neighboring elements.

As you might imagine, the numbers in the sequence exhibit fractal-like characteristics, since multiple instances of the same element appearing early in the sequence will result in longer repeated sequences in later look-and-say numbers.

Unfortunately, this sort of structure in a 1-d string is not particularly visually satisfying — but what if we could translate look-and-say numbers into two dimensions? It occurred to me that we could use the fact that only the digits 1, 2, and 3 appear in look-and-say numbers to generate walks in a square grid from them. We would pick one of these digits to map to "go forward one step" and the others to map to "turn left, then step forward" and "turn right, then step forward."

For the image below, I chose 3 as the "go straight" digit. I got something of a tangled mess using 1, and 2 gave me big blobs where the path wandered around in the same area for a long time. This is the 37th look-and-say number, as translated into a square grid walk:



The path looks somewhat random at first, but a second look reveals repeated patterns all over it. I like it.
Tags: look-and-say, math

  • Post a new comment

    Error

  • 5 comments

[info]clipdude

October 26 2008, 22:57:55 UTC 3 years ago

Sadly, there's only one hit for "look and say" on MathSciNet (O. Martin, Look-and-say biochemistry: exponential RNA and multistranded DNA, Amer. Math. Monthly, 113 (2006), no. 4, 289-307), and no hits for "audioactive decay". (The paper in which Conway first described this sequence is not indexed in MathSciNet.) I wonder if anyone has thought to turn them into paths before.

You've defined a sequence (looking at where the path ends) that takes values in the plane (the integer lattice, in fact). I wonder what can be said about this sequence or the norms of it.

[info]nothings

October 27 2008, 00:20:14 UTC 3 years ago

Very neat.

Looking at some of these little side shapes where it wandered away and then managed to come back "the way it came", I wonder if it would be useful to color things based on the direction, e.g. red for N/E, blue for S/W, black for both, or some such. Or color 1 if traversed once, color 2 if traversed more than once, color 3 if traversed more than once in each direction (which has the advantage of being directionally invariant, but the disadvantage that you wouldn't be able to easily see that one side of a section is the 'going out' part and the other bits are the 'coming back' part).

[info]two_star

October 27 2008, 05:55:20 UTC 3 years ago

Good ideas. I'd need to figure out a little more SVG to get my code to make colors.

[info]algeh

October 27 2008, 01:26:24 UTC 3 years ago

If I were to look at it without reading the explanation first, I'd guess this were some kind of geographical map (mostly because of the behavior along the left side). Interesting.

[info]rfreebern

October 27 2008, 15:25:00 UTC 3 years ago

This is really cool. Looks like fun to play with.
Create an Account
Forgot your login or password?
Facebook Twitter More login options
English • Español • Deutsch • Русский…