block by bmershon 67a9e48a3718d1ec1e81a240f51b6101

Grid Cycles

Full Screen

Best viewed fullscreen.

Scroll for examples.

Imagine a person standing in each cell. Now tell each person to move simultaneously to an adjacent cell in the grid with the rule that each must not move in the oppose direction of a neighbor who is entering their cell; that is, no two people may simultaneously cross the same edge as they move to an adjacent cell.

This visualization illustrates the valid patterns in which all 36 people could move. It becomes immediately clear that the migration patterns on a 6 x 6 grid take the form of cycles moving either clockwise or counter-clockwise. Unlike musical chairs, each person must end up in a different adjacent cell.

index.html

disjoint-set.js

powerset.js

restricted-powerset.js

worker.js