46 terms

Math 139 - 13: Sections 14.1 - 14.4, vocabulary, notes, & practice problems

Graph

A finite set of points called vertices, with line segments (or curves) connecting them called edges

Vertex

Another word for node, vertices for plural form

Loop

Edge starts and ends at same vertex

Equivalent Graphs

2 Graphs with same number nodes connected in the same way, the placement of the vertices and the shapes of the edges are unimportant

Example: In the early 1700'a city in Germany was located on both banks and two island of a river. The town's sections were connected by seven bridges around the river. Draw a graph that models the layout of the city and use vertices to represent the land masses and edges to represent the bridges. (Ex. 2, Pg. 895)

The only thing that matters is the relationship between the land masses and bridges- which land masses are connected to each other and by how many bridges. Label each land mass with an uppercase letter, add points to represent the land mass. Next, add the edges to represent the bridges.

Example: Create a graph that models the bordering relationships among these six states- Vermont, New Hampshire, Maine, Connecticut, Massachusetts, and Rhode Island. (Ex. 3, Pg. 897)

In the graph, Vermont will connect to New Hampshire and Massachusetts. New Hampshire will connect to Vermont, Maine, and Massachusetts. Connecticut will connect to Rhode Island, and Massachusetts. Massachusetts will connect to New Hampshire, Vermont, Rhode Island, and Connecticut.

Degree of vertex

The number of edges at that vertex (have it as an end point), note that if a loop connects a vertex to itself, that loop contributes 2 to the degree of the vertex

Example: Suppose you have a graph with 3 nodes, A, B, and C. Each pair of nodes is connected by a single edge. The degree of C is:

2

Example: There are 3 nodes A, B, and C. A and B are connected by an edge, and A and C are connected by an edge. A is also connected to itself by a loop. The degree of node A is:

4

Path

A sequence of adjacent vertices and the edges connecting them

Circuit

A path that begins and ends at the same vertex

If there is at least one edge connecting two vertices in a graph, the vertices are called ________. A sequence of such vertices and the edges connecting them is called a/an _________. If this sequence of vertices begins and ends at the same vertex, it is called a/an _________.

Adjacent; Path; Circuit

True or False: A graph can be drawn in many equivalent ways.

True

True or False: An edge can be a part of a path only once.

True

True or False: Every circuit is a path.

True

True or False: Every path is a circuit.

False

Euler Path

A path that travels through every edge of a graph once and only once, each edge must be traveled and no edge can be retraced

Euler Circuit

A circuit that travels through every edge of a graph once and only once, a Euler Circuit must begin and end at the same vertex

Euler's Theorem

1. If a graph has all even vertices, it has a Euler path and circuit.

2. If there is exactly 2 odd vertices then there is a Euler path but not a Euler circuit.

3. Otherwise there is neither a path nor circuit (every Euler circuit is a Euler path, but not every Euler path is an Euler circuit)

2. If there is exactly 2 odd vertices then there is a Euler path but not a Euler circuit.

3. Otherwise there is neither a path nor circuit (every Euler circuit is a Euler path, but not every Euler path is an Euler circuit)

Fleury's Algorithm

(How to find a Euler path or Euler Circuit)

1. If the graph has 2 odd vertices, start and end at an odd vertex. If the graph has no odd vertices, choose any vertex as the starting point.

