16 Problems on the Binary Relations - Homework 7 | MATH 3336, Assignments of Discrete Mathematics

Material Type: Assignment; Class: Discrete Mathematics; Subject: (Mathematics); University: University of Houston; Term: Unknown 1989;

Typology: Assignments

Pre 2010

Uploaded on 08/19/2009

koofers-user-7vo-1
koofers-user-7vo-1 🇺🇸

5

(1)

10 documents

1 / 12

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Homework 07. Due Tuesday, April 03
Exercise 1. Let Aand Bbe two nonempty sets. What is a binary relation
from Ato B? Give several examples of binary relations.
Exercise 2. List the ordered pairs in the relation Rfrom A={0,1,2,3,4}
to B={0,1,2,3}, where (a, b)Riff
a) a=b;
b) a+b= 4;
c) a > b;
d) adivides b;
e) bdoes not divide a;
f) gcd(a, b) = 1.
Display each of these relations graphically and in a tabular form (See Figure 1
on the top of page 520).
1
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download 16 Problems on the Binary Relations - Homework 7 | MATH 3336 and more Assignments Discrete Mathematics in PDF only on Docsity!

Homework 07. Due Tuesday, April 03

Exercise 1. Let A and B be two nonempty sets. What is a binary relation from A to B? Give several examples of binary relations.

Exercise 2. List the ordered pairs in the relation R from A = { 0 , 1 , 2 , 3 , 4 } to B = { 0 , 1 , 2 , 3 }, where (a, b) ∈ R iff

a) a = b;

b) a + b = 4;

c) a > b;

d) a divides b;

e) b does not divide a;

f) gcd(a, b) = 1.

Display each of these relations graphically and in a tabular form (See Figure 1 on the top of page 520).

a) R = {(0, 0), (1, 1), (2, 2), (3, 3)}



























0 1

3 4

2

2 3

x x

x

0

1

2

3

4

0

1

2

3

x

0 1

b) R = {(1, 3), (2, 2), (3, 1), (4, 0)}



















 

 



 

 

 

 



 

 







 

 



 

 



 

 

0

4

0

1

2

3

4

0

1

2

3

0

x

1

3 x

2

x

1 x

3

2

e) R = {(1, 0), (1, 1), (1, 2), (1, 3), (2, 0), (2, 2), (3, 0), (3, 3), (4, 0)}

 

 





 

 



 





 

 



 

 



 





 

 





 

 

 

 



 

 





 

 



 

 





















0 1

3 4

2

2 3

0

1

2

3

4

0

1

2

3

0 1

x x x

x

x

x x

x

x x

f)

R = {(0, 0), (1, 0), (1, 2), (1, 3), (2, 0), (2, 3), (3, 0), (3, 2), (4, 0), (4, 3)}





 



 

 





 

 



 



 

 





 

 



 







 



 

 









 

 



 

 





 

 



 

 



 

 





















0 1

3 4

2

2 3

0

1

2

3

4

0

1

2

3

0 1

x x x

x

x

x

x

x x x

Exercise 3. Let A be a nonempty set. Give the definitions of reflexive, symmetric, antisymmetric, and transitive relations R on A.

Exercise 4. Determine whether relation R on the set of all web pages is reflexive, symmetric, antisymmetric, or transitive, where (a, b) ∈ R iff

a) Everyone who has visited web page a has also visited web page b;

b) There are no common links found on both web page a and web page b;

c) There is at least one common link on web page a and web page b;

d) there is a web page that includes links to both web page a and web page b.

a) Let us denote by V (x, a) the statement “person x visited web page a”. Then (a, b) ∈ R iff the proposition ∀x(V (x, a) → V (x, b)) has the truth value T. In other words, if by Xw we denote the set of people who visited page w, we obtain that (a, b) ∈ R iff Xa ⊆ Xb.

Let a be a web page. Since Xa ⊆ Xa, we get (a, a) ∈ R, i.e R is reflexive.

Let (a, b) ∈ R then Xa ⊆ Xb. The inclusion Xb ⊆ Xa, generally speaking, does not hold. We can build a counterexample as follows. Let the set of web pages W = {a, b} consists of two elements, and the set of Internet users also consists of two elements, namely, X = {x, y}. We assume that person x visited both pages a and b, and the person y visited only the page b. Then, Xa = {x} and Xb = {x, y}. Therefore, (a, b) ∈ R but (b, a) 6 ∈ R, i.e. R is not symmetric.

Let (a, b) ∈ R and (b, a) ∈ R. Then, Xa = Xb. Generally speaking, it means that the same people visited both page a and page b but it does not mean that a = b. We build a counterexample as follows. Let the set of web pages W = {a, b} consists of two different pages a and b and the set of Internet users X = {x} consist of the only one person x. We assume that x visited both pages a and b. Then, we get (a, b) ∈ R and (b, a) ∈ R but a 6 = b. Therefore, R is not antisymmetric.

