Packet #6: Counting & Graph Theory. Applied Discrete Mathematics

Size: px
Start display at page:

Download "Packet #6: Counting & Graph Theory. Applied Discrete Mathematics"

Transcription

1 Packet #6: Counting & Graph Theory Applied Discrete Mathematics Table of Contents Counting Pages 1-8 Graph Theory Pages 9-16 Exam Study Sheet Page 17

2 Counting Information I. Product Rule: A B C = A * B * C II. Union Rule: A B = A + B - A B III. Inclusion/Exclusion Principle: The Union Rule applied inductively to: A 1 A 2 A n IV. Selection with Replacement A. Permutations: n B. Combinations: C(n+r-1,r) or C(n+r-1,n-1) V. Selection without Replacement A. Permutations: P(n,r) B. Combinations: C(n,r) VI. Pigeonhole Principle If (k+1) or more objects are placed in k boxes, then there is at least one box containing two or more objects. 1

3 Counting Product Rule A B C = A * B * C Examples Example 1: A = {1,2,3} B = {a,b} C = {a,b,g,d} How many 3-character words with 1st character from A, 2nd from B, 3rd from C? Answer: A * B * C = 3*2*4 = 24 Example 2: 3 Independents, 2 Democrats, 4 Republicans How many ways to form 3-person committee with one member from each party? Method: Count number of triples <Independent, Democrat, Republican> Answer: 3*2*4 = 24 Union Rule A B = A + B - A B Example S = {a,b,c} How many 3-letter words in S * start with a or end in b? Method: Let A = 3 letter words starting with "a" Let B = 3 letter words ending with "b" Find: A B Answer: A = (1) (3) (3) = 1*3*3 = 9 B = (3) (3) (1) = 3*3*1 = 9 A B = (1) (3) (1) = 1*3*1 = 3 A B = = 15 2

4 Inclusion/Exclusion Principle To calculate A 1 A 2 A n, 1. Calculate size of all possible intersections 2. Add results from of odd numbered sets. 3. Subtract results from of even numbered sets. Ie. A 1 A 2 A 3 = A 1 + A 2 + A 3 - A 1 A 2 - A 1 A 3 - A 2 A 3 + A 1 A 2 A 3 Example: How many integers in {1,,1000} are divisible by either 2, 3, or 5? A = divisible by 2 B = divisible by 3 C = divisible by 5 Find: A B C A = {2,4,,1000} = 500 B = {3,6,,999} = 333 C = {5,10,,1000} = 200 A B = {6,12,18,,996} = 166 A C = {10,20,,1000} = 100 B C = {15,30,,990} = 66 A B C = {30,60,,990} = 33 So, A B C = = 734 Selection with Replacement Permutations (Order Matters), with replacement: n r Choose r times from a set of n items with replacement and order matters. Drawing with replacement (sequence can repeat items): If there are n distinct objects and we draw r times. Each drawing has n distinct possibilities. If order matters, then by the product rule we have n x n x... x n possibilities = n r. 3

5 Examples Example 1: Create a sequence of 10 numbers by rolling a die 10 times. How many possible sequences? Method: Choose 10 times from a set of 6. Answer: 6 10 Example 2: S = {0,1,,7} How many strings of length 5 are there in S *? Method: Choose 5 times from a set of 8. Answer: 8 5 Combinations (Order Does Not Matter), with replacement: C(n+r-1,r) Choose r times from a set of n items with replacement and order does not matter. The number of possible outcomes is written as C(n+r-1,r). Combinations are discussed in more detail later. Example: You have 4 different kinds of cookies. How many different ways can 6 cookies be chosen? Method: Choose 6 times from a set of 4 with replacement and order does not matter. Answer: C(4+6-1,6) = C(9,6) = 9*8*7 3*2*1 = 84 Selection without Replacement Permutations (Order Matters): P(n,r) Choose r times from a set of n items without replacement and order matters. If we do not have replacement but order matters: Then first drawing has n possibilities; the second drawing has (n-1), the third has n! (n-2), etc. By the product rule we have: n x (n-1) x (n-2) x... x (n-r+1) = (n r)!. This is usually called permutations of n things taken r at a time. The number of n! possible outcomes is P(n,r) = (n r)! 4

6 Examples Example 1: Six CD's with 57 songs. CD player can be programmed to play any 20 songs in any order. How many ways can 20 different songs be played? Method: Choose 20 from 57 without replacement, order matters Answer: P(57,20) = 57! 37! Example 2: Given n integers x 1, x 2,, x n, all distinct. How many sorted arrangements are possible (i.e. how many permutations of x 1 x n?) Method: Choose all n items from n, without replacement, order matters n! Answer: P(n,n) = (n n)! = n! 0! = n! Example 3: S = {a,b,c,d,e,f} How many 3-letter words are in S * which have no character repeated? Method: Choose 3 from 6 without replacement and order matters. Answer: P(6,3) = 6! = 6*5*4 = 120 3! Combinations (Order Does Not Matter) without replacement: C(n,r) Choose r times from a set of n items without replacement and order doesn't matter. If order does not count and there is no replacement, then we must determine how many of the permutations are the same objects but only differ in order. That is: In how many orders can n distinct objects be arranged? P(n,n) = n! = n!. Therefore, if order does not matter and we do not have 0! replacement, the number of possibilities for n objects taken r at a time is P(n,r) P(r,r) = n!. This is usually referred to as combinations of n things taken r at a time (n r)!r! = C(n,r). There is another important type of combination, combinations with replacement. The sequence can repeat, but order does not matter. (Discussed Earlier) Number of ways to choose r from n is C(n,r) = n! (n r)!r! 5

