C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
Binary RelationLet P and Q be two non- empty sets. A binary relation R is defined to be a subset of P x Q from a set P to Q. If (a, b) ∈ R and R ⊆ P x Q then a is related to b by R i.e., aRb. If sets P and Q are equal, then we say R ⊆ P x P is a relation on P e.g. (i) Let A = {a, b, c} B = {r, s, t} Then R = {(a, r), (b, r), (b, t), (c, s)} is a relation from A to B. (ii) Let A = {1, 2, 3} and B = A R = {(1, 1), (2, 2), (3, 3)} is a relation (equal) on A. Example1: If a set has n elements, how many relations are there from A to A. Solution: If a set A has n elements, A x A has n2 elements. So, there are 2n2 relations from A to A. Example2: If A has m elements and B has n elements. How many relations are there from A to B and vice versa? Solution: There are m x n elements; hence there are 2m x n relations from A to A. Example3: If a set A = {1, 2}. Determine all relations from A to A. Solution: There are 22= 4 elements i.e., {(1, 2), (2, 1), (1, 1), (2, 2)} in A x A. So, there are 24= 16 relations from A to A. i.e. {(1, 2), (2, 1), (1, 1), (2, 2)}, {(1, 2), (2, 1)}, {(1, 2), (1, 1)}, {(1, 2), (2, 2)}, {(2, 1), (1, 1)},{(2,1), (2, 2)}, {(1, 1),(2, 2)},{(1, 2), (2, 1), (1, 1)}, {(1, 2), (1, 1), (2, 2)}, {(2,1), (1, 1), (2, 2)}, {(1, 2), (2, 1), (2, 2)}, {(1, 2), (2, 1), (1, 1), (2, 2)} and ∅. Domain and Range of RelationDomain of Relation: The Domain of relation R is the set of elements in P which are related to some elements in Q, or it is the set of all first entries of the ordered pairs in R. It is denoted by DOM (R). Range of Relation: The range of relation R is the set of elements in Q which are related to some element in P, or it is the set of all second entries of the ordered pairs in R. It is denoted by RAN (R). Example: Let A = {1, 2, 3, 4} B = {a, b, c, d} R = {(1, a), (1, b), (1, c), (2, b), (2, c), (2, d)}. Solution: DOM (R) = {1, 2} RAN (R) = {a, b, c, d} Complement of a RelationConsider a relation R from a set A to set B. The complement of relation R denoted by R is a relation from A to B such that R = {(a, b): {a, b) ∉ R}.
Example: Consider the relation R from X to Y X = {1, 2, 3} Y = {8, 9} R = {(1, 8) (2, 8) (1, 9) (3, 9)} Find the complement relation of R. Solution: X x Y = {(1, 8), (2, 8), (3, 8), (1, 9), (2, 9), (3, 9)} Now we find the complement relation R from X x Y R = {(3, 8), (2, 9)}
Next TopicRepresentation of Relations
|