Leave the poles until last
Cut off the top and bottom corners of the fly’s map. The rim still remembers which loose ends belong together.
What can happen to one strand?
The octahedron has four ends at each pole. Here we draw six to make the general rule easier to see. The rim has already joined A to B, shown by the dashed blue strand. Suppose we want C joined to D and E joined to F after dealing with A and B. There are five ways.
The first way makes a new closed walk, so give it weight x. The other four just replace one connection: for example, AC and BD leave the path C–A–B–D, which smooths to CD. Each contributes 1. With d ends there are d−2 ways of opening a smaller pair and one way of closing the loop.
One specified strand contributes x + d − 2.
What the rim leaves behind
At a rim corner, either pair the two rim edges together and the two spokes together, or send the left and right rim edges to different poles. Call the latter corner active; it has two orientations. Between consecutive active corners, a gap joins opposite poles if those orientations agree and the same pole if they disagree. Each inactive corner also joins the poles with its paired spokes.
| Active corners | 0 through | 2 through | 4 through | 4 through + rim loop |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 |
| 1 | 0 | 0 | 8 | 0 |
| 2 | 0 | 12 | 12 | 0 |
| 3 | 0 | 24 | 8 | 0 |
| 4 | 2 | 12 | 2 | 0 |
| Rim settings | 2 | 48 | 30 | 1 |
“Through” means a strand from one pole to the other. For example, with all four corners active, the two alternating orientations have four disagreements and no through strands. The two constant orientations have no disagreements and four through strands. The other twelve have two disagreements.
Put the poles back
With zero through strands, each pole separately gives x(x+2). With two through strands, smooth one joined pair at each pole, then close the remaining walk: x(x+2)². With four through strands, choose any of three pairings at the first pole. It supplies two joined pairs for the other pole, which contributes x(x+2). The lone completely inactive rim already has a loop, adding a factor of x to that last case.
2x²(x+2)² + 48x(x+2)² + 3(30+x)x(x+2)
= x(x+2)(2x²+55x+186).
That’s 372 settings with one walk, 296 with two, 59 with three, and two with four. These are counts of the turn settings, not of starting streets or directions.
What if the rim has six corners, or more?
Take an even rim of n corners. At each pole pair its n loose ends in all possible ways. For a nonempty set of active corners, k through strands means n−k orientation changes. Choose the change positions, choose any additional active positions, and choose the first orientation. This gives 2C(n,k)2k settings, less two when k=n to exclude the empty active set. That empty case instead has its own closed rim.
Write Rs=x(x+2)⋯(x+s−2), with R0=1. At each pole the already joined pairs smooth away with weight Rn/Rk. Choose one pairing on the remaining k ends at the first pole, then smooth those new pairs at the second pole with weight Rk. The resulting factor is (k−1)!! Rn²/Rk, where (k−1)!! counts the pairings, including one empty pairing at k=0.
Every summand is therefore divisible by Rn. For six corners, a direct count on the uncut graph gives 68,880 / 69,188 / 22,812 / 2,999 / 144 / 2 settings for one through six walks respectively, agreeing with the formula.
The factor is not peculiar to the rim: on any even-degree graph, fix all the turns except at one corner of degree d. The fixed turns leave some closed walks and pair up the dangling ends. Smoothing those pairs gives Rd times the weight of the already closed walks. In particular, Terra’s open corner of degree four gives x(x+2) without the rim count.