Definition (Graph)
A graph is a tuple where
- is a set of vertices
- is a set of edges connecting two vertices. Formally, it is a set of unordered pairs of elements of .
graph LR A((A)) x--x B((B)); A((A)) x--x D((D)); B((B)) x--x C((C)); B((B)) x--x D((D)); C((C)) x--x E((E)); D((D)) x--x E((E));
Vertices
Vertices are a set of items or objects that represent a node on a graph.
Definition: Adjacent Vertices
Two vertices are adjacent if there is an edge connecting them.
Definition: Incident Vertex
A vertex is incident on an edge if is one of the vertices by . This literally just means the vertex(or vertices, see Hypergraph) that compose an edge.
Definition: Vertex Neighborhood
The neighborhood of a vertex is the set of adjacent vertices. An open neighborhood does not include . A closed one does. Indeed,
where is the set of adjacent vertices on .
Definition (Subgraph)
is a subgraph of , if it is obtained by taking some of the edges and vertices of . For example,
graph LR A((A)) x--x B((B)); B((B)) x--x C((C)); C((C)) x--x E((E)); D((D)) x--x E((E));
is a subgraph of the graph. A graph is its own subgraph.
Definition (Induced Subgraph)
An induced subgraph is a subgraph that takes some vertices in , but will contain all edges that connect between them.
For example, let be
graph LR A((A)) o--o B((B)) B o--o C((C)) C o--o D((D)) D o--o A
then the induced subgraph with vertices are
graph LR A((A)) o--o B((B)) B o--o C((C))
However,
graph LR A((A)) o--o B((B)) C((C))
would not be induced (but just a subgraph).