Discrete Maths

October 29, 2017 | Author: smartvarsh | Category: Logic, Proposition, Formalism (Deductive), Logical Expressions, Mathematical Concepts
Share Embed Donate


Short Description

all discrete maths notes mca...

Description

1 PROPOSITIONS AND LOGICAL OPERATIONS INTRODUCTION What is logic? Logic is the discipline that deals with the methods of reasoning. Logic provides you rules & techniques for determining whether a given argument is valid. In logic we are interested in true or false of statements, and how the truth/falsehood of a statement can be determined from other statements. However, instead of dealing with individual specific statements, we are going to use symbols to represent arbitrary statements so that the results can be used in many similar but different cases. The formalization also promotes the clarity of thought and eliminates mistakes. There are various types of logic such as logic of sentences (propositional logic), logic of objects (predicate logic), logic involving uncertainties, logic dealing with fuzziness, temporal logic etc. Here we are going to be concerned with propositional logic and predicate logic, which are fundamental to all types of logic. Needs of logical reasoning Logical reasoning is used in used in Mathematics to prove theorems, in the natural & physical sciences to draw conclusions from experiments. Indeed we are constantly using logical reasoning. What do we mean by statement or proposition? A statement or proposition is a declarative sentence that is either true or false but not both e.g. 1) The earth is round Statement that happen to be true 2) Do you speak English? Question but not a statement 3) Take two aspirins Command but not a statement 4) The Sun will come out tomorrow Statement since it is either true or false but not both, although we have to wait until tomorrow to find out if it is true or false. 5) x is greater than 2 x is a variable representing a number, is not a proposition, because unless a specific value is given to x we can not say whether it is true or false, nor do we know what x represents. CONNECTIVES In mathematics, the letters x, y, z… denote variables & these variables can be combined with the familiar operations +, -, ÷ and ×. In logic the letters p, q, r …. denote propositional variables i.e. variables can be replaced by statements e.g. p: The sun is shining today q: It is cold

2 Statements or propositional variables can be combined by logical connectives to obtain compound sentences e.g. We may combine the above sentences by the connective and to form the compound sentence p and q: The Sun is shining and it is cold. There are several ways in which we commonly combine simple statements into compound ones. The words are or, and, not, if …. then and if and only if can be added to one or more propositions to create a new proposition i.e. compound propositions. The logical operators are also called connectives. TRUTH TABLE The truth table of a logical operator specifies how the truth value of a proposition using that operator is determined by the truth values of the propositions. A truth table lists all possible combination of truth values of the propositions in the left most columns and the truth value of the resulting propositions in the right most column. NEGATION (NOT) If p is a proposition, its negation p is another proposition called the negation p. the negation of p is denoted by ~ p. The proposition ~ p is read “not p”. Alternate symbol used in the literature are ¬ p, p and “not p”. Truth table for negation p

~ p

T F

F T

p: I went to my class yesterday. ~ p: I did not go to my class yesterday. I was absent in my class yesterday. It is not the case that I went to my class yesterday. CONJUNCTION (AND) If p and q are propositions, then the propositions “p and q”, denoted by p Λ q, is true when both p and q are true and is false otherwise. The proposition p Λ q is called the conjunction of p and q. Truth table for conjunction p

q

T T F F

T F T F

p Λ q T F F F

There is difference between the logical and & English and e.g. Jack and Jill are cousins – Here and is not conjunctions He opened the book and started to read – Here and is used in the sense “and then”. Roses are red and Violets are blue – Proper conjunction Example:

3 Let p be “Ravi is rich” and let q be “Ravi is happy”. Write each of the following in symbolic form. a. Ravi is poor but happy. b. Ravi is neither rich nor happy. c. Ravi is rich and happy. DISJUNCTION (OR) If p and q are propositions, then disjunction “p or q”, denoted by p V q, is false when both p and q are false and is true otherwise. The proposition p V q is called the disjunction of p and q. Truth table for conjunction p T T F F

q T F T F

p V q T T T F

There is also difference between the logical or & English or e.g. Twenty or thirty animals were killed in the fire today – indicating approximate no. of animals and it is not used as connective. There is something wrong with the bulb or with the wiring – the possibility exists one or the other or both. Normally in our everyday language, or is used two statements which have some kind of relationship between them. But in logic it is not necessary to have any relationship between them. Example: Let p be “Ravi is tall” and let q be “Ravi is handsome”. Write each of the following in symbolic form. a. Ravi is short or not handsome. b. Ravi is tall or handsome. c. It is not true that Ravi is short or not handsome. OTHER DEFINITIONS Atomic, primary or simple statements: are those statements which do not contain any connectives. Molecular, composite or compound statements: are those statements which contain one or more primary statements or some connectives. Example Construct the truth table of (~ p Λ (~ q Λ r)) V (q Λ r) V (p Λ r) Example Given that the truth values of p and q are T and those of r and s are F, find the truth value of the following (~ (p Λ q) V ~r) V (((~p Λ q) V ~ r) Λ s) Example “It is not the case that houses are cold or haunted and it is false that cottages are warm or houses ugly”. For what truth values will the above statement be true ?

4 MATHEMATICAL INDUCTION PRINCIPLE OF MATHEMATICAL INDUCTION Let P be a proposition defined on the positive integers N, i.e., P (n) is either true or false for each n in N. suppose P has the following two properties: 1. P (1) is true. 2. P (n + 1) is true whenever P (n) is true. Then P is true for every positive integer. We shall not prove this principle. In fact, this principle is usually given as one of the axioms when N is developed axiomatically. Example 1 Show by mathematical induction that for all n ≥ 1 1 + 2 + 3 + ……… + n = n (n + 1) ⁄ 2 Example 2 Show by mathematical induction that for all n 1 + 21+ 22+ ……… +2n =2n + 1 - 1 BASIC CONCEPTS OF SET THEORY A set is well defined collection of objects. Any object belonging to a set is called a member or an element of that set. We will generally us uppercase letters to denote sets and lowercase letters to denote the members or elements of sets. If an element p belongs to a set A, then we write p Є A. If any element q does not belong to a set A, then we write q ¢ A A set is finite if it contains a finite number of distinguishable elements e.g. the alphabets of English, otherwise a set is infinite e.g. the set of real numbers. Let A and B be any two sets. If every element of a is an element of B, then A is called a subset of B or A is said to be included in B or B includes A, denoted by A B. Two sets A and B are equal if A

B and B

A.

A set A is called a proper subset of a set B if A as A B.

B and A ≠ B. Symbolically it is written

A set is called a universal set if it includes every set under discussion. A universal set is denoted by E or U.

5 A set which doesn’t contain any element is called an empty set or null set. An empty set will be denoted by . For a set A, a collection or family of all subsets of a is called the power set of A. The power set of A is denoted by P(A). OPERATIONS ON SET The intersection of any two sets A and B written as A ∩ B is the set consisting of all the elements which belong to both A and B. Symbolically, A ∩ B = { x | x Є A Λ x Є B} Two sets A and B are called disjoint iff A ∩ B = common.

i.e. A and B have no element in

