Discrete Mathematics 6. GRAPHS Lecture 10 Dr.-Ing. Erwin Sitompul

Slides:



Advertisements
Similar presentations
Numbers Treasure Hunt Following each question, click on the answer. If correct, the next page will load with a graphic first – these can be used to check.
Advertisements

Mathematical Preliminaries
AP STUDY SESSION 2.
1
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
Objectives: Generate and describe sequences. Vocabulary:
UNITED NATIONS Shipment Details Report – January 2006.
CSE 211 Discrete Mathematics
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Properties of Real Numbers CommutativeAssociativeDistributive Identity + × Inverse + ×
Custom Statutory Programs Chapter 3. Customary Statutory Programs and Titles 3-2 Objectives Add Local Statutory Programs Create Customer Application For.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt BlendsDigraphsShort.
1 Click here to End Presentation Software: Installation and Updates Internet Download CD release NACIS Updates.
Break Time Remaining 10:00.
Turing Machines.
Table 12.1: Cash Flows to a Cash and Carry Trading Strategy.
PP Test Review Sections 6-1 to 6-6
EU market situation for eggs and poultry Management Committee 20 October 2011.
Bright Futures Guidelines Priorities and Screening Tables
EIS Bridge Tool and Staging Tables September 1, 2009 Instructor: Way Poteat Slide: 1.
Outline Minimum Spanning Tree Maximal Flow Algorithm LP formulation 1.
Bellwork Do the following problem on a ½ sheet of paper and turn in.
Exarte Bezoek aan de Mediacampus Bachelor in de grafische en digitale media April 2014.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
Graphs, representation, isomorphism, connectivity
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
Adding Up In Chunks.
CS1022 Computer Programming & Principles Lecture 7.1 Graphs (1)
KNURE, Software department, Ph , N.V. Bilous Faculty of computer sciences Software department, KNURE An Euler.
Discrete Mathematics 3. MATRICES, RELATIONS, AND FUNCTIONS Lecture 5 Dr.-Ing. Erwin Sitompul
Discrete Mathematics Dr.-Ing. Erwin Sitompul
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
Model and Relationships 6 M 1 M M M M M M M M M M M M M M M M
Copyright © Cengage Learning. All rights reserved.
1 hi at no doifpi me be go we of at be do go hi if me no of pi we Inorder Traversal Inorder traversal. n Visit the left subtree. n Visit the node. n Visit.
Analyzing Genes and Genomes
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Clock will move after 1 minute
Intracellular Compartments and Transport
PSSA Preparation.
Essential Cell Biology
Immunobiology: The Immune System in Health & Disease Sixth Edition
Physics for Scientists & Engineers, 3rd Edition
Energy Generation in Mitochondria and Chlorplasts
Murach’s OS/390 and z/OS JCLChapter 16, Slide 1 © 2002, Mike Murach & Associates, Inc.
Based on slides by Y. Peng University of Maryland
Chapter 9 Graphs.
22C:19 Discrete Math Graphs Fall 2010 Sukumar Ghosh.
22C:19 Discrete Math Graphs Fall 2014 Sukumar Ghosh.
Graph-02.
22C:19 Discrete Math Graphs Spring 2014 Sukumar Ghosh.
GRAPH Learning Outcomes Students should be able to:
CS 200 Algorithms and Data Structures
Planar Graphs Graph Coloring
Discrete Mathematical Structures: Theory and Applications
Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins.
MAT 2720 Discrete Mathematics Section 8.2 Paths and Cycles
Discrete Mathematics EXERCISES Lecture 11 Dr.-Ing. Erwin Sitompul
Homework 8 Graph G is given by the figure below.
Graph theory Definitions Trees, cycles, directed graphs.
Konigsberg- in days past.
Presentation transcript:

Discrete Mathematics 6. GRAPHS Lecture 10 Dr.-Ing. Erwin Sitompul

10/2 Erwin SitompulDiscrete Mathematics Homework 9 Graph G is given by the figure below. (a)List all possible paths from A to C. (b) List all possible circuits. (c)Write down at least 4 cut sets of the graph. (d)Draw the subgraph G 1 = {B,C,X,Y}. (e)Draw the complement of subgraph G 1. Graph G

10/3 Erwin SitompulDiscrete Mathematics Solution of Homework 9 (a) All possible paths from A to C. Graph G (A,X,Y,C) and (A,X,B,Y,C) (b) All possible circuits. (B,X,Y,B) (c) At least 4 cut sets of the graph. {(A,Z) }, {(A,X) },{(C,Y)}, {(A,Z),(A,X)}, {(B,X),(B,Y)}, {(B,X),(X,Y)}