7 Example How many ways can you choose a committee of 5 from 7 people? 7! Answer: C(n,r) = 2!5! = 7*6 2 = 21 Summary of Permutations and Combinations Type (n things, r times) Order Counts Replacement Symbol Expression Permutations w/ repl. Yes Yes None n r Permutations - no repl. Yes No P(n,r) n! (n-r)! Combinations - no repl. No No C(n,r) n! (n-r)! r! Combinations - w/ repl. No Yes C(n+r-1,r) (n+r-1)! r! (n-1)! More Examples Example 1: Place n indistinguishable objects into r distinguishable boxes. Number of possible outcomes is C(n+r-1,r-1) (n+r-1) bits, (r-1) ones: C(n+r-1,r-1) Example 2: 12 identical flyers are to be placed into 4 mailboxes. How many ways can this be done? Answer: C(12+4-1,4-1) = C(15,3) = 15! 15 * 14 * 13 = = !3! 3*2*1 What if each mailbox must receive at least 2 letters? Method: Put 2 letters in every box. Then, how many ways are there to distribute remaining 4 among 4 mailboxes? 7! Answer: C(4+4-1,4-1) = C(7,3) = 4!3! = 7*6*5 3*2*1 = 35 6

8 Example 3a: 15 basketball players are to be drafted by 3 professional teams (A,B,C). Each team will draft 5 players. In how many ways can this be done? Method: Choose 5 from 15 for A: C(15,5), 5 from remaining 10 for B: C(10,5), C has remaining 5: C(5,5) = 1 (multiply all three together). This determines all the ways we can partition the players where A chooses first, B second, and C last. Answer: C(15,5)*C(10,5) Example 3b: Now, if we cannot tell which team is which, we say the teams are indistinguishable. If this is the case, how many ways can 15 players be partitioned into 3 teams of 5 each? (i.e. - we want to know how many different sets {A,B,C} there are. In 3a, we could have one division with (A,B,C) = ({1,2,3,4,5},{6,7,8,9,10},{11,12,13,14,15}) and another with (A,B,C) = ({6,7,8,9,10},{1,2,3,4,5},{11,12,13,14,15}). But these two examples divide the fifteen players up into the same groups.) C(15,5) *C(10,5) Answer: (since the teams are indistinguishable) 3! Example 4: In how many ways can 2n people be divided into n pairs without replacement and order does not matter? C(2 n, 2 ) * C(2 n 2,2) *... * C(2,2) Answer: n! Example 5: In how many ways can 10 boys and 5 girls stand in a line if no 2 girls can stand next to each other? Boy1 Boy2... Boy10 Method: Choose one slot for each girl (Select 5 slots from 11, without replacement and order matters.). Answer: There are 10! ways to place the boys and P(11,5) ways to place the girls, so by the product rule the answer is 10! * P(11,5). Example 6: In how many ways can 2 distinct numbers be selected from 1,2,...,100 so that their sum is even? Answer: (2 Odds) C(50,2) + (2 Evens) C(50,2) = 50*49 Example 7: In how many ways can 2 distinct numbers be selected from 1,2,...,100 so that their sum is odd? Answer: Choose 1 even and 1 odd = C(50,1) *C(50,1)= 50*50 7

9 Pigeonhole Principle If (k+1) or more objects are placed in k boxes, then there is at least one box containing two or more objects. Examples Example 1: If you have a group of 367 people, there must be at least two people who have the same birthday (there are only 366 possible birthdays). Example 2: If you have a group of 27 English words, there must be at least two words that begin with the same letter (there are only 26 possible letters in the English language). 8

10 Graph Information I. Basic Definitions II. Euler Circuit and Fleury's Algorithm III. Hamilton Cycle IV. Kruskal's Algorithm V. Matrix Representation of Graphs VI. Hasse Diagrams 9

11 Graphs Basic Definitions path: (way of getting from one vertex to another via edges) - sequence of vertices in which successive vertices are joined by an edge length of path: number of edges in path Example paths: uvwxy (length 4) uxy (length 2) uxwustxzy (length 8) closed path: first vertex = last vertex cycle: closed path in which all vertices are distinct, except first = last acyclic graph: graph with no cycle Example closed path: xyztx closed path: swxtzyxs closed path: uvwvu acyclic graph: also cycle not cycle not cycle 10

12 A graph is connected if every pair of vertices is joined by a path. Example Connected Not connected The degree of a vertex is the number of edges touching the vertex. (loops count twice) Example Vertex Degree u 2 v 2 x 4 y 4 z 4 11

13 Euler Circuit and Fleury's Algorithm Euler circuit: closed path which uses each edge exactly once Can show there is an Euler circuit if and only if every vertex has even degree. ("easy" to find) Fleury's algorithm will always find Euler circuit in connected graph if every vertex has even degree. Fleury's Algorithm Start at any vertex v While (still more edges incident with v) do - if possible choose edge vw which does not disconnect - else choose only vw and delete v - delete edge vw - v := w end do Example of Fleury's Algorithm 12

14 etc. Euler circuit: Hamilton Cycle Hamilton cycle: cycle which uses each vertex once "hard" problem (version of Traveling Salesman Problem) Example Hamilton cycle: uvtwxysu 13

15 Kruskal's Algorithm Minimum cost network to connect sites. Given sites and link costs Kruskal's Algorithm Start with no edges. Examine edges in non-decreasing order of weight. If an edge does not create a cycle, add it. Example of Kruskal's Algorithm Matrix Representation of Graphs Label vertices v 1, v 2,, v n Adjacency matrix M: nxn matrix with M[x,y] = number of edges joining v x and v y. 14

16 Examples of Adjacency Matrices Graph isomorphism: Graphs G and H are isomorphic if there is some way to label the vertices of H so that H is G (ie, has same adjacency matrix). Examples 15

17 Suppose M is the adjacency matrix of a graph G. Can prove by induction: M k [i,j] = number of length-k paths joining i and j Reachability Matrix R 16

