تحليل التوافقي شابتر 1
تحليل التوافقي شابتر 1
تحليل التوافقي شابتر 1
Prepared by:
Isra Elamin
Lecturer in Computer Science Dept.
Types of Combinatorics
Combinatoics is concerned with the study of arrangements, patterns,
designs, assignments, schedules, connections and configurations.
There are three basic problems of combinatorics:
1. Existence Problem: Is there at least one arrangement of a particular kind?
2. Counting Problem: How many arrangements are there?
3. Optimization Problem: is concerned with choosing the best among all
possible arrangements according to some criterion.
SETS
SETS
A set is a collection of well defined objects.
In this method a set is represented by listing all its elements, separating these by commas
(i) If V be the set of vowels of English alphabet, it can be written in Roster form as :
V = { a, e, i, o, u}.
(ii) If A be the set of natural numbers less than 7, then A={1, 2, 3, 4, 5, 6}, is in the Roster
form.
(iii) if A be the set of letters used in the word mathematics, then A = {m, a, t, h, e, i, c, s}.
REPRESENTATION OF SETS
2. Set-builder form
In this form elements of the set are not listed but these are represented by some
common property.
(i) Let V be the set of vowels of English alphabet then V can be written in the set
builder form as:
V = {x : x is a vowel of English alphabet}
(ii) Let A be the set of natural numbers less than 7.
then A = {x : x N and 1 x < 7}
Note : Symbol ':' read as 'such that'
Membership
Membership means that an element is a member of a set.
6 is a member of D.
6 belong to D.
It is written as : 6 ∈ D
As it is clear that the number of elements in set A is not finite (infinite) while number of
elements in set B is finite. A is said to be an infinite set and B is said to be is finite set.
A set is said to be finite if its elements can be counted and it is said to be infinite if it is
not possible to count up to its last element.
CLASSIFICATION OF SETS
2.Empty (Null) Set
Ø = { }
There is no such number which is less than 5 and greater than 10. Such a set is
said to be a null (empty) set.
CLASSIFICATION OF SETS
3. Singleton Set
As there is only one even prime number namely 2, so set A will have only one element.
Here A = {2}.
Two sets A and B are said to be equivalent sets if they have same number
of elements but they are said to be equal if they have not only the same
number of elements but elements are also the same.
CLASSIFICATION OF SETS
5. Disjoint Sets
Two sets are said to be disjoint if they do not have any common element.
If A and B are any two sets such that each element of the set A is an element of the set B also,
then A is said to be a subset of B.
SUBSETS
Remarks
Each set is a subset of itself i.e. A A.
Null set has no element so the condition of becoming a subset is
automatically satisfied. Therefore null set is a subset of every set.
If A B and B A then A = B.
If A B and A B then A is said to be a proper subset of B and B is said to be a super
set of A. i.e. A B or B A .
Cardinality of Sets
Definition
Remark: The term cardinality comes from the common usage of the
term cardinal number as the size of a finite set.
Cardinality of Sets
Example
Let A be the set of odd positive integers less than 10. Then |A| = 5.
Example
Let S be the set of letters in the English alphabet. Then |S| = 26.
Example
In a particular problem a set U is said to be a universal set if all the sets in that problem
are subsets of U.
Remarks
(i) Universal set does not mean a set containing all objects of the universe.
(ii) A set which is a universal set for one problem may not be a universal set for another
problem.
VENN DIAGRAM
British mathematician John Venn (1834 1883 AD) introduced the concept of
diagrams to represent sets. According to him universal set is represented by the
interior of a rectangle and other sets are represented by interior of circles.
A new set having those elements which are in A but not B is said to be the difference of sets A and B and
it is denoted by A-B.
A -B= {1, 3, 5}
Similarly a set of those elements which are in B but not in A is said to be the difference of B and A and it
is denoted by B - A.
B - A = {6}
DIFFERENCE OF SETS
In general, if A and B are two sets then:
A-B = { x : x A and x B }
B-A = { x : x B and x A }
fc =U. (iii) Uc = f.
INTERSECTION OF SETS
Consider the sets: A = {1, 2, 3, 4} and B = { 2, 4, 6}
Here A B = {2, 4 }
If A and B are two sets then the set of those elements which belong to both the sets is
said to be the intersection of A and B. It is denoted by A B .
A B = {x : x A and x B}
INTERSECTION OF SETS
A B can be represented using Venn diagram as :
Remarks
If A B= f then A and B are said to be disjoint sets. In Venn diagram disjoint
sets can be represented as:
UNION OF SETS
If A and B are only two sets then union of A and B is the set of those elements
which belong to A or B.
In set builder form :
A B = {x : x A or xB}
OR
A B = {x : x A -B or x B -A or x A B }
UNION OF SETS
A B can be represented using Venn diagram as :
CARTESIAN PRODUCT OF TWO SETS
Consider two sets A and B where
A={1, 2}, B= {3, 4, 5}.
Set of all ordered pairs of elements of A and B This set is denoted
by A ×B and is called the Cartesian product of sets A and B.
i.e. A×B ={(1, 3), (1, 4),(1, 5),(2, 3),(2, 4),(2, 5)}
Cartesian product of B sets and A is denoted by A×B.
CARTESIAN PRODUCT OF TWO SETS
In the present example, it is given by:
B×A = {(3, 1),(3, 2),(4, 1),(4, 2),(5, 1),(5, 2)}
Clearly A×B B×A.
In the set builder form :
A×B = {(a,b) : a A and b B }
B×A = {(b,a) : b B and a A }
Note : If A = f or B = f or A,B = f then A×B = B×A = f.
RELATIONS AND FUNCTIONS
RELATIONS
Consider the following example : A={Mohamed, Ahmed, Ali, Hassan}
B={Reem, Mariam, Fatima}
Suppose Reem has two brothers Mohamed and Ahmed, Mariam has one brother Ali, and
Fatima has one brother Hassan. If we define a relation R " is a brother of" between the
elements of A and B then clearly:
Mohamed R Reem, Ahmed R Reem, Ali R Mariam, Hassan R Fatima.
After omitting R between two names these can be written in the form of ordered pairs as :
(Mohamed, Reem), (Ahmed, Reem), (Ali, Mariam), (Hassan, Fatima).
The above information can also be written in the form of a set R of ordered pairs as:
R= {(Mohamed, Reem), (Ahmed, Reem), (Ali, Mariam), (Hassan, Fatima)}
RELATIONS
Clearly R A×B, i.e. R = {(a,b): aA, bB and aRb}
If A and B are two sets then a relation R from A to B is a sub set of A×B.
If (i) R = f, R is called a void relation.
(ii) R=A×B, R is called a universal relation.
(iii) If R is a relation defined from A to A, it is called a relation defined on A.
(iv) R = { (a,a) " a A } , is called the identity relation.
Domain and Range of a Relation
If R is a relation between two sets then the set of its first elements (components)
of all the ordered pairs of R is called Domain and set of second elements of all
the ordered pairs of R is called range, of the given relation.
Find:
(ii) Domain of R
(iii) Range of R
(iv)
2
4 2
6 3
Example
If R is a relation 'is greater than' from A to B, where:
Find:
2
1
3
4
2
5
FUNCTIONS
Consider the relation:
This relation f from set A to B where every element of A has a unique image in B is
defined as a function from A to B.
The domain is { A , B , C}
The domain is { A , B , C}