2. Number edges as you trace through the graph by- after traveling over an edge erase it (show erased edges as dashed line; when faced with a choice of edges to trace, choose an edge that is not a bridge.

1. If the graph has 2 odd vertices, start and end at an odd vertex. If the graph has no odd vertices, choose any vertex as the starting point.

2. Number edges as you trace through the graph by- after traveling over an edge erase it (show erased edges as dashed line; when faced with a choice of edges to trace, choose an edge that is not a bridge.

A connected graph has at least one Euler circuit if it has _____ odd vertices.

0

True or False: An Euler circuit is also an Euler path.

True

An Euler circuit can start at _______ vertex.

Any

True or False: Euler's Theorem provides a procedure for finding Euler paths and Euler circuits.

False

Weight

Number we put on an edge (we decide)

Hamilton Path

A path that passes through each vertex of a graph exactly once

Hamilton Circuit

A Hamilton Path that begins and ends at the same vertex and passes through all other vertices exactly once

Complete Graph

A graph that has an edge between each pair of its vertices

What formula do we use to figure out the number of Hamilton circuits in a complete graph?

(n-1)!

Example: Determine the number of Hamilton circuits in a complete graph with 1. four vertices, 2. five vertices, 3. eight vertices.

1. (4-1)! = 6

2. (5-1)! = 24

3. (8-1)! = 5040

2. (5-1)! = 24

3. (8-1)! = 5040

Traveling Salesperson Problem

The problem of finding a Hamilton circuit in a complete, weighted graph for which the sum of the weights of the edges is a minimum. (Example 3 Page 973)

The Nearest Neighbor Method

1. Model problem with complete, weighted graph.

2. Identify the vertex that serves as the starting point.

3. From the starting point, choose an edge with the smallest weight. Move along to the second vertex.

4. From the second vertex, choose the edge with the smallest weight that does not lead to a vertex already visited.

5. Continue building the circuit one vertex at a time, by moving along edges with the smallest weights until all vertices are visited.

6. From the last vertex, return to the starting point.

2. Identify the vertex that serves as the starting point.

3. From the starting point, choose an edge with the smallest weight. Move along to the second vertex.

4. From the second vertex, choose the edge with the smallest weight that does not lead to a vertex already visited.

5. Continue building the circuit one vertex at a time, by moving along edges with the smallest weights until all vertices are visited.

6. From the last vertex, return to the starting point.

A path that passes through each vertex of a graph exactly once is called a/an _______ path. Such a path that begins and ends at the same vertex and passes through all other vertices exactly once is called a/an ________ circuit.

Hamilton; Hamilton

A graph that has an edge between each pair of its vertices is called a/an _________ graph. If such a graph has (n) vertices, the number of Hamilton circuits in the graph is given by the factorial expression _____.

Complete; (n-1)!

True or False: Every complete graph that has a Hamilton circuit has at least one Euler Circuit.

False

True or False: In a weighted graph, the lengths of the edges are proportional to their weights.

False

True or False: The nearest neighbor method provides exact solutions to traveling salesperson problems.

False

Tree

A graph that is connected and has no circuits- there is exactly one path from each node to every other node- every edge is a bridge

Spanning Trees

All the tree's nodes and edges come from the graph (it's a subgraph). The tree contains all of the graph's nodes, and just enough edges to make a tree

Minimum Spanning Tree

For a weighted graph is a spanning tree with the smallest possible total weight

Kruskals' Algorithm

(used to find minimum spanning tree)

1. Find edge with smallest weight in the graph. Mark it.

2. Find the next-smallest edge in the graph. Mark it.

3. Find the next-smallest unmarked edge in the graph that does not create a circuit. Mark it.

4. Repeat step 3 until all vertices have been included. The edges marked are the desired minimum spanning tree.

1. Find edge with smallest weight in the graph. Mark it.

2. Find the next-smallest edge in the graph. Mark it.

3. Find the next-smallest unmarked edge in the graph that does not create a circuit. Mark it.

4. Repeat step 3 until all vertices have been included. The edges marked are the desired minimum spanning tree.

A graph that is connected and has no circuits is called a/an ________. For such graph every edge is a/an _______ and if there are (n) vertices there must be _______ edges.

Tree; Bridge; (n-1)

A tree that contains all of the vertices and some of the edges of another (connected) graph is called a / an _______

tree for that graph.

tree for that graph.

Spanning

A spanning tree that is created from a weighted graph and that has the smallest possible weight is called the ________ tree.

Minimum spanning

True or False: A tree is a complete graph.

False

True or False: Most connected graphs have many possible spanning trees.

True