undirected graph

(data structure)

Definition: A graph whose edges are unordered pairs of vertices. That is, each edge connects two vertices.

Formal Definition: A graph G is a pair (V,E), where V is a set of vertices, and E is a set of edges between the vertices E ⊆ {{u,v} | u, v ∈ V}. If the graph does not allow self-loops, adjacency is irreflexive, that is E ⊆ {{u,v} | u, v ∈ V ∧ u ≠ v}.

See also directed graph, hypergraph, multigraph.

Note: An undirected graph may be represented as a directed graph with two directed edges, one "to" and one "from," for each undirected edge.

Author: PEB

Go to the Dictionary of Algorithms and Data Structures home page.

If you have suggestions, corrections, or comments, please get in touch with Paul E. Black.

Entry modified 18 October 2007.
HTML page formatted Fri Mar 25 16:20:35 2011.

Cite this as:
Paul E. Black, "undirected graph", in Dictionary of Algorithms and Data Structures [online], Paul E. Black, ed., U.S. National Institute of Standards and Technology. 18 October 2007. (accessed TODAY) Available from:

to NIST home page