For any two sets A and B, the unions of A and B, written as A U B is the set of all elements which are members of the set A or the set B or both. Symbolically, A U B = {x | x Є A V x Є B}. Let A and B be any two sets. The relative complement of B with respect to A or difference of A and B, written as A – B, is the set of consisting of all elements of A which are not elements of B. Symbolically, A - B = {x | x Є A Λ x B} Let E be the universal set. For any set A, the relative complement of A with respect to E i.e. E – A is called the absolute complement or complement of A and is denoted by ~ A. BASIC SET OF IDENTITIES 1. A U A = A, A ∩ A = A (Idempotent law) 2. (A ∩ B) =(B ∩ A) , (A U B) = (B U A) (Commutative Law) 3. (A U B) U C = A U (B U C), (A ∩ B) ∩ C = A ∩ (B∩C) (Associative Law) 4. A ∩ ( B U C) = (A ∩ B) U ( A ∩ C), A U ( B∩ C) = (A U B) ∩ ( A U C) (Distributive Law) 5. A U = A, A ∩ E = A 6. A U E = E , A ∩ = 7. A U ~ A = E , A ∩ ~ A = 8. ~ (~ A) = A 9. A U ( A ∩ B) = A, A ∩ ( A U B) = A(Absorption Law) 10. ~ ( A U B) = ~ A ∩ ~ B , ~ ( A ∩ B) = ~ A U ~ B ( De Morgan’s law) 11. ~ = E 12. ~ E = ORDERED PAIR An ordered pair consists of two objects in a given fixed order. An ordered pair is not a set consisting of two elements. The ordering of the two objects is important. The two objects need not be distant. We generally denote an ordered pair by or (x, y) e.g. a

6 point in a two dimensional plane in Cartesian coordinates. The ordered pairs , … represent different points in a plane. The ordered pairs and are equal iff a = c and b = d. CARTESIAN PRODUCT Let A and B be any two sets. The set of all ordered pair such that the 1st member of the ordered pair is an element of A and the second is an element of B is called the Cartesian product of A and B is written as A X B. Thus, A X B = { | x Є A Λ y Є B} Example A = {a, b} B = {1, 2} Find A X B and B X A. PARTITIONS A partition or quotient set of a nonempty set A is a collection P of nonempty subsets of A such that 1. Each element of A belongs to one of the sets in P . 2. If A1 and A2 are distinct elements of P then A1 ∩ A2 = The sets in P are called the blocks or cells of the partition.

7 MATHEMATICAL LOGIC Example ~ (p ↔ q)

(p V q) Λ ~ (p V q) Λ (p Λ q)

Example (p → q) Λ (r → q)

(p V r) → q

Important Definitions For any statement formula p → q, the statement formula q → p is called its converse ~p → ~q is called its inverse and ~q → ~p is called its contra positive. IMPLICATION A proposition p is said to logically imply or tautologically imply or simply imply a proposition q if q is true whenever p is true. A proposition p is said to logically imply a proposition q if p → q is a tautology. The implication of p to q is denoted by p q. Method 1 To show the implication p q, we assume that p has the truth value T and then show that this assumption leads to q having the value T. Then p → q must have the truth value T. Method 2 To show p q, we assume that q has the truth value F and then show that this assumption leads to q having the value F. Then p → q must have the truth value T. Example 1. (p Λ q) p → q 2. p → (q → r) (p → q) → (p → r) 3. (q → (p V ~ p)) → (r → ( p V ~ p)) 4. p → q p → (p Λ q)

r→q

IMPORTANT IMPLICATION FORMULAS 13. p p V q (Disjunctive Addition) 14. (p Λ q) p (Conjunctive simplification) 15. (p Λ q) q (Conjunctive simplification) 16. p Λ (p → q) q (Detachment) 17. ~ q Λ (p → q) ~ p (Contra positive) 18. (p V q) V ~ q p (Disjunctive simplification) 19. (p V q) V ~ p p (Disjunctive simplification) 20. (p → q) Λ (q → r) (p → r) (Chain rule) 21. ~ p p→q 22. q p→q 23. ~ (p → q) p 24. ~ (p → q) ~q 25. (p V q) Λ (p → q) Λ (q → r) r (Dilemma) 26. p Λ q p↔q 27. p → (q → r) (p → q) → (p → r) 28. p (p V p) , p (p Λ p) (Idempotent law)

8 29. (p Λ q) (q Λ p) , (p V q) (q V p) (Commutative Law) 30. (p V q) V r p V (q V r) , (p Λ q) Λ r p Λ (q Λ r) (Associative Law) 31. p Λ ( q V r) (p Λ q) V ( p Λ r), p V ( q Λ r) (p V q) Λ ( p V r) (Distributive Law) 32. p V F p , pΛT p 33. p V T T , pΛF F 34. p V ~ p T , pΛ~p F 35. ~ (~ p) p 36. p V ( p Λ q) p , p Λ ( p V q) p (Absorption Law) 37. ~ ( p V q) ~ p Λ ~ q , ~ ( p Λ q) ~ p V ~ q ( De Morgan’s law) 38. p → q ~ p V q (Implication Law) 39. p ↔ q (p → q) Λ (q → p) (Equivalence Law) 40. (p Λ q) → r p → (q → r) (Exportation Law) 41. (p → q) Λ (p → ~q) ~ p (Absurdity Law) 42. p → q ~q → ~p (Contra positive Law) 43. p ↔ q ( p Λ q) V (~ p Λ ~q) (Biconditional Law)

OTHER CONNECTIVES NAND (NOT AND) If p and q are propositions, then the proposition “p NAND q” denoted by p ↑ q is false when both p and q are true and is true otherwise. That is the word “NAND” is a combination of “NOT” and “AND”. NOR (NOT OR) If p and q are propositions, then the proposition “p NOR q” denoted by p ↓ q is true when p and q are both false and true otherwise. That is the word “NAND” is a combination of “NOT” and “OR”. Truth table for NAND and NOR p T T F F

q T F T F

p↑q F T T T

p↓q F F F T

FUNCTIONALLY COMPLETE SETS Any set of connectives in which every formula can be expressed in terms of an equivalent formula containing the connectives from Λ, V, ~, → and ↔ is called a functionally complete set of connectives. Example 1. Write an equivalent formula for p Λ (q ↔ r) V (r ↔ p) which does not contain the biconditional.

9 2. Write an equivalent formula for p Λ (q ↔ r) which contains neither the biconditional nor the conditional. 3. Write the negation of the statement without using the conditional. “If it snows they do not drive the car”. 4. Rewrite the following statement without using conditional. “If you work hard, you will succeed”.

CONDITIONAL OPERATOR (IF ….. THEN) IMPLICATION If p and q are two statements, then the statement p → q which is read as “If p then q” is called a conditional statement. The statement p is called antecedent (premise, hypothesis) and q the consequent (conclusion) in p → q. Truth table for if ….. then p T T F F

q T F T F

p→q T F T T

It is not necessary that there be any kind of relation between p and q in order to form p → q. The conditional often appears very confusing to a beginner when one tries to translate a conditional in English into symbolic form. Because implications arise in many mathematical arguments, a wide variety of terminology is used to express p → q. Some of the more common ways of expressing this implication are 1. p implies q 2. if p then q 3. q if p 4. p only if q 5. p is sufficient for q 6. q whenever p 7. q is necessary for p In our everyday language, we use the conditional statements in a more restricted sense e.g. If I get the book then I shall read it tonight sounds reasonable. On the other hand “If I get the book then this room is red” does not make sense in English language. But in logic

10 it is perfectly acceptable and has a truth value which depends on the truth values of the two statements being connected. BICONDITIONAL OPERATOR (IF AND ONLY IF) If p and q are two statements, then the statement p q which is read as “p if and only if q” and abbreviated as “p iff q” is called a biconditional statement. p q is also translated as “p is necessary and sufficient for q”. Truth table for if and only if p T T F F

q T F T F

p

q T F F T

Example Given the truth values of p and q are T and those of r and s as F find the truth value of (~ (p Λ q) V~ r) V ((q ~ p) → (r V ~ s)) Example If p → q is false, determine the truth value of (~ (p Λ q)) → q TAUTOLOGIES AND CONTRADICTIONS TAUTOLOGY A statement formula which is true regardless of the truth values of the statements which replace the variables in it is called a tautology or a logical truth or a universally valid formula. Example ((p → q) Λ (q → r)) → (p → r) is a tautology CONTRADICTION A statement formula which is false regardless of the truth values of the statements which replace the variables in it is called a contradiction. Example Verify that the proposition (p Λ q) Λ ~ (p V q) is a contradiction. CONTINGENCY A statement formula that is neither a tautology nor a contradiction is called a contingency. EQUIVALENCE AND IMPLICATION An important step used in mathematical argument is the replacement of a statement with another statement with the same truth value.

