Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
Sample Exam A Semester 2 2019
The University of SydneySchool of Mathematics and Statistics
MATH1064
Discrete Mathematics for Computation
November 2019 Lecturer: Jonathan Spreer
Time Allowed: Writing - two hours; Reading - 10 minutes
Exam Conditions: This is a closed-book examination — no material permitted. Writing
is not permitted at all during reading time.
Family Name: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SID: . . . . . . . . . . . . . . . . . . . . . . . . . . .
Other Names: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Seat Number: . . . . . . . . . . . . . . . . .
Please check that your examination paper is complete (13 pages) and indicate by signing below.
I have checked the examination paper and a�rm it is complete.
Signature: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Date: . . . . . . . . . . . . . . . . . . . . . . . . .
This examination has two sections: Multiple Choice and Extended Answer.
The Multiple Choice Section is worth 50% of the total examination.
There are 20 questions. The questions are of equal value.
All questions may be attempted.
Answers to the Multiple Choice questions must be entered on
the Multiple Choice Answer Sheet before the end of the examination.
The Extended Answer Section is worth 50% of the total examination.
There are 5 questions. The questions are of equal value.
All questions may be attempted. Working must be shown.
University-approved calculators may be used.
THE QUESTION PAPER MUST NOT BE REMOVED FROM THEEXAMINATION ROOM.
Marker’s useonly
Page 1 of 13
Sample Exam A Semester 2 2019 Page 2 of 13
Multiple Choice Section
In each question, choose at most one option.Your answers must be entered on the Multiple Choice Answer Sheet.
1. Let A and B be finite sets. Given that there exists a bijective function f : A � B we
may conclude that:
(a) |A| < |B| (b) |A| ⇥ |B| (c) |A| = |B| (d) |A| ⇤ |B| (e) |A| > |B|
2. How many numbers are there between 1 and 1000 that are divisible by 15 and 2?
(a) 100 (b) 66 (c) 12
(d) 33 (e) None of the above.
3. The general solution of the recurrence relation xn = 8xn�1⌅ 16xn�2 is which one of the
following expressions, where A and B are constants:
(a) xn = A4n
(b) xn = A2n+ B8
n(c) xn = A2
n+ Bn8
n
(d) xn = A4n+ B4
n(e) xn = A4
n+ Bn4
n
4. . . . 20. (There will be 20 multiple choice questions in the real exam.)
O
O
o
Sample Exam A Semester 2 2019 Page 3 of 13
Blank page for working; it will not be marked
End of Multiple Choice Section
Make sure that your answers are entered on the Multiple Choice Answer Sheet
The Extended Answer Section begins on the next page
Sample Exam A Semester 2 2019 Page 4 of 13
Extended Answer Section
There are five questions in this section, some with a number of parts. Write your answersin the space provided below each part. You must show your working and give reasons foryour answers. If you need more space there are extra pages at the end of the examination
paper.
1. (a) Consider the sets A = {a, b, c, 1, 2, 3}, B = {b, c, 1, 4, 5}, and C = {1, 2, 3, 4, 5}.Write down explicitly a bijection from A \B to B ⇧C, or explain why one does not
exist.
Question 1 continues on the next page
AIB a 2,33B n C E 1 4,53
f AaB Bnc
flat 1 f127 4 f137 5
Sample Exam A Semester 2 2019 Page 5 of 13
Question 1 continued
(b) Let X, Y be sets and consider functions f : X � Y and g : Y � X. Suppose that
for every y ⌃ Y we have that f(g(y)) = y. Prove that f is surjective.
Question 1 continues on the next page
Let ye Y Then taking x gey c X
we havefix f gey y
Hence f is surjective
Sample Exam A Semester 2 2019 Page 6 of 13
Question 1 continued
(c) Suppose that A,B, C are sets. Prove the statement
A \ (B ⇧ C) = (A \B) ⌥ (A \ C).
(A Venn diagram is not su⇥cient, be explicit about the elements in A, B, and C.)
AVBnc ECAi A
Let c All Bnc Then X E A and
Xtc B n C
Either x to B or X E C
Either XE Al B or X E Atc
7 x e AIB v Aic
A'B7uCAic7EAiCBn
x e Ai B u Aic Hence either e AIB
or Xf Atc If xe Al B then Xtc B
and hence X E Bnc If c Aic then
EC and again X B C On the
other hand E A Altogether XE Al Bnc
All Bnc AIB v Alc
Sample Exam A Semester 2 2019 Page 7 of 13
2. (a) How many arrangements are there of the letters of WOOLLOOMOOLOO? (In all
parts of this question it is not necessary to evaluate formulas involving factorials,
binomial coe⇥cients, etc.)
(b) How many arrangements are there with the three Ls together?
Question 2 continues on the next page
Ws 1 Os 8 Ls 3 Ms I1 8 3 1
arrangements 1 g z l 84
Treat L as one block Hence
If l possible arrangements
Sample Exam A Semester 2 2019 Page 8 of 13
Question 2 continued
(c) How many arrangements are there with the W and M together?
Treat WM or MW as one block
Traci p I Sisia
of arrangements of arrangementscontaining MW containing Wh
Sample Exam A Semester 2 2019 Page 9 of 13
3. (a) Suppose that (an)n⇥1 is a sequence defined by
a1 = 1, a2 = 3 and ak = ak�1 + ak�2 for all k ⇤ 3.
Prove that for all n ⇤ 1, we have
an ⇥�
7
4
⇥n
.
Question 3 continues on the next page
We use strong induction
Base cases a E Fa 3 E F
2461 3 1
Hyp i Assume 9 92 i ale are all true k 22
Iud step ah an Uu
aw III FtlEI tE 4
E 4116
Il If FSince the statement is true for h E 2 and
if it is true for all u Eh then it is alsotrue for ht 1 it is true for all us I
Sample Exam A Semester 2 2019 Page 10 of 13
Question 3 continued
(b) We draw n mutually intersecting circles in the plane so that each one crosses each
other one exactly twice and no three have a boundary point in common. (Think of
Venn diagrams with two or three mutually intersecting sets.) We are interested in
the number of regions that the plane is divided into. For example, if n = 1, then the
plane is divided into two regions, the inside and the outside of the circle. If n = 2,
then the plane is divided into four regions.
Find a formula for the number of regions that the plane is divided into with n circles.
Prove that your formula is correct.
4 2 u 3 u 44 regions 8 regions 14 regions
claim u mutually intersecting circles createh2 u 2 regions
Proof Induction on u If u 1 then 12 1 2 2and I circle producer Z regions
Suppose u circler separate the plane into 42 4 2
regions
Add Cuthst circle Since it crosses eachof the n circles in 2 points it intersects allcircles in 2h points Each pair of cousequtivepoints splits 1 region into 2
Altogether this creates 2h more regionsU2 n 2 12in ht 1
2uti 2 and the
claim fellows by the principle of math induction
Sample Exam A Semester 2 2019 Page 11 of 13
4. and 5. There will be five extended questions in the real exam.
You may use the next pages for your answers
Sample Exam A Semester 2 2019 Page 12 of 13
This page may be used if you need more space for your answers
End of Extended Answer Section
Sample Exam A Semester 2 2019 Page 13 of 13
Formula Page
Logic
Commutative laws: p � q q � p p ⌦ q q ⌦ p
Associative laws: (p � q) � r p � (q � r) (p ⌦ q) ⌦ r p ⌦ (q ⌦ r)
Distributive laws: p � (q ⌦ r) (p � q) ⌦ (p � r)
p ⌦ (q � r) (p ⌦ q) � (p ⌦ r)
Identity laws: p � (tautology) p
p ⌦ (contradiction) p
Universal bound laws: p ⌦ (tautology) (tautology)
p � (contradiction) (contradiction)
Negation laws: p ⌦ ¬p (tautology)
p � ¬p (contradiction)
Double negative law: ¬(¬p) p
Idempotent laws: p � p p p ⌦ p p
De Morgan’s laws: ¬(p � q) ¬p ⌦ ¬q ¬(p ⌦ q) ¬p � ¬qAbsorption laws: p ⌦ (p � q) p p � (p ⌦ q) p
Negations: ¬(tautology) is a contradiction
¬(contradiction) is a tautology
Conditional: p� q ¬p ⌦ q
Grammars: Restrictions on Productions w1 � w2
Context-sensitive (type 1): w1 = lAr and w2 = lwr, where A ⌃ N, l, r, w ⌃ (N ⌥T )�and w ↵= �; or w1 = S and w2 = � as long as S is not
on the right-hand side of another production
Context-free (type 2): w1 = A, where A is a nonterminal symbol
Regular (type 3): w1 = A and w2 = aB or w2 = a, where A ⌃ N, B ⌃ N,
and a ⌃ T ; or w1 = S and w2 = �
Properties of logarithms
logb(xy) = logb(x) + logb(y), logb(xa) = a logb(x), logc(x) =
logb(x)
logb(c)
Discrete Probability
A random variable X : S � N⌅ {0} has geometric distribution with parameter p ⌃ [0, 1] if
p(X = k) = (1⌅ p)k�1
p for each k ⌃ N⌅ {0}. In this case E(X) =1
pand V (X) =
1⌅ p
p2.
Bayes’ theorem: p(F | E) =p(F )
p(E | F ) · p(F ) + p(E | F ) · p(F )· p(E | F )
End of Examination
Sample Exam B Semester 2 2019 Multiple Choice Answer Sheet
0 0�⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅
1 1�⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅
2 2�⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅
3 3�⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅
4 4�⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅
5 5�⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅
6 6�⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅
7 7�⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅
8 8�⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅
9 9�⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅
Write your
SID here ⌅�
Code yourSID intothe columnsbelow eachdigit, byfilling in theappropriateoval.
Answers ⌅�a b c d e
Q1 �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅Q2 �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅Q3 �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅Q4 �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅ �⇥ ⇤⌅
The University of SydneySchool of Mathematics and
Statistics
MATH1064 Discrete
Mathematics for Computation
Family Name: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Other Names: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Seat Number: . . . . . . . . . . . . . . . . .
Attempt every question. You will not be
awarded negative marks for incorrect
answers.
Fill in exactly one oval per question.
If you make a mistake, draw a cross (X)
through any mistakenly filled in oval(s)
and then fill in your intended oval.
An answer which contains two or more
filled in (and uncrossed) ovals will be
awarded no marks.
This is the first and last page of this answer sheet