(1/25) MA284 : Discrete Mathematics Week 12: Trees; Review http://www.maths.nuigalway.ie/ ~ niall/MA284/ 22 and 24 November, 2017 C C H H H C C H H H H H H H 1 Trees Recall... Applications: Chemistry Applications: Decision Trees Spanning trees 2 What we didn’t study Directed graphs Adjacency Matrix 3 Review The Final Exam Past exam papers Revision Questions 4 A summary in one slide (1/2)... Friday's annotated slides
15
Embed
Friday's annotated slides (1/25) - maths.nuigalway.ieniall/MA284/Week12-2.pdf · If the graph has n vertices, labelled {1,2,...,n},
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
(1/25)
MA284 : Discrete Mathematics
Week 12: Trees; Review
http://www.maths.nuigalway.ie/~niall/MA284/
22 and 24 November, 2017
C
C H H H
C C H
H H H H H H
1 Trees
Recall...
Applications: Chemistry
Applications: Decision Trees
Spanning trees
2 What we didn’t study
Directed graphs
Adjacency Matrix
3 Review
The Final Exam
Past exam papers
Revision Questions
4 A summary in one slide (1/2)...
Friday's annotated slides
What we didn’t study (13/25)
Other topics in combinatorics and graph theory that we have not cover. The
most interesting (to my mind are)
directed graphs
the representation of graphs using adjacency and incidence matrices;
Algorithms, like determining if a graph is connected, or finding the
shortest path between two vertices...
the graph Lapacian;
visualisation of graphs;
and many, many, more...
What we didn’t study Directed graphs (14/25)
Graphs often represent networks, such as the road network we had earlier, or
social networks. So far, we have had that, if vertex a is adjacent to vertex b,
then b is adjacent to a.
In many situations, this is not reasonable:
a city road system might have a one-way system;
on a social network, you might follow someone who does not follow you
back.
a
b
c
e
f
dd
f
e
b
c
a
What we didn’t study Directed graphs (15/25)
Example: Graph of a tournament (2017 Senior Men’s 6 Nations Rugby)
IRELAND
FRANCE
ENGLAND
ITALY
SCOTLAND
WALES
What we didn’t study Adjacency Matrix (16/25)
In a practical setting, a graph must be stored in some computer-readable
format. One of the most comment is an adjacency matrix. If the graph has n
vertices, labelled {1, 2, . . . , n}, then the adjacency matrix is an n× n matrix, A,
with entries
ai,j =
�1 vertex i is adjacent to j
0 otherwise.
24
3
5
1
0 0 0 0 1
0 0 1 1 0
0 1 0 1 1
0 1 1 0 1
1 0 1 1 0
What we didn’t study Adjacency Matrix (17/25)
Properties of the adjacency matrix
The adjacency matrix of a graph is symmetric.
The adjacency matrix of a directed graph is not necessarily symmetric.
If B = Ak , then bi,j is the number of paths from vertex i to vertex j .
We can work out if a graph is connected by looking at the eigenvalues of
A.
If the graphs G and H are isomorphic, and have adjacency matrices AG
and Ah, respectively, then there is a permutation matrix, P, such that
PAGP−1 = AH .
Review (18/25)
But the set of topics that we did study includes:
1. The additive and multiplicative principles;
2. Sets, including power sets; union and intersection;
3. the Principle of Inclusion/Exclusion (PIE) and its applications;
Up until 2014/2015, Discrete Mathematics was delivered as two separate
modules: MA284 and MA204. It’s current incarnation is similar, but is not
identical to either. Some of the past exam papers for them are useful study
aids:
2016/2017 – MA204/MA284: Everything
2015/2016 – MA204/MA284: Everything except Q4(c).
2014/2015 – MA284 Q1, Q2, Q3, Q4(b),
but not Q4(a) [Platonic graphs] and Q4(c) [m-ary trees]
2014/2015 – MA204 Q1; Q2(a), (b) and (d); Q3(a) and (b), Q4
but not Q2(c) [recurrence]; Q3(c) [Reverse Polish
Notation]
Review Revision Questions (21/25)
Q1. Find the number of different arrangements of the letters in the word:MISAPPREHENSION.Of these arrangements,
(a) how many have all the vowels together?(b) how many start and end with N?(c) how many start or end with N?(d) how many have all the letters in alphebetical order?
Q2. (a) The sets A and B are such that |A| = 10 and |B| = 20.What is the largest possible value of |A ∪ B|?What is the largest possible value of |A ∩ B|?What is the value of |A ∪ B|+ |A ∩ B|?
(b) Suppose that four sets are such that
each set has 30 elements;each pair of sets share 10 elements, andeach triple of sets share 5 elements.
If the union of all four sets has 80 elements, how many elements are therein the intersection of all four sets?
Q3. (a) Prove that k�nk
�= n
�n−1k−1
�. (b) Prove that
�nk
�=
�n−1k−1
�+
�n−1k
�.
Q4. (a) How many (binary) bit strings are there of length 8?How many of these have weight 3?
Review Revision Questions (22/25)
(b) A ternary string is a sequence of 0s, 1s, and 2s. How many ternary stringsof length 17 are there?How many of those strings contain exactly eight 0s, four 1s, and five 2s?How many ternary strings of length 17 contain an odd number of 1s?
Q5. How many non-negative integer solutions are there to the equationx1 + x2 + x3 + x4 + x5 < 11, if there are no restrictions?How many solutions are there if x1 > 3?How many solutions are there if each xi < 3?
Q6. Students in an Indiscreet Mathematics class work together in groups of 5 for anassignment. The group is given a score, which they divide up, according to theamount of work each did, to get their individual scores. Aoife, Brian, Conor,Declan, and Eimer worked together, and got a score of 20.
(a) How many ways can their scores be assigned?(b) The were given scores (respectively) of 2, 4, 6, 8 and 0. The lecturer
entered these scores, but assigned them all to the wrong people. How manyways can this happen?
Q7. (a) Prove that�
v∈V
deg(v) = 2|E | for any graph G = (V ,E). Deduce that the
number of edges in the complete graph on n vertices is equal to�n2
�.
(b) Prove that if a connected planar graph has v vertices, e edges, and f faces,then v − e + f = 2. Use this to show that K3,3 is not planar.
Review Revision Questions (23/25)
Q8. Determine the chromatic number of each of the following graphs, and give acorresponding colouring.
1
2 5
8 7
3
9
4
10
6
Q9. Explain the terms Eulerian path and Eulerian circuit.For each of the following graphs, determine if it has an Eulerian path and/orEulerian circuit. If so, give an example; if not, explain why.
(a) G = (V ,E) with V = {a, b, c, d , e, f } and E =�{a, b}, {a, c}, {a, d},
{a, f }, {b, c}, {b, d}, {b, e}, {c, e}, {c, f }, {d , e}, {d , f }, {e, f }�
(b)
a
b h
c
e
f
d
g
ji
Q10. (a) Show that if T is a tree with e edges, then it has e + 1 vertices.(b) Show that if T is an acyclic graph with v vertices, and e = v − 1 edges,