10/4 Erwin SitompulDiscrete Mathematics Solution of Homework 9 (d)Subgraph G 1 = {B,C,X,Y}. (e)Complement of subgraph G 1. Graph G

10/5 Erwin SitompulDiscrete Mathematics Bipartite Graph  If the vertices of graph G can be separated into two subsets V 1 and V 2, such that every edge of G connects a vertex in V 1 to a vertex in V 2, then G is called a bipartite graph.  Bipartite graph is denoted as as G(V 1,V 2 ). V1V1 V2V2

10/6 Erwin SitompulDiscrete Mathematics  Is this graph a bipartite graph? Bipartite Graph  Yes, because the vertices can be divided into two subsets V 1 = {a,b,d} and V 2 = {c,e,f,g}.

10/7 Erwin SitompulDiscrete Mathematics Isomorphic Graph  Graphs that are actually identical but geometrically different are called isomorphic.  Two graphs G 1 and G 2 are isomorphic if there is a one-to-one correspondence between vertices of the two graphs that preserves the adjacency relationship.  In other words, suppose the edge e is incident to vertex u and vertex v in G 1, then the corresponding edge e’ must be incident to vertex u’ and vertex v’ in G 2.  Two isomorphic graphs are identical graphs, different only in the naming of the vertices and edges or the geometrical representation only.

10/8 Erwin SitompulDiscrete Mathematics Isomorphic Graph Graph (a) and graph (b) are isomorphic Graph (a) and graph (c) are not isomorphic

10/9 Erwin SitompulDiscrete Mathematics Isomorphic Graph 2 isomorphic graphs 3 isomorphic graphs

10/10 Erwin SitompulDiscrete Mathematics Isomorphic Graph  From the definition of isomorphic graphs, it can be concluded that if two graphs are isomorphic, then both of them: 1. Have the same number of vertices. 2. Have the same number of edges. 3. Have the same number of vertices of each degree.  The 3 conditions listed above are necessary conditions, but not sufficient conditions.  Further visual inspection is required, as can be seen from the example below. The 3 conditions are met but both graphs are not isomorphic.

10/11 Erwin SitompulDiscrete Mathematics  A graph is called planar if it can be drawn in a plane without any edges crossing (where a crossing of edges is the intersection of the arcs representing them at a point other than their common vertices).  Such a drawing is called a planar representation of the graph.  If there is any edges crossing, then the graph called non- planar. Planar graph, the crossing edges can be rearranged and the graph can be redrawn without crossing Planar Graph

10/12 Erwin SitompulDiscrete Mathematics Example of non-planar graph Planar Graph Example of planar graph

10/13 Erwin SitompulDiscrete Mathematics  A planar graph which is drawn without any edges crossing is called a plane graph. Graph (a), (b), (c) are planar graphs Graph (b), (c) are plane graphs Plane Graph

10/14 Erwin SitompulDiscrete Mathematics Euler Path and Euler Circuit  An Euler path in a graph is a path that contains every edge of the graph exactly once.  An Euler circuit in a graph is a circuit that contains every edge of a graph exactly once.  A graph that contains Euler path is also called semi-Eulerian graph.  A graph that contains Euler circuit is also called Eulerian graph.

10/15 Erwin SitompulDiscrete Mathematics Euler Path and Euler Circuit Example:  Euler path in graph (a): 3, 1, 2, 3, 4, 1.  Euler path in graph (b): 1, 2, 4, 6, 2, 3, 6, 5, 1, 3, 5.  Euler circuit in graph (c): 1, 2, 3, 4, 7, 3, 5, 7, 6, 5, 2, 6, 1.  Graph (a) and (b) are semi-Eulerian graph.  Graph (c) is an Eulerian graph.

10/16 Erwin SitompulDiscrete Mathematics Euler Path and Euler Circuit  Graph (d) is an Eulerian graph.  Graph (e) is neither semi-Eulerian nor Eulerian graph.  Graph (f) is a semi-Eulerian graph. Example:  Euler circuit in graph (d): a, c, f, e, c, b, d, e, a, d, f, b, a.  Graph (e) contains neither Euler path nor Euler circuit.  Graph (f) contains Euler path.

