Can you explain the math generating this fractal?

120 Views Asked by At

I was working on a problem for my job that involved transitioning from a binary vector of length 7 to another binary vector of length 7. The only rule in the transition is that no "1" element in the "from vector" can become a "0" in the "to vector". If I create all possible states and check for valid transitions (like shown here:https://i.stack.imgur.com/WyOw2.jpg) I end up with this (when scaled): https://i.stack.imgur.com/C4bTQ.jpg.

Once I listed all possible binary states I but a 1 if it was an allowed transition, and a 0 if it was not allowed (i colored the 0's red). Here are some examples with smaller vectors: (0,0,0)->(0,0,1) is allowed (0,0,0)->(0,0,0) is allowed (1,0,0)->(1,0,1) is allowed (1,0,0)->(0,0,1) is not allowed. The first 1 went to a 0, breaking the only rule, so the whole transition is listed in the matrix as a 0 because it is an invalid transition.

2

There are 2 best solutions below

1
On

It's a cellular automata modelizing a form of Sierpinski triangle.

See rule 60 in (http://mathworld.wolfram.com/SierpinskiSieve.html).

See this paper considering it as a biological model (http://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.0020424)

1
On

I think the emergence of the 2D fractal is a property of the ordering of the coordinates, which themselves have a fractal nature in binary notation. See the edges of this figure:

counting fractal

Source code for the figure, a visualisation of $2017$ in the context of OEIS A134169, is on my blog post.