18 Fourth Hour Exam Study Sheet I. Counting A. Basic Rules (Product, Union, Inclusion/Exclusion) B. Selection with Replacement (Permutations, Combinations) C. Selection without Replacement (Permutations, Combinations) D. Pigeonhole Principle II. Graphs A. Basic Definitions B. Euler Circuit and Fleury's Algorithm C. Hamilton Cycle D. Kruskal's Algorithm E. Matrix Representation of Graphs F. Hasse Diagrams 17

Discrete Mathematics 2 Exam File Spring 2012

Discrete Mathematics 2 Exam File Spring 2012 Discrete Mathematics 2 Exam File Spring 2012 Exam #1 1.) Suppose f : X Y and A X. a.) Prove or disprove: f -1 (f(a)) A. Prove or disprove: A f -1 (f(a)). 2.) A die is rolled four times. What is the probability

More information

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION MH 1301 DISCRETE MATHEMATICS TIME ALLOWED: 2 HOURS

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION MH 1301 DISCRETE MATHEMATICS TIME ALLOWED: 2 HOURS NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION 2015-2016 MH 1301 DISCRETE MATHEMATICS May 2016 TIME ALLOWED: 2 HOURS INSTRUCTIONS TO CANDIDATES 1. This examination paper contains FIVE (5) questions

More information

Varying Applications (examples)

Varying Applications (examples) Graph Theory Varying Applications (examples) Computer networks Distinguish between two chemical compounds with the same molecular formula but different structures Solve shortest path problems between cities

More information

Brief History. Graph Theory. What is a graph? Types of graphs Directed graph: a graph that has edges with specific directions

Brief History. Graph Theory. What is a graph? Types of graphs Directed graph: a graph that has edges with specific directions Brief History Graph Theory What is a graph? It all began in 1736 when Leonhard Euler gave a proof that not all seven bridges over the Pregolya River could all be walked over once and end up where you started.

More information

1. a graph G = (V (G), E(G)) consists of a set V (G) of vertices, and a set E(G) of edges (edges are pairs of elements of V (G))

1. a graph G = (V (G), E(G)) consists of a set V (G) of vertices, and a set E(G) of edges (edges are pairs of elements of V (G)) 10 Graphs 10.1 Graphs and Graph Models 1. a graph G = (V (G), E(G)) consists of a set V (G) of vertices, and a set E(G) of edges (edges are pairs of elements of V (G)) 2. an edge is present, say e = {u,

More information

Chapter 8 Topics in Graph Theory

Chapter 8 Topics in Graph Theory Chapter 8 Topics in Graph Theory Chapter 8: Topics in Graph Theory Section 8.1: Examples {1,2,3} Section 8.2: Examples {1,2,4} Section 8.3: Examples {1} 8.1 Graphs Graph A graph G consists of a finite

More information

DS UNIT 4. Matoshri College of Engineering and Research Center Nasik Department of Computer Engineering Discrete Structutre UNIT - IV

DS UNIT 4. Matoshri College of Engineering and Research Center Nasik Department of Computer Engineering Discrete Structutre UNIT - IV Sr.No. Question Option A Option B Option C Option D 1 2 3 4 5 6 Class : S.E.Comp Which one of the following is the example of non linear data structure Let A be an adjacency matrix of a graph G. The ij

More information

SEVENTH EDITION and EXPANDED SEVENTH EDITION

SEVENTH EDITION and EXPANDED SEVENTH EDITION SEVENTH EDITION and EXPANDED SEVENTH EDITION Slide 14-1 Chapter 14 Graph Theory 14.1 Graphs, Paths and Circuits Definitions A graph is a finite set of points called vertices (singular form is vertex) connected

More information

5 Graphs

5 Graphs 5 Graphs jacques@ucsd.edu Some of the putnam problems are to do with graphs. They do not assume more than a basic familiarity with the definitions and terminology of graph theory. 5.1 Basic definitions

More information

Foundations of Discrete Mathematics

Foundations of Discrete Mathematics Foundations of Discrete Mathematics Chapters 9 By Dr. Dalia M. Gil, Ph.D. Graphs Graphs are discrete structures consisting of vertices and edges that connect these vertices. Graphs A graph is a pair (V,

More information

Discrete mathematics , Fall Instructor: prof. János Pach

Discrete mathematics , Fall Instructor: prof. János Pach Discrete mathematics 2016-2017, Fall Instructor: prof. János Pach - covered material - Lecture 1. Counting problems To read: [Lov]: 1.2. Sets, 1.3. Number of subsets, 1.5. Sequences, 1.6. Permutations,

More information

Eulerian tours. Russell Impagliazzo and Miles Jones Thanks to Janine Tiefenbruck. April 20, 2016

Eulerian tours. Russell Impagliazzo and Miles Jones Thanks to Janine Tiefenbruck.  April 20, 2016 Eulerian tours Russell Impagliazzo and Miles Jones Thanks to Janine Tiefenbruck http://cseweb.ucsd.edu/classes/sp16/cse21-bd/ April 20, 2016 Seven Bridges of Konigsberg Is there a path that crosses each

More information

Graphs. Pseudograph: multiple edges and loops allowed

Graphs. Pseudograph: multiple edges and loops allowed Graphs G = (V, E) V - set of vertices, E - set of edges Undirected graphs Simple graph: V - nonempty set of vertices, E - set of unordered pairs of distinct vertices (no multiple edges or loops) Multigraph:

More information

Solutions to Exercises 9

Solutions to Exercises 9 Discrete Mathematics Lent 2009 MA210 Solutions to Exercises 9 (1) There are 5 cities. The cost of building a road directly between i and j is the entry a i,j in the matrix below. An indefinite entry indicates

More information

STUDENT NUMBER: MATH Final Exam. Lakehead University. April 13, Dr. Adam Van Tuyl

STUDENT NUMBER: MATH Final Exam. Lakehead University. April 13, Dr. Adam Van Tuyl Page 1 of 13 NAME: STUDENT NUMBER: MATH 1281 - Final Exam Lakehead University April 13, 2011 Dr. Adam Van Tuyl Instructions: Answer all questions in the space provided. If you need more room, answer on

More information

Chapter 14 Section 3 - Slide 1

Chapter 14 Section 3 - Slide 1 AND Chapter 14 Section 3 - Slide 1 Chapter 14 Graph Theory Chapter 14 Section 3 - Slide WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem Euler paths and Euler circuits Hamilton

More information

WUCT121. Discrete Mathematics. Graphs

WUCT121. Discrete Mathematics. Graphs WUCT121 Discrete Mathematics Graphs WUCT121 Graphs 1 Section 1. Graphs 1.1. Introduction Graphs are used in many fields that require analysis of routes between locations. These areas include communications,

More information

BHARATHIDASAN ENGINEERING COLLEGE NATTARAMPALLI Department of Science and Humanities CS6702-GRAPH THEORY AND APPLICATION

BHARATHIDASAN ENGINEERING COLLEGE NATTARAMPALLI Department of Science and Humanities CS6702-GRAPH THEORY AND APPLICATION BHARATHIDASAN ENGINEERING COLLEGE NATTARAMPALLI 635 854 Department of Science and Humanities DEGREE/BRANCH : B.E. CSE YEAR/ SEMESTER : IV/VII. CS6702-GRAPH THEORY AND APPLICATION 1. Define graph. UNIT-I

More information

v V Question: How many edges are there in a graph with 10 vertices each of degree 6?

v V Question: How many edges are there in a graph with 10 vertices each of degree 6? ECS20 Handout Graphs and Trees March 4, 2015 (updated 3/9) Notion of a graph 1. A graph G = (V,E) consists of V, a nonempty set of vertices (or nodes) and E, a set of pairs of elements of V called edges.

More information

ASSIGNMENT 4 SOLUTIONS

ASSIGNMENT 4 SOLUTIONS MATH 71 ASSIGNMENT SOLUTIONS 1. If F : X X is a function, define f (x) to be (f f)(x), and inductively define f k (x) (f f k 1 )(x) for each integer k. (So f (x) (f f )(x) f(f(f(x))) for instance.) We

More information

Week 12: Trees; Review. 22 and 24 November, 2017

Week 12: Trees; Review. 22 and 24 November, 2017 (1/24) MA284 : Discrete Mathematics Week 12: Trees; Review http://www.maths.nuigalway.ie/~niall/ma284/ 22 and 24 November, 2017 C C C C 1 Trees Recall... Applications: Chemistry Applications: Decision

More information

Topic 10 Part 2 [474 marks]

Topic 10 Part 2 [474 marks] Topic Part 2 [474 marks] The complete graph H has the following cost adjacency matrix Consider the travelling salesman problem for H a By first finding a minimum spanning tree on the subgraph of H formed

More information

Solution : a) C(18, 1)C(325, 1) = 5850 b) C(18, 1) + C(325, 1) = 343

