Discrete Mathematics 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
Angstrom Care 培苗社 Quadratic Equation II
1
© 2008 Pearson Addison Wesley. All rights reserved Chapter Seven Costs.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Chapter 1 The Study of Body Function Image PowerPoint
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.
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 + ×
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.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
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.
EU Market Situation for Eggs and Poultry Management Committee 21 June 2012.
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.
Discrete Mathematics University of Jazeera College of Information Technology & Design Khulood Ghazal Connectivity Lecture _13.
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.
© 2012 National Heart Foundation of Australia. Slide 2.
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 5. COMBINATORICS Lecture 8 Dr.-Ing. Erwin Sitompul
Discrete Mathematics 6. GRAPHS Lecture 10 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.
Note to the teacher: Was 28. A. to B. you C. said D. on Note to the teacher: Make this slide correct answer be C and sound to be “said”. to said you on.
Subtraction: Adding UP
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
1 Let’s Recapitulate. 2 Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Clock will move after 1 minute
Intracellular Compartments and Transport
CS203 Lecture 15.
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
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
Based on slides by Y. Peng University of Maryland
Bioinformatics Programming 1 EE, NCKU Tien-Hao Chang (Darby Chang)
1 Section 8.4 Connectivity. 2 Paths In an undirected graph, a path of length n from u to v, where n is a positive integer, is a sequence of edges e 1,
Graph Theoretic Concepts. What is a graph? A set of vertices (or nodes) linked by edges Mathematically, we often write G = (V,E)  V: set of vertices,
7.1 and 7.2: Spanning Trees. A network is a graph that is connected –The network must be a sub-graph of the original graph (its edges must come from the.
1 CS104 : Discrete Structures Chapter V Graph Theory.
MAT 2720 Discrete Mathematics Section 8.2 Paths and Cycles
Chapter 9: Graphs.
Homework 8 Graph G is given by the figure below.
Can you draw this picture without lifting up your pen/pencil?
Graph Theory What is a graph?.
Graphs G = (V, E) V are the vertices; E are the edges.
Presentation transcript:

Discrete Mathematics Dr.-Ing. Erwin Sitompul Lecture 9 6. GRAPHS Discrete Mathematics Dr.-Ing. Erwin Sitompul http://zitompul.wordpress.com

Homework 8 A chairperson and a treasurer of PUMA IE should be chosen out of 50 eligible association members. In how many ways can a chairperson and a treasurer can be elected, if: (a) There is no limitation. (b) Amir wants to serve only if elected as a chairperson. (c) Budi and Cora want to be elected together or not at all. (d) Dudi and Encep do not want to work together. The position of chairperson and treasurer are different. The sequence of election must be considered. The problem in this homework is a permutation problem.

Solution of Homework 8 (a) There is no limitation. (b) Amir wants to serve only if elected as a chairperson. Amir is not elected as chairperson an thus does not want to serve; the 2 positions will now be filled by the remaining 49 members Amir is elected as chairperson, with 49 ways to fill the treasurer position

Solution of Homework 8 (c) Budi and Cora want to be elected together or not at all. The wish of Budi and Cora does not come true; and from the remaining 48 members, 2 people will be elected to fill the positions Budi and Cora are elected together

Solution of Homework 8 (d) Dudi and Encep do not want to work together. Dudi and Encep are not elected, whether as chairperson or treasure Dudi elected as treasurer, Encep not elected as chairperson Encep elected as treasurer, Dudi not elected as chairperson Encep elected as chairperson, Dudi not elected as treasurer Dudi elected as chairperson, Encep not elected as treasurer Events where Dudi and Encep work together All possible ways to elect

Definition of Graph A graph is an abstract representation of a set of discrete objects where some pairs of the objects are connected by links. The figure below shows a graph that represents a map of road network that connects a number of cities in Central Java.

Bridges of Königsberg (Euler, 1736) Can someone pass every bridge exactly once and come back the his/her original position? A graph can be used to represent the Königsberg bridge: Vertex  represents a dry land Arc or edge  represents a bridge

Graph Representation Graph G = (V,E) where: V = Set of vertices, may not be a null set = {v1,v2,...,vn} E = Set of edges, each connecting a pair of vertices = {e1,e2,...,en}

Graph Representation G1 G1 is a graph with V = {1,2,3,4} Simple graph

Graph Representation G2 G2 is a graph with V = {1,2,3,4} = {e1,e2,e3,e4,e5,e6,e7} G2 Multigraph

Graph Representation G3 G3 is a graph with V = {1,2,3,4} = {e1,e2,e3,e4,e5,e6,e7,e8} G3 Pseudograph

Graph Classification Based on the existence of loop or multiple edges, a graph can be classified into: 1. Simple graph, if the graph does not have any loop or double edge. 2. Unsimple graph, if the graph has any loop or double edge.

Graph Classification Based on the orientation of the edges, a graph can be classified into 2 types: 1. Undirected graph, if the edges are directed. 2. Directed graph or digraph, if all the edges are directed.

Graph Applications Program Analysis t:=0; read(x); while x <> 1945 do begin if x < 0 then writeln(‘Year may not be negative.’); else t:=t+1; end; writeln(‘Guessed after’,t,’attempts.’); 1 : t:=0 2 : read(x) 3 : x <> 1945 4 : x < 0 5 : writeln(‘Year...’) 6 : t:=t+1 7 : read(x) 8 : writeln(‘Guessed...)

The price of 1 bottle drink is 45 cent Graph Applications Automata Theory in a Vending Machine D : Dime (10 cent) Q : Quarter (25 cent) The price of 1 bottle drink is 45 cent

Graph Terminology 1. Adjacency G1 Two vertices are said to be adjacent if they are directly connected through an edge. Observe graph G1: Vertex 1 is adjacent with vertex 2 and 3. Vertex 1 is not adjacent to vertex 4. G1

Graph Terminology 2. Incidence G1 For any edge e = (vj,vk), it is said that e is incident to vertex vj , and e is incident to vertex vk . Observe graph G1: Edge (2,3) is incident to vertex 2 and vertex 3. Edge (2,4) is incident to vertex 2 and vertex 4. Edge (1,2) is not incident with vertex 4. G1

Graph Terminology 3. Isolated Vertex G4 A vertex is called isolated vertex if it does not have any edge incident to it. Observe graph G4: Vertex 5 is an isolated vertex. G4

Graph Terminology 4. Empty Graph (Null Graph) G5 An empty graph is a graph whose set of edges is a null set. Observe graph G5: It is an empty graph (null graph). G5

Graph Terminology 5. Degree of Vertex G1 The degree of a vertex is the number of edges incident to the vertex itself. Notation: d(v). Observe graph G1: d(1) = d(4) = 2. d(2) = d(3) = 3. G1

Graph Terminology G4 G6 Observe graph G4: d(5) = 0  isolated vertex d(4) = 1  pendant vertex Observe graph G6: d(1) = 3  incident to double edges d(3) = 4  incident to a loop G4 G6

Graph Terminology In a directed graph: din(v) = in-degree = number of arcs arriving to a vertex dout(v) = out-degree = number of arcs departing from a vertex d(v) = din(v) + dout(v)

Graph Terminology G7 Observe graph G7: din(1) = 2 dout(1) = 1

Graph Terminology Handshake Lemma G1 The sum of the degree of all vertices in a graph is an even number; that is, twice the number of edges in the graph. In other words, if G = (V, E), then Observe graph G1: d(1) + d(2) + d(3) + d(4) = 2 + 3 + 3 + 2 = 2  number of edges = 2  5 G1

Graph Terminology G4 G6 Observe graph G4: d(1) + d(2) + d(3) + d(4) + d(5) = 2 + 2 + 3 + 1 + 0 = 2  number of edges = 2  4 Observe graph G6: d(1) + d(2) + d(3) = 3 + 3 + 4 = 2  number of edges = 2  5 G4 G6

Graph Terminology Example: Solution: A graph has five vertices. Can you draw the graph if the degree of the vertices are: (a) 2, 3, 1, 1, and 2? (b) 2, 3, 3, 4, and 4? Solution: (a) No, because 2 + 3 + 1 + 1 + 2 = 9, is an odd number. (b) Yes, because 2 + 3 + 3 + 4 + 4 = 16, is an even number.

Graph Terminology 6. Path G1 A path with length n from vertex of origin v0 to vertex of destination vn in a graph G is the alternating sequence of vertices and edges in the form of v0, e1, v1, e2, v2, ..., vn –1, en, vn such that e1 = (v0, v1), e2 = (v1, v2), ..., en = (vn–1, vn) are the edges of graph G. The length of a path is determined by the number of edges in that path. Observe graph G1: Path 1, 2, 4, 3 is a path with edge sequence of (1,2), (2,4), and (4,3). The length of path 1, 2, 4, 3 is 3. G1

Graph Terminology 7. Circuit G1 A path that starts and finishes at the same vertex is called a circuit. Observe graph G1: Path 1, 2, 3, 1 is a circuit. The length of the circuit 1, 2, 3, 1 is 3. G1

Graph Terminology 8. Connectivity Two vertices v1 and v2 is said to be connected if there exists at least one path from v1 to v2. A graph G is said to be a connected graph if for every pair of vertices vi and vj of set V there exists at least one path from vi to vj. If not, then G is said to be disconnected graph. Example of a disconnected graph:

Graph Terminology A directed graph G is said to be connected if its non-directed graph is connected (Note: the non-directed graph of a directed graph G is obtained by omitting all arrow heads). Two vertices, u and v, in a directed graph G are said as strongly connected vertices if there exists a directed path from u to v and also from v to u. If u and v are not strongly connected vertices but the non-directed graph of G is a connected one, then u and v are said as weakly connected vertices.

Weakly connected graph Strongly connected graph Graph Terminology Directed graph G is said as strongly connected graph if every possible pair of vertices u and v in G is strongly connected. If not, then G is said to be a weakly connected graph. Weakly connected graph Strongly connected graph

Complement of the subgraph Graph Terminology 9. Subgraph and Subgraph Complement Suppose G = (V,E) is a graph, then G1 = (V1,E1) is a subgraph of G if V1  V and E1  E. Complement of subgraph G1 in regard to graph G is the graph G2 = (V2,E2) such that E2 = E – E1 and V2 is the set of all vertices incident to members of E2. Complement of the subgraph G8 A subgraph of G8

A spanning subgraph of G9 Not a spanning subgraph of G9 Graph Terminology 10. Spanning Subgraph Subgraph G1 = (V1,E1) of G = (V,E) is said to be a spanning subgraph if V1 = V; that is if G1 contains all vertices of G. G9 A spanning subgraph of G9 Not a spanning subgraph of G9

G10 without the cut set, becomes a disconnected graph Graph Terminology 11. Cut Set Cut set of a connected graph G is a set of edges of G that can decides whether G is connected or not. If these edges are omitted, then G will be disconnected. For the graph G10 below, {(1,2),(1,5),(3,5),(3,4)} belong to the cut set. G10 G10 without the cut set, becomes a disconnected graph

G10 without the cut set, becomes a disconnected graph Graph Terminology The number of cut sets of a connected graph can be more than one. For instance, the sets {(1,2),(2,5)}, {(1,3),(1,5),(1,2)} and {(2,6)} are also the cut set of G10. {(1,2),(2,5),(4,5)} is not a cut set because its subset, {(1,2),(2,5)} is already a cut set. G10 G10 without the cut set, becomes a disconnected graph

Graph Terminology 12. Weighted Graph A weighted graph is a graph whose edges are given weighting numbers.

Homework 9 Graph G 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 G1 = {B,C,X,Y}. (e) Draw the complement of subgraph G1. Graph G

Homework 9 New Graph H Graph H1 Observe graph H below. (a) List all possible paths from b to c. (b) List all possible circuits. (c) Write down at least 4 cut sets of the graph. (d) Draw the complement of subgraph H1 with regard to H. (e) Draw a spanning subgraph of H. Graph H Graph H1