11 EQUIVALENCE Two propositions are logically equivalent or simply equivalent if they have exactly the same truth values under all circumstances. The propositions p and q are logically equivalent if p q is a tautology. The equivalence of p and q is denoted by p q. Note 1. One way to determine whether two propositions are equivalent is to use a truth table. In particular, the propositions p and q are logically equivalent if and only if the columns giving their truth values agree. Note 2. Whenever we find logically equivalent statements, we can substitute one for another as we wish, since this action will not change the truth value of any statement. Example Prove (p → q) (~ p V q)

Example Without using truth table show that ((p V q) Λ ~ (~ p Λ (~ q V ~ r))) V (~ p Λ ~ q) V (~ p Λ ~ r) is a tautology. Example Without using truth table show that (~ p Λ (~ q Λ r)) V (q Λ r) V (p Λ r)

r

12

NORMAL FORMS A statement formula is said to be in the normal form (or canonical form) if 1. only three connections ~, Λ, V have been used 2. negation has not been used for a group of letters 3. distributive law has been applied 4. parenthesis has not been used for the same connective(e.g. p V (q V r) is p V q V r) Note: In this section we will use word “product” in place of “conjunction” and “sum” in place of “disjunction”. Elementary product and sum A product of the variables and their negations in a formula is called an elementary product and a sum of the variables and their negation is called an elementary sum. Any part of an elementary product or sum which itself an elementary product or sum is called a factor of the elementary product or sum. e.g. 1. p, ~p, ~p Λ q, ~q Λ p Λ ~p, p Λ ~p are some elementary products of the two variables p and q 2. p, ~p, ~p V q, ~q V p V ~p, p Λ ~q are some elementary sums. 3. ~p, q Λ ~q , ~p Λ q are some of the factors of ~p Λ q Λ ~q DISJUNCTIVE NORMAL FORM A formula which is equivalent to a given formula and which consists of a sum of elementary products is called a disjunctive normal form. CONJUNCTIVE NORMAL FORM A formula which is equivalent to a given formula and which consists of a product of elementary sums is called a conjunctive normal form. Example Obtain the disjunctive normal form and conjunctive normal forms of 1. p Λ (p → q) 2. ~ (p V q) ↔ (p Λ q) MINTERM For a given number of variables, the minterm consists of conjunctions in which each variable or its negation, but not both, appears only once. e.g. for two variables p and q p Λ q, p Λ~ q, ~p Λ q and ~ p Λ ~q are called minterms. From the truth table of these minterms, it is clear that no two minterms are equivalent. p T T F F

q T F T F

pΛq T F F F

p Λ~ q F T F F

~p Λ q F F T F

~ p Λ ~q F F F T

13

PRINCIPAL DISJUNCTIVE NORMAL For a given formula, an equivalent formula consisting of disjunctions of only minterms is known as its principal disjunctive normal form. Note: For every truth value T in the truth table of the given formula, select the minterm which has also has the value T for the same combination of the truth table of p and q. The disjunction of only minterms will then be the equivalent to the given formula. Example Obtain the principal disjunctive normal form of p → ((p → q) Λ ~ (~ q V ~p)) The method to obtain the principal disjunctive normal form of a given formula without constructing the truth table is given below 1. Replace ↔ and → by ~, Λ, V. 2. Use De Morgan’s law and distributive law. 3. Drop any elementary product which is a contradiction. 4. Introduce the missing factors to obtain minterms. 5. Delete the identical minterms. Example Obtain the principal disjunctive normal form of 1. ~p V q 2. (p Λ q) V (~p Λ r) V (q Λ r) MAXTERM For a given number of variables, the maxterm consists of disjunctions in which each variable or its negation, but not both, appears only once. e.g. for two variables p and q p V q, p V~ q, ~p V q and ~ p V ~q are called maxterms. PRINCIPAL CONJUNCTIVE NORMAL For a given formula, an equivalent formula consisting of conjunctions of the maxterms is known as its principal conjunctive normal form. Note: If the principal disjunctive normal form of a given formula A is known then the principal disjunctive normal form of ~A will consist of the disjunction of the remaining minterms which do not appear in the principal disjunctive normal form of A. From A ~ ~ A, one can obtain the principal conjunctive normal form of A. Example Obtain the principal disjunctive and principal conjunctive normal forms of the following formulae. 1. q Λ (p V ~ q) 2. p → (p Λ ( q → p)) 3. ( q → p) Λ (~ p Λ q) 4. p V (~ p → (q V (~ q → p)))

14

PREDICATE CALCULUS Consider the two statements “Rohit is brilliant” and “Manas is brilliant”. As propositions, there is no relation between them, but they have something in common. Instead of writing two statements we can write a single statement like “x is brilliant”, because is Rohit and Manas share the same nature brilliant. By replacing x by any other name we get many propositions. The common feature expressed by “is brilliant” is called predicate. Predicate calculus deals with sentences involving predicates. A p[art of a declarative sentence describing the properties of an object or relation among objects can be referred as predicate, e.g. “is brilliant”. Denote the predicate “is brilliant” by letter B, Rohit by r, Manas by m. then we can write the two statements as B(r) and B(s) respectively. QUANTIFIERS There are two types of quantifiers 1. Universal quantifier 2. Existential quantifier UNIVERSAL QUANTIFIER The Universal quantification of a predicate p(x) is the statement “for all values of x, p(x) is true”. The universal quantification of P(x) is denoted by x P(x). The symbol is called the universal quantifier. EXISTENTIAL QUANTIFIER The Existential quantification of a predicate p(x) is the statement “there exists a value of x for which p(x) is true”. The existential quantification of P(x) is denoted by x P(x). The symbol is called the existential quantifier. Consider statements involving the names of two objects e.g. Jack is taller than Jill can be represented by T (j1, j2) Example P(x): x is a person F(x, y): x is the father of y M(x, y): x is the mother of y Write the predicate “x is the father of the mother of y”

15

VALIDITY USING TRUTH TABLE 1. If you invest in the stock market, then you will get rich. If you get rich, then you will be happy. Therefore, if you invest in the stock market, then you will be happy. 2. I will become famous or I will not become a writer. I will become a writer. Therefore, I will become famous. 3. If I drive to work, then I will arrive tired. I do not drive to work. Therefore, I will not arrive tired. 4. Without constructing a truth value, show that a Λ e is not a valid consequence of a ↔ b, b ↔ (c Λ d), c ↔ (a V e), a V e RULES OF INFERENCE A particular formula is a valid consequence of a given set of premises can be proved by the rules of inference. There are two rules of inference which called rules P and T. P: A premise introduced at any point in the derivation. T: A formula S may be introduced in a derivation if S is tautologically implied by any one or more of the preceding formulas in the derivation. IMPORTANT IMPLICATION FORMULAS 44. p p V q (Disjunctive Addition) 45. q p V q (Disjunctive Addition) 46. (p Λ q) p (Conjunctive simplification) 47. (p Λ q) q (Conjunctive simplification) 48. ~ p p→q 49. q p→q 50. ~ (p → q) p 51. ~ (p → q) ~q 52. p, q p Λq 53. ~ p, p V q q 54. p , p → q q 55. ~ q , p → q ~p 56. p → q , q → r p→r 57. p V q , p → r , q → r r Example 1 Demonstrate that R is a valid inference from the premises p → q, q → r and p

16

Example2 Show that r V s follows logically from the premises c V d, (c V d) → ~h, ~h → (a Λ ~b) and (a Λ ~b) → r V s There is a third inference rule known as rule CP or rule of conditional proof. CP: If we can derive S from R and a set of premises, then we can derive R → S from the set of premises alone. Rule CP is called deduction theorem and is generally use if the conclusion is of the form R → S. In such cases R is taken as additional premises and S is derived from the given premises and R. Example 3 Show that R → S can be derived from the premises P → (Q → S), ~R V P and Q. Example 4 If A works hard, then either B or C will enjoy themselves. If B enjoys himself, then A will not work hard. If D enjoys himself, then C will not. Therefore, if A works hard, D will not enjoy himself.

17

Relations Relations means as it’s name implies it shows. The relation ship between minimum two entities, objects. In this unit we will discuss about relations and it’s properties, and it’s representation and some operations on relations. Before discussing about relations in detail we should know about product set. 1)

