Most but not all of the invariants and predicates that apply to simple graphs (see Sections Elementary Invariants of a Graph and Elementary Graph Predicates) also apply to multigraphs. We list them below.
Let G and H be two graphs. For clarity, we list here once again the conditions under which G is equal to H and H is a subgraph of G.
The graphs G and H are equal if and only if:
Finally, we have introduced a few predicates to help users determine if a general graph is simple or not, undirected or not.
The number of vertices of the graph G.
The number of edges of the graph G.
Let u and v be two vertices of the same graph G. If G is undirected, returns true if and only if u and v are adjacent. If G is directed, returns true if and only if there is an edge directed from u to v.
Let e and f be two edges of the same graph G. If G is undirected, returns true if and only if e and f share a common vertex. If G is directed, returns true if and only if the terminal vertex of e (f) is the initial vertex of f (e).
The negation of the adj predicate applied to vertices.
The negation of the adj predicate applied to edges.
Let u be a vertex and e an edge of a graph G. Returns true if and only if u is an end-vertex of e.
The negation of the in predicate applied to a vertex with respect to an edge.
Returns true if and only if the graphs G and H are equal, that is if and only if they are structurally equal and are compatible with respect to their support, vertex and edge labels, and edge capacities (see the introduction to this section).
Returns true if and only if H is a subgraph of G, that is, if and only if H is a structural subgraph of G and the graphs are compatible with respect to their support, vertex and edge labels, and edge capacities (see the introduction to this section).
Returns true if and only if the graph G is bipartite.
Given a bipartite graph G, return its two partite sets in the form of a pair of subsets of V(G).
Returns true if and only if G is a regular graph.
Returns true if and only if the graph G, on n vertices, is the complete graph on n vertices.
Returns true if and only if the edge-set of the graph is empty.
Returns true if and only if the vertex-set of the graph is empty.
Returns true if and only if G is a simple graph.
Returns true if and only if G is a undirected graph.
Returns true if and only if G is a directed graph.