tucker/ams301-i.1-3.docx  · web view2020. 8. 28. · vertices represent branch points in search...

22
Introductory Comments about AMS 301 Graphs consist of a set of vertices and edges that join different pairs of distinct vertices. Two vertices joined by an edge are adjacent. A path is a connected sequence of vertices One path from a to k is a – b – f – j – k . If the path ends where it starts, it is called a circuit. Examples of graphs: road maps (e.g., Google maps) communication networks electrical circuits organizational charts programming flow charts and data structures

Upload: others

Post on 23-Jan-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: tucker/AMS301-I.1-3.docx  · Web view2020. 8. 28. · Vertices represent branch points in search for unknown letter or word. Example 4. Street Surveillance. Author: Alan Tucker Created

Introductory Comments about AMS 301

Graphs consist of a set of vertices and edges that join different pairs of distinct vertices. Two vertices joined by an edge are adjacent.

A path is a connected sequence of vertices One path from a to k is a – b – f – j – k .

If the path ends where it starts, it is called a circuit.

Examples of graphs: road maps (e.g., Google maps) communication networks electrical circuits organizational charts programming flow charts and data structures social networks search trees connections in big data sets

Page 2: tucker/AMS301-I.1-3.docx  · Web view2020. 8. 28. · Vertices represent branch points in search for unknown letter or word. Example 4. Street Surveillance. Author: Alan Tucker Created

Example 1. Matching - pair off vertices on left and right; e.g. computer dating, or matching workers with jobs they can do.

Not possible in the above graph-- A, B and D must each be paired with c or d.

Bipartite graphs can be written with vertices split into left and right sides with all edges going between a left and a right vertex. Matching problems involve bipartite graphs

Page 3: tucker/AMS301-I.1-3.docx  · Web view2020. 8. 28. · Vertices represent branch points in search for unknown letter or word. Example 4. Street Surveillance. Author: Alan Tucker Created

Example 2. Spell checker graph

Vertices represent branch points in search for unknown letter or word

Page 4: tucker/AMS301-I.1-3.docx  · Web view2020. 8. 28. · Vertices represent branch points in search for unknown letter or word. Example 4. Street Surveillance. Author: Alan Tucker Created

Example 4. Street Surveillance

How many police at corners (vertices) are needed to keep all blocks (edges) under surveillance? A set of vertices incident to all edges is called an edge cover. We want a minimum edge cover.

We count 14 edges and 11 corners. A vertex can watch at most 3 incident edges (such a vertex has degree 3). So at least 14/3 = 5 vertices will be needed.

If 5 vertices could work, we must use either (i) 4 degree-3 vertices and 1 degree-2 vertex; each edge would be incident to one vertex; or (ii) 5 degree-3 vertices; one edge is double covered

Page 5: tucker/AMS301-I.1-3.docx  · Web view2020. 8. 28. · Vertices represent branch points in search for unknown letter or word. Example 4. Street Surveillance. Author: Alan Tucker Created

We will repeatedly use the AC Principle Assumptions have Consequences

Example 5. Scheduling MeetingsState legislature wants to schedule committee meetings so that any pair of committees with a common member(s) must meet at different times.

Make a graph model with vertices for committees and edges between committees with a common member. A set of committees that can meet at the same time corresponds to A set of vertices with no edges between them. (called an independent set)

Suppose we want to find a maximum independent set of vertices- a largest set of committees that could meet at the same time.

Page 6: tucker/AMS301-I.1-3.docx  · Web view2020. 8. 28. · Vertices represent branch points in search for unknown letter or word. Example 4. Street Surveillance. Author: Alan Tucker Created

Theorem: If V is the set of vertices in a graph and I is an independent set, then C= V-I is an edge cover, and conversely, I is maximum independent set if and only if C is a minimum edge cover.

Proof: Since no edge has both its ends at vertices in I, then any edge has at least one endvertex not in I, that is, in V- I.