Product Set

If A and B are two non empty finite set then product set or Cartesian product A X B as said to be ordered pair (a, b) with a E A and b E B. A X B = { (a, b) / a ∈ A and b ∈ B } Eg.

A = { 1, 2, 3}

B = { 4, 5}

A X B = { (1, 4) (1, 5), (2, 4), (2, 5), (3, 4), (3, 5) } B X A = { (4, 1) , (4, 2), (4, 3), (5, 1), (5, 2), (5, 3) } Is A X B ≠ B X A Let coordinately of a set A is about as n(A) or /A/ Then N (A X B) = n (A) X n (B) This can be verified from above eg: n (A X B) = 3 X 2 = 6 n (A) = 3 n (B) = 2 2)

Relations

Usually relations are defined on sets; and it’s condition product is how the elements of the sets are related and we are grouping those elements which satisfying the relation R. Let A and B are two sets. Then A X B = { (a, b) / a ∈ A and b ∈ B } On the above set A X B we can define some relation R then the set R contain only those tables which satisfying the defined relation. Eg.: Let A = { 2, 3 } B = { 1, 4, 9, 10 } A X B = { (2, 1), (2 , 4) (2 , 9) (2, 10), (3, 1), (3, 4), (3, 9), (3, 10) } Her relation in given 2 R 4, 3 R 9 Read as 2 Related to 4 and 3 Related to 9 where 2, 3 ∈ A and 4, 9 ∈B. Her we can 2 say that Let a E A and b E B then the above relation in b = a .

18 So the relation R in defined on A X B is b is a Square of A. So R = { (a, b) / (a, b) ∈ A X B and b = 2 a }. In the Relation R is defined as. R is a set which contain the element (a, b) in ordered pair and every (a, b) ∈ A X B and b = a2. So the Relation set R is obtained as. R = { (2, 4), (3, 9 ) } ∈ A X B Similarly any types of relations can be defined as sets such as. B < a ; b = a, a > b, a + 5 < b etc. .. Where a ∈ A and b ∈ B. Where A and Bare two sets. So from the above discussions we can Understand that Relation R is a subset of A X B. If the relation is defined on two set A and B. RCAXB 3)

Domain & Range of a Relation

Let R be a relation defined on two sets A to B then Domain of R Dom (R) is a subset of A ie set of all first element in the pair that make up R. Similarly Range of R is Range (R) is a subset of B in Set of all Second element in the pair that make up R. We can explain it with example. Let

A = { 1, 2, 3, 4} B = { 5, 6, 7, 10}

A X B = { (1, 5), (1, 6), (1, 7), (1, 10) (2, 5), (2,6) (2,7) (2,10) (3,5), (3,6), (3,7), (3,10), (4,5), (4,6), (4, 7), (4, 10) } Relation R = { (a, b) / (a, b) ∈ A X B and (a + 4 = b) } So R = { (1, 5), (2,6), (3,7) }. Dom (R) = { 1, 2, 3 } ∈ A Range (12) = { 5, 6, 7 } ∈ B 4)

R- Relative set

If R is a relation from A to B where A and B are two set and x E A is we define R(x), the RRelative set of x is the all element y in B properly that x is Related Y x Ry for some x is A. R – Relative set of A is R (A) = { y ∈ B / x R y for some x in A } Let A = {1, 2, 3 } B {1, 2, 4, 5} Let R in a Relation x + 2 ≤ y where X ∈ A and y ∈ B the R = { (1, 4) (1,4) (2,4) (2,5) (3,5) }

19 R relative set of 2 is R (2) = {4, 5) is in relation set 2

R

4 and 2

R

5.

R relative set of set A R (A) = { 4, 5} is in the above relation set only 4 and 5 are related to some of the elements in A. •

Let R be a relation from A to B and Let A, and A2 be subset of A

Theorem 1

Then we can prove following Theorem

(A)

If A1 ⊆ A2 then R (A1) ⊆ R (A2)

(B)

R (A1 υ A2) = R (A1) υ R (A2)

(C)

R (A1 ∩ A2) ⊆ R (A1) ∩ R(A2)

Proof : a)

If y ∈ R (A1), then x R Y for X ∈ A1, Since A1 ⊆ A2, x ∈ A2 this y ∈ R (A2)

b)

If y E R (A υ B) this is from the definition of R – relative set x R y for some X in A υ B2 If x is in A1 them we must have y E R (A1). By the some argument if X is in A2 then we must have y ∈ R (A2) is in either (are y ∈ R (A1) υ R (A2)

Ie we have taken that y ∈ R (A1 υ A2) and y ∈ R (A1) υ R (A2) Ie R (A1 υ A2) ⊆ R (A1) υ R (A2) – We know that

1

A1 ⊆ (A1 υ A2) A2 ⊆ (A1 υ A2)

We have show that R (A1) ⊆ R (A1 υ A2) R (A2) ⊆ R (A1 υ A2) R (A1) υ R (A2) ⊆ R (A1 υ A2) -2 From 1 and 2 ie

x ⊆ y and y ⊆ x them x = y

So R (A1 υ A2) = R (A1) υ R (A2) c) By using above notations we can prove A (A1 ∩ A2) ⊆ R (A1) ∩ R (A2) Left as an exercise. 5)

Matrix Representation of Relation

In order to represent a relation between two finite sets with a matrix as follows. If set A = {a1, a2 . . . . . . . . Am } and B = {b1, b2, b3 . . . . . bn } are finite set contain M and n elements respectively and R is a relation from A to B we can represent R by a Mxn matrix MR = [Mij] The matrix MR is defined as.

Mij

=

1 if (ai, bj) ∈ R. 0 If (ai, bj) ∉ R.

*

Ie in mxn matrix each entry is matrix in filled with 1 If (ai, bj) is a element in Relation R else 0 if (ai, bj) in not a member relation.

20

Example A = { 1, 2, 4, 6 } B = { 1, 4, 5, 16, 25, 36 } 2

Let R be a relation from A to B and relation is defined as y = x where x ∈ A and y ∈ B. So Relation Set R = { (1,1), (2,4), (4,16) (6,36) }. Matrix Representation for the above Relation is n (A) = 4 n (b) = 6 So we have 4 X 6 matrix MR B

A=

1

4

5

16

25

36

1

1

0

0

0

0

0

2

0

1

0

0

0

0

4

0

0

0

1

0

0

6

0

0

0

0

0

1

(2 , 4) ∈ R so Correspondently is 1. Example 2 Let Mr be the Matrix of a Relation then prepare the Relation set from the matrix assume elements as a1 a2 . . . . an for A b1, b2, b3 . . bm for B. 1 0 0

=

MR

Her n (A) = 3

0 0 1

0 1 1

1 0 0

0 0 0

n (B) = 5

Her Relation Set are R = { (a1, b1), (a1, b4), (a2, b3), (a3, b2), (a3, b3) }. 6)

The Diagraph of a Relation

A relation can also be represented as Diagraph. If a relation is defined on two different set then the diagraph for that relation usually a bi partiate graph. More discuss about this is in following see when. The Diagraph of a Relation A relation can also be represented as a diagraph. Digraph in pictorial representation of a relation usually the relation is defined on single set. Let A be a finite set with n elements. Then we can define any relation R on AXA and a here R ∈ AXA. In order to represent a relation as A to A is R, we can draw a directed graph (Diagraph). Graph is a set of vertices along with set of Edges. Each vertex (node) in the graph represent the element in the set here A. Edge between two vertex represent say < Vi Vj are element of A.

