MAT2612 - Self Assessment Task B
MAT2612 - Self Assessment Task B
State, with reasons, for (a), (b), (c) whether the relation is:
1
2. Let f : R → R be f (x) = √ .
x +4
37
5. A computer program does an operation (such as sorting) on sets of numbers. Let f (n) be the
computing time for n numbers. For the following functions, describe what happens to the
computing time when the size of the input set is doubled.
(For example, for f (n) = n, when we double the size of the input set from n to 2n the computing
time also doubles.)
7. In the definition of O, do we need k? In other words, if f is O(g) can we not always choose c
large enough such that |f (n)| ≤ c|g(n)| for n ≥ 0? Explain. (5)
8. Use the rules (and if necessary, the definition) for ordering Θ-classes to arrange the following in
order from lowest to highest
√ (8)
lg n, (lg n)6 , lg nn , n4 , n, 5n3 + n2 , 1n , (1, 001)n , 5n .
9. Comment on the following: f is O(g) means that f (n) is never more than a fixed multiple of
g(n). (4)
(a) How many everywhere defined functions are there from A to B? (3)
(b) How many one-to-one functions are there from A to B? (4)
12. Let A = {1, 2, 3, 4, 5, 6, 7, 8} . Compute the products (composition) and write them in the form
1 2 3 4 5 6 7 8
.
38
MAT2612/101
13. Let
1 2 3 4 5 6 7 8
p= .
1 8 4 7 3 6 2 5
(3)
(i) Find a permutation q such that
1 2 3 4 5 6 7 8
q◦p = .
2 5 1 6 3 8 7 4
(4)
A = {1, 2, 3, 4, 5}
39
16. Draw a Hasse diagram of a finite partially ordered set satisfying the following (if possible, if not,
explain why not):
(a) The poset contains three maximal elements and no minimal element. (3)
(b) The poset contains a pair of elements having exactly two upper bounds but no least upper
bound. (4)
(c) The poset contains a pair of elements having a least upper bound but no greatest lower
bound. (4)
(d) The poset contains an element with exactly one complement and an element with 2
complements. (4)
(e) The poset contains exactly 3 incomparable elements. (4)
aRb if b = ar
19. Chapter dependencies of textbooks is a familiar partial ordering of the chapters in the textbook.
Define A < B if chapter A is a prerequisite for chapter B. Let C be the set of chapters and let
the prerequisites be given by
Class Prerequisites
Chapter 1 None
Chapter 2 None
Chapter 3 Chapter 1
Chapter 4 Chapter 2,3
Chapter 5 Chapter 3
Chapter 6 Chapter 4,5
Chapter 7 Chapter 6
Chapter 8 Chapter 6
(a) Draw the Hasse diagram for the partial ordering of the chapters. (5)
(b) Find all minimal and maximal elements of C. (2)
(c) Does C have a least element or a greatest element? If so, give them. (2)
40
MAT2612/101
Suppose you want to read the entire book, one chapter a month.
(d) Which choice or choices do you have for your first and for your last chapter? (2)
(e) You want to read chapter 6 as soon as possible. How many months before you can? (4)
(f) You want to read chapters 1, 2, 3 in order and chapter 8 last. Find all possible ways that
you could read the book. (4)
20. Draw the Hasse diagram of the poset represented by the following matrix. (Call the elements
a, b, c, d.) (4)
1 1 1 1
0 1 1 1
0 0 1 1
0 0 0 1
21. Say for each of the posets represented by the given Hasse-diagram whether the poset is
b c
c d b d
41
d) a e) a f) a
b c
c
b c
b d
d e f
d e
g h
e
f
22. For the following Hasse diagram, do each of the following. If any do not exist, explain why.
a b
d e f g
i j
42
MAT2612/101
23. Construct the truth table for the following Boolean function:
f (x, y, z) = (x ∧ z) ∨ (x ∧ y ∧ z 0 ) ∨ x 0 ∧ y .
(x 0 ∧ y 0 ∧ z 0 ) ∨ (x 0 ∧ y 0 ∧ z) ∨ (x ∧ y 0 ∧ z 0 ) ∨ (x 0 ∧ y 0 ∧ z).
(6)
43