this post was submitted on 03 Nov 2024
8 points (90.0% liked)

Haskell

372 readers
1 users here now

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 week ago (2 children)

One thing I'm missing is which problems this technique can solve. I believe one important use case is in type inference. Are there many other problems that can be solved by union-find?

[–] solrize 2 points 1 week ago (1 children)

The Wikipedia article discusses some applications. One amazing thing I remembered about the algorithm is its running time, which is infinitesimally slower than linear, by which I mean that the growth factor above linear is the inverse Ackermann function! I've never studied the analysis but I found the result to be mind boggling.

https://en.wikipedia.org/wiki/Disjoint-set_data_structure

[–] [email protected] 1 points 1 week ago

Thanks, I did look at the Wikipedia page, but the Applications section is pretty difficult to read. The applications it lists are themselves quite abstract problems.