21

Eg : 1 A = { 1,2,3,4 } A relation R defined on A to A is R ∈ A X A. Relation R { (a,b) / (a ∈ A and b ∈ A), a < b}. R = { (1,2), (1,3) (1,4), (2,3) (2,4) (3,4) }

2 1

Fig. 1

4 3

is the graph of a relation . . . . R. Eg : 2 Prepare the Relation set from the given Diagram

1

2

3

5

4 Figure 2

R=

A = { 1,2,3,4,5 }

{1,1), (2,2) (1,3) (1,4) (1,5), (2,2), (2,3), (2,4), (2,5) (3,3) (3,4) (3,5) (4,4) (4,5) (5,5) }

R = { (a, b) / (a, b) ∈ A X B, a ≤ b }. Note : Suppose a Relation R is defined on two different sets A and B is a relation is defined from A to B. Then whose digraph in said to be a bipartiate graph. A = { 1,2,3 } B = { a, b, c}. A relation R is defmal on A X B in given. R = { (1, a) (2, c), (3, b), (1,c), (3, a) }. So graph for above relation in represented given below.

22 Her the nodes (vertex) are divided in to two sets. {1,2,3} (a, b, c) and also seen that there in no relationship among elements in the some set. So we can partiation the graph in to exalt two halfs; these types of graph called bi partiate graph. [We will discuss the properties of graph is coming unit Graph theory]. 7)

Paths in Relations and Digraphs

Path length in a relation R can be explained easily with help of a diagraph of a Relation. Let a be set A = { a, b, c, d, e }. And a Relation r definition A to a in R = { (a, a), (a, b,) (b, c) (c, e) (c, d), (d, e) }. The diagraph for the above relation is

2

2

2

2

2

2 Fig 3 R

R

R

R

R

R

Here the element in the relation set R are a a, a b, b c, c d, c e, d e. are seen in the graph with edges < a1, a2 >, < a, b >, < b, c >, < c, d > < c, e >, and < d, e >. Path length for above edges are in there a path of length are from are vertex to another vertex which is present in the relation observe the sequence. R

R

b c and c d. [ b Related to C and [ Related to d ] is contributing a path of length 1 each is a R R relation from. B to d in a sequence as b c, c d so path length from b to d is 2. [ is represented with Doted Line ]. So, suppose R is a relation on set A, A path of length n in R from a to b is a finite sequence S=a

R

x, x

R

x2, x2

R

x3 . . . . . . xn-1

R

b

Where x1, x2 . . . . . xn-1 are intermediate nodes in the diagraph through which we can reach to Rn from a bat the path of length is n. it is denoted as. a b meaning in the expression will generate a sequence starting from a and ending at b through intermediate n-1 elements. Like A

R

x1, x1

R

x2 . . . . . . . x n –1

R

b.

The notalian R (x) consist of all vertex that be reached from x bat whose path of length should be n. The Notalwon R (x), consist of all vertex that can be reach from x by some path in R. From the above digraph for a Relation defined on A to A. we can list different path of lengths.

23

R = { (a, a) (a, b), (b, c) (c, d) (c, e) (d, e) } Path of length = 1 n = 1 R

a a R a b R b C R c d R c e R d e Path length n = 2 R2

a a R2 a b R2 a c R2 b e R2 b d R2 c e

-

R

R

a a and a a R R a a and a b R R a b and b c R R b c and c e R R b c and c d R R C d and c e

Path length n = 3 R3

a a R3 a b R3 a c R3 a d R3 a e R3 b e -

R

R

R

R

R

a a, a a and a a R R R a a, a a and a b R R R a a, a b and b c R R R a b, b c and c d R R R a b, b c and c e R R R b c, c d and d e

Path of length n = 4 R4

a a 4 aR b R4 a c R4 a d R4 a e

-

R

R

a a, a a, a a and a a R R R R a a, a a, a a and a b. R R R R a a, a a, a b and a c R R R R a a, a b, b c and c d R R R R a a, a b, b c and c e

Here after in n > 3 we have no path from mode other than a But if the n ® is sufficiently large it is difficult to prepare the part of length by using above method. 1 2 In order to made this taste easy, we are using another method Matrix method to calculate R , R . n ...R . We have already discussed matrix representative of a Relation R is MR. With help of this matrix. We can calculate any path of length in the relation. 2

n

MR represent the matrix which gives the relation whose path of length in 2. Similarly MR is the matrix with path of length n. 2

Here MR = MR MR 3

MR = MR 0 MR 0 MR

R

M is the original relation matrix with path of length,

24

n

MR = MR 0 MR 0 MR . . . .MR (n tones). n

(the operator is part are at relative positions) Guide Line for preparing MR . 1)

Let MR be the Relational matrix with n rows and n columns and path of length one. Her MR = [Mij ] 1 ≤ I ≤ n and I ≤ j ≤ n. 2

2

2)

Let MR is the Relational matrix with path of length 2 is MR = [ nij ] 1 ≤ i ≤ n and 1 ≤ j ≤ n.

3)

In MR each entry

2

th

th

1

If and only if i row and j column of MR above R 1 in the some relative position

0

If there is no 1 in some relative position of I row and j column of MR.

Nij =

th

3

4)

2

R

3

MR = MR M and Her each entry in MR = [ nij ] th

th

2

1, if there is one in the some relative position of i row and j column of MR and MR [ Nij ] =

th

th

2

0, if there is no one in the some relative position of i row and j column of MR and MR. 4

5

n

5) Repeat the step for MR , MR . . . . . . MR . k k-1 Is MR = MR MR. Example 1 Let

MR =

2

A = { a, b, c, d, e } R = { (a, a), (a, b), (b, c), (c, d), (c, e), (d, e) }. 1 0 0 0 0 st

MR = MR MR = 1

1 0 0 0 0

0 1 0 0 0

0 0 1 0 0

0 0 1 1 0

1

1

0

0

0

0

0

1

0

0

0

0

0

1

1

0

0

0

0

1

0

0

0

0

0

rd

3

st

1

th

4

25

2

MR

=

st

1

1

0

0

0

0

0

1

0

0

0

0

0

1

1

0

0

0

0

1

0

0

0

0

0

1

1

1

0

0

0

0

0

1

1

0

0

0

0

1

0

0

0

0

0

0

0

0

0

0

st

Her in MR 1 raw and 1 column contain 1 in some relative position 1 is in marked in circle in MR 2 2 MR (1,1) = 1 MR, & MR rd

th

2

2

rd

Similarly 3 row and 4 column of MR contain 1 in some relative position at 4. So in MR matrix 3 th 2 n row 4 column contain a which is marked in Rectangle MR . Like this way we can prepare MR . 8)

Computer Representation of Relations.

A relation R can be represented in computer by using two methods. They are matrix representation, and another are in linked list representation. This same representation we are discussing in graph theory also any given relation R which can be represented as a diagraph as we have discussed. This diagraph we can represent as a matrix in graph theory we call it as adjacency matrix. Preparation of adjacency matrix is as given below. 1)

Let R be a relative defined as set A with n (A) = M, so we have MR with mxm.

2)

any entry in MR = [ Mij ] is

1 Mij

th

th

th

If there is a edge between i vertex to j vertex. Ie i element with set A to J element with set A

=

th

th

0 If there is no edge between i vertex to j vertex. For the given graph

a

a

th

26

a

Fig. 5

a a

MR =

a

b

c

d

e

A

1

1

0

0

0

B

0

0

1

0

0

C

0

0

0

1

1

D

0

0

0

0

1

E

0

0

0

0

0

