One more nitpick on the upper bound of the GCD: since we know that 0 is going to be in every column, one of the row numbers must start with a 0 and will be an 8-digit number (0 in the first cell). The GCD can't be larger than the smallest row number.
The GCD search should start at 098,765,432 and then go down from there.
Since we're over-engineering here, one more optimization is to skip all potential GCDs that are divisible by 2 or 5.
Suppose the GCD was divisible by 2, then all rows would be even. Since the last digit of an even integer is in {0,2,4,6,8} and we need 9 unique numbers in the final column, we know that 4 or 5 of the row numbers must be odd. So the GCD can't be even.
Similarly, the GCD can't be divisible by 5. If it were, all rows numbers would need a 0 or 5 in the final digit.
There's a fallacy going on with this kind of anecdote (observing both increases in housing and increases in pricing concurrently), namely not being able to observe the counterfactual of NOT adding housing (but keeping all other socio-economic factors constant). What would go on with rent in that scenario?
Yes, rents are going up today... but it's quite possible they would be going up MORE (on average) if the new housing wasn't being added. Unfortunately, not many Randomized Control Trials for housing economics.
Housing developers are incentivized to select locations for projects that will serve increasing rents, increasing population, increasing incomes, etc. They spend a lot of effort on understanding demographic and economic trends. Projects are often 3-4 years from conception to delivery. The causal chain is essentially: Do Market Research -> Select Project Type/Location Expected to Outperform (Financially) -> Build Housing (Hopefully Where Rents Go Up) -> Make $$. The observed concurrency of More Housing and Higher Rents is actually a "Thesis Proven Correct" thing from the perspective of the investors, lenders, etc. But the causality (more housing CAUSES higher rents) isn't quite as simple as outside observers sometimes think it is.
FWIW, there are real problems with having most of the housing creation/provision mediated through this profit motive. Developers stop producing housing once the profit expectations decrease to the point that capital is expected to achieve higher returns in other asset classes (capital is mobile, it will flee the asset class if there are better opportunities elsewhere). This point of slowing/stopping housing creation (at the margin) is often far short of what most people would consider socially optimal. But that's the logic of capitalism. I'm simply approaching this more from a "how things are" perspective not a "how things should be" perspective.
Disclosure: I'm a tech/stats/finance guy turned real estate developer
There's a good book from 1990 with lots of detail, history, and examples of AARON and Harold Cohen's work: Aaron's Code by Pamela McCorduck. Recommended reading for anyone into generative art, or more generally the intersection of computation and art.
Using the built-in PostGIS topology tools? Or something more custom? I'm curious as I just started digging into and using PostGIS for a land parcel use case. I've wondered about the graph structure of parcels adjacent to others, rather than just a big unordered table of geom objects.