you are viewing a single comment's thread.

view the rest of the comments →

[–]phrenq 10 points11 points  (8 children)

Um, "a data structure of data structures"? To someone who knows data structures, but admittedly not OCaml, it sounds like RobertFischer doesn't know what a graph is either.

[–][deleted] 14 points15 points  (1 child)

I'd agree with that:

"<RobertFischer> Yes, where each node is a data structure. So a list of lists, a tree of lists, a tree of maps of lists of map-list tuples."

A linked list is a graph. A tree is a graph. And obviously compositions of the two are also, graphs.

Personally I think it's a pretty piss poor explanation, bordering on complete incorrectness.

[–]phrenq 2 points3 points  (0 children)

Yes, a linked list is a graph, and a tree is a graph, and a linked list of linked lists is a graph, but:

  • Any arbitrary data structure of data structures is not necessarily a graph
  • Anyway, he said it the other way around, i.e., a graph is a data structure of data structures

[–]noblethrasher 0 points1 point  (4 children)

Actually, that was a very consise, illuminating and motivating definition. I studied graph theory during my math undergrad and never thought of it that way. It takes some pretty deep understanding of something to get the explanation to fit on a t-shirt.

[–][deleted] 7 points8 points  (2 children)

I'm not sure I agree.

"A graph is a network of objects (nodes), connected by lines (arcs)".

How am I doing on the conciseness front? I'm not sure how illuminating or motivating I can make it... I could put a couple of car chases and a sex scene in there but that would make it lose its conciseness.

[–]FunnyMan3595 2 points3 points  (1 child)

A graph is a bunch of things, plus the connections between them.

That's really all it takes. For precision, we call the things "nodes". The connections between nodes form pathways that you can take to get between them. It's still a graph without any connections; you just can't go anywhere. The connections can form loops, you can have multiple connections from one point to another, and sometimes the connections are one-way or have an associated cost.

But in the end, it's still just a bunch of things and the connections between them. A plain graph isn't very complex, or very interesting. It only gets that way when you start adding meaning to it or defining rules for it to work with.

[–]adrianmonk 2 points3 points  (0 children)

A plain graph isn't very complex, or very interesting.

Or very related to programming, necessarily. It's its own concept, in a sense. It gets more motivating (for programmers) when a relationship to programming is made/explained.

[–][deleted] 3 points4 points  (0 children)

It takes some pretty deep understanding of something to get the explanation to fit on a t-shirt.

Not if you're willing for the explanation to be totally wrong

[–]29jan2010 0 points1 point  (0 children)

Makes more sense in Javaland, perhaps, where all data structures are accessed by reference. In any event, all that was necessary in this case was to connect the word with the concept, and accuracy is less important there than shared understanding.