fall310.files.wordpress.com€¦  · web viewprincess nora bint abdulrahman university cs310-...

5
Princess Nora Bint Abdulrahman University CS310- Discrete Mathematics Faculty of Computer and Information Sciences first Semester 1434/1435H Department of the Computer Sciences assignment #7 Name: student #: section: Q1. For each of these relations on the set {1, 2, 3, 4}, decide whether it is reflexive, whether it is symmetric, whether it is anti symmetric, whether it is transitive, whether it is Equivalence. a- {(2,2),(2,3),(2,4),(3,2),(3,3),(3,4)}. 1. not reflexive (4,4) R 2. not symmetric (2,4) R but (4,2) R 3. not anti symmetric (2,3) R ^ (3,2) R but 2≠3 4. transitive 5. Not Equivalence b- {(1,1),(1,2),(2,1),(2,2),(3,3),(4,4)}. 1. Reflexive 2. Symmetric 3. Not anti symmetric (1,2) R ^ (2,1) R but 1≠2 4. Transitive 5. Equivalence c- {(1,1),(2,2),(3,3),(4,4)} 1. Reflexive 2. Symmetric 3. anti symmetric 4. Transitive

Upload: others

Post on 07-Oct-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: fall310.files.wordpress.com€¦  · Web viewPrincess Nora Bint Abdulrahman University CS310- Discrete Mathematics. Faculty of Computer and Information Sciences first Semester 1434/1435H

Princess Nora Bint Abdulrahman University CS310- Discrete MathematicsFaculty of Computer and Information Sciences first Semester 1434/1435HDepartment of the Computer Sciences assignment #7

Name: student #: section:

Q1. For each of these relations on the set {1, 2, 3, 4}, decide whether it is reflexive, whether it is

symmetric, whether it is anti symmetric, whether it is transitive, whether it is Equivalence.

a- {(2,2),(2,3),(2,4),(3,2),(3,3),(3,4)}.

1. not reflexive (4,4) R2. not symmetric (2,4) R but (4,2) R3. not anti symmetric (2,3) R ^ (3,2) R but 2≠3 4. transitive5. Not Equivalence

b- {(1,1),(1,2),(2,1),(2,2),(3,3),(4,4)}.

1. Reflexive2. Symmetric3. Not anti symmetric (1,2) R ^ (2,1) R but 1≠24. Transitive5. Equivalence

c- {(1,1),(2,2),(3,3),(4,4)}1. Reflexive2. Symmetric3. anti symmetric4. Transitive5. Equivalence

Q2. Find R and R-1 for each of these relations: a. {(a,b),a<b}R={(a,b) | a ≥ b}

R-1 ={(a,b) | b < a}

Page 2: fall310.files.wordpress.com€¦  · Web viewPrincess Nora Bint Abdulrahman University CS310- Discrete Mathematics. Faculty of Computer and Information Sciences first Semester 1434/1435H

Princess Nora Bint Abdulrahman University CS310- Discrete MathematicsFaculty of Computer and Information Sciences first Semester 1434/1435HDepartment of the Computer Sciences assignment #7

b. {(a,b), a divides b}R={(a,b) | a doesn’t divide b}R-1 ={(a,b) | b divides a}

Q3. Let A = {1, 2, 3}, B = {a, b, c}, and C = {x, y, z}. Consider the following relations R and S from A to B to C, respectively. R = {(1,b), (2,a), (2,c)} and S = {(a, y), (b, x), (c, y), (c, z)}

a- Find the composition relation S o R.

S o R = { (1,x) , (2,y) , (2,z) }R0S= { }

b- Find the matrices MR , MS and MRoS

Q4. Let A = {1, 2, 3, 4}. Consider the following relations R on A. R ={(1, 1), (1, 2), (1, 3), (2, 4), (3, 2)}, Find R3.

R1={(1,1),(1,2),(1,3),(2,4),(3,2)} R2=RoR= {(1,1),(1,2),(1,3),(1,4),(3,4)} R3=R2oR= {(1,1),(1,2),(1,3),(1,4)}

Q5. Determine whether the relations represented by the directed graph are: reflexive, symmetric, anti symmetric, transitive

Page 3: fall310.files.wordpress.com€¦  · Web viewPrincess Nora Bint Abdulrahman University CS310- Discrete Mathematics. Faculty of Computer and Information Sciences first Semester 1434/1435H

Princess Nora Bint Abdulrahman University CS310- Discrete MathematicsFaculty of Computer and Information Sciences first Semester 1434/1435HDepartment of the Computer Sciences assignment #7

a- b-

a- \1. Not Reflexive (no loop)2. Not Symmetric ( there is edge from a to b but not from b to a , there is

edge from a to c but not from c to a).3. Not anti symmetric (there is edge from b to c and there is from c to b

but b ≠ c).4. Not Transitive ( there is edge from c to b and from b to c , but not from

b to b).

b- \1. Reflexive 2. Not Symmetric ( there is edge from c to a but not from a to c , there is

edge from c to d but not from d to c).3. Not anti symmetric (there is edge from a to b and there is from b to a).4. Not Transitive (there is edge from c to a and there is from a to b but not

from c to b).

Q6. Let R be the relation on the set { 0,1,2,3 } containing the ordered pairs (0,1),(1,1),(1,2),(2,0),(2,2),(3,0) . Find the:

a- Reflexive closure of R.{(0,1),(1,1),(1,2),(2,0),(2,2),(3,0) } ∪ {(0,0), (3,3)}

Page 4: fall310.files.wordpress.com€¦  · Web viewPrincess Nora Bint Abdulrahman University CS310- Discrete Mathematics. Faculty of Computer and Information Sciences first Semester 1434/1435H

Princess Nora Bint Abdulrahman University CS310- Discrete MathematicsFaculty of Computer and Information Sciences first Semester 1434/1435HDepartment of the Computer Sciences assignment #7

b- Symmetric closure of R.{(0,1),(1,1),(1,2),(2,0),(2,2),(3,0) } ∪ {(1,0) , (2,1) , (0,2) , (3,0)}

Q7 . Which of these collections of subsets are partitions of {1,2,3,4,5,6}:

a- {1,2} , {2,3,4} , {4,5,6}.No , because 4 and 2 appear in two sets

b- {1} , {2,3,6} , {4} , {5}.Yes , because :

these sets are disjoint the union of these sets is {1,2,3,4,5,6}.

c- {1,4,5} , {2,6}.No , because the union of these sets is not {1,2,3,4,5,6} [ 3 not member of any subsets ].