Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Subgraphs
A graph H is a subgraph of a graph G, written as H G, if V (H) V (G)
and E(H) E(G). We also say G contains H as a subgraph.
If H G and either V (H) is a proper subset of V (G) or E(H) is a proper
subset of E(G), then H is a proper subgraph of G.
If H G and V (H) = V (G), then H is a spanning subgraph of G.
An induced subgraph of G is obtained by deleting a set of vertices of G
(and, of course, the edges incident to them).
Formally: u, v V (H), uv E(H) iff (if and only if) uv E(G).
Removing vertices and edges from a graph G = (V, E):
For a proper subset X V of vertices, the graph G X is the subgraph of
G induced by (restricted to) the vertex-set V X.
For a subset Y E of edges, the graph G Y has vertex-set V (spanning
subgraph) and edge-set E Y .
Paths and cycles
Given a graph G and two vertices u, v V (G), a u v path is a sequence
of distinct vertices of G, beginning with u and ending at v, such that consecutive vertices in the sequence are adjacent. The number of edges in a path
is called the length of the path.
More formally: a u v path in a graph is a sequence of distinct vertices
(v0 , v1 , . . . , vk ) (with k 0) such that v0 = u, vk = v, and, for 0 i k 1,
the vertices vi and vi+1 are adjacent.
Note that a path contains one fewer edges than vertices. Also: a vertex in
itself is a path of length 0.
If in a path (v0 , v1 , . . . , vk ) with at least three vertices the last vertex is also
adjacent to the first one, we obtain a cycle. A cycle has as many edges as
vertices (the length of the cycle).
We often write a cycle as (v0 , v1 , . . . , vk , v0 ). Unlike paths, which have endpoints, no vertex in a cycle has a special role.
2
Connected graphs
A graph G is connected if G contains a u v path for every pair u, v of
(not necessarily distinct) vertices of G otherwise G is disconnected.
A maximal connected subgraph of G is a component of G. (H G is
a maximal connected subgraph of G means H is connected, but it is not a
proper subgraph of any other connected subgraph of G.)
Walks and trails
If in the definition of a path we drop the condition that the vertices are
distinct, we are describing a u v walk.
Thus we can think of a u v walk as a sequence v0 , e1 , v1 , e2 , v2 , . . . , ek , vk
of vertices and edges such that, for 1 i k, the edge ei has endpoints vi1
and vi .
Clearly, a u v walk followed by a v w walk results in a u w walk.
The length of a path, cycle, or walk is its number of edges (with multiplicity
for walks). We often identify a path or cycle, but not a walk, with its edge-set.
Theorem 1.6 0 . For each uv walk W there is a uv path P only containing
edges, and hence vertices, of W . (In fact, P contains those edges of W in
their original order.)
Corollary. G is connected if and only if it contains a u v walk for every
pair u, v of vertices.
A walk without repeated edges is a trail.
A walk (or trail) is closed if its endpoints are the same. The name circuit
is also used for a closed trail when we do not specify the first vertex but keep
the list in cyclic order.
An Eulerian trail (or Euler walk) is a trail which visits every edge exactly
once. An Eulerian circuit (or Euler tour) is an Eulerian trail which starts
and ends on the same vertex. They were first discussed by Leonhard Euler
while solving the famous Seven bridges of K
onigsberg problem in 1736.
3