Professional Documents
Culture Documents
FINAL DSP Question
FINAL DSP Question
FINAL DSP Question
1. If you prefer, you can write your answers and then take pictures. Copy/insert the pictures
into MS Word document. (you may save as .pdf file)
2. I’ll only accept .pdf version or Ms. Word (.docx)
3. Save the file as using your id as the file name(example: 192312322.pdf or
192312322.docx)
https://forms.gle/KTh6HxAwG3vgJwva9
(i) Draw its diagram and find domain and co-domain. [2m]
(ii) List all the range of function. [1m]
(iii) Determine if it’s injective, surjective and bijective. [1m]
(b) Consider the following function. [2m]
int curve(int y)
if (y == 0)
return 0;
else
Show the tracing process to derive the result by this function call: curve (5).
1
DSP5221 DISCRETE STRUCTURES & PROBABILITY TRI 2020
(c) Among a set of 5 black balls and 3 red balls, how many selections of 5 balls can be made
such that at least 3 of them are black balls. [2m]
(d) A random sample of 250 working adults found that 37% access the internet at work, 44%
access the internet at home and 21% access the internet at both work and home. What is the
probability that a person in this sample selected at random accesses the internet at home or
at work? [2m]
Let x denote the number of times a certain numerical control machine will malfunction: 1, 2 or 3
times on any given day. Let y denote the number of times a technician is called on an emergency
call. Their joint probability distribution is given as :
p(x,y) x
1 2 3
y
0.05 0.05 0.10
1
0.05 0.10 0.35
3
0.00 0.20 0.10
5
2
DSP5221 DISCRETE STRUCTURES & PROBABILITY TRI 2020
(a) You are conducting a survey of drivers and their views on the most annoying habits of other
drivers. 61% of the participants view talking on cellphones as the most annoying habit. Let x
represent the number who named talking on cell phones as the most annoying habit. Six people
are randomly selected in the survey.
a) Find the probability :
i. Exactly 2 people will name “talking on the cell phones”. [1m]
ii. At least five people will name “talking on the cell phones”. [1m]
b) Find the mean and standard deviation of the binomial distribution. [2m]
(b) Mei Mei is planning to purchase a new oven. She is considering brands such as Elba, Khind
and Panasonic. She will choose among these 3 brands which is illustrated by the following tree
diagram. For each brand, the probability of its oven being defect after 1 year is given.
0.3321 0.4442
x
Elba Panasonic
Khind
0.33
0.22 0.48 0.67
0.78 0.52
(i) Based on the tree diagram above, what is the value of x? [1m]
(ii) What is the probability the Mei Mei will have a defective oven after 1 year. [1m]
(iii) What is the probability that Mei Mei buys a Panasonic oven given that the new oven
will be defective after 1 year? [2m]
(c) An author has 6 different books in print. If those 6 books are stacked in a random order, what
is the probability that they are arranged in alphabetical order from top to bottom ? [2m]
3
DSP5221 DISCRETE STRUCTURES & PROBABILITY TRI 2020
e1 e2 e3 e4 e5 e6 e7 e8 e9
A 1 1 1 0 0 0 0 0 0
B 0 1 0 0 1 0 1 1 1
C 0 0 1 1 1 1 0 0 0
D 1 0 0 1 0 0 0 0 0
E 0 0 0 0 0 1 1 0 0
F 0 0 0 0 0 0 0 1 1
125
107 163
114
4
DSP5221 DISCRETE STRUCTURES & PROBABILITY TRI 2020
(a) Draw the transition diagram of a finite state automaton given the property it accepts strings
over [a,b] that contains abba. (Note: The input is always strings over [a,b]). [3m]
(b) Given a finite state automaton table which consists of (I, S, f, A, S0).
I = {M,N,T}, S = {S0, S1, S2, S3, S4}, A = {S1, S3, S4}
I
M N T
S
S0 S1 S3 S2
S1 S0 S1 S4
S2 S3 S1 S0
S3 SO S2 S4
S4 S2 S3 S1
(i) Draw the transition diagram of the finite state automaton. [5m]
(ii) Determine if the input strings will be accepted by the finite state automaton above.
State yes or no for every input string:
MNTNTM [1m]
TTNNTTMNN [1m]
~END~