Page 7: tucker/AMS301-I.1-3.docx  · Web view2020. 8. 28. · Vertices represent branch points in search for unknown letter or word. Example 4. Street Surveillance. Author: Alan Tucker Created

Section I.2 Isomorphism.Two graphs G and G’ are isomorphic (that is, the ‘same’ graph) if there is a 1-to-1 correspondence between their vertices so that a pair of vertices are adjacent in G if and only if the corresponding pair of vertices are adjacent in G’.

These graphs can be seen as a complete graph K4 with a hanging edge attached to one vertex of the K4. (Move 4 to upper right corner where d is.)

Consider the subgraph of vertices of deg 3. Or of deg 2.

Page 8: tucker/AMS301-I.1-3.docx  · Web view2020. 8. 28. · Vertices represent branch points in search for unknown letter or word. Example 4. Street Surveillance. Author: Alan Tucker Created

Example 2: Symmetric Graphs

If there is an isomorphism, a can be associated with any vertex in the right graph: choose a - 1. Use AC Principle to try to continue isomorphism. Neighbors of a must match up with neighbors of 1.

The complement Gc of a graph G has the same set of vertices but two vertices in G are adjacent if and only if the corresponding two vertices are not adjacent in Gc.

The edges in G and Gc together form a complete graph Kn. Two graphs are isomorphic if and only if their complements are isomorphic.

Page 9: tucker/AMS301-I.1-3.docx  · Web view2020. 8. 28. · Vertices represent branch points in search for unknown letter or word. Example 4. Street Surveillance. Author: Alan Tucker Created
Page 10: tucker/AMS301-I.1-3.docx  · Web view2020. 8. 28. · Vertices represent branch points in search for unknown letter or word. Example 4. Street Surveillance. Author: Alan Tucker Created

Theorem: The sum of the degrees of all the vertices equals 2 x (number of edges)

Corollary: Every graph has an even number of odd-degree vertices. Since the sum of the degrees must be an even number.

Example 1: In a graph with 20 edges and every vertex of degree 4, how many vertices are there? Let v denote the number of vertices Then sum(deg) = 4 + 4 + . . = v(4)

By Theorem, sum(deg) = 2x(no. of edge) = 2x20 Then 4v = 2x20. So v = 2x20/4 = 10

Example 2: How many edges e are there in Kn? Recall that Kn is the complete graph on n vertices. As in Ex. 1, sum(deg) = n-1 + n-1 + . . = n(n-1) So sum(deg) = 2e = n(n-1) and e = n(n-1)/2.

Page 11: tucker/AMS301-I.1-3.docx  · Web view2020. 8. 28. · Vertices represent branch points in search for unknown letter or word. Example 4. Street Surveillance. Author: Alan Tucker Created

Example 3: Is it possible to have a party of seven people where everyone knows exactly three other people at the party? Make graph of party with vertices for people and edges between pairs of people who know each other. Then this graph has 7 vertices, all of deg 3. Such a graph is impossible by the Corollary.

Page 12: tucker/AMS301-I.1-3.docx  · Web view2020. 8. 28. · Vertices represent branch points in search for unknown letter or word. Example 4. Street Surveillance. Author: Alan Tucker Created

Example 4: Mountain Climbers PuzzleTwo people start at locations A and Z at the same elevation on opposite sides of a mountain range whose summit is labeled M. Is it possible for the two people to move along the range below to meet at M such that they are always at the same altitude every moment.

Make a range graph with a vertex for each stopping location and an edge when one can move directly from one location to another.

Always possible because (A,Z) and (M,M) are only degree-1 vertices.

Page 13: tucker/AMS301-I.1-3.docx  · Web view2020. 8. 28. · Vertices represent branch points in search for unknown letter or word. Example 4. Street Surveillance. Author: Alan Tucker Created

Theorem: A graph is bipartite if and only if all circuits have even length (even number of edges). Proof: bipartite means that edges on a circuit alternate going from one side to the other side of the bipartitle graph. This forces circuits to be even length.

Even-circuits guarantee that an attempted bipartition will work.