38
CST 5 Math A-maze-ing Math Graphs

CST 504 Graphs

Embed Size (px)

Citation preview

CST 5 Math

A-maze-ingMathGraphs

The Königsberg Conundrum In the old city of Konigsberg there

used to be only 5 bridges. People could take a round trip of all

the bridges by crossing them only once.

Go to page 70 in the text and trace with your finger the path you would take.

The Seven Bridges Then two more bridges were built. People tried but could not do a round

trip and cross each bridge only once. Try this using the picture on the next

slide.

Leonard Euler This smart guy, Leonard Euler, (pr.

Oiler) was able to show why a round trip was impossible.

He used dots to represent the land and lines to represent the bridges.

The Oiler does it! So Lenny showed that no matter

where you started, you could not help but pass over a bridge two times.

By doing this he introduced graph theory which shows how the elements of a set relate to each other.

First, Some Definitions graph

Informally, a graph is a finite set of dots called vertices (or nodes) connected by links called edges (or arcs).

Definitions adjacent

Two vertices are adjacent if they are connected by an edge.

Definitions Degree: The degree (or valence) of

a vertex is the number of edge ends at that vertex.

For example, in this graph all of the vertices have degree two.

Activities Book 2, p.18, Q. 1-7, some orally P. 19, Q. 9, 10, 14, 15

More Definitions complete graph

A complete graph with n vertices is a graph with n vertices in which each vertex is connected to each of the others (with one edge between each pair of vertices).

Here are the first five complete graphs:

Definitions connected

A graph is connected if there is a path connecting every pair of vertices.

Activities P. 79, Q. 1-7 P. 81, Q. 8-11

Labyrinths So, the island in Königsberg and the bridges

created a maze or a labyrinth. Labyrinths have existed for thousands of

years. According to legend, King Minos created a

labyrinth on the island of Crete. At the centre was his son, a half-man half-

bull called a Minotaur (a/k/a Bob). If you could get out of the labyrinth before

Bob got you, you survived.

Bob Dies… Theseus kills Bob. He then escapes. He goes home.

Okay So that was not actually the maze. What did your graph look like?

Activities On page 85, do Q. 1-4 orally. On page 86, do Q. 6-10 On Page 87, do Q. 13, 16, 17, 21

Labyrinth Project You and a partner will pick a maze. Draw the labyrinth. Draw a graph of the labyrinth showing the

vertices and the edges. This is a C1 task – math communication –

constructs and uses networks of concepts;

You will write a short paragraph about the labyrinth, how it works, and what you have learned.

Chartres Cathedral Prayer Maze

Brain Maze

Theseus Maze

Circular Maze

Euler Paths and Circuits Euler path: A path that travels over

each edge once and only once in a connected graph.

Euler Circuit: An Euler path that is closed.

Special Case An Euler path or circuit only exists if a

graph has EXACTLY 2 vertices whose degrees are odd numbers.

An Euler path exists when the degrees of all the vertices are even numbers.

Euler Circuit:Degree of Vertices

Drawing Euler Paths An Euler path must start at a vertex

having an odd-numbered degree and end at another vertex with an odd-numbered degree.

An Euler circuit can begin at any vertex and ends at the same vertex.

Hamiltonian Paths Hamiltonian Path: A path that passes

through every vertex once and only once.

Hamiltonian Circuit: A Hamiltonian path that finishes at the same vertex.

Distance of a Path D(P,Q) is the shortest distance

between two points. Each edge/line is considered to have

length one.

Activities Page 27, Q. 1-7

Tree Diagrams A tree diagram is a

connected graph without a simple circuit.

This can be used in planning jobs, electrical circuits and plumbing.

A

B C D

Directed Graph or Digraphs A directed graph is a graph in which

each edge has a direction – called an arc;

The arc has only one direction that can be followed; E.g one way street

A path or circuit is SIMPLE if it contains no repeat arcs;

Weighted Graph A weighted graph is a graph, directed

or not, in which a weight is attributed to each edge;

The weight of a path is the sum of the weights of the edges that make up the path;

Activities Page 37, Q. 1, 3, 4 Page 41, Q. 13, 15, 16

Value of a Path The value of a path is the total of its

weights. It can be a maximum or a minimum. To find the minimum, start with the

path of lowest weight, and add additional edges until all the nodes are connected.

Networks A network is a graph in which every

edge is assigned a weight. A weight can indicate time or cost. The weight of a path corresponds to

the sum of the weights of the edges that make up the path.

A network can be directed or undirected.

Chromatic Number The chromatic number is the

minimum number of colours necessary to colour all of a graph’s vertices without any 2 adjacent vertices being of the same colour.

It is also applied to maps.

Critical Path The critical path corresponds to a

simple path of maximum value. Critical paths are used to determine

the minimum amount of time required to carry out a task comprising several steps.

To do this, you must know which steps are pre-requisites (needed ahead of time) for other steps, and which steps can be carried out at the same time.

Activity Page 52, Q. 1,2,5 Page 54, Q. 9, 10, 12, 13, 19