Graphs Flashcards

1
Q

Definition of a graph

A

A graph consists of a finite set of points, called vertices (singular is vertex), and line segments or curves called edges, that start and end at vertices.
An edge that starts and ends at the same vertex is called a loop.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Degree of vertex

A

Number of edges at that vertex.

Vertex with even number of edges is “even vertex”. And odd number of edges is”odd vertex.”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Adjacent vertices

A

Two vertices connected by at least one edge.

Adjacent vertices = connected vertices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Circuit

A

A path that begins and ends on same vertex.

Every circuit is a path. But Not every path is a circuit.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Connected graph

A

If for any 2 of its vertices there is at least one path connecting them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Euler path

A

A path that travels though every edge of a graph once and only once. Each edge must be traveled and no edge must be retraced.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Euler circuit

A

Travels though each edge of graph once and only once and must end on same vertex.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Euler’s theorem

A

Following statements are true for connected graphs:
1-if a graph has exactly 2 odd vertices, then it has at least one Euler path, but no Euler circuit.
2-if a graph has no odd vertices, then it has at least one Euler circuit
3-if a graph has more than 2 odd vertices, then it has no Euler paths and no Euler circuits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Fleury’s algorithm

-what is the procedure?

A

1- If the graph has exactly two odd vertices, choose one of the two vertices as the starting point. If the graph has no odd vertices, choose any vertex as a starting point.
2- Number edges as you trace the graph according to the following rules:
-After you’ve traveled over an edge erase it. Show the erased edges as dashed lines.
-Open faced with a bridge of edges to trace choose an edge that is not a bridge travel over an edge that is a bridge only if there is no alternative.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Purpose of Fleury’s algorithm

A

Finding A Euler’s path or a Euler’s circuit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Is a Euler circuit and Euler path the same thing?

A

Every Euler circuit is a Euler path. However, NOT Every Euler path is a Euler circuit.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Hamilton path

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Hamilton circuit

A

If a Hamilton path begins and ends at the same vertex and passes through all other vertices exactly once it is a Hamilton circuit.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Difference between Hamilton path and Euler path

A

Hamilton path involves vertices.
Euler path involves edges.

Hamilton paths are used for ups drivers for specific locations.
Euler paths are used when every road needs to be used -for example garbage.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Weighted graph

A

A graph whose edges have numbers attached to them. For example the cost of airfare from city A to city B.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Traveling sales person problem

A

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.

17
Q

Optimal Hamilton circuit

A

Also known as optimal solution. It is the minimum sum of weights of the edges in a weighted graph. (Traveling sales person problem)

18
Q

Brute force method

A

One method for finding an optimal Hamilton circuit. It uses the following steps:
1-model the problem with a complete weighted graph.
2- make a list of all the possible Hamilton circuits
3- Determine the sum of the weights of the edges for each of these circuits
4- The circuit with the minimum sum of weight is the optimal

19
Q

Nearest neighbor method of finding approximate Solutions to the traveling sales person problem

A

1-model the problem with the complete weighted graph.
2-Identify the vertex that serves as the starting point.
3- From the starting point, choose the edge with the smallest weight. Go to that vertex
4-Continue building the circuit, one vertex at a time, by moving along the edge with the smallest weight until all vertices are visited.