Definition:Graph (Graph Theory)

Informal Definition
A graph is intuitively defined as a pair consisting of a set of nodes or vertices and a set of edges.



Vertex
In the above, the vertices (singular: vertex) are the points $$A, B, C, D, E, F, G$$ which are marked as dots.

Edge
The edges are the lines that join the vertices together.

In the above, the edges are $$AB, AE, BE, CD, CE, CF, DE, DF, FG$$.

Formal Definition
Formally, a graph is an ordered pair $$G = \left({V, E}\right)$$ such that:
 * $$V$$ is a non-empty set, called the vertex set;
 * $$E$$ is a set of 2-element subsets of $$V$$, called the edge set.

That is: $$E \subseteq \left\{{\left\{{u, v}\right\}: u, v \in V}\right\}$$.

$$E$$ can also be described as an antireflexive, symmetric relation on $$V$$.

It is often convenient to refer to the vertex set and edge set for a given graph $$G$$ as $$V \left({G}\right)$$ and $$E \left({G}\right)$$ respectively, especially if there is at any one time more than one graph under consideration.

Note that although $$V$$ is defined as being non-empty, it is still possible for $$E = \varnothing$$. That is, although a graph must have at least one vertex, it may have no edges.

Incident
An edge $$e = \left\{{u, v}\right\} \in E$$ is said to be incident to $$u$$ and $$v$$, or joins $$u$$ and $$v$$.

By the same coin, if $$e = \left\{{u, v}\right\} \in E$$ then $$u$$ and $$v$$ are likewise incident to $$e$$.

Adjacent
Two vertices $$u$$ and $$v$$ are said to be adjacent or neighboring if there exists an edge $$e = \left\{{u, v}\right\} \in E$$ to which they are both incident. Otherwise they are non-adjacent.

Degree
The degree of a vertex $$v$$ in a graph $$G$$ is the number of edges to which it is incident, and is denoted $$\deg_G \left({v}\right)$$, or just $$\deg \left({v}\right)$$ if it is clear from the context which graph is being referred to.

That is:
 * $$\deg_G \left({v}\right) = \left|{\left\{{u \in V : \left\{{u, v}\right\} \in E}\right\}}\right|$$.

If the degree of a vertex $$v$$ is even, then $$v$$ is called an even vertex. If the degree of $$v$$ is odd, then $$v$$ is an odd vertex. If the degree of $$v$$ is zero, then $$v$$ is an isolated vertex.

The degree sequence of a graph is a list of the degrees of all the vertices of the graph in descending order.

Connected
A graph is connected if there is a path between any pair of vertices in the graph. Otherwise, it is called disconnected.

Order
The order of a graph is the number of its vertices.

That is, the order of a graph $$G = \left({V, E}\right)$$ is $$\left \vert {V}\right \vert$$.

Size
The size of a graph is the number of its edges.

That is, the size of a graph $$G = \left({V, E}\right)$$ is $$\left \vert {E}\right \vert$$.

Notation
A graph $$G$$ whose order is $$p$$ and whose size is $$q$$ is called a $$\left({p, q}\right)$$-graph.

Also see

 * Multigraph: A graph which may have more than one edge between a given pair of vertices;
 * Pseudograph: A graph which allows an edge to start and end at the same vertex. Such an edge is called a loop.
 * Directed graph or digraph: A graph in which the edges are ordered pairs of vertices.

A graph which is not a multigraph nor a pseudograph nor a directed graph can be called a simple graph if this clarification is necessary.

Finite Graph
A finite graph is a graph with a finite number of edges and a finite number of vertices.

Note
Not to be confused with the Graph of a Mapping.