程序案例-ITNPBD1

University of Stirling ITNPBD1
Computing Science & Mathematics Autumn 2021
ITNPBD1 —Mathematical Foundations
Assignment — Deadline: 23 December 2021 17:00
Instructions
Please write (or type) solutions on plain A4 sized paper.
Write clearly, and explain the arguments you are using.
Full working must be shown, otherwise marks will be lost.
Scan your assignment (if you handwrite) and submit it in a pdf format as a single file on
CANVAS.
It is your responsibility to make sure you have submitted your work by the deadline.
Important guidance
Coursework and assessments are anonymously marked for fairness, and therefore you should not
put your name on any coursework. Always use your student number.
You must ensure that the work you submit is entirely your own, is free from plagiarism and due
acknowledgement is given to all sources you have used. For help and further information see:
https://www.stir.ac.uk/media/stirling/services/academic-registry/documents/policy-and-
procedure-academic-integrity-misconduct.docx
[ Questions overleaf.]
1
ITNPBD1
1. Amir and Jingpeng each play a single round of a computer game, which ends with a win or
a loss.
LetA denote the event that Amir loses, and J denote the event that Jingpeng loses the game
they play, respectively. Suppose that P (A) = 1/9 and P (J) = 1/12. We assume that the
events A and J are independent.
Find the probability that:
(i) Jingpeng wins the game it plays. [1]
(ii) Both of them lose the game they play. [1]
(iii) At least one of them loses the game they play. [2]
(iv) Both of them win the game they play. [2]
[6]
2. A magic bag contains 8 raspberries, 6 watermelons, and 7 bananas. 5 pieces of fruits are
taken out from the magic bag randomly without replacement. Find the probability that
(a) 3 raspberries and 2 watermelons are taken, [2]
(b) the 5 pieces of fruits taken are all bananas, [2]
(c) all of the 5 fruits taken are the same kind, [3]
(d) the 5 pieces taken contain at least 4 raspberries. [4]
[11]
3. You have a deck of 52 playing cards (check online for the full composition of a 52 card
deck if you are unsure).
(i) How many different 8 card hands can be dealt [2]
(ii) What is the probability that a hand of 8 dealt randomly contains (exactly) 2 aces [2]
(iii) What is the probability that a hand of 7 dealt randomly will have 7 cards of the same
suit
[4]
[8]
4. An influenza vaccine is produced by two different companies. It is known that a vaccine
produced by company 1 is effective with probability 0.89, while a vaccine produced by
company 2 is effective with probability 0.93. We also know that company 1 supplies 40%
of the vaccines, while company 2 supplies 60% of the vaccines ordered by the government.
(i) What is the probability that a vaccine is effective, given that it was produced by com-
pany 2 [1]
(ii) What is the probability that a randomly chosen vaccine from the government’s order
is not effective [4]
(iii) What is the probability that given a vaccine is not effective that it was produced by
company 1 [3]
[8]
2
ITNPBD1
5. Suppose someone e-mails you 10 different files you need to save one-by-one to your com-
puter. Suppose that in total you have 6 different empty folders on your computer.
(i) How many ways can you save the files into the 6 folders if the temporal order in which
you save the individual files does not matter. [4]
(ii) How many ways can you save the files into the 6 folders if the temporal order in which
you save the individual files matters. [4]
[8]
6. Compute the determinant, and use Gauss-Jordan elimination to find the inverse of the fol-
lowing matrix (if it exists).
M =
218 0 00 218 2
0 1 1
.
[10]
7. Let
A =
2 0 12 2 2
0 4 1
.
(a) Find A2 and A3, and verify that
A3 A2 12A = 12I
holds, where I stands for the identity matrix. [6]
(b) Find A 1 by multiplying the equation above on both sides by A 1. [6]
[12]
8. Let
C =
1 0 00 3 6
0 1 2
.
Verify that C2 = C holds. Find the eigenvalues and eigenvectors of C.
[12]
3
ITNPBD1
9. Write an essay [minimum 700, maximum 1000 words (equations/formulas do not count
as words)] describing an application of a method or concept from probability or statistics
to data science or artificial intelligence. Key points to consider:
(1) describe the data science/artificial intelligence problem, with particular emphasis on
its importance and highlighting the challenges
(2) introduce rigorously and concisely the mathematics (basic notations, concepts and
results),
(3) reflect and analyse how the mathematical/statistical tools are being utilised/exploited,
and in particular how they help to solve a real world problem.
[25]
For question 9 there are some references in the appropriate Teams folder.
You can use those if you like, or find something else, which you find more interesting.
Total marks: 6+11+8+8+8+10+12+12+25=100 (=100%)
[End of assignment.]