Graph Theory and Algorithms 1 DM Notes1CMrsLenox.

Slides:



Advertisements
Similar presentations
Great Theoretical Ideas in Computer Science
Advertisements

Greedy Algorithms Clayton Andrews 2/26/08. What is an algorithm? “An algorithm is any well-defined computational procedure that takes some value, or set.
Chapter 7 Graph Theory 7.1 Modeling with graphs and finding Euler circuits. Learning Objectives: Know how to use graphs as models and how to determine.
Section 14.1 Intro to Graph Theory. Beginnings of Graph Theory Euler’s Konigsberg Bridge Problem (18 th c.)  Can one walk through town and cross all.
13.4 Map Coloring and the Four Color Theorem. We started this chapter by coloring the regions formed by a set of circles in the plane. But when do we.
Polynomial Time Approximation Schemes Presented By: Leonid Barenboim Roee Weisbert.
Ant colony algorithm Ant colony algorithm mimics the behavior of insect colonies completing their activities Ant colony looking for food Solving a problem.
Section 1.7: Coloring Graphs
CS774. Markov Random Field : Theory and Application Lecture 17 Kyomin Jung KAIST Nov
Great Theoretical Ideas in Computer Science.
Last time: terminology reminder w Simple graph Vertex = node Edge Degree Weight Neighbours Complete Dual Bipartite Planar Cycle Tree Path Circuit Components.
The Instant Insanity Game
Graph Algorithms: Minimum Spanning Tree We are given a weighted, undirected graph G = (V, E), with weight function w:
Chapter 9: Greedy Algorithms The Design and Analysis of Algorithms.
Graph Colouring Lecture 20: Nov 25.
Computability and Complexity 24-1 Computability and Complexity Andrei Bulatov Approximation.
Two Discrete Optimization Problems Problem #2: The Minimum Cost Spanning Tree Problem.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 25 Instructor: Paul Beame.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Minimum Spanning Trees. Subgraph A graph G is a subgraph of graph H if –The vertices of G are a subset of the vertices of H, and –The edges of G are a.
Graph Coloring.
Chapter 9.8 Graph Coloring
CS 2813 Discrete Structures
9.8 Graph Coloring. Coloring Goal: Pick as few colors as possible so that two adjacent regions never have the same color. See handout.
Math for Liberal Studies.  Here is a map of the parking meters in a small neighborhood  Our goal is to start at an intersection, check the meters, and.
Domain decomposition in parallel computing Ashok Srinivasan Florida State University COT 5410 – Spring 2004.
Slide 14-1 Copyright © 2005 Pearson Education, Inc. SEVENTH EDITION and EXPANDED SEVENTH EDITION.
1 Excursions in Modern Mathematics Sixth Edition Peter Tannenbaum.
Graph Theory Topics to be covered:
5.1  Routing Problems: planning and design of delivery routes.  Euler Circuit Problems: Type of routing problem also known as transversability problem.
Ant colony algorithm Ant colony algorithm mimics the behavior of insect colonies completing their activities Ant colony looking for food Solving a problem.
Graph Colouring L09: Oct 10. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including the famous.
MAT 2720 Discrete Mathematics Section 8.7 Planar Graphs
1 12/2/2015 MATH 224 – Discrete Mathematics Formally a graph is just a collection of unordered or ordered pairs, where for example, if {a,b} G if a, b.
Chapter 10.8 Graph Coloring
Sec. 5.1: Planarity & Coloring
Graph.
CS270 Project Overview Maximum Planar Subgraph Danyel Fisher Jason Hong Greg Lawrence Jimmy Lin.
1.5 Graph Theory. Graph Theory The Branch of mathematics in which graphs and networks are used to solve problems.
Graph Colouring Lecture 20: Nov 25. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including.
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
CIRCUITS, PATHS, AND SCHEDULES Euler and Königsberg.
Graphs. Graph Definitions A graph G is denoted by G = (V, E) where  V is the set of vertices or nodes of the graph  E is the set of edges or arcs connecting.
Chapter 10.8 Graph Coloring These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7 th ed., by Kenneth.
Classwork Quiz Worksheet Homework (day 54) Worksheet (1-7) Walks, Paths and Circuits SOL: DM.1.
1 3/21/2016 MATH 224 – Discrete Mathematics First we determine if a graph is connected.
Turn in HW and Classwork sheet from last class. You have 10 minutes to complete the warm- up. After the warm-up, we will finish our notes on algorithms.
Graph Coloring: Background and Assignment Networked Life NETS 112 Fall 2014 Prof. Michael Kearns.
On the Ability of Graph Coloring Heuristics to Find Substructures in Social Networks David Chalupa By, Tejaswini Nallagatla.
Excursions in Modern Mathematics Sixth Edition
Excursions in Modern Mathematics Sixth Edition
Graph Coloring Lots of application – be it mapping routes, coloring graphs, building redundant systems, mapping genes, looking at traffic patterns (see.
BackTracking CS255.
Redraw these graphs so that none of the line intersect except at the vertices B C D E F G H.
HAMILTONIAN CIRCUIT ALGORITHMS

What is the next line of the proof?
Great Theoretical Ideas in Computer Science
CS200: Algorithm Analysis
Discrete Mathematics for Computer Science
Graph Theory Graph Colorings.
Graph Theory.
Graph Theory Unit 2.
Chapter 10.8 Graph Coloring
Chapter 10.8 Graph Coloring
Chapter 10.8 Graph Coloring
MAT 2720 Discrete Mathematics
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Chapter 10.8 Graph Coloring
Dominating Set By Eric Wengert.
Presentation transcript:

Graph Theory and Algorithms 1 DM Notes1CMrsLenox

 I can solve chromatic number problems using graphs and existing algorithms.. DM Notes1CMrsLenox 2

 Trial and error is generally how humans approach problems… Hmmm… pants, socks and shoes. Shoes then socks then pants? Socks,then pants then shoes? Shoes then pants then socks? DM Notes1CMrsLenox 3

 And if you do something enough, you generally settle on a procedure (algorithm)  In the previous example, a getting dressed algorithm would be pants then socks then shoes, or socks then pants then shoes.  Algorithms are an ordered series of steps, also called procedures. DM Notes1CMrsLenox 4

 If we did these problems for a long time, most of us would develop a process or procedure on how to solve the problem.  The discrete math we will cover is generally people publishing the procedures (algorithms) they have found useful for a specific type of problem. Most of these algorithms become computer programs so that humans do the thinking part, and computers do the computing part. DM Notes1CMrsLenox 5

 Optimal: The procedure will give the best solution to that kind of problem.  Efficient: The procedure doesn’t require too much time or effort.  Approximate: Fairly good and efficient. DM Notes1CMrsLenox 6

 If you try every possible way of doing something, you will find the best answer  For a 10 vertex connected graph, there are up to 10! sequences ( ) or different ways to run the problem.  Exhaustive is not used for the graph problems we do in this course unless the vertex number is REALLY small. I will not make you do a problem different ways so you know you got the best answer DM Notes1CMrsLenox 7

Greedy Algorithm  Step 1. Assign the first color to the first vertex  Step 2. Choose the next vertex. If it is adjacent to v, give it a new color. When selecting colors, see if the first one you used will work, then the second color used, etc.  Step 3 Keep repeating. DM Notes1CMrsLenox 8

 Note: We could get different answers using this.  Efficient doesn’t guarantee we will get the best answer using it, just that it doesn’t take much work to do. DM Notes1CMrsLenox 9

10

 The greedy algorithm is fast to use, but the answer may or may not be the best answer.  So, a new efficient (though not quite as efficient) algorithm is developed, which usually means steps to fix a problem with the old one are added. Approximate describes these. DM Notes1CMrsLenox 11

A vertex’s degree is the number of edges that touch it. BACD DM Notes1CMrsLenox 12

 A:4 B:3 C:3  B: 1 DM Notes1CMrsLenox 13 A B C A B IS A 2 or 3?

 1. Assign color 1 to the vertex with the highest degree  2. Also assign color 1 to any vertex not connected to that vertex that you legally can.  3. Assign color 2 to the vertex with the next highest degree that is not already colored.  Also assign color 2 to any vertex not connected to that vertex that you legally can.  repeat…. DM Notes1CMrsLenox 14

1.Degree of vertices 2. Ascending Priority list 3. Use to priority list to assign colors – a.To all not connected b.Cross out colored  Degrees next AB D C E F GH IJ DM Notes1CMrsLenox 15

1.Degree of vertices 2. Ascending Priority list 3. Use to priority list to assign colors – a.To all not connected b.Cross out colored  A:2 B:3 C:3 D:3 E:1  F:3 G:5 H:2 I:3 J: 1  Start with G! Color next. AB D C E F GH IJ DM Notes1CMrsLenox 16

1.Degree of vertices 2. Ascending Priority list 3. Use to priority list to assign colors – a.To all not connected that you can b.Cross out colored A:2 B:3 C:3 D:3 E:1 F:3 G:5 H:2 I:3 J: 1  Cross of the colored ones. AB D C E F GH IJ DM Notes1CMrsLenox 17

1.Degree of vertices 2. Ascending Priority list 3. Use to priority list to assign colors – a.To all not connected b.Cross out colored A:2 B:3 C:3 D:3 E:1 F:3 G:5 H:2 I:3 J: 1  Highest left is C,D,I or F. I choose C. Colored Next. AB D C E F GH IJ DM Notes1CMrsLenox 18

1.Degree of vertices 2. Ascending Priority list 3. Use to priority list to assign colors – a.To all not connected b.Cross out colored A:2 B:3 C:3 D:3 E:1 F:3 G:5 H:2 I:3 J: 1 AB D C E F GH IJ DM Notes1CMrsLenox 19

 Find the vertex with the highest degree.  Color it. Also color every other vertex you can that color.  Looking at the subgraph of currently uncolored vertices, repeat step.  Continue until everything is colored. DM Notes1CMrsLenox 20

 In the old days, the more colors a map had, the more expensive it was to make the map.  Map makers and math guys spent a lot of time trying to figure out a good procedure for coloring maps that used as few colors as possible. This is the chromatic number problem. (Borders are edges, countries are vertices). DM Notes1CMrsLenox 21

 A conjecture (educated but unproven belief) is that no planar map requires more than 4 colors.  Algorithmoncomputer Algorithmoncomputer DM Notes1CMrsLenox 22 Planar maps include geography maps. I can draw them as dots and edges without the edges crossing over each other.

Chromatic numbers really were about coloring originally Graphs and matrices can be used to find solutions to different types of problems Algorithms are step by step procedures to solve different types of problems. The greedy algorithm and Welsh Powell algorithms are popular map coloring algorithms. DM Notes1CMrsLenox 23