Adjacency list [ linked list representation] The Diagraph in Relation can be represented as. Linked list, it is usually a storage call which consist of at least one information field and one pointed field to point next node [Storage cell] INFO FIELD

POINTER

is the one such organization.

The Linked list representation of the above diagraph is a

a

b

c

c

d

d

e \

e

Nil

b

e

\

\

\

Her the \ in the pointed field indicated that there is no node after that in end of the list 9)

Properties of Relations

In many applications to computer science and applied mathematics, we deal with relations on a set A rather than relations from A to B. Moreover, these relations often satisfy certain properties that will be discussed in this section. Reflexive and Irreflexive Relations A relation R on a set A is reflexive if (a, a) ∈ R for all a ∈ A, that is, if a R a for all a ∈ A. A relation R on a set is irreflxive if a R a for every a ∈ A.

27 Thus R is reflexive if every element a ∈ A is related to itself and it is irreflexive if no element is related to itself. a)

Let ∆ = } (a,a) / a ∈ A] so that ∆ is the relation of equality on the set A. Then ∆ is reflexive, since (a, a) ∈ ∆ for all ∈ A.

b)

Let R = [ (a, b) ∈ A X A [a ≠ b], so that R is the relation of inequality on the set A. Then R is irreflexive, since (a, a) ∉ R for all a ∈ A.

c)

Let A = {1,2,3), and let R = {(1,1), (1,2)}. Then R is not reflexive since (2,2) ∉ R and (3,3) ∉ R. Also, R is not irreflexive, since (1,1) ∈ R.

d)

Let A be a nonempty set. Let R = ∅ ⊆ A X A, the empty relation. Then R is not reflexive, since (a, a) ∉ R for all a ∈ A (the empty set has no elements). However, R is irreflexive.

We can identify a reflexive or irreflexive relation by its matrix as follows. The matrix of a reflexive relation must have all I’s on it’s main diagonal, while the matrix of an irreflexive relation must have all 0’s on its main diagonal. Similarly, we can characterize the digraph of a reflexive or irreflexive relation as follows. A reflexive relation has a cycle of length I at every vertex, while an irreflexive relation has no cycles of length I. Another useful way of saying the same thing uses the equality relation ∆ on a set A : R is reflexive if and only if ∆ ⊆ R, and R is irreflexive if and only if ∆ ∩ R = ∅ . Finally, we may note that if R is reflexive on a set A, then Dom (R) = Ran (R) = A. Symmetric, Asymmetric, and Antisymmetric Relations A relation R on a set A is symmetric if whenever a R b, then b R a. It then follows that R is not symmetric if we have some a and b ∈ A with a R b, but b R a. A relation R on a set A is asymmetric if whenever a R b, then b R a. It then follows that R is not asymmetric if we have some a and b ∈ A with both a R b and b R a. A relation R on a set A is antisymmetric if whenever a R b and b R a, then a = b. The contrapositive of this definition is that R is antisymmetric if whenever a a ≠ b, then a R b or b R a. It follows that R is not antisymmetric if we have and b in A, a ≠ b, and both a R b and b R a. Given a relation R, we shall want to determine which properties hold for R. Keep in mind the following remark : A property fails to hold in general if we can find one situation where the property does not hold. Now we will see how can we solve some problems by wing there properties. Before Doing problem. We clarify some notations. +

-

Z is a set of Integers both + ve and – ve 2 in set of +ve integers. 2 in set of –ve Integers R in set of Realnumbers. Example I Let A= Z, the set of integers, and let R = { (a, b) ∈ A X A [ a < b ] So that R is the relation less than. Is R symmetric, asymmetric, or antisymmetric?

28 Solution Symmetry : If a < b, then it is not true that b < a, So R is not symmetric. Asymmetry: If a < b, then b < a (b is not less than a), so R is asymmetric. Antisymmetry: If a ≠ b, then either a < b or b < a, so that R is antisymmetric. Let A = {1,2,3,4) and let R = { (1,2), (2,2) (3,4), (4,1) }. Then R is not symmetric, since (1,2) ∈ R, but (2,1) ∉ R. Also, R is not asymmetric, since (2,2) ∈ R. Finally, R is antisymmetric, since if a ≠ b, either (a, b) ∉ R or (b, a) ∉ R. Example – 3 +

Let A = Z , the set of positive integers, and let R = { (a, b) ∈ A X A [ a divides b }. Is R symmetric, asymmetric, or anisymmetric ? Solution If a \ b, it does not follow that b \ a, so R is not symmetric. For example 214 but 4 X 2 (4 Dn 2) not equal to 2 dwe by 4) If a = b = 3, say, then a R b and b R a, so R is not asymmetric. If a \ b and b \ a, then a = b, so R is antisymmetric. We now relate symmetric, asymmetric, and antisymmetric properties of a relation to properties of its matrix. The matrix MR = [ Mij ] of a symmetric relation satisfies the property that If mij = 1, then mij = 1. Moreover, if m ji = 0, then mij = 0. Thus MR is a matrix such that each pair of entries, symmetrically T placed about the main diagonal, are either both 0 or both 1. It follows that MR = M R, so that MR is a symmetric matrix The matrix MR = [ mij ] of an asymmetric relation R satisfies the property that If mij = 1, then mji = 0. If R is asymmetric, it follows that M ii = 0 for all i; that is, the main diagonal of the matrix MR consists entirely of 0’s. This must be true since the asymmetric property implies that if M ii = 1, then m ii = 0, which is a contradiction. Finally, the matrix MR = [ m ij] of an antisymmetric relation R satisfies the property that if i ≠ j, then m ij = 0 or m ji = 0. Example 4 given below Consider the matrix each of which is the matrix of relation, as indicated. Relations R1 and R2 are symmetric since the matrices MR1 and MR2 are symmetric matrices. Relation R3 is antisymmetric, since no symmetrically situated, off-diagonal positions of MR3 both

29 contain 1’s. Such positions may both have 0’s, however, and the diagonal elements are unrestricted. The relation R3 is not asymmetric because MR3 has 1’s on the main diagonal. Relation R4 has none of the three properties: MR4 is not symmetric. The presence of the 1’s in positions 4, 1 and 1, 4 of MR4 violates both asymmetry and antisymmetry. Finally, R5 is antisymmetric but not asymmetric, and R6 is both asymmetric and antisymmetric. 1 0 1

0 0 1

1 1 1

0 1 1 0

= MR1

(a) 1 0 0

1 1 0

0 1 0 0 (e)

1 0 1 1

0 0 1 1

1 1 0 0

1 0 1 0

1 1 0 0

1 0 1 0

= MR2

(b) 1 0 0

0 0 0 1

= MR3

(c)

1 0 0 0

1 1 0 0

0 0 0 0

= MR4

(d)

0 1 1 0

1 1 0 1

= MR5

0 0 0 0

1 0 0 0

= MR6

(f)

We now consider the diagraphs of these three types of relations. If R is an asymmetric relation, then the digraph of R cannot simultaneously have an edge from vertex i to vertex j and an edge from vertex j to vertex i. This is true for any i and j, and in particular if i equals j. Thus there can be no cycles of length 1, and all edges are “one-way streets.” If R is an antisymmetric relations, then for different vertices i and j there cannot be an edge from vertex i to j and an edge from vertex j to vertex i. When i = j, no condition is imposed. Thus there may be cycles of length I, but again all edges are “one way.” We consider the diagraphs of symmetric relations in more detail. The diagraph of a symmetric relation R has the property that if there is edge from vertex i to vertex j, then there is an edge from vertex j to vertex i. Thus, if two vertices are connected by an edge, they must always be connected to both directions. Because of this, it is possible and quite useful to give a different representation of a symmetric relation. We keep he vertices as they appear in the diagraph, but if two vertices a and b are connected by edges in each direction, we replace these two edges with one undirected edge, or a “two-way street.” This undirected edge is just a single line without arrows and connects a and b. The resulting diagram will be called the graph of the symmetric relation. Example 5 Let A = { a, b, c, d, e } and let R be the symmetric relation given by

30

R = { (a, b), (b, a), (a, d), (c, a), (b, c), (c, b), (b, e), (e, b), (e, d), (d, e), (c, d), (d, c) } The usual diagraph of R is shown in Figure 6 (a) while Figure 6 (b) shows the graph of R. Note that each undirected edge corresponds to two ordered pairs in the relation R.

(a)

(b) figure 6

An undirected edge between a and b, in the graph of a symmetric relation R, corresponds to a set {a, b] such that (a, b) ∈ R and (b, a) ∈ R. Sometimes we will also refer to such a set {a, b} as an undirected edge of the relation R and call a and b adjacent vertices. A symmetric relation R on a set A is called connected if there is a path from any element of A to any other element of A. This simply means that the graph of R is all in one piece. In figure 17 we show the graphs of two symmetric relations. The graph in Figure 7 (a) is connected, whereas that in Figure 7 (b) is not connected. Transitive Relations We say that a relation R on a set A is transitive if whenever a R b and b R c, then a R c. It is often convenient to say what it means for a relation to be not transitive. A relation R on A is not transitive if there exist a, b, and c in A so that a R b and b R c, but a R c. If such a, b, and c do not exist, then R is transitive.

(a)

(b) Figure 7

Eg: 1 Let A = Z, the set of integers, and let R be the relation less than. To see whether R is transitive, we assume that a R b and b R c. Thus a < b and b < c. It then follows that a < c, so a R c. Hence R is transitive.

31

Eg: 2 Let A = {1, 2, 3, 4 } and let R = { (1, 2), (1, 3), (4, 2) }. Is R transitive? Solution Since there are no elements a, b, and c in A such that a R b and b R c, but a R c, we conclude that R is transitive. A relation R is transitive if and only if its matrix MR = [ m ij ] has the property If m ij = 1 and m jk = 1, then m ik = 1. 2

The left – hand side of this statement simply means that (MR) has a 1 in position i, k. Thus the 2 R transitivity of R means that if (MR) has a 1 in any position, then M must have a 1 in the same position. Thus, in particular, if (MR)2 = MR, then R is transitive. The converse is not true. Eg: 3 Let A = {1, 2, 3} and let R be the relation on A whose matrix is MR =

1 0 0

1 0 0

1 1 1

Show that R is transitive. Solution 2 By direct computation, (MR) = MR; therefore, R is transitive. 134 Chapter 4 Relations and Digraphs To see what transitivity means for the digraph of a relation, we translate the definition of transitivity into geometric terms. If we consider particular vertices a and c, the conditions a R b and b R c mean that thee is a path 2 of length 2 in R from a to c. In order words, a R c. Therefore, we may rephrase the definition of 2 2 transitivity as follows: If a R c, then a R c; that is, R ⊆ R (as subsets of A X A). In other words, if a and c are connected by a path of length 2 in R, then they must be connected by a path of length 1. We can slightly generalize the foregoing geometric characterization of transitivity as follows. Theorem 1

A relation R is transitive if an only if it satisfies the following property: If there is a path of length greater than 1 from vertex a to vertex b, there is a path of length 1 from a to b (that is, a is related n to b). Algebraically stated, R is transitive if and only if R ⊆ R for all n ≥ 1.

32 It will be convenient to have a restatement of some of these relational properties in terms of R relative sets. We list there statements without proof. Theorem 2 Let R be a relation on a set A. Then

10

a)

