Presentation is loading. Please wait.

Presentation is loading. Please wait.

It's a world-wide webby wonderland.. Graphs are often used to represent real-world information and real-world structures. Graph Theory was even invented.

Similar presentations


Presentation on theme: "It's a world-wide webby wonderland.. Graphs are often used to represent real-world information and real-world structures. Graph Theory was even invented."— Presentation transcript:

1 It's a world-wide webby wonderland.

2 Graphs are often used to represent real-world information and real-world structures. Graph Theory was even invented to solve a real-world problem. – The city of Kӧnigsberg was located on the Pregel river in Prussia. The river divided the city into four separate landmasses, including the island of Kneiphopf. – These four regions were linked by seven bridges. Residents of the city wondered if it were possible to leave home, cross each of the seven bridges exactly once, and return home. – Leonhard Euler (a mathematician) and solved it by converting it into a graph

3

4

5

6

7

8 Some courses have pre-requisites. Are there any courses at UW-L that can't be taken because they are pre-requisites to each other (even indirectly via a third course)? Construct a schedule for building a house. what are the most critical (in terms of time) parts of the construction? Send a signal from your cell phone to your friends cell phone in Taiwan. Download a web page from Russia. Whats the best NFL/MLB team?

9 Vertex Arc

10 A vertex is a node in the graph An arc is a an ordered pair of vertices – The arc might connect one vertex to itself. – The arc is one-way (FROM, TO) When drawn, a vertex is usually a circle (dot) and an arc is a line between the circles where the directionality is given by an arrow. A graph G consists of a set of vertices V and a set of arcs E. For example: – Let G = (V, E) – where V = {1,2,3,4,5,6} – and E = {{1,2}, {1,5}, {2,3}, {2,5}, {3, 4}, {4, 5}, {4, 6}}

11 A model is an abstract description of a system. A graph is a mathematical model. – G = ({a,b,c,d,e}, {(a,c), (a,b), (c,b), (c,e), (d,b), (d,d), (e,d)}) A view is a way to visualize a system or part of a system. A drawing of the model is a view. For one model, there may be many views.

12 Vertex A is adjacent to vertex B iff (A,B) is in E. A loop is when a vertex is listed first and last in an arc. The in-degree of a vertex V is the count of arcs of the form (_, V). The number of arcs TO the vertex The out-degree of a vertex V is the count of arcs of the form (V, _). The number of arcs FROM the vertex The order of a graph is the number of vertices The size of a graph is the number of arcs G = ({a,b,c,d,e}, {(a,c), (a,b), (c,b), (c,e), (d,b), (d,d), (e,d)})

13 A path is a sequence of vertices [V 1, V 2, V 3, V 3, …, V n ] such that – For every pair of adjacent vertices V i and V j in the path, there is an arc (V i, V j ) in the graph. The length of a path is the number of arcs in the path. The length can be zero for the case of a single vertex. Vertex V j is connected to vertex V i iff there is at least one path that starts at V i and ends at V j A cycle is a path where – length > 0 – It starts and ends with the same vertex A graph with no cycles is acyclic.

14 Define G Give the size and order of G. Is [F, E, C, D] a path? – length? – weight? What is the degree of E? Of A? Is H connected to A? Is A connected to H?

15 A tree is a graph such that – It has one vertex with in-degree 0. This vertex is known as the 'root'. – Each non-root vertex has an in-degree of 1 – There is a path from the root to every other vertex

16 Some vertices have an out-degree of zero. These vertices are called leaves. There may be many leaves in the tree. A tree is an acyclic graph.

17

18

19

20


Download ppt "It's a world-wide webby wonderland.. Graphs are often used to represent real-world information and real-world structures. Graph Theory was even invented."

Similar presentations


Ads by Google