This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Ubergraphs: A Definition of a Recursive Hypergraph Structure

Cliff Joslyn, Kathleen Nowak

1 Introduction

Partly in service of exploring the formal basis for Georgetown University’s AvesTerra database structure, we formalize a recursive hypergraph data structure, which we call an ubergraph. This type of data structure has been alluded to in passing but no formal explication exists to our knowledge. 111https://en.wikipedia.org/wiki/Hypergraph#Generalizations As hypergraphs generalize graphs by allowing edges to have more than two vertices, ubergraphs generalize hypergraphs by allowing edges to contain other edges as vertices. Thus, all graphs are hypergraphs and all hypergraphs are ubergraphs.

The ability to do indirection in graph data structures by “quoting” or “pointing to” edges is absolutely central in graph-based data science, and is accomplished in such systems by a variety of ad hoc mechanisms such as reification. Hypergraphs are frequently used as part of that armamentarium, but ubergraphs are a more robust representation framwork.

Note that here we deal only with undirected hyper- and ubergraphs. Direction and/or orientation could prove very valuable, but await further consideration [2].

2 Hypergraphs

A hypergraph is a generalization of a graph in which an edge can connect any number of vertices.

Definition 1.

A hypergraph HH is a pair (V,E)(V,E) where VV is a set of vertices and E𝒫(V)E\subseteq\mathcal{P}(V) is a set of non-empty subsets of VV. The elements of EE are called hyperedges.

Note 1.

An abstract simplicial complex is a hypergraph whose edge set is closed under subset.

The incidence matrix and Levi graph of a (hyper)graph express vertex-edge membership.

Definition 2.

Let H=(V,E)H=(V,E) be a hypergraph with |V|=n|V|=n and |E|=m|E|=m. The incidence matrix of HH is the n×mn\times m matrix MM defined by