R is not transitive. We consider La = {c}, Lb = {a, c}, and Lc = {a}. Then, La ∩ Lb = {c} 6 = ∅, Lb ∩ Lc = {a} 6 = ∅ but La ∩ Lc = ∅. In other words, (a, b) ∈ R, (b, c) ∈ R but (a, c) 6 ∈ R.

d) Let L(l, w) denote “l is a link on the web page w”. Let us denote by Lw the set of all links on web page w. Then (a, b) ∈ R iff ∃c({a, b} ⊆ Lc).

Let a be a web page such that no web page has a link to a. Then, (a, a) 6 ∈ R. So, R is not reflexive.

Let (a, b) ∈ R then we can find c s.t. {a, b} ⊆ Lc. Therefore, {b, a} = {a, b} ⊆ Lc for the same web page c. So, R is symmetric.

R is not antisymmetric. Let a and b are different web pages and we assume that c is a web page which has links to both a and b. Then, (a, b) ∈ R, (b, a) ∈ R but b 6 = a.

R is not transitive. Let W = L = {a, b, c} with La = {b, c}, Lb = {a}, and Lc = {a, b}. Then, (a, b) ∈ R because both a and b are links on page c. Also, (b, c) ∈ R, because b and c are links on page a. But there is no web page which includes both a and c. So, (a, c) 6 ∈ R.

Exercise 5. Let R be a relation from A to B and S be a relation from B to C. What is the composite relation S ◦ R?

Exercise 6. Let A = { 1 , 2 , 3 , 4 }, R be the relation {(1, 2), (1, 3), (2, 3), (2, 4), (3, 1)} ans S be the relation {(2, 1), (3, 1), (3, 2), (4, 2)} on A. Find the relations S◦R and R ◦ S.

S ◦ R = {(1, 1), (1, 2), (2, 1), (2, 2)}

and

R ◦ S = {(2, 2), (2, 3), (3, 2), (3, 3), (3, 4), (4, 3), (4, 4)}.

Exercise 7. Find the Boolean product of matrices

A =

 (^) and B =

A ⊙ B =

Exercise 8. Let A =

. Find

a) A[2];

b) A[3];

c) A ∨ A[2]^ ∨ A[3].

Solution.

A[2]^ =

 (^) and A[3]^ =

Exercise 12. How many nonzero entries does the matrix representing the relation R from A = { 1 , 2 ,... , 1000 } to itself have if R is

a) {(a, b) : a ≤ b};

b) {(a, b) : a = b − 1 ∨ a = b + 1};

c) {(a, b) : a + b = 1000};

d) {(a, b) : a + b ≤ 1001 }.

a). The matrix has ones on and above the main diagonal, the entries which lie strictly below main diagonal are equal to zero. The total number of entries in a n × n matrix is equal to n^2 , the number of the diagonal entries is n. Therefore, the number of elements strictly above the main diagonal is (n^2 − n)/2. The upper triangular part, including main diagonal, has (n^2 + n)/2 = n(n + 1)/2 entries. For our case, we plug n = 1000 and obtain 1001 · 1000 /2 = 500500 entries which are equal to one;

b). The matrix has ones on a diagonal below the main diagonal (for entries mi,i− 1 ) and above the main diagonal (for entries mi,i+1). All other entries are equal to zero. The number of ones is equal to 2(1000 − 1) = 1998.

c). This relation is the set {(1, 999), (2, 998),... , (998, 2), (999, 1)}. It has 999 elements, therefore, the matrix has exactly 999 entries which are equal to one.

d). The pairs which correspond to the equation a + b = 1001 give us the following identities m 1 , 1000 = 1, m 2 , 999 = 1,.. ., m 999 , 2 = 1, and m 1000 , 1 =

  1. This entries lie on the diagonal, connecting the bottom-left and top- right corners of the matrix. The ones entries, which correspond to the strict inequality a + b < 1001 lie above this diagonal. Therefore, the number of ones in the matrix is equal to 500500 ( compare this result with the answer in a) ).

Exercise 13. Let R 1 and R 2 be relations on a set A presented by the matrices

MR 1 =

 (^) and MR 2 =

respectively. Find the matrices which represent relations R 1 ∪ R 2 , R 1 ∩ R 2 , R 1 ◦ R 2 , and R 2 ◦ R 1.

This relations are represented by the matrices MR 1 ∨ MR 2 , Mr 1 ∧ MR 2 , MR 2 ⊙ MR 1 , and MR 1 ⊙ MR 2 , respectively.

Exercise 14. Let R be a relation on A with |A| = n. Give the definitions of the reflexive, symmetric, and transitive closures of R. How can you find the matrices representing each of these closures if the matrix MR is known?

Exercise 15. Find the reflexive, symmetric, and transitive closures of the relations in Exercise 11.

Exercise 16. Find the smallest relation containing the relation

R = {(1, 2), (1, 4), (3, 3), (4, 1)}

that is

a) both reflexive and transitive;

b) symmetric and transitive;

c) reflexive, symmetric, and transitive.

a). First, we add diagonal elements to obtain the reflexive closure

R 1 = {(1, 1), (1, 2), (1, 4), (2, 2), (3, 3), (4, 1), (4, 4)}.