5

Not sure exactly how to define this but here's the basis of the question (very loosely)

  • All lists can be contained in tree's
  • all trees can be contained in a graph
  • all graphs can be contained in a multi graph,
  • and all multigraphs can be contained in a hypergraph (never actually heard of a hypergraph before searching for an answer to this, so may not have it quite right)

So there's a containment hierarchy of 'complexity' of data structures. Is Hypergraph the highest one, is there a proof of this, and is there a name for the study of whatever this is.

By highest one, I mean all structures can be represented as a hypergraph if I chose to. So in any code I could represent all the structures by using a number of hypergraphs (not that I would). tia

[Update] Perhaps an alternative way to ask it is, for any arrangement of data structures consisting of nodes and edges. Does there exist a structure that can't be contained in a hypergraph.

Then there is a second question - is there any data structure which can't be represented using nodes and edges.

daven11
  • 159
  • 4
  • 4
    I don't know how clearly defined this question is. I can imagine that for any structure you come up with, I can create a higher order one. – Dave Clarke Sep 27 '12 at 10:46
  • how so? I can't think of any thing that I'd need more than a multi graph for, e.g. 3d space and so on. If I need a multigraph of multigraphs then that is a multigraph as well (in the most abstract relationship sense) – daven11 Sep 27 '12 at 10:49
  • 1
    I could probably add edges between nodes and edges at one level. Then I could add edges between edges (of the lower level). Then for each new level, I could add new kinds of edges that go between edges of the lower level .... – Dave Clarke Sep 27 '12 at 10:53
  • isn't that a multigraph though? if you have a multigraph of multigraphs, then that can be represented as a multigraph. For each node in the lower level, we can move it up to the top level with edges intact, and the top level is still a multigraph – daven11 Sep 27 '12 at 10:56
  • 1
    I cannot connect edges with edges in a multigraph. – Dave Clarke Sep 27 '12 at 11:00
  • ok, that's a hypergraph, so replace multigraph in the preceding with hypergraph (I find multigraphs easier to conceptualise, so probably should have said hypergraphs all along) – daven11 Sep 27 '12 at 11:03
  • 1
    Don't think you can have a "directed" hypergraph, since it's just a family of sets. Hence: "Does there exist a structure that can't be contained in a hypergraph." ... any directed graph. – badroit Sep 27 '12 at 11:41
  • seems like there might be? - https://www.google.com.au/search?q=directed+hypergraph&oq=directed+hypergraph&sugexp=chrome,mod=11&sourceid=chrome&ie=UTF-8 - I suppose a hypergraph would contain a directed hypergraph, much the same way a graph can contain a directed hypergraph? – daven11 Sep 27 '12 at 12:16
  • What about sets? – Aryabhata Sep 27 '12 at 15:30
  • a graph of nodes without edges? – daven11 Sep 27 '12 at 22:30
  • If I think of data structures as functions, it is clear that you can get arbitrarily complex. A graph of graphs of graphs of... – Raphael Sep 29 '12 at 11:26

1 Answers1

3

Perhaps this is an interesting question with explicit answers, but you probably really have a problem with "exactly how to define this".

A list does not directly corresponds to a unique data structure, nor does a tree. A singly linked list corresponds to a (sufficiently unique) data structure, as does a binary tree. When you say multi graph, you probably want to refer to a quiver, i.e. a directed multigraph (edges with own identity). A binary or ternary quiver would again correspond to a (sufficiently unique) data structure.

However, any sufficiently canonical (and efficient) realization of a (n-ary) quiver as a data structure would probably not match well with the way datatypes are handled in "common" programming languages, where the size of an object with a certain datatype shouldn't depend on the actual content of that object. Therefore, this would be the point at which I would stop to look for a higher order data structure (than a quiver, looking for function like data structures and continuations certainly is useful). My reason for this is that I don't see the practical usefulness of a higher order data structure if it cannot be realized efficiently within "common" programming languages.

Thomas Klimpel
  • 5,380
  • 27
  • 66
  • hmm, it does seem the problem is definition, thought someone would have done this for me, strangely enough I have an application where an answer would be helpful. There is an intuitive notion of complexity of structures, which needs to be defined, and is there a 'supreme' data structure? – daven11 Sep 27 '12 at 22:53
  • @daven11 I think you have a problem with "exactly how to define this", because it's unclear to me what you are looking for "exactly". You mentioned "nodes" and "edges" in your question, hence I tried to give an answer in that direction. If you are just looking for mathematical structures (without any concrete corresponding "realizable" data structure), then "set" is the universal structure which is used to define all other structures (when set theory is used as the foundational system for mathematics). In this direction, a simple "pair" should be enough to implement any other data structure... – Thomas Klimpel Sep 28 '12 at 11:27
  • thanks, I must admit I thought someone would point me towards a definition. I'll probably have to do a bit more research and figure out exactly what I mean :-). – daven11 Sep 28 '12 at 12:59