You are on page 1of 14

Name: Dominick B.

Powell
ID: 620144363
Due: October 2, 2022
Course: COMP2201 – Discrete Mathematics
Assignment 1

Question 1 [10 marks] – COMPULSORY


a. The formula for the number of permutations of n objects of t types is
(n! / n1! x n2! x … x nt!), because the orderings have repetitions and many objects can be
picked in different ways.

52 !
b. 8 ! 6 ! 6 ! 6 !5 ! 3! 3!2 ! = 6.203212188 x1050

c.
d. Question: Each month one bus travels from UWI Mona to Spanish Town. In 2020 due to
Covid, 6 buses traveled the route. Show that at least one bus traveled 2 months.

e. Assuming X is the number of days in a week – {1, 2, 3……12} and Y is the number of
buses that travels – { c1, c2, c3,…..c6 }.

We have |X| = n = 12 and |Y| = m = 6 and k = ceiling of (n/m),


Which is; ceiling of (12/6) = ceiling of (2) = 2.

By pigeonhole principle, there are at least 2 months b1, b2 that is an element of X, such
that f (a1) = f (a2), i.e. match the same bus.
Therefore, at least 1 bus travels 2 of the months.
Question 2 [6 marks]

From the Tree Diagram, the number of selections in which either Rhona is Vice Captain or Trevion is Captain,
or Quilston is Operations Officer otherwise he is not an officer is Forty-Two (42).
Question 3 [2 marks]

To determine the row of Pascal’s triangle containing the following binomial coefficients (¿¿12k ), 0 ≤ k ≤12
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1
1 7 21 35 35 21 7 1
1 8 28 56 70 56 28 8 1
1 9 36 84 126 126 84 36 9 1
1 10 45 120 210 252 210 120 45 10 1
1 11 55 165 330 462 462 330 165 55 11 1
1 12 66 220 495 792 924 792 495 220 66 12 1

¿ 12
( )
Therefore, the row of Pascal’s triangle containing the binomial coefficients ¿ k , 0 ≤ k ≤12 is

1 12 66 220 495 792 924 792 495 220 66 12 1

Pascal’s Theorem states,


C (n+1, k) = C (n, k+1) + C(n, k) for 1 < = k < = n

Therefore,
 C (11+1, k) = C(11, k-1) + C(11, k)
C (11+1, 1) = C(11, 1-1) + C(11, 1) = 12
C (11+1, 2) = C(11, 2-1) + C(11, 2) = 66
C (11+1, 3) = C(11, 3-1) + C(11, 3) = 220
C (11+1, 4) = C(11, 4-1) + C(11, 4) = 495
C (11+1, 5) = C(11, 5-1) + C(11, 5) = 792
C (11+1, 6) = C(11, 6-1) + C(11, 6) = 924
C (11+1, 7) = C(11, 7-1) + C(11, 7) = 792
C (11+1, 8) = C(11, 8-1) + C(11, 8) = 495
C (11+1, 9) = C(11, 9-1) + C(11, 9) = 220
C (11+1, 10) = C(11, 10-1) + C(11, 10) = 66
C (11+1, 11) = C(11, 11-1) + C(11, 11) = 12
Question 4 [5 marks] – COMPULSORY
a. If x is congruent to 13 modulo 17 then 7x - 3 is congruent to which number modulo 17?

b. Addition Table of Z13

+ 0 1 2 3 4 5 6 7 8 9 10 11 12
0 0 1 2 3 4 5 6 7 8 9 10 11 12
1 1 2 3 4 5 6 7 8 9 10 11 12 0
2 2 3 4 5 6 7 8 9 10 11 12 0 1
3 3 4 5 6 7 8 9 10 11 12 0 1 2
4 4 5 6 7 8 9 10 11 12 0 1 2 3
5 5 6 7 8 9 10 11 12 0 1 2 3 4
6 6 7 8 9 10 11 12 0 1 2 3 4 5
7 7 8 9 10 11 12 0 1 2 3 4 5 6
8 8 9 10 11 12 0 1 2 3 4 5 6 7
9 9 10 11 12 0 1 2 3 4 5 6 7 8
10 10 11 12 0 1 2 3 4 5 6 7 8 9
11 11 12 0 1 2 3 4 5 6 7 8 9 10
12 12 0 1 2 3 4 5 6 7 8 9 10 11