Mij={1if viej0otherwise.M_{ij}=\begin{cases}1&\text{if }v_{i}\in e_{j}\\ 0&\text{otherwise}.\end{cases}
Definition 3.

Let H=(V,E)H=(V,E) be a hypergraph with |V|=n|V|=n and |E|=m|E|=m. Then the Levi graph is the bipartite graph G=(V˙E,E)G=(V\hskip 2.84526pt\dot{\cup}\hskip 2.84526ptE,E^{\prime}), where (vi,ej)E(v_{i},e_{j})\in E^{\prime} if and only if viejv_{i}\in e_{j}.

Example 1.

Let HH be the hypergraph with vertex set V={1,2,3,4,5}V=\{1,2,3,4,5\} and edge set

E={{1},{1,3},{2,3},{1,3,5}}.E=\{\{1\},\{1,3\},\{2,3\},\{1,3,5\}\}.

The incidence matrix for HH is

M=[11010010011100000001]M=\begin{bmatrix}1&1&0&1\\ 0&0&1&0\\ 0&1&1&1\\ 0&0&0&0\\ 0&0&0&1\end{bmatrix}

and the Levi graph representation is

v5v_{5}v4v_{4}v3v_{3}v2v_{2}v1v_{1}e4e_{4}e3e_{3}e2e_{2}e1e_{1}

Where the Levi graph represents the vertex-edge membership relation \in, since E𝒫(V)E\subseteq{\cal P}(V) is a set system of VV, it also manifests edge-edge inclusion as a partial order on the edges through \subseteq. This can also be read from the Levi graph as N(ei)N(ej)N^{-}(e_{i})\subset N^{-}(e_{j}) if and only if eieje_{i}\subset e_{j}. In our example, we have e1e2e4e_{1}\subset e_{2}\subset e_{4}, while e3e_{3} is non-comparable.

3 Ubergraphs

One way to generalize hypergraphs is to allow edges to contain not only vertices but other edges. For a finite set XX, we define

𝒫(X)k=𝒫(i=0kPi), where P0=X and Pi=𝒫(j=0i1Pj) for i1.\mathcal{P}(X)^{k}=\mathcal{P}\left(\bigcup_{i=0}^{k}P_{i}\right),\hskip 2.84526pt\text{ where }P_{0}=X\hskip 2.84526pt\text{ and }P_{i}=\mathcal{P}\left(\bigcup_{j=0}^{i-1}P_{j}\right)\text{ for }i\geq 1.
Definition 4.

A depth kk ubergraph UU is a pair (V,E)(V,E) where VV is a set of fundamental vertices and E𝒫(V)kE\subseteq\mathcal{P}(V)^{k} is a finite set of uberedges. Additionally, if sVs\notin V belongs to an edge, we require that ss is itself an edge.

Note 2.

Every hypergraph is a depth 0 ubergraph.

Since uberedges are allowed to contain other edges, we call the elements of

V(eEe)V\hskip 2.84526pt\cup\hskip 2.84526pt\left(\bigcup_{e\in E}e\right)

vertices and the elements of VV fundamental vertices.

Let U=(V,E)U=(V,E) be an ubergraph with |V|=n|V|=n and |E|=m|E|=m. The incidence matrix of this type of hypergraph is a matrix MM of order (n+m)×m(n+m)\times m where

Mxy={1if xy0otherwise.M_{xy}=\begin{cases}1&\text{if }x\in y\\ 0&\text{otherwise}.\end{cases}

Moreover, the Levi graph of a hypergraph generalizes to what we will call the uber-Levi graph of UU to express uberedge membership. It has one vertex corresponding to each fundamental vertex and edge of UU and a directed edge from xx to yy if xx is a member of yy in UU.

Example 2.

Let UU be the ubergraph with fundamental vertex set V={1,2,3}V=\{1,2,3\} and edges

E\displaystyle E =\displaystyle= {e1,e2,e3,e4,e5}\displaystyle\{e_{1},e_{2},e_{3},e_{4},e_{5}\}
=\displaystyle= {{1},{1,3},{1,3,e1},{2,e2},{1,e4}}\displaystyle\{\{1\},\{1,3\},\{1,3,e_{1}\},\{2,e_{2}\},\{1,e_{4}\}\}
=\displaystyle= {{1},{1,3},{1,3,{1}},{2,{1,3}},{1,{2,{1,3}}}\displaystyle\{\{1\},\{1,3\},\{1,3,\{1\}\},\{2,\{1,3\}\},\{1,\{2,\{1,3\}\}\}

The incidence matrix for HH is

M=[1110100010011000010000010000000000100000]M=\begin{bmatrix}1&1&1&0&1\\ 0&0&0&1&0\\ 0&1&1&0&0\\ 0&0&1&0&0\\ 0&0&0&1&0\\ 0&0&0&0&0\\ 0&0&0&0&1\\ 0&0&0&0&0\end{bmatrix}

and the uber-Levi graph representation is

[Uncaptioned image]
Note 3.

The uber-Levi graph is a directed acyclic graph (DAG). The roots (vertices with no in-neighbors) correspond to the fundamental vertices of UU, and the vertices with positive in degree correspond to the edges of UU. Moreover, every DAGDAG yields an ubergraph.

Where the uber-Levi graph represents the vertex-edge membership relation \in, since E𝒫(i=0Pi)E\subseteq\mathcal{P}\big{(}\bigcup_{i=0}^{\infty}P_{i}\big{)} is a set system of i=0Pi\bigcup_{i=0}^{\infty}P_{i}, it also manifests edge-edge inclusion as a partial order on the edges through \subseteq. As before, this can be read from the uber-Levi graph since eieje_{i}\subset e_{j} if and only if N(ei)N(ej)N^{-}(e_{i})\subset N^{-}(e_{j}). In our example, we have e1e2e3e_{1}\subset e_{2}\subset e_{3} and e1e5e_{1}\subset e_{5}, while e4e_{4} is non-comparable.

As constructed so far, ubergraphs can express the syntax of generalized graph data structures like AvesTerra, where nodes can have a variable number of attributes, and in turn those attributes can be other nodes. In our example, we have e1e3e_{1}\in e_{3}: the uberedge e3e_{3} has another uberedge e1e_{1} as an element.

Additionally, it has been discussed that AvesTerra may wish to model situations where edges can refer to themselves, either directly or indirectly. This corresponds to dropping the requirement: If sPi,i>0s\in P_{i},i>0, belongs to an edge, then ss is itself an edge. In our example, if we were to change the definition of e5e_{5} from e5={1,e4}e_{5}=\{1,e_{4}\} to e5={1,e4,e2}e^{\prime}_{5}=\{1,e_{4},e_{2}\}, then the uber-Levi graph would change to

[Uncaptioned image]

Note the inclusion of a cycle, making the uber-Levi graph now a general directed graph. Allowing (ultimately) expressions like e={e}e=\{e\}, and thus arbitrary cycles in the uber-Levi graph, violates the axiom of foundation. The vertex set is no longer well defined, and non-well-founded sets would need to be invoked.

3.1 Basic Concepts

Ubergraphs are a generalization of hypergraphs, hence many of the definitions of hypergraphs carry verbatim to ubergraphs. Most of the vocabulary given here is generalized from [1].

Let U=(V,E)U=(V,E) be a depth kk ubergraph with |V|=n|V|=n and |E|=m|E|=m. Let MM be the incidence matrix of UU. By definition the empty ubergraph has V=E=V=E=\emptyset and we call any ubergraph with VV\neq\emptyset and E=E=\emptyset a trivial ubergraph. For eEe\in E, we define

V0(e)=SV,e𝒫(S)kSV^{0}(e)=\bigcap_{\begin{subarray}{c}S\subseteq V,\\ e\subseteq\mathcal{P}(S)^{k}\end{subarray}}S

to be the minimum set of fundemental vertices in an ubergraph containing ee. Then we have the following analogs of subgraph:

  • For EEE^{\prime}\subseteq E, the ubergraph (V,E)(V,E^{\prime}) is called a sububergraph.

  • For VVV^{\prime}\subseteq V, the induced sububergraph U[V]U[V^{\prime}] of the ubergraph UU is the ubergraph U(V)=(V,E)U(V^{\prime})=(V^{\prime},E^{\prime}) where

    E={eE|V0(e)V}.E^{\prime}=\{e\in E\hskip 2.84526pt|\hskip 2.84526ptV^{0}(e)\subseteq V^{\prime}\}.

Let UU be the ubergraph with vertices V={1,2,3,4,5}V=\{1,2,3,4,5\} and edge set

E={{1,2},{1,{1,2}},{{3},{{1,4}}},{1,4,5}}.E=\{\{1,2\},\{1,\{1,2\}\},\{\{3\},\{\{1,4\}\}\},\{1,4,5\}\}.

Then U=({1,2,3,4,5},{{1,2},{1,4,5}})U^{\prime}=(\{1,2,3,4,5\},\{\{1,2\},\{1,4,5\}\}) is a sububergraph of UU and U[{1,2}]=({1,2},{{1,2},{1,{1,2}}})U[\{1,2\}]=(\{1,2\},\{\{1,2\},\{1,\{1,2\}\}\}).

Two vertices x,yx,y of an ubergraph are adjacent if there is an uberedge which contains both elements. Two uberedges are incident if their intersection is not empty. The degree of a vertex xx is the number of uberedges containing xx.

Let x,yVEx,y\in V\hskip 2.84526pt\cup\hskip 2.84526ptE. A path PP from xx to yy is a sequence

x=x1,e1,x2,e2,,xs,es,xs+1=yx=x_{1},e_{1},x_{2},e_{2},\dots,x_{s},e_{s},x_{s+1}=y

such that

  • x1,x2,,xs+1x_{1},x_{2},\dots,x_{s+1} are all distinct vertices except possibly x1=xs+1x_{1}=x_{s+1},

  • e1,e2,,ese_{1},e_{2},\dots,e_{s} are distinct uberedges, and

  • xi,xi+1eix_{i},x_{i+1}\in e_{i} for all i=1,2,,si=1,2,\dots,s.

If x=yx=y the path is called a cycle. The integer ss is the length of the path. We say that UU is connected if for every pair of vertices, there is a path which connects these vertices; otherwise we describe UU as disconnected.

3.2 Matrices, Ubergraphs, and Entropy

Let U=(V,E)U=(V,E) be an ubergraph with |V|=n|V|=n and |E|=m|E|=m. As stated earlier, the incidence matrix of an ubergraph is an (n+m)×m(n+m)\times m matrix MM where

Mxy={1if xy0otherwise.M_{xy}=\begin{cases}1&\text{if }x\in y\\ 0&\text{otherwise}.\end{cases}

Many basic concepts can be computed from the incidence matrix. For example, the degree of a vertex xx is (M𝟙)x(M\mathbbm{1})_{x} and two uberedges are incident if and only if the inner product of the corresponding rows of MM is nonzero. Further, the incidence matrix of any (induced) sububergraph is a submatrix of MM.

Next, we define the adjacency matrix A(U)A(U) of UU to be the square matrix whose rows and columns are indexed by the fundamental vertices and edges of UU such that for all x,yVEx,y\in V\hskip 2.84526pt\cup\hskip 2.84526ptE,

Axy={|{eE|x,ye}|if xy0otherwise.A_{xy}=\begin{cases}|\{e\in E\hskip 2.84526pt|\hskip 2.84526ptx,y\in e\}|&\text{if }x\neq y\\ 0&\text{otherwise}.\end{cases}

Let D(x)=yVEax,yD(x)=\sum\limits_{y\in V\hskip 2.84526pt\cup\hskip 2.84526ptE}a_{x,y}. Then the Laplacian matrix of UU is given as

L(U)=DA(U)L(U)=D-A(U)

where D=diag(D(v1),,D(vn),D(e1),,D(em))D=diag(D(v_{1}),\dots,D(v_{n}),D(e_{1}),\dots,D(e_{m})). Note that L(U)L(U) is Hermitian so it’s eigenvalues are real. Further, by an application of the Gershgorin disk Theorem, they must be nonnegative. Since i=1n+mλi=Tr(L(U))=i=1n+mD(xi):=d^\sum\limits_{i=1}^{n+m}\lambda_{i}=Tr(L(U))=\sum\limits_{i=1}^{n+m}D(x_{i}):=\hat{d}, we have that

(μi)i=1n+m:=(λid^)i=1n+m\left(\mu_{i}\right)_{i=1}^{n+m}:=\left(\frac{\lambda_{i}}{\hat{d}}\right)_{i=1}^{n+m}

is a discrete probability distribution. Thus, we can define the algebraic ubergraph entropy of UU by

I(U)=i=1n+1μilog2(μi).I(U)=-\sum_{i=1}^{n+1}\mu_{i}\log_{2}(\mu_{i}).

3.3 Similarity and Metric on Ubergraphs

When we have two structures, one of the most important tasks is to compare them. This comparison is done with an isomorphism.

Definition 5.

Let U=(V,E)U=(V,E) and U=(V,E)U^{\prime}=(V^{\prime},E^{\prime}) be two ubergraphs. We say that UU and UU^{\prime} are isomorphic, denoted UUU\simeq U^{\prime}, if there exists a bijection

φ:VV\varphi:V\rightarrow V^{\prime}

such that

eE if and only if φ(e):={φ(x)|xe}E.e\in E\text{ if and only if }\varphi(e):=\{\varphi(x)\hskip 2.84526pt|\hskip 2.84526ptx\in e\}\in E^{\prime}.

This similarity measure is manifested in both the uber-Levi graph and the incidence matrix.

Theorem 1.

Two ubergraphs are isomorphic if and only if their uber-Levi graphs are isomorhpic.

Proof.

Let UU and UU^{\prime} be ubergraphs with uber-Levi graphs DD and DD^{\prime} respectively. First suppose that UUU\simeq U^{\prime} and let φ:V(U)V(U)\varphi:V(U)\rightarrow V(U^{\prime}) be an isomorphism. Define

ψ:V(D)V(D) by ψ(v)=φ(v) and ψ(e)=φ(e)={φ(x)|xe}.\psi:V(D)\rightarrow V(D^{\prime})\text{ by }\psi(v)=\varphi(v)\text{ and }\psi(e)=\varphi(e)=\{\varphi(x)\hskip 2.84526pt|\hskip 2.84526ptx\in e\}.

Then

(x,y)E(D)defxyψ(x)ψ(y)def(ψ(x),ψ(y))E(D).(x,y)\in E(D)\stackrel{{\scriptstyle def}}{{\Leftrightarrow}}x\in y\stackrel{{\scriptstyle\simeq}}{{\Leftrightarrow}}\psi(x)\in\psi(y)\stackrel{{\scriptstyle def}}{{\Leftrightarrow}}(\psi(x),\psi(y))\in E(D^{\prime}).

Now suppose that DDD\simeq D^{\prime} and let ψ:V(D)V(D)\psi:V(D)\rightarrow V(D^{\prime}) be an isomorphism. We claim that ψ|V(U)\psi|_{V(U)} is an isomorphism from UU to UU^{\prime}. First note that vv is a fundamental vertex if and only if it’s in-degree in the uber-Levi graph representation is zero. Thus, since isomorphisms preserve degree, we must have that ψ|V(U)\psi|_{V(U)} is bijection from V(U)V(U) to V(U)V(U^{\prime}). Further,

xedef(x,e)E(D)(ψ(x),ψ(e))E(D)defψ(x)ψ(e).x\in e\stackrel{{\scriptstyle def}}{{\Leftrightarrow}}(x,e)\in E(D)\stackrel{{\scriptstyle\simeq}}{{\Leftrightarrow}}(\psi(x),\psi(e))\in E(D^{\prime})\stackrel{{\scriptstyle def}}{{\Leftrightarrow}}\psi(x)\in\psi(e).

Thus, by recursively applying this argument we have that ψ|V(U)\psi|_{V(U)} is a bijection from V(U)V(U) to V(U)V(U^{\prime}) such that eE(U)e\in E(U) if and only if ψ|V(U)(e)E(U)\psi|_{V(U)}(e)\in E(U^{\prime}). ∎

References

  • [1] ”Alain Bretto”. ”Hypergraph Theory”. ”Springer International Publishing”, ”2013”.
  • [2] ”Giorgio Gallo, Giustino Longo, and Stefano Pallottino”. ”directed hypergraphs and applications”. ”Discrete Applied Mathematics”, ”42”:”177–201”, ”1993”.