CS 381 Solutions to Homework 9



Q 1. Textbook p. 382:
1. (a) $<0,0>, <1,1>, <2,2>, <3,3>$
(b) $<1,3>, <2,2>, <3,1>, <4,0>$
(c) $<1,0>, <2,0>, <2,1>, <3,0>, <3,1>$ $<3,2>, <4,0>, <4,1>, <4,2>, <4,3>$
(d) $<1,0>, <1,1>, <1,2>, <1,3>, <2,0>$ $<2,2>, <3,0>, <3,3>, <4,0>$
(e) $<0,1>, <1,0>, <1,1>, <1,2>, <1,3>, <2,1>$ $<2,3>, <3,1>, <3,2>, <4,1>, <4,3>$
(f) $<1,2>, <2,1>, <2,2>$



2 (c)
  1 2 3 4 5 6
1 x x x x x x
2   x   x   x
3     x     x
4       x    
5         x  
6           x



For your information the set of ordered pairs looks as follows:
$R = \{(1,1), (1,2), (1,3), (1,4), (1,5), (1,6), (2,2), $
$(2,4), (2,6), (3,3), (3,6),
(4,4), (5,5), (6,6)\}$



Q 2. Let $R$ denote the relation to be defined.
Basis Clause: $<0,0> \in R$
Inductive Clause: If $<x,y> \in R$, then $<x+1, y+2> \in R$.
Extremal Clause: Nothiung is in $R$ unless it is obtained from the Basis and Inducive Clauses.



Q 3. $R = \{ <1>, <2>, <3>\}$ and all its subsets are a unary relation on {$1, 2, 3$}.



Q 4. Let $A$ denote the set of cardinarity $n$. Then a binary relation on $A$ is a set of ordered pairs of elements of $A$, which is a subset of the Cartesain product $A \times A$. Hence the number of binary relations on $A$ is the number of subsets of $A \times A$. Since a set $B$ has $2^{\mid B \mid}$ subsets and $\mid A \times A \mid = n^{2} $, the number of subsets of $A \times A$ is equal to $2^{n^{2}}$.