Multiplication Table of Z13

* 0 1 2 3 4 5 6 7 8 9 10 11 12
0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 0 1 2 3 4 5 6 7 8 9 10 11 12
2 0 2 4 6 8 10 12 1 3 5 7 9 11
3 0 3 6 9 12 2 5 8 11 1 4 7 10
4 0 4 8 12 3 7 11 2 6 10 1 5 9
5 0 5 10 2 7 12 4 9 1 6 11 3 8
6 0 6 12 5 11 4 10 3 9 2 8 1 7
7 0 7 1 8 2 9 3 10 4 11 5 12 6
8 0 8 3 11 6 1 9 4 12 7 2 10 5
9 0 9 5 1 10 6 2 11 7 3 12 8 4
10 0 10 7 4 1 11 8 5 2 12 9 6 3
11 0 11 9 7 5 3 1 12 10 8 6 4 2
12 0 12 11 10 9 8 7 6 5 4 3 2 1
Question 5 [5 marks]

a. The combination formula that should be used in this solution is ( nPr = n! / (n-r)! )
because the question said no repetitions are allowed.

nPr = n! / (n-r)!

22P4 + 22P5 + 22P6 + 22P7 + 22P8 + 22P9 + 22P10

= 2.5408625 x1012

b. 13 letter Greek words with at least one repeated letter


= All 9-letter words less 13 letter words with no repeated letters
= 2413 – 24P13
= 8.609447979 x1017
Question 6 [3 marks]
By using the binomial theorem,
n
( a+ b ) =∑ C ( n , k ) an−k b k
n

k=0

(3u2 – 2v3 +4w) 4


[3u2 – (2v3 +4w)] 4
Let a = 3u2, b = – (2v3 +4w), n = 4
¿¿

= C (4,0) a4 b0 + C (4,1) a4-1 b1 + C (4,2) a4-2 b2 + C (4,3) a4-3 b3 + C (4,4) a4-4 b4


= 1 a4 b0 + 4 a3 b1 + 6 a2 b2 + 4 a1 b3 +1 a0 b4

By substitution,
= (3u2)4 (-2v3 + 4w)0 + 4 (3u2)3 (-2v3 + 4w)1 + 6 (3u2)2 (-2v3 + 4w)2 + 4 (3u2)1 (-2v3 + 4w)3 +
(3u2)0 (-2v3 + 4w)4

Question 7 [10 marks] – COMPULSORY


a.

b. function LCM (x, y)


if a is 0 or b is 0
return Error
larger = max(x, y)
if larger mod x == 0 and larger mod y == 0
return larger
else
xprimes = getPrimes(x)
yprimes = getPrimes(y)
lcmprimes = allPrimes(xprimes, yprimes)
return productOfList(lcmprimes)

function getPrimes(n)
return list_of_all_primes_whose_product_is_n

function allPrimes(xlst, ylst)


xlst_power = get_list_of_unique_primes_and_occurrences_from_x lst
ylst_power = get_list_of_unique_primes_and_occurrences_from_y lst

for each prime in (xlst_power, ylst_power)


if occurrence in xlst is greater
allprimeslst = allprimeslst + xlst[xindex]
else
allprimeslst = allprimeslst + ylst[yindex]
return allprimeslst

function productOfList(lst)
if lst is empty
product = 0
else
product = 1
for value in lst
product = product * value[0] ^ value[1]
return product

c.
d.
Question 8 [5 marks]

def No_Fib_Checker (list1, list2):


def checkStart (n0, n1, x, y, ln):
if x > n0:
return False
elif (ln == 1 and n0 == x) or (ln >= 2 and n0 == x and n1 == y):
return True
else:
return checkStart(n0, n1, y, x+y, ln)
for lst in [list1, list2]:
if len(lst) == 0:
return False
else:
if len(lst) == 1:
if checkStart(lst[0], 0, 0, 1, len(lst)):
continue
else:
return False
elif checkStarter (lst[0], lst[1], 0, 1, len (lst)):
if len (lst) == 2:
continue
for i in range (2,len(lst)):
if lst[i-2]+lst[i-1] != lst[i]:
return False
continue
else:
return False
return True

Question 9 [4 marks + Bonus 5 marks (to an assignment maximum of 50 marks)]

You might also like