Quiz 1 and 2
Quiz 1 and 2
1. On the island of knights and knaves, you meet three natives, A, B, and C, who address
you as follows :A: At least one of us is a knave. B: At most two of us are knaves.
What are A, B, and C?
A: Knight
B: Knight
C:Knave
(a) Find the output of the circuit corresponding to the input P = 1, Q = 0, and R = 1.
To find the output, we need the specific circuit diagram or
description. Without this, we can’t find the output
S = (¬ (P∧Q)) ∧(QvR)
(b) Write the Boolean expression corresponding to the circuit.
Decimal form: 53
Q).(Note for students who have studied some circuit design: Do not simplify the circuit; just
P ----|>o-----| |------|
| | | |
| | | AND |
| |----->| | |
| |-----|----> (P ∧ Q)
Q ----|>o-----| |
| |
|------| | AND
| |
| |
|----->| |
P ----|>o-----|
|----->| |
| | OR
Q ----|>o-----| |
|----->|
5. Find a circuit with the following input/output table.
(b) B x A: B x A = {(u,a),(u,b)(u,c),(v,a),(v,b),(v,c)}
(a) Is 3 R 15? Is 3 R 16? Is (7, 17) ∈ R? Is (3, 18) ∈ R? Yes, No, No, Yes
(b) Write R as a set of ordered pairs. R= {(3, 15), (3, 18)}
(c) Write the domain and co-domain of R. Domain = {3}
(d) Draw an arrow diagram for R.
A: 3 5 7
|\
| \
V V
B: 15 18 16 17
12. Define a relation R from R to R as follows: For all (x, y) ∈ R × R, (x, y) ∈ R if, and only if,
x = y 2 + 1.
(a) Is (2, 5) ∈ R? Is (5, 2) ∈ R? Is (−3) R 10? Is 10 R (−3)? False, True, False, True
13. Let A = {1, 2, 3, 4} and B = {a, b, c}. Define a function G: A → B as follows:G = {(1, b),(2,
c),(3, b),(4, c)}.
(a) Find G(2). G(2) = c
(b) Draw an arrow diagram for G.
A: 1 2 3 4
| | | |
V V V V
B: a b c
Does F = G? Explain.
16. Let A = {a, b, c} and B = {u, v}. Write (a). A × B and (b). B × A.
A×B: {(a,u),(a,v),(b,u),(b,v),(c,u),(c,v)}
B×A: {(u,a),(u,b),(u,c),(v,a),(v,b),(v,c)}
17. Let A = {3, 5, 7} and B = {15, 16, 17, 18}, and define a relation R from A to B as follows: For all (x, y) ∈
(a) Is 3 R 15? Is 3 R 16? Is (7, 17) ∈ R? Is (3, 18) ∈ R? True, False, False
(b) Write R as a set of ordered pairs.
R= {(3, 15), (3, 18), (5, 15)}
(c) Write the domain and co-domain of R. Domain = {3, 5} Co-domain = {15, 18}
F≠G because F(x) and G(x) produce different results for the same input x.