World's most popular travel blog for travel bloggers.

Is this a hypergraph?

, , No Comments
Problem Detail: 

Here is the problem is want to solve:

I want to connect nodes with directed labelled edges, but this two nodes are potentially themselves graphs, hypergraphs or the current structure I don't have a name for.

Here is a simple example with a graph $(v_1,e_1,v_2)$ where nodes $v_1$ and $v_2$ are connected by $e_1$. I want to have the following structure: $((v_1,e_1,v_2),e_2,(v_3,e_3,v_4))$

in this case, the $v_i$ hold a single value (i.e. classical graph nodes)

What I don't know is:

  • What is the name of such a structure ?
  • If it's a well known data structure, are there some efficient implementations ?
Asked By : EulDjulius
Answered By : D.W.

No, this isn't a hypergraph. I don't think it has a standard "name". Call it whatever you like: as long as you define your terms clearly, you should be fine.

Yes, you can implement this efficiently using any standard data structure for representing graphs: e.g., adjacency lists. Each node of the "outer" graph will contain a pointer to a data structure that describes the "inner" graph it represents.

Best Answer from StackOverflow

Question Source :

3200 people like this

 Download Related Notes/Documents


Post a Comment

Let us know your responses and feedback