# Take an m x n grid, and in each box pick two opposite corners at random to connect. What can be said about the resulting pattern?

Inspired by the upcoming book 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 by Nick Montfort et al., whose title derives from this particular example of emergent behavior. Here's an example: (Note that I'm considering the grey "negative space" here, not the graph made by the black "walls.") In particular, this breaks an rectangle up into a number of disjoint paths. What can be said about the length of such paths, say asymptotically as$m, n \to \infty$while$m / n\$ remains constant? (To make things a bit cleaner, it may make more sense to identify the edges to make a torus instead of leaving the edges ragged.

We can get some initial results just by looking at Euler characteristic, as described by Anders Kaseorg at the link below

Example in UNICODE if you can't see the picture:

╱╱╲╱╲╲╱╲╱╱╲╲╱╱╱╲╱╱╱╱╱╱╱╱╲╱╱╲╲╱╲╱╱╱╱╲╱╱╲
╲╱╲╱╱╱╲╱╲╲╱╲╲╱╲╱╱╲╱╲╲╲╲╱╱╱╲╱╲╲╲╲╱╲╲╲╲╲╲
╲╱╲╱╲╲╲╲╱╲╱╲╲╱╲╲╲╲╱╲╲╱╲╲╱╲╱╱╲╱╲╱╲╱╲╱╲╱╲╱
╲╱╲╱╲╲╲╲╱╱╲╲╲╱╱╲╲╲╲╲╲╱╱╱╱╲╲╱╲╱╱╱╱╱╲╱╱╱╱╱
╱╱╱╱╲╱╱╱╲╲╲╲╲╲╲╲╲╱╱╱╲╱╲╲╲╱╲╲╱╲╲╲╲╲╲╱╲╱╱╱
╱╱╲╲╱╱╱╲╲╲╱╲╱╱╱╱╲╱╱╱╱╱╲╱╲╲╱╱╱╱╲╱╲╲╱╲╱╲╱╱
╲╱╱╱╱╲╱╲╱╱╲╱╱╲╱╱╲╱╲╲╱╲╱╲╲╲╱╱╱╲╲╱╱╲╱╲╲╱╲╲
╲╱╲╱╱╱╲╲╱╱╲╲╲╱╱╱╲╲╱╲╲╱╱╱╲╲╱╲╱╲╲╲╱╲╱╲╲╱╱╲╱
╲╲╱╲╱╱╲╱╲╱╲╱╱╱╱╱╱╲╱╲╱╱╱╱╲╱╲╱╱╲╲╲╱╲╲╲╱╱╲╲╱
╲╱╱╲╲╲╲╲╲╱╲╲╲╲╲╲╱╲╱╱╱╲╱╲╱╱╱╲╲╲╲╲╱╲╲╲╱╱╲╲╲
╱╲╱╲╱╲╱╲╱╲╱╲╲╱╲╲╲╱╱╲╲╲╲╲╲╲╱╱╲╱╲╲╲╱╲╱╲╱╲╲╲
╱╱╱╱╱╲╲╱╲╲╲╱╱╲╲╲╲╱╱╱╲╱╲╱╲╱╲╱╲╲╲╱╲╲╲╱╲╲╱╱╱


(Thanks to Alon Amit for the sample picture.)

-
can't see the picture... – gt6989b Dec 3 '12 at 23:22
Maybe you got it right while I was editing? Does it show up if you reload? – Daniel McLaury Dec 3 '12 at 23:23
Found the problem, it was on my side, sorry for the trouble... – gt6989b Dec 3 '12 at 23:25
OT, but I cannot help myself... This reminds me of one of the many, many interesting things in the book "Programming the PET/CBM" by Raeto West. It was also my first introduction to systems of orthogonal polynomials. Is that Commodore BASIC by the way? ;-) – WimC Dec 11 '12 at 21:49