Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
102 views
7 pages
Matrices of Relation
Discrete Mathematics PDF
Uploaded by
Isif Sethi
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save 4. Matrices of Relation For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
102 views
7 pages
Matrices of Relation
Discrete Mathematics PDF
Uploaded by
Isif Sethi
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save 4. Matrices of Relation For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 7
Search
Fullscreen
168 Comments In programming languages, usually only some speci fied number of characters of the names of variables and special terms (technically these are called identifiers) are significant. For caample, in the C programming Tanguay, only the first 31 characters of identifiers are Chapter 3% Functions, Sequences, and Relations the sume 31 characters, the system is allowed to-con- sider them identic If wedefine a relation Ron the set of C identifiers by 11 Res, provided that the frst 31 characters of s; and 2 coincide, then R is an equivalence relation, An equivalence class consists of identifies that the system is allowed to consider identical, significant. This means thatif two identifiers begin with Matrices of Relations A matrix is ucomvenient way to represent arelation 2 from X to ¥ Such a repecsentation can beused by a computer to analyze a relation. We label the rows with the elements of X (in some arbitrary order), and we label the columas with the elements af (again, in some arbitrary order). We then set the entry in row x and colurnn y to Lif x Ry and to otherwise. This matrix is called the matrix of the relation R (sclative to the orderings of and 13, eee eee $ + A bancis Alor = ‘The matrix of the relation R of Example 3.5, A= (10. (1d), (2.01, 13, 61,13.) A. ahh (a, bcd leeluive wo theorderings 142, 3.4.and a, obese d 1jfror 2jo 010 sto ra s\boog < a eecse eletores 1 relative to the orderings 2, 3, 4, 1 and Obviously, the matrix of a relition from X to ¥ is dependent on the arderings of % and ¥. ‘The mattis of the tek and 5.6, 7, 8, defined by eer If x divides » Sos aera) ass < 4} 10 45, 6, 7, 8p, telative to the orderings 2, 3, «3.5 © Matrices of Relations 169. ‘When we write the matrix of a relation Ron a-set X (Le, from X to XN, we use the same ordering for the rows as we do far the columns, ion R= [ra UB), ke, 0), la, Oy cd, Ce) ‘on (a, beds relative to the-ondering «by ed abed oftoo0 bfornto efor ol- g\oooL [Notice thatthe matrix ofa relation on a set X is alwys a square mati. ‘Weccanquickly determine whether a relation Roma set X isrefleive by examining the mutrix A of & teelative to some ordering), The relation R is reflexive if und only if 4 has 1's on the main diagonal, (The main diagonal of a square matrix consists oF the etries ona ine fram the upper let to the lower right.) The relation & is refleive i ane only if(e.8) € & for all x € X, But this ta 1 holds precisely when the main sfiagonal consists of 1's, Notice tht the relation of Example 3.5.4 reflenive and that the main diagonal of the matsis of ® ennsists of 1s ‘We can also quickly determine whether a relation A am a set X is symmetric by examining the matrix A of & (relative to some ordering). The relation R is syrometric ‘if and only if for all ¢ and j, che éjth entry of A is equal 1 the jéth entry of A. (Less formally, R is symmewic if and only if A ynmetric about the main diagonal.) The: reason is that & is symmetric if und whenever (x, v) is im A, Cy, x) is also in R. ‘But this last cor 1a holds pres metric about the main diagonal. ‘Notice thut the relation & of Example 3.3.4 is symmetric und that the matrix of & is symmetric about the main diagonal. ‘We canalse quickly determine whether a relation & isantisymmetric by examining the matrix of R (relative to some ordering) (see Exercise 11), ‘We conclude by showing how matrix multiplication relates to composition of relations and how we ean use the matrix of a rel to fest for transi ‘Let Ry be the relation from X = {1.2.3} to ¥ bj defined by Ry = [El a), (2, 51,480), (3, BH, and from ¥ 10 Z = bx, ¥.2) detined by Rpm (ern), far, r,s 9), 4, DL ‘The matrix of R relative to the orderings 1,2, Sand ob is170 Chapter 3 Functions, Sequences, and Relations and the matrix of Ry relative to the orderings a, band x, y,2 is afi ana 1 Aas= [0 1 ‘Let us interpret this product. ‘The dah entry in AAs is computed as 1b) (ame He this value is nonzero, then either sa or rv is nonzero. Suppose that car 3 0. (The ‘argument is similar if 1» 0.) Then s # Oand u 30. This means that (J, «) © Ry and fa.) © Ry. This implies that {i,) = Ryo Ry. We have shown that if the (kth entry in Ajay is nonzero, then (1,4) € Ryo &. The converse is also true, as we now show. ‘Assume that (i,k) © Ry oR). Then, cither us: ‘The product of these matrices --¢ 5 1. tate Ry and{a,h) © Re or 2. (i bye Ry and Cb, k) © a. Hf Lholds, thens = Land a = 1.sosw = Land sw + tv is nonzero. Simil Land again we have sa + rw-nonzero, We have shown that iti.) © Reo Ry. then entry in AyAz is nemzero, ‘We have shown that Gi,4) € R22 Ry if-and only if the kth entry in Ava2 is ‘monger, thus A jz is “almost the matrix of the relathon Aso Ry. To obtair che matrix of the relation Rs © Ry, we need only change all monzere entries im Ay Ay uo 1. Thus the ‘mattis of the relution &2 © &,. relative w the previously chosen orderings 1. 2, 3 and Have ge is aye H 1 H Ife 2fo ro]. airy « ‘The argument given in Example 3.5.5 holds for any relations, We summarize this resull as Theorem 3.5.6, Theorem 3.5.6 Copyrighted materialeee Example 3 3.5 © Matrices of Relations 174 ‘Thoorem 3.5.6 provides u quick teat fordetermining wincthera.elation is transitive IA isthe matrix of R (relative ta some onéering), we compute A". We then compare A and AY The relation R is transitive if and only if whenever entry i, j in A? is nonzem, enniry i,j im A is also nonzem, The reavon is that entry i, j in A* is nonzero if and only ifthere are cfements (i,.£) and (k. f) im R (sce the proof of Theorem 3.5.6}. Naw R is transitive if and only if whenever (7. &) and (&, j) are in R then (i,j) is in R. Bat (% j) is in @ if and only if entry é jin A is oanrero. Therefore. & is transitive if and only if whenever emtyy i, 7 in A? is nonzero, entry é, Ais also nonzero. ‘The matrix of the eelation Rm (Ca a) lB). (c. 0). ds AD (Ped Ce oon {a,b,c}, relative tthe ondering a,b, ed 0 As e--6 cess Seer l l 0 Tis square is 0 0 0 1 erne eres 1 0 0 o ‘We sce hal whenever entry j, jin A* is nonzero, entry i, fin A isalso nonzero. There- fore, Fis transitive, « The matrix of the relation R= (aa), UB). (6,0). fa I (ar 0, Ce. 9) ‘on (a, #, c,d}, relative to the ondering 2, b, bore 9100 “=loi io pool lis square is 1120 o100 o2 1 oft oo 07 ‘The enry in row 1, column 2of A? is nonzero, but the eomesponding entry in A is zero, Therefore, & is aor wansitive. 4 ‘The matrix of a elation Ric another way to represent or specify a relation from X to ¥. ‘The entry in sow. and column y is | ifx R yor Dif Ry -Arrelation is reflexive iFand only if the main diagonal of its matrix represcotation consists of all 1's -Aselation is symmetric if and only if its matrix is symmetrieie.,cntry j, j always equals entry J.)172 Chapter 3% Functions, Sequences, and Relations Let Rj be w relation from X to ¥ and Jet Ry be a relation from ¥ to Z. Let ay be the matrix of Ry and let Ay be the matrix of Rz. The matria of the relation zo Ry is ‘obiained by replacing each nonzero term in the matrix product Ay A2 by | Totestwhether a relation is transitive, et A be is transitive if and only if whenever entry &, j in 8 Se Le matrix. Compute A2. The relation is nonzero, entry J, j in A is also 1. What isthe mtris of «elation? 22, Given the matrix a a relation herw can we determine whether the relation is reflexive?™ Given the matrix ofa relation, hiw eas we determine whether the ron is syenemeic? 4. Given the matrix of a relation, how can we determine whether the relation is icansitive? 5. Given the matsix Ay of the relation Ry and the matrix Ay of tthe relation &). expla how to lain the atria of the xelabion Reo ieee dn Evercises IB, find she mars of the rela R fon X10 velanive 1 the orderings given, 2. Meas in Exercise 1; ondering of 8: 3.2.1: ondering of YE, Rend B Reese) (rel tnad (sbi taeis ondering af X: Un Bxeeioes 4-6, fd the matrix ofthe relation R ow X relative to the ondering given. (2.31.3. 4). (4, 51 ardeing of X:1,2.3.45 8. Kes in Bsereise 4; onfering of X:5, 3.1, 2.4 6 R= Ms, yd Lx yi ondering of X21.2.3.4 Je Fit enatvees that eepresest te eelatboas of Exercises 13-16 Section 3.3, Un Beercises 8-10, write she relarion R. glvew dy the madris, a a Set af enderet pais, Rowan? oftoto bfooeo clea to a\vaig A 12a Wino ahead way wA OT ifaoao rhi oo oom t How can we quickly determine whether a relotion bs an rixyrumeirie by exumining the matrix of # (rclutive to seme dering)? ‘Tell whethershe relation of Exercice Wis eflexive,«ymmetric, transitive. antisymmetric, a partial onder analioranequivalence relation, ‘Given the matrix of relation Fear X10 V, baw cam we Find the matrix ofthe inverse relation &-! 14, Finale matin ofthe inverse of each of he reatisms af Eser- ives Hand 9, Use the mattis of the eelabog to est for Uansitvity (see Es ampies 3.3.7 and 3.5.8) for the relations of Exercises 4, 6, ard 10. i Bverciies 16-18, find tay The mows Ay af re relavion Ry (relavive ro the given pondering sh th) The matrix bz af the relovian Ry (relive 1a the given onderingsh fe} The matrix produce Ay Ay (Mise he result of part fe 40 find the marrix of te relation RoR} feb Use the rexulrof pact fd) to fine the relation Ry > Ry (axa setefandered pairs), BOR, = Wl aAL ye (La) AB eis RE = Mesh (BD, Creath Oy epb oederiags! 1, 2,316 ytd. bee TA. Ry =r, 7h x divides 3.8) is rom A Ww 7: Re = f62h y > ch Ry is foun ¥ to 2; ordering of Mand ¥:2, 3.4.5. vondering of 2:12.34 Rim tery Lx ty 61; Ry is from X wo Y; Re= (07.2) yest + Ti; Ry i from ¥ to Z: ordering of X, ¥, and Zh2 34519, Givea the matrix of an equivalence relation Koa X. how can swe easily fad the equivalence class comin the element next 120, Lot Ri be aeclation from X ta ¥ and et Ry be w elation fear Y 16 Z, Choose otdetgs of X, ¥, ana Z. All naiioes of rea ‘ios are with respest 0 these onderings, Let Ay be the matrix ‘oF Ry and fet Az be the matrix of R.Show thatthe Jth entry Inthe manny product Ay > isequal tothe number of elements inthe set om Aion) Rand fo.) = Ral 21. Suppaie that ye yore relations oe sek Ay is he me tris of Ay relative some ordering of X, und A isthe matrix fF Ry rebstive the same ordering of X. Let A be a matrix ‘whose 370heniry is Vif he f/th entry of either Ay oF Ap is Prove that i ie mates af L Ro 22, Suppose that fy and #, are relations on a set May bethe rae rin of Ay relative tn sone ordering. Mand Aa isthe matrix fof Re relative to the same ordering of X. Let Abe a matrix whose J/th entry is 1 ifthe /jth entries of both Ay and Ay are 1, Prove that isthe rats of #7 Ra 3.6 > Relational Databases’ 3.6, Relational Databases 173 2%, Suppose shar the mats ofthe relation Ry 00 (1, 2, 3} bx (3) felative to the onclering 1.2 3, ae that Che msstr ofthe res tion & om [1 2.31 is (39) relative to the ordering 1, 2,3, Use Exercise 21 to fod the mmutris ofthe relation Ry U Re relative to the ardering 1.2.3 2A, Use Exercise 22.40 find the matrix of the celaion Ry 9 Ry relative to the ordering 2 3ar the relations of Exercise 23, 25, How ean we quickly determine whether relation & is. fur Fion by examining the martin of & ¢eelative wasomeenrdering)? 26. Let A he the murs of a Function JF from Xe ¥ (rea some orderings of 1 and Y). Wht sanditians must A satisfy Foe ft be onto ¥? 2A. Let A be the sate af a functiow from Xt (relative to some orderings of snd 1). What curaitions must A satis Foe ft be one-one’? ‘The “bi” ina binary relation R refers to the fact that A has two columns when we write Rasa table, Itis often useful to allow a table to huve an arbitrary numnbee of columns, Ifa table has n columns, the corespanding reluion is called an m-ary relation, indent Table 3.6.1 represents a 4-ary relation. This table expresses the relationship among. ication nuunbers, nanies, positions, and ages. TABLE 3.6.1 m PLAYER ID Number Name Position Age 22M —_Jebwssoabaugh © 9581 Glover ot eT SHIO® — iauey P 18 Baal Cage € 30 O18 Homer ib 4 267ID——Scove P 2 6108 Jetsontaugh of 30 3082 Singieion ob au ‘Ween also express an /-ary relation as a collection of # ples. This seston cam he ote without fons of conti174 Chapter 3 Functions, Sequences, and Relations rer) ‘Table 3.6.1 can be expressed as the set M22012, Johnsonbaugh, ¢, 22), (93831, Glover, of, 24), (38199, Baney. p18}, 184341, Cage, c. 30), 101180, Homer, Ib. 37), (26710, Seore, p, (61049, Johnsonbaugh, of, 301, (39826, Singleton. 2b, 31] of d-tuples, 4 ‘A database is a collection of records that ane manipulated by a computer. For ‘example, an airline database might contain records of passengers’ reservations, Hight schedules. equipment, and so on, Computer systems are capable o storing large amounts of information in databases, The data are available to various applications. Database management systems are programs that help users aceess the information in databases. ‘The relational database model, invented by E. F. Cox, is based om the concept of an ary relation, We will briefly introshuce some of the fundamental ideas in the theory of relational databases. For more details on relational databases. the reader is referred to [Cosid; Date; and Kroenke. We begin with some of the terminology. ‘The columns of an n-ary relation are called attributes, The domain of an attribute is a set to which all the elements in that atribute belong, For example, in Table 3.6. the attribute Age might be taken to be the set ofall positive tmieyers less than 100, The atiribute Name might be taken to be-all strings over the alphabet having length 30h less, ‘A single tribute oF 3 combination of atiributes fara relation isa Rey ithe values ‘of the auribates uniquely define an.n-tuple, For example, in Table 3.6.1, we can take the attribute ID Number as 2 key: (Iris assumed that each perso has a unigue identification umber.) The attribute Name is not a key because different persons can have the same name. For the same reason, we cannot take the attribute Position or Age as 1 key. Name and Position, in combinatinn, could be used asa key foe Table 3.6.1, since in aurexample 1 player is uniquely defined by a name and a position 'A datahase management system responds to queries. A query is a request for information from the database. For example, “Find all persons who play autield” is a meaningful query forthe relation givenbby Table 3.6.1. We will discuss several operations con relations that are used to: answer queries in the relational database mod! ERED Select The selection operator chooses certain 2-tuples from a relation, The choices are mule by giving conditions on the aruributes, For example, for the relation PLAYER given in ‘Table 3.6.1 PLAYER [Position = el] ‘ill select the tuples (22012, Johnsonbaugh, ©. 22), (84341, Cuge, ¢, 30), 4 EERSTE Project Whereas the selestion operator chooses rows of 4 relation, the projection operator chooses columns, addition, duplicutes are climinatcd. For example, for the relation PLAYER given by Table 3.6.1 PLAYER [Name, Position] aterial right
You might also like
RD Sharma Mcqs 2023-2024 Class 12 (R.D.sharMA) (Z-Library)
PDF
78% (9)
RD Sharma Mcqs 2023-2024 Class 12 (R.D.sharMA) (Z-Library)
547 pages
Short Notes and Formulae Class XII Maths
PDF
83% (6)
Short Notes and Formulae Class XII Maths
30 pages
Discrete Mathematics: Graph Theory 1
PDF
No ratings yet
Discrete Mathematics: Graph Theory 1
18 pages
Lecture2 150706142459 Lva1 App6892
PDF
100% (1)
Lecture2 150706142459 Lva1 App6892
32 pages
Mathematical Logic Notes
PDF
No ratings yet
Mathematical Logic Notes
139 pages
Short Notes Class 12 Maths
PDF
No ratings yet
Short Notes Class 12 Maths
22 pages
Relations (7.1 To 7.3) PDF
PDF
No ratings yet
Relations (7.1 To 7.3) PDF
13 pages
DS Lec2 Relations and Functions
PDF
No ratings yet
DS Lec2 Relations and Functions
36 pages
Mid II
PDF
No ratings yet
Mid II
293 pages
Mid II
PDF
No ratings yet
Mid II
366 pages
Chapter 5 - Relations and Functions - MDM Yusarima
PDF
No ratings yet
Chapter 5 - Relations and Functions - MDM Yusarima
24 pages
Chapter 9
PDF
No ratings yet
Chapter 9
52 pages
UNIT 6 Relation
PDF
No ratings yet
UNIT 6 Relation
48 pages
Relations: Dr. Mitesh S. Joshi. January 28, 2022
PDF
No ratings yet
Relations: Dr. Mitesh S. Joshi. January 28, 2022
32 pages
Comp106 2 Relations
PDF
No ratings yet
Comp106 2 Relations
69 pages
Sets, Logic and Rules of Inference
PDF
No ratings yet
Sets, Logic and Rules of Inference
36 pages
6 Relation
PDF
No ratings yet
6 Relation
56 pages
3 Relations
PDF
No ratings yet
3 Relations
33 pages
Pertemuan 10 - 1
PDF
No ratings yet
Pertemuan 10 - 1
31 pages
Complete Maths Formulae Part 1
PDF
No ratings yet
Complete Maths Formulae Part 1
58 pages
Discrete Structures Chapter 2 Part 1 Relations
PDF
No ratings yet
Discrete Structures Chapter 2 Part 1 Relations
79 pages
Chapter 9
PDF
No ratings yet
Chapter 9
37 pages
12 Last Min Prep
PDF
No ratings yet
12 Last Min Prep
19 pages
Discrete Mathematics
PDF
No ratings yet
Discrete Mathematics
51 pages
DM Unit 4 IT
PDF
No ratings yet
DM Unit 4 IT
42 pages
Relations
PDF
No ratings yet
Relations
60 pages
Discrete Mathematics
PDF
No ratings yet
Discrete Mathematics
45 pages
+2 Maths
PDF
No ratings yet
+2 Maths
29 pages
Chapter 9
PDF
No ratings yet
Chapter 9
52 pages
Relations Chapter 2
PDF
No ratings yet
Relations Chapter 2
41 pages
Functions, Sequence and Relations
PDF
No ratings yet
Functions, Sequence and Relations
43 pages
Discrete Mathematics
PDF
No ratings yet
Discrete Mathematics
43 pages
Relations and Their Properties
PDF
No ratings yet
Relations and Their Properties
27 pages
LectureWeek10 159289
PDF
No ratings yet
LectureWeek10 159289
39 pages
Screenshot 2025-01-27 at 14.05.21
PDF
No ratings yet
Screenshot 2025-01-27 at 14.05.21
36 pages
Lecture2 150706142459 Lva1 App6892
PDF
No ratings yet
Lecture2 150706142459 Lva1 App6892
32 pages
6 e 25 B 7 A 3 Relations
PDF
No ratings yet
6 e 25 B 7 A 3 Relations
65 pages
12 Relations
PDF
No ratings yet
12 Relations
26 pages
Lecture3 Relation
PDF
No ratings yet
Lecture3 Relation
30 pages
Chapter 03
PDF
No ratings yet
Chapter 03
16 pages
Chapter9 Relations
PDF
No ratings yet
Chapter9 Relations
58 pages
Chapter Two Relations and Functions 2.1. Relations A Relation Is Used To Describe Certain Properties of Things. That Way, Certain Things
PDF
No ratings yet
Chapter Two Relations and Functions 2.1. Relations A Relation Is Used To Describe Certain Properties of Things. That Way, Certain Things
27 pages
Lecture 14
PDF
No ratings yet
Lecture 14
12 pages
Lecture 1818 K21CR
PDF
No ratings yet
Lecture 1818 K21CR
17 pages
Relations AND Functions: by Simranjit Kaur
PDF
No ratings yet
Relations AND Functions: by Simranjit Kaur
11 pages
Relations Handout
PDF
No ratings yet
Relations Handout
19 pages
Matrix of Relation and Composition of Relation
PDF
No ratings yet
Matrix of Relation and Composition of Relation
14 pages
Example 3
PDF
No ratings yet
Example 3
14 pages
Lecture Slides MATH255 Week 4
PDF
No ratings yet
Lecture Slides MATH255 Week 4
34 pages
Topic 9 Matrices
PDF
No ratings yet
Topic 9 Matrices
12 pages
Sol Revision Test 1
PDF
No ratings yet
Sol Revision Test 1
9 pages
Mathematical Induction
PDF
No ratings yet
Mathematical Induction
12 pages
2022 Binary Relations
PDF
No ratings yet
2022 Binary Relations
15 pages
Lesson 4
PDF
No ratings yet
Lesson 4
8 pages
Complete Maths Formulae Part 1 - Converted 555
PDF
No ratings yet
Complete Maths Formulae Part 1 - Converted 555
8 pages
Relations
PDF
No ratings yet
Relations
13 pages
Quiz Discrete Mathematics
PDF
No ratings yet
Quiz Discrete Mathematics
10 pages
SIMILAR Matrices
PDF
No ratings yet
SIMILAR Matrices
4 pages
Assignment 1 Maths XII
PDF
No ratings yet
Assignment 1 Maths XII
9 pages
CS 103X: Discrete Structures Homework Assignment 4 - Solutions
PDF
No ratings yet
CS 103X: Discrete Structures Homework Assignment 4 - Solutions
4 pages
CH 3
PDF
No ratings yet
CH 3
7 pages
2022 Binary Relations
PDF
No ratings yet
2022 Binary Relations
15 pages
Solved Problems3: .1. Given: A (1, 2
PDF
No ratings yet
Solved Problems3: .1. Given: A (1, 2
7 pages
Telecom Transmission & Switching Systems (EET-456) : Assignment 2
PDF
No ratings yet
Telecom Transmission & Switching Systems (EET-456) : Assignment 2
4 pages
Revision Test 1
PDF
No ratings yet
Revision Test 1
5 pages
Equivalence Relation Example
PDF
No ratings yet
Equivalence Relation Example
5 pages
Lecture # 10: Sets Continued
PDF
No ratings yet
Lecture # 10: Sets Continued
6 pages
Section 9.5 Question 9 To 19
PDF
No ratings yet
Section 9.5 Question 9 To 19
4 pages
Telecom Transmission & Switching Systems (EET-456) : Assignment 3
PDF
No ratings yet
Telecom Transmission & Switching Systems (EET-456) : Assignment 3
4 pages