Some applications of graph theory

Slides:



Advertisements
Similar presentations
22C:19 Discrete Math Graphs Fall 2010 Sukumar Ghosh.
Advertisements

Introduction to Graph Theory Instructor: Dr. Chaudhary Department of Computer Science Millersville University Reading Assignment Chapter 1.
22C:19 Discrete Math Graphs Fall 2014 Sukumar Ghosh.
Some applications of graph theory. More on the Four Color Problem.
Solving Graph Problems with Boolean Methods Randal E. Bryant Carnegie Mellon University.
Shortest Paths and Dijkstra's Algorithm CS 110: Data Structures and Algorithms First Semester,
Graph II MST, Shortest Path. Graph Terminology Node (vertex) Edge (arc) Directed graph, undirected graph Degree, in-degree, out-degree Subgraph Simple.
Last time: terminology reminder w Simple graph Vertex = node Edge Degree Weight Neighbours Complete Dual Bipartite Planar Cycle Tree Path Circuit Components.
The Theory of NP-Completeness
Graph Colouring Lecture 20: Nov 25.
© 2006 Pearson Addison-Wesley. All rights reserved14 B-1 Chapter 14 (continued) Graphs.
22C:19 Discrete Math Graphs Spring 2014 Sukumar Ghosh.
Dijkstras Algorithm Named after its discoverer, Dutch computer scientist Edsger Dijkstra, is an algorithm that solves the single-source shortest path problem.
Graph Theory Topics to be covered:
May 1, 2002Applied Discrete Mathematics Week 13: Graphs and Trees 1News CSEMS Scholarships for CS and Math students (US citizens only) $3,125 per year.
Representing and Using Graphs
Graphs. Definitions A graph is two sets. A graph is two sets. –A set of nodes or vertices V –A set of edges E Edges connect nodes. Edges connect nodes.
Most of contents are provided by the website Graph Essentials TJTSD66: Advanced Topics in Social Media.
Graph Colouring Lecture 20: Nov 25. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including.
Some applications of graph theory
Graphs Part II Lecture 7. Lecture Objectives  Topological Sort  Spanning Tree  Minimum Spanning Tree  Shortest Path.
NPC.
Grade 11 AP Mathematics Graph Theory Definition: A graph, G, is a set of vertices v(G) = {v 1, v 2, v 3, …, v n } and edges e(G) = {v i v j where 1 ≤ i,
Graphs – Part III CS 367 – Introduction to Data Structures.
Presented By Ravindra Babu, Pentyala.  Real World Problem  What is Coloring  Planar Graphs  Vertex Coloring  Edge Coloring  NP Hard Problem  Problem.
Graphs. Representations of graphs : undirected graph An undirected graph G have five vertices and seven edges An adjacency-list representation of G The.
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
EECS 203 Lecture 19 Graphs.
Shortest Path Problems
Richard Anderson Lecture 26 NP-Completeness
Redraw these graphs so that none of the line intersect except at the vertices B C D E F G H.
Graph Theory CSRU1400, Fall 2007 Ellen Zhang.
SULE SOLMAZ BEYZA AYTAR
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
EECS 203 Lecture 20 More Graphs.
Great Theoretical Ideas in Computer Science
Discrete Maths 9. Graphs Objective
Network Routing.
Shortest Paths Discrete Mathematics and Its Applications (7th Edition)
Discrete Mathematics for Computer Science
Discrete Mathematics and Its Applications (5th Edition)
Graph Theory Graph Colorings.
Graph Algorithm.
Introduction to Graph Theory Euler and Hamilton Paths and Circuits
Graph.
Graphs Chapter 13.
Richard Anderson Lecture 25 NP-Completeness
Shortest Paths Discrete Mathematics and Its Applications (7th Edition)
CSE 373: Data Structures and Algorithms
Richard Anderson Lecture 28 NP-Completeness
Discrete Math II Howon Kim
Chapter 11 Graphs.
A path that uses every vertex of the graph exactly once.
Discrete Mathematics and Its Applications (5th Edition)
Route Inspection Which of these can be drawn without taking your pencil off the paper and without going over the same line twice? If we introduce a vertex.
Discrete Mathematics Lecture 13_14: Graph Theory and Tree
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Shortest Path Algorithm for Weighted Non-negative Undirected Graphs
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Hamilton Paths and Hamilton Circuits
CE 221 Data Structures and Algorithms
Dijkstra's Shortest Path Algorithm
CE 221 Data Structures and Algorithms
Chapter 14 Graphs © 2011 Pearson Addison-Wesley. All rights reserved.
Shortest Paths Discrete Mathematics and Its Applications (8th Edition)
Graphs: Shortest path and mst
Shortest Paths Discrete Mathematics and Its Applications (7th Edition)
Graph Algorithm.
Shortest Paths Discrete Mathematics and Its Applications (7th Edition)
Prof. Ramin Zabih Graph Traversal Prof. Ramin Zabih
Presentation transcript:

Some applications of graph theory

More on the Four Color Problem

The four color theorem was stated, but not proved, in 1853 by Francis Guthrie.

The theorem asserts that four colors are enough to color any geographical map in such a way that no neighboring two countries are of the same color.

Other applications? Beyond the mathematical issues in connection with this theorem, coloring question have wider practical applicationsespecially for mobile phones. They make it possible to effectively reduce the number of used broadcasting frequencies, equivalent to the colors.

A long road… Tait's conjecture:(1886) Every polyhedron has a Hamiltonian cycle ================= (along the edges) through ALL the vertices.

Polyhedra The Steinitz theorem (1894) for polyhedra states that every simple 3-connected planar graph is a polyhedral graph of a 3-dimensional polytope and vice versa.

If Tait’s conjecture were true… it would prove the 4-color theorem: any planar trivalent graph with a Hamiltonian cycle has a 3-coloring of the edges, which is equivalent to having a 4-coloring of faces. Proof: color the Hamiltonian cycle alternately yellow and red. All other edges are diagonals of this polygon, & can be blue. code the edge colors as (0,1) (1,0) and (1,1); then color any face (0,0), and color the rest by crossing over edges using vector addition [mod 2]. This gives a face-coloring in (0,0) (0,1) (1,0) & (1,1).

Tutte’s counterexample A non-Hamiltonian 3-connected cubic graph given by Tutte (1946) as a counterexample to Tait's Hamiltonian graph conjecture using three copies of the Walther graph.

Appel and Haken’s proof (1972) reduced the infinitude of possible maps to 1,936 reducible configurations (later reduced to 1,476). These had to be checked one by one by computer ... This reducibility part of the work was independently double checked with different programs and computers. … the unavoidability part of the proof was verified in over 400 pages of microfiche, which had to be checked by

Proof by ...computer Automated theorem proving has become a cottage industry. Human beings are still required to give meaning to what the computers do… Curiously, “proof assistants” are also used in studying software reliability.

Recent work on map coloring

Finding the shortest path

Path from vertex V to vertex W f: edge weight function f(p) Minimize sum of f(p) over all possible paths Shortest path algorithms are applied in an obvious way to automatically find directions between physical locations, such as driving directions on web mapping websites like Mapquest. For example, if vertices represent the states of a puzzle like a Rubik's Cube and each directed edge corresponds to a single move or turn, shortest path algorithms can be used to find a solution that uses the minimum possible number of moves

The traveling salesman problem find shortest path that goes through every vertex exactly once, and returns to the start. Unlike the shortest path problem, this problem is NP-complete and is believed not to be efficiently solvable

Dijkstra’s algorithm

Dijkstra’s the running time is O(|V|2+|E|)=O(|V|2).

Dijkstra’s algorithm Create distance list, previous vertex list, visited list, and current vertex. All values in distance list set to infinity except starting vertex to zero. All values in visited list are set to false. All values in the previous list are set to a special value signifying that they are undefined, such as null. Current vertex is set as the starting vertex. Mark the current vertex as visited. Update distance and previous lists based on those vertices which can be immediately reached from the current vertex. Update the current vertex to the unvisited vertex that can be reached by the shortest path from the starting vertex. Repeat (from step 6) until all nodes are visited.

: function Dijkstra(Graph, source): 2: for each vertex v in Graph: // Initialization 3: dist[v] := infinity // initial distance from source to vertex v is set to infinite 4: previous[v] := undefined // Previous node in optimal path from source 5: dist[source] := 0 // Distance from source to source 6: Q := the set of all nodes in Graph // all nodes in the graph are unoptimized - thus are in Q 7: while Q is not empty: // main loop 8: u := node in Q with smallest dist[ ] 9: remove u from Q 10: for each neighbor v of u: // where v has not yet been removed from Q. 11: alt := dist[u] + dist_between(u, v) 12: if alt < dist[v] // Relax (u,v) 13: dist[v] := alt 14: previous[v] := u 15: return previous[ ]

Dijkstra demo on youtube

Dijkstra applets

SPA: the pineapple express

[Find the shortest path from Honolulu to London] [Honolulu -> Chicago -> Boston -> London] [Honolulu -> SF -> NY -> London] [Honolulu -> LA -> NY -> London] [Honolulu -> LA -> ATL -> London]

Traveling salesman problem The case of Sweden

The Traveling Salesman Problem

World tour

Social Networks, Part II Every social network can be expressed as a graph. For example, consider the graph whose vertices are people and they are joined by an edge if the people have shared a handshake. What is the average path distance along this graph to the president of the united states? What is the maximum path distance?

Small world graphs

Obama is 6'1 and was the 44th president of the US

Warning: it’s not different people every time! What is the probability of being two handshakes away from the president? President shakes hands about 65,000 times a year (100-250 per day). Assuming that most of the people the President meets are Americans, that means that about 1 in 4,615 Americans meets the President every year (300 million divided by 64,875). Warning: it’s not different people every time!

Thanks to George Hickenlooper, your instructor is two handshakes from the former president

How many handshakes is your math teacher Barack Obama? A) 1 – he has shaken hands with Obama B) 2 – he has shaken hands with someone who has shaken hands with Obama C) at least three – he has never shaken hans with anyone who has shaken hands with Obama

