TheInfoList

In mathematics, graph theory is the study of graphs, which are mathematical structures used to model pairwise relations between objects. A graph in this context is made up of vertices (also called nodes or points) which are connected by edges (also called links or lines). A distinction is made between undirected graphs, where edges link two vertices symmetrically, and directed graphs, where edges link two vertices asymmetrically; see Graph (discrete mathematics) for more detailed definitions and for other variations in the types of graph that are commonly considered. Graphs are one of the prime objects of study in discrete mathematics.

Refer to the glossary of graph theory for basic definitions in graph theory.

## Definitions

Definitions in graph theory vary. The following are some of the more basic ways of defining graphs and related mathematical structures.

### Graph

A graph

Refer to the glossary of graph theory for basic definitions in graph theory.

Definitions in graph theory vary. The following are some of the more basic ways of defining graphs and related mathematical structures.

### Graph

A graph with three vertices and three edges.

In one restricted but very common sense of the term,[1][2] a graph is an ordered pair ${\displaystyle G=(V,E)}$ comprising:

• ${\displaystyle V}$, a set of vertices (also called nodes or points);
• ${\displaystyle E\subseteq \{\{x,y\}\mid x,y\in V\;{\textrm {and}}\;x\neq y\}}$, a set of edges (also called links or lines), which are unordered pairs of vertices (that is, an edge is associated with two distinct vertices).

To avoid ambiguity, this type of object may be called precisely an undirected simple graph.

In the edge ${\displaystyle \{x,y\}}$, the vertices

In one restricted but very common sense of the term,[1][2] a graph is an ordered pair ${\displaystyle G=(V,E)}$ comprising:

• ${\displaystyle V}$, a set of vertices (also called nodes or points);
• , the vertices ${\displaystyle x}$ and ${\displaystyle y}$ are called the endpoints of the edge. The edge is said to join ${\displaystyle x}$<

In the edge ${\displaystyle \{x,y\}}$, the vertices ${\displaystyle x}$ and ${\displaystyle y}$ are called the endpoints of the edge. The edge is said to join ${\displaystyle x}$ and ${\displaystyle y}$ and to be incident on ${\displaystyle x}$ and on ${\displaystyle y}$. A vertex may exist in a graph and not belong to an edge. Multiple edges, not allowed under the definition above, are two or more edges that join the same two vertices.

In one more general sense of the term allowing multiple edges,[3][4] a graph is an ordered triple ${\displaystyle G=(V,E,\phi )}$ comprising:

To avoid ambiguity, this type of object may be called precisely an undirected multigraph.

A loop is an edge that joins a vertex to itself. Graphs as defined in the two definitions above cannot have loops, because a loop joining a vertex ${\displaystyle x}$ to itself is the edge (for an undirected simple graph) or is incident on (for an undirected multigraph) ${\displaystyle \{x,x\}=\{x\}}$ which is not in ${\displaystyle \{\{x,y\}\mid x,y\in V\;{\textrm {and}}\;x\neq y\}}$A loop is an edge that joins a vertex to itself. Graphs as defined in the two definitions above cannot have loops, because a loop joining a vertex ${\displaystyle x}$ to itself is the edge (for an undirected simple graph) or is incident on (for an undirected multigraph) ${\displaystyle \{x,x\}=\{x\}}$ which is not in ${\displaystyle \{\{x,y\}\mid x,y\in V\;{\textrm {and}}\;x\neq y\}}$. So to allow loops the definitions must be expanded. For undirected simple graphs, the definition of ${\displaystyle E}$ should be modified to ${\displaystyle E\subseteq \{\{x,y\}\mid x,y\in V\}}$. For undirected multigraphs, the definition of ${\displaystyle \phi }$ should be modified to ${\displaystyle \phi :E\to \{\{x,y\}\mid x,y\in V\}}$. To avoid ambiguity, these types of objects may be called undirected simple graph permitting loops and undirected multigraph permitting loops, respectively.

${\displaystyle V}$ and ${\displaystyle E}$ are usually taken to be finite, and many of the well-known results are not true (or are rather different) for infinite graphs because many of the arguments fail in the infinite case. Moreover, ${\displaystyle V}$ is often assumed to be non-empty, but ${\displaystyle E}$ is allowed to be the empty set. The order of a graph is ${\displaystyle |V|}$, its number of vertices. The size of a graph is ${\displaystyle |E|}$, its number of edges. The degree or valency of a vertex is the number of edges that are incident to it, where a loop is counted twice.

In an undirected simple graph of order n, the maximum degree of each vertex is n − 1 and the maximum size of the graph is n(n − 1)/2.

The edges of an undirected simple graph permitting loops ${\displaystyle G}$ induce a symmetric homogeneous relation ~ on the vertices of ${\displaystyle G}$ that is called the adjacency relation of ${\displaystyle G}$. Specifically, for each edge ${\displaystyle (x,y)}$, its endpoints ${\displaystyle x}$ and ${\displaystyle y}$ are said to be adjacent to one another, which is denoted ${\displaystyle x}$ ~ ${\displaystyle y}$.

A directed graph or digraph is a graph in which edges have orientations.

In one restricted but very common sense of the term,[5] a directed graph is an ordered pair ${\displaystyle G=(V,E)}$ comprising: