MAT1830 - Discrete Mathematics for Computer Science
Assignment #6 Solutions
1. E is reflexive and symmetric and transitive.
E is not antisymmetric (for example, aEb and bEa).
F is reflexive and antisymmetric and transitive.
F is not symmetric (for example
MAT1830 - Discrete Mathematics for Computer Science
Assignment #3 Solutions
(1) (a) This is true. For any integer, there is another integer which is double the first.
(b) This is false. It is not the case that every integer is double an integer. For examp
MAT1830 - Discrete Mathematics for Computer Science
Assignment #7
To be handed in at the beginning of your support class in week 9 (2 6 May)
Show your working for all questions.
1. Find expressions for each of the following. (Leave your answer as a mathem
MAT1830 - Discrete Mathematics for Computer Science
Assignment #7 Solutions
1. (a) A ternary string of length 10 is an ordered selection of 10 elements from the set cfw_0, 1, 2 with
3 elements. There are 310 such selections.
[1]
(b) Such a string is a per
MAT1830 - Discrete Mathematics for Computer Science
Tutorial Sheet #10 and Additional Practice Questions
Tutorial Questions
1. Find recursive definitions for the following.
(a) The sequence a0 , a1 , a2 , . . . where an = 2n for n 0.
(b) The sequence b0 ,
Lecture 21: Probability and Independence
Lecture 21: Probability and Independence
Why should you care?
I Many algorithms work better if they make random choices.
For example, quicksort can avoid its worst case by making
random choices. The Pollard- factor
Learning Outcomes for MAT1830
At the completion of this unit, students should be able to:
I
identify basic methods of proof, particularly induction, and
apply them to solve problems in mathematics and computer
science;
I
manipulate sets, relations, functi
Lecture 25: Discrete distributions
In this lecture well introduce some of the most common and
useful (discrete) probability distributions. These arise in various
different real-world situations.
Discrete uniform distribution
This type of distribution aris
Lecture 29: Graph Theory
What graph theory is NOT about
Supply
Demand
What graph theory IS about
A graph consists of a set of objects called vertices and a list of
pairs of vertices, called edges.
Graphs are normally represented by pictures, with vertex A
Lecture 22: Conditional probability and Bayes
theorem
Your friend believes that Python coding has become more popular
than AFL in Melbourne. She bets you $10 that the next person to
pass you on the street will be a Python programmer. You feel
confident ab
MAT1830 - Discrete Mathematics for Computer Science
Tutorial Sheet #10 Solutions
1. (a) Note that a0 = 20 = 1.
Also, an = 2n = 2(2n1 ) = 2an1 for n 1.
So a0 = 1 and an = 2an1 for all integers n 1 is a recursive definition for the sequence.
(b) Note that b
MAT1830 Sample Exam 1 Solutions
(1) (a) Calculate
504
385
119
28
=
=
=
=
1
3
4
4
385
119
28
7
+
+
+
+
119
28
7
0
So gcd(504, 385) = 7.
[6]
(b) No. If there was an integer y such that 504y 10 (mod 385), then we would have, for some
integer k, 504y = 385k +
MAT1830 - Discrete Mathematics for Computer Science
Assignment #9
To be handed in at the beginning of your support class in week 11 (15 19 May)
Fully explain your answers for all questions.
1. A biased coin flips heads with probability 73 and tails with p
MAT1830 - Discrete Mathematics for Computer Science
Assignment #7
To be handed in at the beginning of your support class in week 9 (1 5 May)
Fully explain your answers for all questions.
1. Find expressions for each of the following. (Leave your answer as
MAT1830 Sample Exam 1
When you are instructed to write down something, no explanation is required. Everywhere else,
you must justify your answers. Marks will be allocated for clarity of explanation. It is not enough to get
the right answer.
(1) (a) Use th
MAT1830 - Discrete Mathematics for Computer Science
Assignment #8
To be handed in at the beginning of your support class in week 10 (8 12 May)
Fully explain your answers for all questions.
1. One side of a 6-sided die is marked 0, two sides are marked 2,
MAT1830 - Discrete Mathematics for Computer Science
Tutorial Sheet #9 and Additional Practice Questions
Tutorial Questions
1. (a) Find the expected value and variance of a random variable X with probability distribution
given by the table below.
0 1 2
x
P
MAT1830 - Discrete Mathematics for Computer Science
Tutorial Sheet #8 and Additional Practice Questions
Tutorial Questions
1. A fair coin is flipped three times. Let X be the number of times heads is flipped. Find the
probability distribution of X.
2. Abo
MAT1830 - Discrete Mathematics for Computer Science
Tutorial Sheet #8 and Additional Practice Questions
1. The sample space is cfw_HHH, HHT, HTH, HTT, THH, THT, TTH, TTT (where HTH means heads
on the first flip, tails on the second, heads on the third, an
MAT1830 - Discrete Mathematics for Computer Science
Tutorial Sheet #11 Solutions
1. (a)
V1
V2
V3
V4
(b) 1. The walk is V1 , V2 , V1 , V2 .
(c) For any n 2:
- The 1st entry in the top row of M n is the number of walks of length n from V1 to V1 , which
is 1
Lecture 30: Walks, paths and trails
There are several ways of travelling around the edges of a graph.
A walk is a sequence
V1 , e1 , V2 , e2 , V3 , e3 , . . . , en1 , Vn ,
where each ei is an edge joining vertex Vi to vertex Vi+1 . (In a
simple graph, whe
Lecture 28: Recursion, lists and sequences
A list or sequence of objects from a set X is a function f from
cfw_1, 2, . . . , n to X , or (if infinite) from cfw_1, 2, 3, . . . to X .
We usually write f (k) as xk and the list as hx1 , x2 , . . . , xn i, or
Lecture 23: Random variables
In a game, three standard dice will be rolled and the number of
sixes will be recorded. We could let X stand for the number of
sixes rolled. Then X is a special kind of variable whose value is
based on a random process. These
MAT1830 - Discrete Mathematics for Computer Science
Tutorial Sheet #6 Solutions
1. There are lots of possibilities. Ill give one possible relation as a set of ordered pairs and leave you
to draw the diagrams.
(a) cfw_(a, a), (b, b), (c, c), (d, d), (e, e)
MAT1830 - Discrete Mathematics for Computer Science
Tutorial Sheet #6 and Additional Practice Questions
Tutorial Questions
1. Let X = cfw_a, b, c, d, e, f .
(a) Make up a relation on X which is reflexive and transitive but is not symmetric and is not
anti
MAT1830 - Discrete Mathematics for Computer Science
Tutorial Sheet #7 Solutions
Unless youre told otherwise, its always OK to leave the answers to these kinds of questions as
mathematical expressions rather than evaluating them as (sometimes huge) numbers
MAT1830 - Discrete Mathematics for Computer Science
Tutorial Sheet #7 and Additional Practice Questions
Tutorial Questions
1. Calculate the following by hand.
(a) 4!
(b) 10!
8!
(c)
(d)
10
8
7
3
2. (a) How many ways can a president, treasurer and secretary
MAT1830 - Discrete Mathematics for Computer Science
Assignment #4
To be handed in at the beginning of your support class in week 6 (37 April)
Show your working and give full explanations for all questions.
(1) Define a sequence of integers a1 , a2 , a3 ,
MAT1830 - Discrete Mathematics for Computer Science
Assignment #5
To be handed in at the beginning of your support class in week 7 (10 13 April)
If youre missing out on your usual support class on Fri 14 Apr, you can submit your assignment to me
at a lect
MAT1830 Sample Exam 2
When you are instructed to write down something, no explanation is required. Everywhere else,
you must justify your answers. Marks will be allocated for clarity of explanation. It is not enough to get
the right answer.
(1) (a) Use th