Visualizing partially ordered sets (posets) is ver...
# show-and-tell
l
Visualizing partially ordered sets (posets) is very helpful for understanding group theory. Unfortunately, most advanced mathematics software don't make good graphs. For example,

this▾

power of 2 group lattice looks like it was made with graph viz. I've been playing around with linear and radial posets, like the linear and radial trees in D3's Hierarchy. The result is something between a tree and a force directed graph. I vibe coded a solution that uses GAP to generate the lattice data, and then uses D3 to visualize the graph. I'm pretty happy with it, but it isn't optimized, so I wonder what the optimal way to position nodes to minimize overlapping links looks like. I know lattices and posets are niche, but making them more accessible would help certain fields of math and science. https://observablehq.com/d/830afeaada6a9512
🙌 3
t
oh I just did some work on minimising cross over https://observablehq.com/@tomlarkworthy/spectral-layout it was for visualizing the runtime graph https://observablehq.com/@tomlarkworthy/atlas Its a ton of code but it was written by https://observablehq.com/@tomlarkworthy/robocoop-2
I tried minimizing crossings but it did not make a huge amount of difference https://observablehq.com/d/9c57a944d864b69f
f
fwiw, I had also started an exploration to minimize crossings last year, but haven't found the time to make further progress: https://observablehq.com/d/4f2b361ea6b3e0c2
l
@Tom Larkworthy your notebook was actually one of the inspirations! It made me realize if I minimize the crossings for the highest node layer and work backwards, I can minimize the crossings for the whole poset. It is a good first pass, but I would also like to add in grouping of nodes in a similar class.
🙌 1
Here is another radial poset I've been working on that has groups of nodes (chart is at the very bottom of notebook): https://observablehq.com/d/da1dbafcbd0d6490#radialPoset
f
(@Lao I had accidentally shared a fork URL - I've updated the link)
👍 1
l
@Fabian Iwand thanks, I'm studying the notebook. These kinds of graphs are really important for pairwise comparisons. I'm into psychometrics, so I'm very interested in knowing how to display confidence intervals between multiple groups. Even though it isn't a bipartite graph optimization problem, I think what you are doing is what took me HOURS to do manually for this chart I made for my work about internet connection between global areas. I would love to automate this kind of a thing: https://infogram.com/20240408lincicomebeaumont-smithglobal-internet-bandwidth-figure-5print-1h9j6q77j9vw54g
f
Personally I think that adjacency matrices are a powerful and underutilized tool that can outperform a flowchart for surfacing information (but may also be used as source for graph layouts). Imo the biggest challenges stem from the unfamiliar reading flow and direction, and I hope to find ways to make these aspects more intuitive.
💯 1
j
If you like the multi tree shape you have, then graphviz (or other implementations of dot like dagre) already do edge crossing minimization
But if the posets have some inherent symmetry to them then edge crossing minimization won't find that. Sometimes showing the symmetry looks better even if it has more crossings bc there's more regular structure
I think some kind of spectral/laplacian technique might work for that? But I’m not sure since it’s been a while since I've looked at that stuff
I like Fabian’s visualization. A related one is the upset plot. https://observablehq.com/@spren9er/upset-plots-with-observable-plot It's used for intersecting sets but I think there might be some correspondence between intersecting sets and lattices/posets?
t
While we are on this tangent @Jasmine Otto showed me the linkograph, which has some categorised behavioural patterns for in HCI / Behavioural science https://arxiv.org/abs/2502.04599v2 Underlying representation is a hypergraph with extras.
👍 1