doc5.2

advertisement
DEFINITION: A graph G is a picture consisting of a set V of
dots, called vertices, and a set E of lines, called edges. The edges
do not have to be straight lines, but they always have to
connect two vertices. When an edge connects a vertex back
with itself (which is also allowed), then is called a loop.
NOTATION: G = (V,E)
Examples:
Fig.1
Fig.2
Fig.3
Note that, in Fig.1 for example, the edges Pittsburgh - Chicago and St.
Louis - New York cross is NOT a vertex. Also note that there is no rule
against having more than one edge connecting the same two edges, as in
the case with vertices A and L from Fig.3. These are called multiple
edges. Note also that Fig.3 (a) and (b) show two different
representations of the same graph. Hence, a graph can be drawn in
infinitely many ways, and it is not the shape of the graph that matters, but
rather how the vertices are connected to each other.
DEFINITIONS:
Adjacent vertices: Two vertices are said to be adjacent if there is
an edge joining them. In Fig.3 for example, A and R are
adjacent, A and L are not adjacent.
Adjacent edges: Two edges are said to be adjacent if they share
a common vertex. In Fig.3 for example, AD and DL are
adjacent, AL and DR are not adjacent.
Degree of a vertex: The degree of a vertex is the number of lines
at that vertex. OBS: A loop contributes twice toward the
degree. In Fig.3 for example, deg(A)=5, deg(D)=3.
Paths: A path is a sequence of vertices with the property that
each vertex in the sequence is adjacent to the next one.
Whereas a vertex can appear on a path more than once, an
edge can be part of a path only once. In Fig.3 for example, a
path from A to D is A, D or A, R, D or A, R, D, L, A, D. In
Fig.2(c) for example, there is no path between D and F.
Circuits: A circuit is a path that starts and ends at the same
vertex. In Fig.3 for example, A, R, D, L, A is a circuit.
Connected graphs: A graph is said to be connected if any two
vertices can be joined by a path. If a graph is not connected,
then it is said to be disconnected. A graph that is disconnected
is made up of pieces that are by themselves connected; such
pieces are called the components of the graph. Fig.1, Fig.2(a),
Fig.3 are connected graphs. Fig.2(a),(b) are disconnected
graphs. Fig.2(a) has two components and Fig.2(c) has three.
Bridges: Sometimes in a connected graph there is an edge (or
more) such that if we were to erase it, the graph would become
disconnected. Such an edge is called a bridge. In Fig.2(a) for
example, AE is a bridge, EG is not a bridge.
DEFINITIONS:
Euler path: An Euler path is a path that travels through every
edge of a connected graph. Since it is a path, edges can only be
traveled once. Thus, an Euler path travels through every edge
of the graph once and only once – every edge must be traveled
(Euler); no edge can be retraveled (path).
OBS: Not every graph has an Euler path.
Euler circuit: An Euler circuit is circuit that travels through
every edge of a connected graph.
OBS: Not every graph has an Euler circuit.
One of Euler’s most important ideas was the observation
that certain types of problems can be conveniently rephrased
as graph problems, and that, in fact, graphs offer the perfect
model for describing many real-life situations. The notion of
using a mathematical concept to describe and solve a real-life
problem is one of the oldest and grandest traditions in
mathematics. It is called modeling.
Example 1 and 2 (page 167): The Walking Patrolman
and Walking Mail Carrier
Example 3 (page 167): The Seven Bridges of Königsberg
Download