Reflexivity of R means that a ∈ R (a) for all a in A.

b)

Symmetry of R means that a ∈ R (b) if and only if b ∈ R (a).

c)

Transitivity of R means that if b ∈ R (a) and c ∈ R (b), then c ∈ R (a). Equivalence Relations

A relation R on a set a is called an equivalence relation if it is reflexive, symmetric, and transitive. EXAMPLE 1 Let A be the set of triangles in the plane and let R be the relation on A defined as follows: R = { (a, b) ∈ A X A [ a is congruent to b }. It is easy to see that R is an equivalence relation. EXAMPLE 2 Let A = {1, 2, 3, 4 } and let R = { (1, 1), (1, 2), (2, 1) (2, 2), (3, 4), (4, 3), (3, 3), (4, 4) }. It is easy to verify that R is an equivalence relation. EXAMPLE 3 Let A = Z, the set of integers, and let R be defined by a R b if and only if a b ≤ b. Is R an equivalence relation? Solution Since a ≤ a, R is reflexive. If a ≤ b, it need not follow that b ≤ a, so R is not symmetric. Incidentally, R is transitive, since a ≤ b and b ≤ c imply that a ≤ c. We see that R is not an equivalence relation. EXAMPLE 4 Let A = Z and let R = { (a, b) ∈ A X A [ a and b yield the same remainder when divided by 2 ]. In this case, we call 2 the modulus and write a ≡ b (mod 2), read “ a is congruent to b mod 2.” Show that congruence mod 2 is an equivalence relation. Solution

33

First, clearly a ≡ a (mod 2). Thus R is reflexive. Second, if a ≡ b (mod 2), then a and b yield the same remainder when divided by 2, so b ≡ a (mod 2). R is symmetric. Finally, suppose that a ≡ b (mod 2) and b ≡ c (mod 2). Then a, b, and c yield the same remainder when divided by 2. Thus, a ≡ c (mod 2). Hence congruence mod 2 is an equivalence relation. EXAMPLE 5 +

Let A = Z and let n ∈ Z . We generalize the relation defined in Example 4 as follows. Let R = { (a, b) ∈ A X A ] a ≡ b (mod n) } That is, a ≡ b (mod n) if and only if a and b yield the same remainder when divided by n. Proceeding exactly as in Example 4, we can show that congruence mod n is equivalence relation. We note that if a ≡ b (mod n), then a = qn + r and b = tn + r and a – b is a multiple of n. This, a ≡ b (mod n) if and only if n \ (a – b ). Partitions on set Partition or quotient set of a non empty set A in a collection of D of non empty sub set of a such that 1)

Each element in a belongs to one of the set in partition D.

2)

If A1 and A2 are distinct elements of p then A1 ∩ A2 = ∅

eg:

A1 A4 A2

A3

A5

P = { A1, A2, A3, A4, A5 } Where each one A1, A2 . . . . A5 are individual set. Eg : 1 Let A = { 1, 2, 3, 4, 5, 6 } A1 = {1, 3 } A2 = { 2, 5, 6 }, A3 = { 4 } Her P = { A1, A2, A3 } •

Equivalence Relation and Partitions

34 The following result shows that if P is a partition of a set A then P can be used to construct an equivalence relation on A. Theorem 1 Let P be a partition of a set A. Recall that the sets in P are called the blocks of P. Define the relation R on A as follows: a R b if and only if a and b are members of the same block. Then R is an equivalence relation on A. Proof (a)

If a ∈ A, then clearly a is in the same block as itself, so a R a.

(b)

If a R b, then a and b are in the same block; so b R a.

(c)

If a R b and b R c, then a, b, and c must all lie in the same block of P. Thus a R c.