Solution : a) C(18, 1)C(325, 1) = 5850 b) C(18, 1) + C(325, 1) = 343 DISCRETE MATHEMATICS HOMEWORK 5 SOL Undergraduate Course College of Computer Science Zhejiang University Fall-Winter 2014 HOMEWORK 5 P344 1. There are 18 mathematics majors and 325 computer science majors

More information

Discrete Mathematics Exam File Fall Exam #1

Discrete Mathematics Exam File Fall Exam #1 Discrete Mathematics Exam File Fall 2015 Exam #1 1.) Which of the following quantified predicate statements are true? Justify your answers. a.) n Z, k Z, n + k = 0 b.) n Z, k Z, n + k = 0 2.) Prove that

More information

Figure 2.1: A bipartite graph.

Figure 2.1: A bipartite graph. Matching problems The dance-class problem. A group of boys and girls, with just as many boys as girls, want to dance together; hence, they have to be matched in couples. Each boy prefers to dance with

More information

Definition: A graph G = (V, E) is called a tree if G is connected and acyclic. The following theorem captures many important facts about trees.

Definition: A graph G = (V, E) is called a tree if G is connected and acyclic. The following theorem captures many important facts about trees. Tree 1. Trees and their Properties. Spanning trees 3. Minimum Spanning Trees 4. Applications of Minimum Spanning Trees 5. Minimum Spanning Tree Algorithms 1.1 Properties of Trees: Definition: A graph G

More information

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, 2016 Instructions: CS1800 Discrete Structures Final 1. The exam is closed book and closed notes. You may

More information

r=1 The Binomial Theorem. 4 MA095/98G Revision

r=1 The Binomial Theorem. 4 MA095/98G Revision Revision Read through the whole course once Make summary sheets of important definitions and results, you can use the following pages as a start and fill in more yourself Do all assignments again Do the

More information

Graphs. The ultimate data structure. graphs 1

Graphs. The ultimate data structure. graphs 1 Graphs The ultimate data structure graphs 1 Definition of graph Non-linear data structure consisting of nodes & links between them (like trees in this sense) Unlike trees, graph nodes may be completely

More information

Graph Theory Questions from Past Papers

Graph Theory Questions from Past Papers Graph Theory Questions from Past Papers Bilkent University, Laurence Barker, 19 October 2017 Do not forget to justify your answers in terms which could be understood by people who know the background theory

More information

Computational Discrete Mathematics

Computational Discrete Mathematics Computational Discrete Mathematics Combinatorics and Graph Theory with Mathematica SRIRAM PEMMARAJU The University of Iowa STEVEN SKIENA SUNY at Stony Brook CAMBRIDGE UNIVERSITY PRESS Table of Contents

More information

An Introduction to Graph Theory

An Introduction to Graph Theory An Introduction to Graph Theory Evelyne Smith-Roberge University of Waterloo March 22, 2017 What is a graph? Definition A graph G is: a set V (G) of objects called vertices together with: a set E(G), of

More information

γ(ɛ) (a, b) (a, d) (d, a) (a, b) (c, d) (d, d) (e, e) (e, a) (e, e) (a) Draw a picture of G.

γ(ɛ) (a, b) (a, d) (d, a) (a, b) (c, d) (d, d) (e, e) (e, a) (e, e) (a) Draw a picture of G. MAD 3105 Spring 2006 Solutions for Review for Test 2 1. Define a graph G with V (G) = {a, b, c, d, e}, E(G) = {r, s, t, u, v, w, x, y, z} and γ, the function defining the edges, is given by the table ɛ

More information

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, 2016 Instructions: CS1800 Discrete Structures Final 1. The exam is closed book and closed notes. You may

More information

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. An Introduction to Graph Theory

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. An Introduction to Graph Theory SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics An Introduction to Graph Theory. Introduction. Definitions.. Vertices and Edges... The Handshaking Lemma.. Connected Graphs... Cut-Points and Bridges.

More information

Simple Graph. General Graph

Simple Graph. General Graph Graph Theory A graph is a collection of points (also called vertices) and lines (also called edges), with each edge ending at a vertex In general, it is allowed for more than one edge to have the same

More information

CPS 102: Discrete Mathematics. Quiz 3 Date: Wednesday November 30, Instructor: Bruce Maggs NAME: Prob # Score. Total 60

CPS 102: Discrete Mathematics. Quiz 3 Date: Wednesday November 30, Instructor: Bruce Maggs NAME: Prob # Score. Total 60 CPS 102: Discrete Mathematics Instructor: Bruce Maggs Quiz 3 Date: Wednesday November 30, 2011 NAME: Prob # Score Max Score 1 10 2 10 3 10 4 10 5 10 6 10 Total 60 1 Problem 1 [10 points] Find a minimum-cost

More information

Math 3336 Section 6.1 The Basics of Counting The Product Rule The Sum Rule The Subtraction Rule The Division Rule

Math 3336 Section 6.1 The Basics of Counting The Product Rule The Sum Rule The Subtraction Rule The Division Rule Math 3336 Section 6.1 The Basics of Counting The Product Rule The Sum Rule The Subtraction Rule The Division Rule Examples, Examples, and Examples Tree Diagrams Basic Counting Principles: The Product Rule

More information

CS1800 Discrete Structures Final Version A

CS1800 Discrete Structures Final Version A CS1800 Discrete Structures Fall 2017 Profs. Aslam, Gold, & Pavlu December 11, 2017 CS1800 Discrete Structures Final Version A Instructions: 1. The exam is closed book and closed notes. You may not use

More information

2. CONNECTIVITY Connectivity

2. CONNECTIVITY Connectivity 2. CONNECTIVITY 70 2. Connectivity 2.1. Connectivity. Definition 2.1.1. (1) A path in a graph G = (V, E) is a sequence of vertices v 0, v 1, v 2,..., v n such that {v i 1, v i } is an edge of G for i =

More information

Chapter 11: Graphs and Trees. March 23, 2008

Chapter 11: Graphs and Trees. March 23, 2008 Chapter 11: Graphs and Trees March 23, 2008 Outline 1 11.1 Graphs: An Introduction 2 11.2 Paths and Circuits 3 11.3 Matrix Representations of Graphs 4 11.5 Trees Graphs: Basic Definitions Informally, a

More information

Network Topology and Graph

Network Topology and Graph Network Topology Network Topology and Graph EEE442 Computer Method in Power System Analysis Any lumped network obeys 3 basic laws KVL KCL linear algebraic constraints Ohm s law Anawach Sangswang Dept.

More information

IMO Training 2010 Double Counting Victoria Krakovna. Double Counting. Victoria Krakovna

IMO Training 2010 Double Counting Victoria Krakovna. Double Counting. Victoria Krakovna Double Counting Victoria Krakovna vkrakovna@gmail.com 1 Introduction In many combinatorics problems, it is useful to count a quantity in two ways. Let s start with a simple example. Example 1. (Iran 2010

More information

Graph and Digraph Glossary

Graph and Digraph Glossary 1 of 15 31.1.2004 14:45 Graph and Digraph Glossary A B C D E F G H I-J K L M N O P-Q R S T U V W-Z Acyclic Graph A graph is acyclic if it contains no cycles. Adjacency Matrix A 0-1 square matrix whose

More information

Discrete Structures Lecture The Basics of Counting

Discrete Structures Lecture The Basics of Counting Introduction Good morning. Combinatorics is the study of arrangements of objects. Perhaps, the first application of the study of combinatorics was in the study of gambling games. Understanding combinatorics

More information

Assignment 4 Solutions of graph problems

Assignment 4 Solutions of graph problems Assignment 4 Solutions of graph problems 1. Let us assume that G is not a cycle. Consider the maximal path in the graph. Let the end points of the path be denoted as v 1, v k respectively. If either of

More information

Elements of Graph Theory

Elements of Graph Theory Elements of Graph Theory Quick review of Chapters 9.1 9.5, 9.7 (studied in Mt1348/2008) = all basic concepts must be known New topics we will mostly skip shortest paths (Chapter 9.6), as that was covered

More information

About the Author. Dependency Chart. Chapter 1: Logic and Sets 1. Chapter 2: Relations and Functions, Boolean Algebra, and Circuit Design

About the Author. Dependency Chart. Chapter 1: Logic and Sets 1. Chapter 2: Relations and Functions, Boolean Algebra, and Circuit Design Preface About the Author Dependency Chart xiii xix xxi Chapter 1: Logic and Sets 1 1.1: Logical Operators: Statements and Truth Values, Negations, Conjunctions, and Disjunctions, Truth Tables, Conditional

More information

Basic Combinatorics. Math 40210, Section 01 Fall Homework 4 Solutions

Basic Combinatorics. Math 40210, Section 01 Fall Homework 4 Solutions Basic Combinatorics Math 40210, Section 01 Fall 2012 Homework 4 Solutions 1.4.2 2: One possible implementation: Start with abcgfjiea From edge cd build, using previously unmarked edges: cdhlponminjkghc

More information

Math Summer 2012

Math Summer 2012 Math 481 - Summer 2012 Final Exam You have one hour and fifty minutes to complete this exam. You are not allowed to use any electronic device. Be sure to give reasonable justification to all your answers.

More information

Graph Theory. Part of Texas Counties.

Graph Theory. Part of Texas Counties. Graph Theory Part of Texas Counties. We would like to visit each of the above counties, crossing each county only once, starting from Harris county. Is this possible? This problem can be modeled as a graph.

More information

Practice Exam #3, Math 100, Professor Wilson. MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Practice Exam #3, Math 100, Professor Wilson. MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. Practice Exam #3, Math 100, Professor Wilson MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 1) A tree is A) any graph that is connected and every

More information

Mathematics and Statistics, Part A: Graph Theory Problem Sheet 1, lectures 1-4

Mathematics and Statistics, Part A: Graph Theory Problem Sheet 1, lectures 1-4 1. Draw Mathematics and Statistics, Part A: Graph Theory Problem Sheet 1, lectures 1-4 (i) a simple graph. A simple graph has a non-empty vertex set and no duplicated edges. For example sketch G with V

More information

Graphs and Puzzles. Eulerian and Hamiltonian Tours.

Graphs and Puzzles. Eulerian and Hamiltonian Tours. Graphs and Puzzles. Eulerian and Hamiltonian Tours. CSE21 Winter 2017, Day 11 (B00), Day 7 (A00) February 3, 2017 http://vlsicad.ucsd.edu/courses/cse21-w17 Exam Announcements Seating Chart on Website Good

More information

Graph Theory: Starting Out

Graph Theory: Starting Out Graph Theory: Starting Out Administrivia To read: Chapter 7, Sections 1-3 (Ensley/Crawley) Problem Set 5 sent out; due Monday 12/8 in class. There will be two review days next week (Wednesday and Friday)

More information

Part II. Graph Theory. Year

Part II. Graph Theory. Year Part II Year 2017 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2017 53 Paper 3, Section II 15H Define the Ramsey numbers R(s, t) for integers s, t 2. Show that R(s, t) exists for all s,

More information

Counting Problems; and Recursion! CSCI 2824, Fall 2012!

Counting Problems; and Recursion! CSCI 2824, Fall 2012! Counting Problems; and Recursion! CSCI 2824, Fall 2012!!! Assignments To read this week: Sections 5.5-5.6 (Ensley/Crawley Problem Set 3 has been sent out today. Challenge problem today!!!!! So, to recap

More information

CS 311 Discrete Math for Computer Science Dr. William C. Bulko. Graphs

CS 311 Discrete Math for Computer Science Dr. William C. Bulko. Graphs CS 311 Discrete Math for Computer Science Dr. William C. Bulko Graphs 2014 Definitions Definition: A graph G = (V,E) consists of a nonempty set V of vertices (or nodes) and a set E of edges. Each edge

More information

Eulerian Tours and Fleury s Algorithm

Eulerian Tours and Fleury s Algorithm Eulerian Tours and Fleury s Algorithm CSE21 Winter 2017, Day 12 (B00), Day 8 (A00) February 8, 2017 http://vlsicad.ucsd.edu/courses/cse21-w17 Vocabulary Path (or walk): describes a route from one vertex

More information

Math 776 Graph Theory Lecture Note 1 Basic concepts

Math 776 Graph Theory Lecture Note 1 Basic concepts Math 776 Graph Theory Lecture Note 1 Basic concepts Lectured by Lincoln Lu Transcribed by Lincoln Lu Graph theory was founded by the great Swiss mathematician Leonhard Euler (1707-178) after he solved

More information

Discrete Structures. Fall Homework3

Discrete Structures. Fall Homework3 Discrete Structures Fall 2015 Homework3 Chapter 5 1. Section 5.1 page 329 Problems: 3,5,7,9,11,15 3. Let P(n) be the statement that 1 2 + 2 2 + +n 2 = n(n + 1)(2n + 1)/6 for the positive integer n. a)

More information

MTH-129 Review for Test 4 Luczak

MTH-129 Review for Test 4 Luczak MTH-129 Review for Test 4 Luczak 1. On each of three consecutive days the National Weather Service announces that there is a 50-50 chance of rain. Assuming that they are correct, answer the following:

More information

Graph (1A) Young Won Lim 4/19/18

Graph (1A) Young Won Lim 4/19/18 Graph (1A) Copyright (c) 2015 2018 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version

More information

Mathematics and Statistics, Part A: Graph Theory Revision Exercises: Sheet 3

Mathematics and Statistics, Part A: Graph Theory Revision Exercises: Sheet 3 Mathematics and Statistics, Part A: Graph Theory Revision Exercises: Sheet 3 1. Prove Caley s theorem. There are n n 2 distinct labelled trees on n vertices. (i) Sketch a tree with 11 edges and find the

More information

Notebook Assignments

Notebook Assignments Notebook Assignments These six assignments are a notebook using techniques from class in the single concrete context of graph theory. This is supplemental to your usual assignments, and is designed for

More information

Graph theory. Po-Shen Loh. June We begin by collecting some basic facts which can be proved via bare-hands techniques.

Graph theory. Po-Shen Loh. June We begin by collecting some basic facts which can be proved via bare-hands techniques. Graph theory Po-Shen Loh June 013 1 Basic results We begin by collecting some basic facts which can be proved via bare-hands techniques. 1. The sum of all of the degrees is equal to twice the number of

More information

Fundamental Properties of Graphs

Fundamental Properties of Graphs Chapter three In many real-life situations we need to know how robust a graph that represents a certain network is, how edges or vertices can be removed without completely destroying the overall connectivity,

More information

Math 443/543 Graph Theory Notes

Math 443/543 Graph Theory Notes Math 443/543 Graph Theory Notes David Glickenstein September 8, 2014 1 Introduction We will begin by considering several problems which may be solved using graphs, directed graphs (digraphs), and networks.

More information

Number Theory and Graph Theory

Number Theory and Graph Theory 1 Number Theory and Graph Theory Chapter 7 Graph properties By A. Satyanarayana Reddy Department of Mathematics Shiv Nadar University Uttar Pradesh, India E-mail: satya8118@gmail.com 2 Module-2: Eulerian

More information

Chapter 1: Number and Operations

Chapter 1: Number and Operations Chapter 1: Number and Operations 1.1 Order of operations When simplifying algebraic expressions we use the following order: 1. Perform operations within a parenthesis. 2. Evaluate exponents. 3. Multiply

More information

PACKING DIGRAPHS WITH DIRECTED CLOSED TRAILS

PACKING DIGRAPHS WITH DIRECTED CLOSED TRAILS PACKING DIGRAPHS WITH DIRECTED CLOSED TRAILS PAUL BALISTER Abstract It has been shown [Balister, 2001] that if n is odd and m 1,, m t are integers with m i 3 and t i=1 m i = E(K n) then K n can be decomposed

More information

Note that there are questions printed on both sides of each page!

Note that there are questions printed on both sides of each page! Math 1001 Name: Fall 2007 Test 1 Student ID: 10/5/07 Time allowed: 50 minutes Section: 10:10 11:15 12:20 This exam includes 7 pages, including this one and a sheet for scratch work. There are a total of

More information

Rosen, Discrete Mathematics and Its Applications, 6th edition Extra Examples

Rosen, Discrete Mathematics and Its Applications, 6th edition Extra Examples Rosen, Discrete Mathematics and Its Applications, 6th edition Extra Examples Section 9.5 Euler and Hamilton Paths Page references correspond to locations of Extra Examples icons in the textbook. p.634,

More information

a b c d a b c d e 5 e 7

a b c d a b c d e 5 e 7 COMPSCI 230 Homework 9 Due on April 5, 2016 Work on this assignment either alone or in pairs. You may work with different partners on different assignments, but you can only have up to one partner for

More information

Unit 7 Day 4 Notes: graph coloring, Graph theory review & Quiz

Unit 7 Day 4 Notes: graph coloring, Graph theory review & Quiz Unit 7 Day 4 Notes: graph coloring, Graph theory review & Quiz Warm-Up Phones OFF & in Blue Pockets! Get out paper for notes! Agenda Notes first, Then do practice and HW questions Quiz at the end Notes:

More information

Discrete Mathematics and Probability Theory Fall 2013 Midterm #2

Discrete Mathematics and Probability Theory Fall 2013 Midterm #2 CS 70 Discrete Mathematics and Probability Theory Fall 013 Midterm # 1. (30 points) Short Answer. No justification necessary. Please write only the answer in the space provided after each question. Please

More information

2.) From the set {A, B, C, D, E, F, G, H}, produce all of the four character combinations. Be sure that they are in lexicographic order.

2.) From the set {A, B, C, D, E, F, G, H}, produce all of the four character combinations. Be sure that they are in lexicographic order. Discrete Mathematics 2 - Test File - Spring 2013 Exam #1 1.) RSA - Suppose we choose p = 5 and q = 11. You're going to be sending the coded message M = 23. a.) Choose a value for e, satisfying the requirements

More information

Math 778S Spectral Graph Theory Handout #2: Basic graph theory

Math 778S Spectral Graph Theory Handout #2: Basic graph theory Math 778S Spectral Graph Theory Handout #: Basic graph theory Graph theory was founded by the great Swiss mathematician Leonhard Euler (1707-178) after he solved the Königsberg Bridge problem: Is it possible

More information

Reference Sheet for CO142.2 Discrete Mathematics II

Reference Sheet for CO142.2 Discrete Mathematics II Reference Sheet for CO14. Discrete Mathematics II Spring 017 1 Graphs Defintions 1. Graph: set of N nodes and A arcs such that each a A is associated with an unordered pair of nodes.. Simple graph: no

More information

A graph is finite if its vertex set and edge set are finite. We call a graph with just one vertex trivial and all other graphs nontrivial.

A graph is finite if its vertex set and edge set are finite. We call a graph with just one vertex trivial and all other graphs nontrivial. 2301-670 Graph theory 1.1 What is a graph? 1 st semester 2550 1 1.1. What is a graph? 1.1.2. Definition. A graph G is a triple (V(G), E(G), ψ G ) consisting of V(G) of vertices, a set E(G), disjoint from

More information

Notes slides from before lecture. CSE 21, Winter 2017, Section A00. Lecture 9 Notes. Class URL:

Notes slides from before lecture. CSE 21, Winter 2017, Section A00. Lecture 9 Notes. Class URL: Notes slides from before lecture CSE 21, Winter 2017, Section A00 Lecture 9 Notes Class URL: http://vlsicad.ucsd.edu/courses/cse21-w17/ Notes slides from before lecture Notes February 8 (1) HW4 is due

More information

Simple graph Complete graph K 7. Non- connected graph

Simple graph Complete graph K 7. Non- connected graph A graph G consists of a pair (V; E), where V is the set of vertices and E the set of edges. We write V (G) for the vertices of G and E(G) for the edges of G. If no two edges have the same endpoints we

More information

Math.3336: Discrete Mathematics. Chapter 10 Graph Theory