Trump and Lakey

Lakey and Bill

The Venkers

Schlafly and Trump

Schlafly and Venker

So… Lakey -> Venker -> Schlafly -> Trump, Possibly… Lakey -> Venker -> Trump

How many handshakes is Lakey from Donald Trump A) He has shaken hands with Trump B) He may have shaken hands with someone who has shaken hands with Donald Trump C) He has definitely shaken hands with someone who has shaken hands with someone who has shaken hands with Donald Trump

Small world graphs

What’s your Kevin Bacon number? Bela Lugosi, has a Bacon number of 3: 1. Bela Lugosi was in Abbott and Costello Meet Frankenstein (1948) with Vincent Price 2. Vincent Price was in The Raven (1963) with Jack Nicholson 3. Jack Nicholson was in A Few Good Men (1992) with Kevin Bacon

Cinema Finder Problem: Find an actor who has as large a Kevin Bacon number as possible http://oracleofbacon.org/

Which actor has the highest Kevin Bacon number A) Tom Hanks B) Will Smith C) George Hickenlooper D) Meryl Streep E) Leanne Lakey

What’s your Erdös number? Lakey has an Erdös number of 3: 1. Lakey coauthored with Guido L. Weiss 2. Weiss coauthored with Charles C.K. Chui 3. Chui coauthored with Paul Erdös

Lakey’s Erdös number A) 1, Lakey wrote a paper with Erdös B) 2, Lakey wrote a paper with Charles C.K. Chui who wrote a paper with Erdös C) 3, Lakey wrote a paper with Guido Weiss, who wrote a paper with Charles C.K. Chui who wrote a paper with Erdös D) At least 4

Exercise: Draw a wheel graph that has 10 vertices in which each vertex is connected with its “nearest neighbor” and its “next nearest neighbor by an edge. What is the shortest path between vertex 1 and vertex 6? What is the maximum path distance between any two vertices on the graph? For each vertex n=1…5, flip a coin. If it comes up tails leave the connection with vertex n+1. If it comes up heads, change the edge between vertices n and n+1 to a an edge between vertex n and n+5. Find the maximum path distance between any two vertices on the new graph.