Since R s reflexive, symmetric, and transitive, R is an equivalence relation. R will be called the equivalence relation determined by P. EXAMPLE 6 Let A = { 1, 2, 3, 4 } and consider the partition P = { ( 1, 2, 3), (4) } of A. Find the equivalence relation R on A determined by P. Solution The blocks of P are { 1, 2, 3 } and { 4 }. Each element in a block is related to every other element in the same block and only to those elements. Thus, in this case, R = { ( 1, 1), ( 1, 2), ( 1, 3), ( 2, 1), ( 2, 2), ( 2, 3), ( 3, 1), ( 3, 2), ( 3, 3), ( 4, 4). If P is a partition of A and R is the equivalence relation determined by P, then the blocks of P can easily be described in terms of R. If A1 is a block of P and a ∈ A; We see by definition that A1 consists of all elements X of A with a R x. That is, A1 = R (a). Thus the partition P is { R (a) \ a ∈ A }. In words, P consists of all distinct R – relative sets that arise from elements of A. For instance, in Example 6 the blocks { 1, 2, 3 } and { 4 } can be described, respectively, as R (1) and R (4). Of course, { 1, 2, 3 } could also be described as R (2) or R (3), so this way of representing the blocks is not unique. The foregoing construction of equivalence relations from partitions is very simple. We might be tempted to believe that few equivalence relations could be produced in this way. The fact is, as we will now show, that all equivalence relations on A can be produced from partitions. Lemma 1 Let R be an equivalence relation on a set A, and let a ∈ A and b ∈ A. Then a R b if and only if R (a) = R (b). Proof First suppose that R (a) = R (b). Since R is reflexive, b ∈ R (b); therefore, b ∈ R (a), so a R b.

35 •

A lemma is a theorem whose main purpose is to aid in proving some other theorem.

Conversely, suppose that a R b. Then note that 1. 2.

b ∈ R (a) by definition. Therefore, since R is symmetric, a ∈ R (b), by Theorem 2 (b) of Section 9

We must show that R (a) = R (b). First, choose an element x ∈ R (b). Since R is transitive, the fact that x ∈ R (b), together with (1), implies by Theorem 2 (c) of Section 4.4 that x ∈ R (a). Thus R (b) ⊆ R (a). Now choose y ∈ R (a). This fact and (2) imply, as before, that y ∈ R (b). Thus R (a) ⊆ R (b), so we must have R (a) = R (b). Note the two – part structure of the lemma’s proof. Because we want to prove a biconditional, p ⇔ q, we must show q ⇒ p as well as p ⇒ q. We now prove our main result. Theorem 2 Let R be an equivalence relation on A, and let P be the collection of all distinct relative sets R (a) for a in A. Then P is a partition of A, and R is the equivalence relation determined by P. Proof According to the definition of a partition, we must show the following two properties: (a)

Every element of A belongs to some relative set.

(b)

If R (a) and R (b) are not identical, then R (a) ∩ R (b) = ∅.

Now property (a) is true, since a ∈ R (a) by reflexivity of R. To show property (b) we prove the following equivalent statement: If R (a) ∩ R (b) ≠ ∅, then R (a) = R (b). To prove this, we assume that c ∈ R (a) ∩ R (b). Then a R c and b R c. Since R is symmetric, we have c R b. Then a R c and c R b, o, by transitivity of R, a R b. Lemma 1 then tells us that R (a) = R (b). We have now proved that P is a partition. By Lemma 1 we see that a R b if and only if a and b belong to the same block of P. Thus P determines R, and the theorem is proved. Note the use of the contrapositive in this proof. If R is an equivalence relation on A, then the sets R (a) are traditionally called equivalence classes of R. Some authors denote the class R (a) by [a]. The partition P constructed in Theorem 2 therefore consists of all equivalence cases of R, and this partition will be denoted by A / R. Recall that partitions of A are also called quotient sets of A, and the notation A / R reminds us that P is the quotient set of A that is constructed form and determines R.

36 EXAMPLE 7 Let R be the relation defined in Example 2. Determine A / R. Solution From Example 2 we have R (1) = { 1, 2 } = R (2). Also, R (3) = { 3, 4 } = R (4). Hence A / R = { { 1, 2 }, { 3, 4 } }. EXAMPLE 8 Let R be the equivalence relation define in Example 4 Determine A / R. Solution : Let R(0) = {. . . . .-4 , -2, 0, 2, 4 . . . . } the set of even integers since reminder is zero when this member divided by 2 R (1) = . . . ., -5, -3, -1, 1, 1, 3, 5, 7 . . . . }, the set of odd integers, since each gives a remainder of 1 when divided by 2. Hence A / R consists of the set of even integers and the set of odd integers. From Examples 7 and 8 we can extract a general procedure for determining partition A / R for A finite or countable. The procedure is as follows: Step 1:

Choose any element of A and compute the equivalence class R (a).

Step 2:

If R (a) ≠ A, choose an element b, not included in R (a), and compute the equivalence class R (b).

Step 3:

If A is not the union of previously computed equivalence classes, then choose an element x of A that is not in any of those equivalence classes and compute R (x).

Step 4:

Repeat step 3 until all elements of A are included in the computed equivalence classes. If A is countable, this process could continue indefinitely. In that case, continue until a pattern emerges that allows you to describe or give a formula for all equivalence classes.

4.5

Exercises

Operations on Relations Now that we have investigated the classification of relations by properties they do or do not have, we next define some operations on relations. Let R and S be relations from a set A to a set B. Then, if we remember that R and S are simply subsets of A X B, we can use set operations on R and S. For example, the complement of R, R, is referred to as the complementary relation. It is, of course, a relation from A to B that can be expressed simply in terms of R: a R b if and only if a R b. We can also form the intersection R ∩ S and the union R ∪ S of the relations R and S. In relational terms, we see that a R ∩ S b means that a R b and a S b. All our set-theoretic operations can be used in this way to produce new relations.

37 A different type of operation on a relation R from A to B is the formation of the inverse, usually -1 –1 written R . The relation R is a relation from B to A (reverse order form R) defined by -1

b R a if and only if a R b. -1 -1

-1

-1

It is clear from this that (R ) = R. It is not hard to see that Dom (R ) = Ran (R) and Ran (R ) = Dom (R). We leave these simple facts for the reader to check. EXAMPLE 1 Let A = { 1, 2, 3, 4 } and B = {a, b, c } Let

R = { (1, a), (1, b), (2, b), (2, c), (3, b), (4, a) } And S = { (1, b), (2, c), (3, b), (4, b) } -1

Compute (a) R; (b) R ∩ S; c) R ∪ S; and (d) R Solution a)

We first find

A X B = { (1, a), (1, b), (1, c), (2, a), (2, b), (2, c), (3, a), (3, b), (3, c), (4, a), (4, b), (4, c) }. Then the complement of R in A X B is R = { (1, c), (2, a), (3, a), (3, c), (4, b), (4, c) }. (b) We have R ∩ S = { (1, b), (3, b), (2, c) } (c) We have R ∪ S = { (1, a), (1, b), (2, b), (2, c), (3, b), (4, a), (4, b) }. (d)

-1

Since (x, y) ∈ R if and only if (y, x ) ∈ R, we have

-1

R = { ( a, 1), ( b, 1), ( b, 2), ( c, 2), ( b, 3), ( a, 4) } EXAMPLE 2 Let A = R. Let R be the relation ≤ on A and let S be ≥. Then the complement of R is the relation >, -1 Since a ≤ b means that a > b. Similarly, the complement of S is Є R 0 if < ai, bj> R

47 MR is called the matrix of R. Often MR provides an easy way to check whether R has a given property. THE DIAGRAPH OF A RELATION If A is a finite set and R is a relation on A. The pictorial representation of R is called a directed graph or digraph of R. PROPERTIES OF RELATIONS REFLEXIVE AND IRREFLEXIVE RELATIONS A relation R on a set A is reflexive if Є R a Є A i.e. if aRa a Є A. A relation R on a set A is irreflexive if aRa a Є A. Thus R is reflexive if for every element a Є A is related to itself and it is irreflexive if no element is related to itself e.g. Let R denote the relation “equal to” on any set A. Then R is reflexive since Є R a Є A. Let R denote the relation “less than” on any set A. Then R is irreflexive since R aЄA We can identify a reflexive or irreflexive relation by its matrix as follows. The matrix of a reflexive relation must have all 1’s on its main diagonal, while the matrix of an irreflexive must have all 0’s on its main diagonal. Example Let A = {1, 2, 3} and let R = {(1, 1), (1, 2)}. State whether R is reflexive, irreflexive or not.

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF