I want to share something. It's a rule to follow for easily designing a graph "in one piece". (I wasn't able to find the exact English term for that. The French term is "connexe".)

The rule is:

Each planet must have at least one link toward a following planet.

or

Each planet must have at least one link toward a previous planet.

So if this rule is respected, the graph will be "in one piece".

* * *

As I didn't find this rule, I'll try to prove it.

1) If all previous planets are "in one piece" (alternatively: if all following planets will be "in one piece"), then linking the current planet to any of them at least once will keep the graph "in one piece".

2) The first planet alone is a graph "in one piece" (alternatively: the last planet will be a graph "in one piece").

3) If the first (alternatively: last) state respect the property ("in one piece"), and each step applied to a state where the property is respected keep the property true, then the property will always be true even after an infinite number of steps.

* * *

And that, folks, was my first mathematical demonstration in English. Wohoo! Please be nice with the shaky formulation.

However, the "forward" version of the proof should be inconsistent, because it says "will be a graph in one piece". If someone can come up with a better proof for the forward version, it would be amazing. But maybe this kind of rule&proof have already been made by some true mathematician.

Also, *always* branching in the same direction (always forward or always backward) is an easy rule for not creating two edges between the two same planets.

The idea behind this rule is to loop through all the planets and give them link to previous or following planets, and varying some parameters depending on the planet's number. For instance, I made the "gravity" galaxy with this rule and a decreasing branching factor (the probability for a planet to have many links). This mean that low rank planets end with many links and stack in the middle, while high rank planets form few links and end in the outside of the galaxy. The last planets are dead ends because nobody links to them.

The "rim-world" galaxy was this rule plus a range: each planet can only be linked to planets that are at most N ranks higher. And if higher is more than the total size of the galaxy (80, for instance), I use a modulo to make it loop to the beginning, creating a grand circle.

I'll try to make a "natural" clustered galaxy with a modulo: each planet has more chance to link to planets in the same modulo than itself. Let's see how it works.