10/17 Erwin SitompulDiscrete Mathematics Euler Path and Euler Circuit Theorem: An undirected graph G contains Euler path if and only if it is connected and has two vertices of odd degree or does not have any vertices of odd degree at all. Theorem: An undirected graph G contains Euler circuit if and only if it is connected and each of its vertices has even degree.  In other words: An undirected graph G is an Eulerian graph if and only if the degree of every vertex is even.

10/18 Erwin SitompulDiscrete Mathematics Euler Path and Euler Circuit Theorem: A directed graph G contains Euler circuit if and only if G is connected and for each vertex, the in-degree and out-degree are the same. Theorem: A directed graph G contains Euler path if and only if G is connected and for each vertex, the in-degree and out-degree are the same, except two vertices, where the first vertex’s out- degree is one greater than the in-degree and the second vertex’s in-degree is one greater than the out-degree.

10/19 Erwin SitompulDiscrete Mathematics Euler Path and Euler Circuit Example: (a) An Eulerian digraph: a, g, c, b, g, e, d, f, a. (b) A semi-Eulerian digraph: d, a, b, d, c, b. (c) A digraph, but neither Eulerian nor semi-Eulerian.

10/20 Erwin SitompulDiscrete Mathematics Euler Path and Euler Circuit Example : Is it possible to draw the graph below, by starting from any vertex, and without drawing any line twice? Solution : Yes, possible. All the vertices in the undirected graph above are of even degree. Therefore, the Euler circuit can be drawn. The graph is an Eulerian graph.

10/21 Erwin SitompulDiscrete Mathematics Bridges of Königsberg (Euler, 1736)  Can someone pass every bridge exactly once and come back the his/her original position? Solution : No, impossible. The degrees d(A) = 5, d(B) = 3, d(C) = 3, d(D) = 3  4 vertices of odd degree. The Euler circuit cannot be drawn.

10/22 Erwin SitompulDiscrete Mathematics Hamilton Path and Hamilton Circuit  A Hamilton path in a graph is a path that passes every vertex of the graph exactly once.  A Hamilton circuit in a graph is a circuit that passes every vertex of the graph exactly once, except one vertex which is the origin and (at the same time) the destination, is passed twice.  A graph that contains Hamilton path is also called semi- Hamiltonian graph.  A graph that contains Hamilton circuit is also called Hamiltonian graph.

10/23 Erwin SitompulDiscrete Mathematics Hamilton Path and Hamilton Circuit Example:  Graph (a) contains Hamilton paths: i.e., 3, 2, 1, 4.  Graph (b) contains Hamilton circuits: i.e., 1, 2, 3, 4, 1.  Graph (c) does not contain either Hamiltonian path or Hamiltonian circuit.

10/24 Erwin SitompulDiscrete Mathematics Example: Find a Hamilton circuit in the following graph. Hamilton Path and Hamilton Circuit

10/25 Erwin SitompulDiscrete Mathematics Theorem: A sufficient condition for a graph G with the number of vertices n  3 to be a Hamiltonian graph is that the degree of each vertex v in G to be at least n/2, or d(v)  n/2. Hamilton Path and Hamilton Circuit

10/26 Erwin SitompulDiscrete Mathematics Paths and Circuits  Graph (a) contains Euler path only.  Graph (b) contains Euler path and Hamilton circuit.  Graph (c) contains Euler circuit and Hamilton circuit.  A graph can contain Euler circuit/path and Hamilton circuit/path simultaneously.  A graph can also only contain Euler circuit/path or Hamilton circuit/path.

10/27 Erwin SitompulDiscrete Mathematics Applications of Graphs  Travelling salesman problem.  Chinese postman problem.  Graph coloring.

10/28 Erwin SitompulDiscrete Mathematics Travelling Salesman Problem (TSP)  For this problem, a number of cities and the distances between them are given.  Determine the shortest circuit that must be traveled by a salesman if he departs from a city of origin and stop by in each city exactly once and goes back to the city of origin.  This is a problem of how to find a Hamilton circuit with the minimum weight (distance).

10/29 Erwin SitompulDiscrete Mathematics  Mr. Postman collects the letters for mailboxes which are distributed in n locations in a certain town.  The robot arm fastens n bolts of a car in an assembly line.  Production process of n different products in one cycle. Applications of TSP

10/30 Erwin SitompulDiscrete Mathematics Applications of TSP Example: Determine the shortest Hamilton circuit in the following graph. Solution: There are 3 Hamilton circuits in the given graph above.

