Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
BCA_Semester-II-Discrete Mathematics_unit-ii_Relation and ordering
1. Unit-II Relation and Ordering
Rai University, Ahmedabad
RELATION AND ORDERING
COURSE-BCA
Subject- Discrete Mathematics
Unit-II
RAI UNIVERSITY, AHMEDABAD
2. Unit-II Relation and Ordering
Rai University, Ahmedabad
Relation and Ordering
The relation we are going to study here is an abstraction of relations we see in our everyday life
such as those between parent and child, between car and owner, among name, social security
number, address and telephone number etc.
A relation is a set of ordered pairs.
The first item in an ordered pair is identified as the domain. The second item in the ordered pair
is identified as the range. Let's take a look at a couple of examples:
e.g. (1)
We all know there is a relationship between a vehicle and the number of wheels that it contains.
A relation can be written in the form of a table:
e.g. (2)
Let's look at a more mathematical example.
The following is an algebraic relation that we will call B.
B :{( 2, 4) (3, 6) (4, 8) (5, 10)}
The domain is: 2, 3, 4, 5 (These are all the x values of the ordered pair)
The range is: 4, 6, 8, 10 (These are all the y values of the ordered pair)
Definition (binary relation):
A binary relation from a set A to a set B is a set of ordered pairs < , > where a is an element
of A and b is an element of B.
When an ordered pair < , > is in a relation R, we write a R b, or < , > ∈ R. It means that
3. Unit-II Relation and Ordering
Rai University, Ahmedabad
element a is related to element b in relation R.
When A = B, we call a relation from A to B a (binary) relation on A.
Different Types of Relations and Properties of Relation:
Let R be a relation on a set A.
Then R is said to be,
1. Reflexive:
If ∀ ∈ i.e., if ( , ) ∈ ∀ ∈ .
2. Symmetric:
If => i.e., if ( , ) ∈ => ( , ) ∈
3. Transitive:
If , => i.e., if ( , ) ∈ , ( , ) ∈ => ( , ) ∈
4. Antisymmetric:
If => = i.e., ( , ) ∈ ( , ) ∈ => =
Equivalence Relation:
A relation which is reflexive, symmetric and transitive is called the Equivalence relation.
i.e., A relation R in a set A is called equivalence if it satisfies the following conditions.
( , ) ∈ ∀ ∈ .
( , ) ∈ => ( , ) ∈
( , ) ∈ ( , ) ∈ => =
Remarks:
1. The smallest equivalence relation in set A is the relation of equality in A.
2. The largest equivalence relation in A is A x A.
Equivalence Classes:
The set of elements of S that are equivalent to each other is called an equivalence class. The
equivalence relation partitions the set S into mutually exclusive equivalence classes.
4. Unit-II Relation and Ordering
Rai University, Ahmedabad
The power of the concept of equivalence class is that operations can be defined on the
equivalence classes using representatives from each equivalence class. In order for these
operations to be well defined it is necessary that the results of the operations be independent of
the class representatives selected.
For fractions, ( / ) is equivalent to ( / ) if one can be represented in the form in which its
components are a constant multiple of the components of the other, say ( / ) = ( / ). This
is equivalent to ( / ) and ( / ) being equal if − = 0. Thus the equivalence classes are
such as
{1/2, 2/4, 3/6, … }
{2/3, 4/6, 6/9, … }
A rational number is then an equivalence class. It is only representated by its lowest or reduced
form. The equivalence class could equally well be represented by any other member.
Graph Of Relation and Relation Matrix:
Relations
A binary relation R is a set of ordered pairs ( , ). Each element in an ordered pair is
drawn from a (potentially different) set. The ordered pairs relate the two sets: together,
they comprise a mapping, which is another name for a relation.
Functions, like = 2 are relations. The equation notation is just short hand for
enumerating all the possible pairs in the relation (e.g., (1,2), (3,18), (-2,8), etc.).
Social relations, which are at the heart of the network enterprise, correspond well to
mathematical relations. To represent a social relation, such as "is the boss of", as a
mathematical relation, we simply list all the ordered pairs:
(Mr. Big, John),
(Mr. Big, Sally),
(John, Billy),
(Sally, Peter),
(Sally, Mary),
(Mary, Falco)
Figure 1a. The "is the boss of" relation, Figure 1b. Same relation represented as a directed
5. Unit-II Relation and Ordering
Rai University, Ahmedabad
represented as a binary relation. graph.
Graphs
A graph G(V,E) is a set of vertices (V) together with a set of edges (E). Some synonyms:
Vertices Edges
Mathematics node, point line, arc, link
Sociology actor, agent Tie
We represent graphs iconically as points and lines, such shown in Figure 1b. It is important to
note that the location of points in space is arbitrary unless stated otherwise. This is because the
only information in a graph is who is connected to whom. Hence, another, equally valid way to
represent the graph in Figure 1 would be this:
All representations in which the right people are connected to the right others are equally valid.
Matrices
We can record who is connected to whom on a given social relation via an adjacency matrix. The
adjacency matrix is a square, 1-mode actor-by-actor matrix like this:
If We can record who is connected to whom on a given social relation via an adjacency matrix. The adjacency
matrix is a square, 1-mode actor-by-actor matrix like this:
6. Unit-II Relation and Ordering
Rai University, Ahmedabad
Andy Bill Carol Dan Elena Frank Gar
Andy 1 0 1 0 0 1
Bill 1 1 0 1 0 0
Carol 1 1 1 1 0 0
Dan 1 1 1 0 0 0
Elena 0 0 0 0 1 0
Frank 0 0 0 0 1 0
Garth 1 1 0 0 0 0
the matrix as a whole is called X, then the contents of any given cell are denoted xij. For
example, in the matrix above, xij = 1, because Andy likes Bill. Note that this matrix is not quite
symmetric (xij not always equal to xji).
Anything we can represent as a graph, we can also represent as a matrix. For example, if it is a
valued graph, then the matrix contains the values instead of 0s and 1s.
By convention, we normally record the data so that the row person "does it to" the column
person. For example, if the relation is "gives advice to", then xij = 1 means that person i gives
advice to person j, rather than the other way around. However, if the data not entered that way
and we wish it to be so, we can simply transpose the matrix. The transpose of a matrix X is
denoted X'. The transpose simply interchanges the rows with the columns.
Definition: Partition of a Set
A partition of a set X is a set of Nonempty Subsets of X such that every element x in X is in
exactly one of these subsets (i.e., X is a disjoint union of the subsets).
Equivalently, a family of sets P is a partition of X if and only if all of the following conditions
hold:
1. P does not contain the empty set.
2. The union of the sets in P is equal to X. (The sets in P are said to cover X.)
3. The intersection of any two distinct sets in P is empty. (We say the elements of P are pair
wise disjoint.)
Examples:
1. Every singleton set {x} has exactly one partition, namely { {x} }.
7. Unit-II Relation and Ordering
Rai University, Ahmedabad
2. For any nonempty set X, P = {X} is a partition of X, called the trivial partition.
3. For any non-empty proper subset A of a set U, the set A together with its complement
form a partition of U, namely, {A, U−A}.
Partial Ordering:
A relation R is a partial ordering if it is a pre-order
(i.e. it is reflexive ( ) and transitive ( => )) and it is also Antisymmetric
( => = ).
The ordering is partial, rather than total, because there may exist elements x and y for which
neither nor .
A lattice is a partial ordering where all finite subsets have a least upper bound and a greatest
lower bound.
Partial ordered Set:
A relation " " is a partial order on a set if it has:
1. Reflexivity: for all .
2. Antisymmetric: and implies .
3. Transitivity: and implies .
For a partial order, the size of the longest chain is called the partial order length (partial order
width). A partially ordered set is also called a poset.
Comparable Elements:
Suppose is a partial ordering on a nonempty set . Then the elements , ∈ are said to be
comparable provided ≤ or ≤ .
Because two elements in a partially ordered set need not be comparable, it is possible for a
partially ordered set to have more than one maximal element. For example, suppose we have a
nonempty partially ordered set in which every element is incomparable to every other element,
i.e., is totally unordered. It follows that every element of is maximal.
Chain:
Let be a finite partially ordered set. A chain in is a set of pair wise comparable elements (i.e.,
a totally ordered subset). The partial order length of is the maximum cardinal number of a
chain in . For a partial order, the size of the longest chain is called the partial order length.
8. Unit-II Relation and Ordering
Rai University, Ahmedabad
Cover of an element:
A family of nonempty subsets of whose union contains the given set (and which contains
no duplicated subsets) is called a cover (or covering) of .
For example, there is only a single cover of{1}, namely{{1}}. However, there are five covers
of{1,2}, namely {{1}, {2}}, {{1,2}}, {{1}, {1,2}}, {{2}, {1,2}}, and {{1}, {2}, {1,2}}.
Hasse Diagram:
A graphical rendering of a partially ordered set displayed via the cover relation of the partially
ordered set with an implied upward orientation. A point is drawn for each element of the poset,
and line segments are drawn between these points according to the following two rules:
1. If < in the poset, then the point corresponding to appears lower in the drawing than the
point corresponding to .
2. The line segment between the points corresponding to any two elements and of the poset is
included in the drawing iff covers or covers .
Example for,
1. Draw the hasse diagram for the set A = (a, b, c)
2. Let = { 1,2,3,9,18} and for any , ∈ , ≤ / .
Greatest Element:
The greatest element of a subset S of a partially ordered set (poset) is an element of S that is
greater than every other element of S.
Least Element:
9. Unit-II Relation and Ordering
Rai University, Ahmedabad
The term least element of a subset S of a partially ordered set (Poset) is an element of S that is
smaller than every other element of S.
Maximal Elements:
An element M in E is called a maximal element in E if there exist no ∈ such that M < .
Minimal Elements:
An element m in E is called a minimal element in E if there exist no ∈ such that < .
OR
A maximal element is an element such that there is no with > .
A minimal element is an element such that there is no with < .
A greatest element is an element such that, for al , ≤ .
A least element is an element such that, for all , ≥ .
Note:
A greatest element is necessarily a maximal element, and a least element is necessarily a minimal
element, but a maximal element is not a greatest element unless it is comparable to every other
element. Likewise, a minimal element is not a least element unless it is comparable to every
other element.
Upper bound of POSET:
The Upper bound of a subset S of some partially ordered set (K, ≤) is an element of K which is
greater than or equal to every element of S
A set with an upper bound is said to be bounded from above by that bound
Lower bound of POSET:
The lower bound of a subset S of some partially ordered set (K, ≤) is an element of K which is
less than or equal to every element of S.
A set with a lower bound is said to be bounded from below by that bound.
Example—
We have set A = {5,10,34,13934}
5 is a lower bound for the set {5, 10, 34, 13934}, but 8 is not.
10. Unit-II Relation and Ordering
Rai University, Ahmedabad
42 is both an upper and a lower bound for the set {42};
All other numbers are either an upper bound or a lower bound for that set.
Example—
World’s strongest man claims he can lift 70kg with his little finger rounded to the nearest 10kg.
What is the smallest amount he can lift?
Here we have to think of all the numbers that can be rounded up to give 70. A number line would
be useful here to observe these numbers.
Numbers shown in red can be rounded up to give 70. This means the smallest amount the
world’s strongest man claims to lift is 65kg which is the smallest number shown on the number
line. This number is called the lower bound How about the greatest amount that he can lift?
Here we need to think about the numbers that can round down to give 70. These numbers have
been indicated on the number line below.
These numbers are between 70 and 74.99999999… and so on. Notice that 75 is not included as
this would round to 80. The world’s strongest man claims to lift a greatest amount of 74. This is
called the upper bound. If you looked carefully about you will have realised that to find the upper
and lower bounds of a number rounded to the nearest 10 you could divide 10 by 2 and then add
or subtract from 70 to find the upper and lower bound as shown below. Find the upper and lower
bounds of 70 rounded off to the nearest 10.
Upper bound 75 +5
70 10
Lower bound 65 -5