Math.3336: Discrete Mathematics. Chapter 10 Graph Theory Math.3336: Discrete Mathematics Chapter 10 Graph Theory Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu Fall

More information

8.2 Paths and Cycles

8.2 Paths and Cycles 8.2 Paths and Cycles Degree a b c d e f Definition The degree of a vertex is the number of edges incident to it. A loop contributes 2 to the degree of the vertex. (G) is the maximum degree of G. δ(g) is

More information

Introduction to Graph Theory

Introduction to Graph Theory Introduction to Graph Theory Tandy Warnow January 20, 2017 Graphs Tandy Warnow Graphs A graph G = (V, E) is an object that contains a vertex set V and an edge set E. We also write V (G) to denote the vertex

More information

Math236 Discrete Maths with Applications

Math236 Discrete Maths with Applications Math236 Discrete Maths with Applications P. Ittmann UKZN, Pietermaritzburg Semester 1, 2012 Ittmann (UKZN PMB) Math236 2012 1 / 19 Degree Sequences Let G be a graph with vertex set V (G) = {v 1, v 2, v

More information

14 More Graphs: Euler Tours and Hamilton Cycles

14 More Graphs: Euler Tours and Hamilton Cycles 14 More Graphs: Euler Tours and Hamilton Cycles 14.1 Degrees The degree of a vertex is the number of edges coming out of it. The following is sometimes called the First Theorem of Graph Theory : Lemma

More information

Euler and Hamilton paths. Jorge A. Cobb The University of Texas at Dallas

Euler and Hamilton paths. Jorge A. Cobb The University of Texas at Dallas Euler and Hamilton paths Jorge A. Cobb The University of Texas at Dallas 1 Paths and the adjacency matrix The powers of the adjacency matrix A r (with normal, not boolean multiplication) contain the number

More information

CMSC 380. Graph Terminology and Representation

CMSC 380. Graph Terminology and Representation CMSC 380 Graph Terminology and Representation GRAPH BASICS 2 Basic Graph Definitions n A graph G = (V,E) consists of a finite set of vertices, V, and a finite set of edges, E. n Each edge is a pair (v,w)

More information

Indicate the option which most accurately completes the sentence.

Indicate the option which most accurately completes the sentence. Discrete Structures, CSCI 246, Fall 2015 Final, Dec. 10 Indicate the option which most accurately completes the sentence. 1. Say that Discrete(x) means that x is a discrete structures exam and Well(x)

More information

Sections 5.2, 5.3. & 5.4

Sections 5.2, 5.3. & 5.4 MATH 11008: Graph Theory Terminology Sections 5.2, 5.3. & 5.4 Routing problem: A routing problem is concerned with finding ways to route the delivery of good and/or services to an assortment of destinations.

More information

Induction Review. Graphs. EECS 310: Discrete Math Lecture 5 Graph Theory, Matching. Common Graphs. a set of edges or collection of two-elt subsets

Induction Review. Graphs. EECS 310: Discrete Math Lecture 5 Graph Theory, Matching. Common Graphs. a set of edges or collection of two-elt subsets EECS 310: Discrete Math Lecture 5 Graph Theory, Matching Reading: MIT OpenCourseWare 6.042 Chapter 5.1-5.2 Induction Review Basic Induction: Want to prove P (n). Prove base case P (1). Prove P (n) P (n+1)

More information

Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around

Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around 1 Finite Math A Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around Academic Standards Covered in this Chapter: *************************************************************************************

More information

Graph Theory CS/Math231 Discrete Mathematics Spring2015

Graph Theory CS/Math231 Discrete Mathematics Spring2015 1 Graphs Definition 1 A directed graph (or digraph) G is a pair (V, E), where V is a finite set and E is a binary relation on V. The set V is called the vertex set of G, and its elements are called vertices

More information

The Probabilistic Method

The Probabilistic Method The Probabilistic Method Po-Shen Loh June 2010 1 Warm-up 1. (Russia 1996/4 In the Duma there are 1600 delegates, who have formed 16000 committees of 80 persons each. Prove that one can find two committees

More information

UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis

UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis Lecture 11 Class URL: http://vlsicad.ucsd.edu/courses/cse21-s14/ Lecture 11 Notes Goals for this week (Tuesday) Linearity

More information

MC302 GRAPH THEORY SOLUTIONS TO HOMEWORK #1 9/19/13 68 points + 6 extra credit points

MC302 GRAPH THEORY SOLUTIONS TO HOMEWORK #1 9/19/13 68 points + 6 extra credit points MC02 GRAPH THEORY SOLUTIONS TO HOMEWORK #1 9/19/1 68 points + 6 extra credit points 1. [CH] p. 1, #1... a. In each case, for the two graphs you say are isomorphic, justify it by labeling their vertices

More information

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points MC 0 GRAPH THEORY 0// Solutions to HW # 0 points + XC points ) [CH] p.,..7. This problem introduces an important class of graphs called the hypercubes or k-cubes, Q, Q, Q, etc. I suggest that before you

More information

Characterizing Graphs (3) Characterizing Graphs (1) Characterizing Graphs (2) Characterizing Graphs (4)

Characterizing Graphs (3) Characterizing Graphs (1) Characterizing Graphs (2) Characterizing Graphs (4) S-72.2420/T-79.5203 Basic Concepts 1 S-72.2420/T-79.5203 Basic Concepts 3 Characterizing Graphs (1) Characterizing Graphs (3) Characterizing a class G by a condition P means proving the equivalence G G

More information

REGULAR GRAPHS OF GIVEN GIRTH. Contents

REGULAR GRAPHS OF GIVEN GIRTH. Contents REGULAR GRAPHS OF GIVEN GIRTH BROOKE ULLERY Contents 1. Introduction This paper gives an introduction to the area of graph theory dealing with properties of regular graphs of given girth. A large portion

More information