Soal Ujian Mat Diskrit 3
Soal Ujian Mat Diskrit 3
Discrete Mathematics
1. [12%] (a) Let A = {1, 2, 3, 4, 5} and B = {x, y, z}. How many functions f : A → B are onto?
(b) For finite sets A and B with |A| = m and |B| = n, how many functions f : A → B are onto?
(c) Let A = {a1, a2, …, am} and B = {b1, b2, …, bn} with |A| = m and |B| = n. How many
onto functions f : A → B satisfy f (a1) = b1 ?
2. [6%] An auditorium has a seating capacity of 900. How many seats must be occupied to
guarantee that at least two people seated in the auditorium have the same last initial and the
same sex?
3. [8%] For an alphabet Σ = {x, y, z}, let A, B, C ⊆ Σ*. If A = {yy, yyy}, B = {x, xx, y}, C =
{y, xy, xxy}, then (a) (BA∩CA) = ? and (b) please show two strings which are in (BA∩CA)
but not in (B∩C)A.
4. [9%] Let Σ = {x, y, z} be an alphabet. Please show (a) a language that contains all strings w
in Σ* where the length of w is even; (b) a language that contains all strings w in Σ* for
which xyz is a suffix of w; and (c) a language that contains all strings w in Σ* where w
contains only two x’s.
5. [10%] Construct a state diagram for a finite state machine with the input alphabet I = {0,1}
and O = {0, 1} that recognizes all strings in the language {0, 1}∗{000} ∪ {0, 1}∗{111}.
6. [10%] Construct a state diagram for a finite state machine with the input alphabet I = {0,1}
and the output alphabet O = {0, 1} that recognizes all strings that end in 00 and in a
position that is a multiple of two.
7. [12%] Let A be a set with |A| = m. (a) How many binary relations on A are not reflexive?
(b) How many binary relations on A are symmetric? (c) How many binary relations on A
are reflexive and symmetric? (d) How many binary relations on A are antisymmetric?
8. [10%] Let R be the “less than or equal to” relation defined on A = {1, 2, 3, 4}. (a) Please
draw the directed graph for R. (b) If R is a partial order on A, please draw the Hasse
diagram for R.
9. [5%] If A = {1, 2, 3, 4, 5, 6} and R is the equivalence relation on A that induces the partition
A = {1, 2, 3, 4}∪{5, 6}, what is R?
10. [10%] Let A = {-3, -1, 12}×{-8, -5, 0, 4, 7}, and define R on A by (x1, y1) R (x2, y2) if (x1 - y1)
mod 5 = (x2 - y2) mod 5. (a) Determine the equivalence class [(-3, -8)] and (b) Determine
the partition of A induced by R.
11. [8%] Minimize the two finite state machines you have constructed in 5. and 6., respectively.
[You should show how to get the answers in detail or obtain no credit.]