Why does a scrambled picture come back?
Every rule here only moves pixels. No pixel is created, destroyed or recolored. So if you follow one pixel, it hops from spot to spot and, because there are only so many spots, it must eventually land where it started. Every pixel travels in its own loop.
The whole picture is back when every loop finishes at the same moment. That happens at the least common multiple of all the loop lengths. This page finds every loop in your picture and computes that number exactly, even when it has hundreds of digits.
The zip: 1024 comes back in 10, 1022 needs 340
A zip is a perfect shuffle of rows, then of columns. With 1024 rows, row r moves to row 2r (counting modulo 1023). After 10 zips every row has been doubled 10 times, and 210 = 1024 is exactly 1 more than 1023, so everyone is home. Halfway there, at 5 zips, the picture becomes 1,024 tiny copies of itself.
Take two rows away and the story changes completely. 1022 needs 340 zips, 1000 needs 36, and 1026 needs 20. Try the size box and the table under it: the number of steps jumps around wildly between neighbours.
Arnold's cat map and the baker's map
The cat map shears the square and wraps it around like a torus. The baker's map squashes, stretches and stacks, like kneading dough. Both are textbook examples of chaos: nearby pixels fly apart fast and the picture turns to noise within a few steps. Yet because the grid is finite, both must come back. A 101×101 cat comes back after 25 steps. A 1000×1000 knead takes about 2.13 × 10253.
Ring twist
Every square ring moves one pixel clockwise. The outer ring of a 64×64 picture has 252 pixels, the next 244, and so on. Each ring is home after its own length, but all of them together need the least common multiple: about 7.38 × 1025 steps.
Rearrange: the same pixels, a different picture
Pick a target and watch every pixel of your picture fly to a new place. Dark pixels go where the target is dark, bright ones where it is bright, then nearby pairs swap if that brings both colors closer. It is still the very same set of pixels, so it can always fly back.
Send a secret picture
Scramble a photo to step k and save the PNG. Anyone who knows the rule, the size and k can turn it back: open it with “Use exact pixels”, then step backward k times. It is a fun puzzle, not real encryption.
Watch the videos
- I Zipped a Smiley 5 Times and Got 1,024 Smileys. 5 More and It Was One Again.
- Nothing Was Lost (Arnold's cat map on a picture of balls)
- I Kneaded 1,048,576 Balls 20 Times. The Smiley Came Back From the Side.
- A smiley of 16,384 balls. What else can the same balls become?
Made by Computed on YouTube.