News for hackers. Stuff that matters.
Re:Zero-knowledge proofs, encoding Sudoku and Mario speedrun... by teraflop on Thursday March 20, 2025 @10:33PM (#43431278)
It's not so much that we want to model problems as graphs, it's that many problems and situations naturally correspond to graphs. Anything with a collection of objects, where some subset of pairs of objects are "related" to each other, is a graph. In mathematical terms, graphs are essentially the same as binary relations on a set (a generalization of functions).

And any time you can think of something as a graph, you can benefit from the wealth of available mathematical and computational tools that apply to all graphs.

Re:Zero-knowledge proofs, encoding Sudoku and Mario speedrun... by eru on Friday March 21, 2025 @01:47AM (#43432169)
Graphs are also really simple structures mathematically.

After all, an (undirected) graph is nothing more than a ground set and a collection of its two-element subsets.

It's the same reason why groups crop up so often: groups are also really simple structures, so it's really easy to satisfy their axioms 'by accident'. Same for numbers in general.

Re:Zero-knowledge proofs, encoding Sudoku and Mario speedrun... by whatshisface on Friday March 21, 2025 @01:55AM (#43432216)
I don't think that's a full explanation for groups, because groups other than the free or permutation groups are rather "unlikely," in the sense that they're much smaller.
Re:Zero-knowledge proofs, encoding Sudoku and Mario speedrun... by eru on Friday March 21, 2025 @02:07AM (#43432284)
Oh, I mean they crop up in lots and lots of applications, because their structure is so simple to satisfy.

Not that they would crop up, if you somehow randomly generated mathematical structure. The real world, and especially the part of the real world that people engage with, seems to have a lot of simple structures.

Re:Zero-knowledge proofs, encoding Sudoku and Mario speedrun... by ForTheKidz on Friday March 21, 2025 @02:36AM (#43432436)
Graphs don't really capture the entirety of hashmaps and other indexing concerns. Other than that yea I agree.
Re:Zero-knowledge proofs, encoding Sudoku and Mario speedrun... by magicalhippo on Friday March 21, 2025 @10:11AM (#43435933)
GP was talking about modelling your problem. A hashmap is seldom a good model for a given problem. Typically they're "just" an implementation detail.

For example, in some cases it can be useful to consider triangles in a 3D model as cyclic graphs of vertices. The edges of the triangle correspond to the edges in the graph.

However I can't think of any case where it's useful to think of a triangle as a hashmap.