News for hackers. Stuff that matters.
Re:Zero-knowledge proofs, encoding Sudoku and Mario speedrun... by behnamoh on Thursday March 20, 2025 @10:29PM (#43431262)
Can someone explain why we care so much about graphs in various branches of science? Like, why model the problems mentioned in the video as graphs that need to be colored?
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.

Re:Zero-knowledge proofs, encoding Sudoku and Mario speedrun... by jon_richards on Thursday March 20, 2025 @11:36PM (#43431584)
There is a huge category of computer science problems that can be solved with the same algorithm (and a conversion). Graph coloring is probably the easiest of those problems to explain.
Re:Zero-knowledge proofs, encoding Sudoku and Mario speedrun... by Ar-Curunir on Thursday March 20, 2025 @11:39PM (#43431598)
Because in this case we have a relatively simple ZKP for 3-coloring.

However what you gain in the simplicity of the ZKP, you lose in the reduction to 3-coloring. So nowadays people use ZKPs that work with more realistic computation representations, like arithmetic circuits

Re:Zero-knowledge proofs, encoding Sudoku and Mario speedrun... by jrndcnfh on Friday March 21, 2025 @01:54AM (#43432208)
Not sure if I grasp your question. It's like asking "why do we care about lists or any data structure for that matter"

Graphs are just a very simple generalization of lists. And many problems can be easily modelled as graphs

Re:Zero-knowledge proofs, encoding Sudoku and Mario speedrun... by carra on Friday March 21, 2025 @06:15AM (#43433867)
I'd say this was done mainly to help visualize the problems better, since this is a learning video. But often problems are converted into graphs because it is a well studied field and that way you can apply many theorems and traversal algorithms.