10/31 Erwin SitompulDiscrete Mathematics Applications of TSP  P 1 = (a, b, c, d, a) or (a, d, c, b, a) Total weight = = 45  P 2 = (a, b, d, c, a) or (a, c, d, b, a) Total weight = = 41  P 3 = (a, c, b, d, a) or (a, d, b, c, a) Total weight = = 32  Shortest Hamilton circuit: P 3

10/32 Erwin SitompulDiscrete Mathematics Chinese Postman Problem  The problem was first discussed by Mei Gan in  Problem: A postman will deliver the letters to the addresses in a part of a city. How should he plan the route of his journey so that he can pass each street exactly once and go back to the place where he starts his journey?  This is a problem of how to find an Euler circuit in a graph.

10/33 Erwin SitompulDiscrete Mathematics  If the graph of the problem is an Eulerian graph, then the Euler circuit can easily be found.  If the graph of the problem is not an Eulerian graph, then some edges in the graph must be passed more than once.  So, the postman must find a circuit that passes every street at least once with the shortest distance possible.  Chinese Postman Problem becomes: A postman will deliver the letters to the addresses in a part of a city. How should he plan his route so that:  The route has the shortest distance.  The postman passes every street at least once.  The postman goes back to his original position. Chinese Postman Problem

10/34 Erwin SitompulDiscrete Mathematics Example: Determine the best path that can be chosen by a postman so that he can pass every edge of the following graph at least once. Solution: The path that should be chosen by the postman is: A, B, C, D, E, F, C, E, B, F, A Weight = = 43. Chinese Postman Problem

10/35 Erwin SitompulDiscrete Mathematics Graph Coloring  A graph is colored in such a way that each vertex is given a color while two adjacent vertices may not have the same color.

10/36 Erwin SitompulDiscrete Mathematics Graph Coloring  Chromatic Number: the minimum number of colors required to color a graph.  Symbol:  (G), pronounced “k-eye”.  A graph G with chromatic number k is denoted as  (G) = k.  The graph below has  (G) = 3.

10/37 Erwin SitompulDiscrete Mathematics Application of Graph Coloring  Map Coloring  A map consists of a number of regions.  A map should be colored in such a way that two neighboring regions must have different colors.

10/38 Erwin SitompulDiscrete Mathematics  The regions are represented by the vertices, and the border between two neighboring regions is represented by an edge.  Coloring a region in a map means coloring the vertex in the corresponding graph.  Neighboring regions must have different colors  The color of every incident vertices must be different. Application of Graph Coloring

10/39 Erwin SitompulDiscrete Mathematics Application of Graph Coloring MapGraph representation Graph coloring, 8 different colors Graph coloring, 4 different colors Map and corresponding graph representation

10/40 Erwin SitompulDiscrete Mathematics Application of Graph Coloring  Scheduling  Suppose there are eight IE students batch 2009 (1, 2, …, 8) and five lectures available to be chosen (A, B, C, D, E).  The following table shows the matrix of five lectures and eight students.  Value 1 in a cell (i, j) means student i takes lecture j.  Value 0 means student i does not take lecture j.

10/41 Erwin SitompulDiscrete Mathematics Application of Graph Coloring  Problem: If in one day there may only be one exam, what is the minimum number of days required to schedule the exams such that every student can take his/her exams without any time conflicts?  Solution: vertex  lecture edge  there is at least one student who takes both lectures (which are connected by the edge)

10/42 Erwin SitompulDiscrete Mathematics Application of Graph Coloring Graph of exam schedule problem The result of graph coloring  The chromatic number is 2.  The exams of lectures A, E, and D can be conducted together in one day.  The exams of lectures B and C should be conducted in another day.

10/43 Erwin SitompulDiscrete Mathematics Homework 10, No.1 Take a look at the graphs (a), (b), and (c).  Determine whether each graph is an Eulerian graph, semi- Eulerian graph, Hamiltonian graph, or semi-Hamiltonian graph.  Give enough explanation to your answer.

10/44 Erwin SitompulDiscrete Mathematics Homework 10, No.2 A department has six task forces. Every task force conducts a routine monthly meeting. The member of the six task forces are: TF 1 = {Amir, Budi, Yanti} TF 2 = {Budi, Hasan, Tommy} TF 3 = {Amir, Tommy, Yanti} TF 4 = {Hasan, Tommy, Yanti} TF 5 = {Amir, Budi} TF 6 = {Budi, Tommy, Yanti} (a) What is the minimum number of time slots that must be allocated so that everyone that belong to more than one task force can attend the meetings that he/she must join without any time conflict? (b)Draw the graph that represents this problem and explain what do a vertex and an edge represent.