Vous êtes sur la page 1sur 64

Syllabus

Section A: Set Theory and Propositional Calculus:


Introduction to set theory, Set operations, Algebra of sets,
Duality, Finite and Infinite sets, Classes of sets, Power Sets,
Multi sets, Cartesian Product, Representation of relations,
Types of relation, Equivalence relations and partitions , Partial
ordering relations and lattices Function and its types,
Composition of function and relations, Cardinality and inverse
Relations Introduction to propositional Calculus: Basic
operations: AND(^), OR(v), NOT(~), Truth value of a
compound statement, propositions, tautologies, contradictions.

PDM CSE

Contd..
Section B: Techniques of Counting and Recursion and
recurrence Relation:
Permutations
with
and
without
repetition,
Combination.Polynomials and their evaluation, Sequences,
Introduction to AP, GP and AG series, partial fractions, linear
recurrence relation with constant coefficients, Homogeneous
solution. Particular solutions, Total solution of a recurrence
relation using generating functions.

PDM CSE

Syllabus
Section C: Algebric Structures
Definition and examples of a monoid, Semigroup, Groups and
rings, Homomorphism, Isomorphism and Automorphism,
Subgroups and Normal subgroups, Cyclic groups, Integral
domain and fields, Cosets, Lagranges theorem
Section D: Section Graphs and Trees:
Introduction to graphs, Directed and Undirected graphs,
Homomorphic and Isomorphic graphs, Subgraphs, Cut points and
Bridges, Multigraph and Weighted graph, Paths and circuits,
Shortest path in weighted graphs, Eurelian path and circuits,
Hamilton paths and circuits, Planar graphs, Eulers formula,
Trees, Spanning trees, Binary trees and its traversals
PDM CSE

Reference Books
Elements of Discrete Mathematics,C.L Liu, 1985, McGraw
Hill
Discrete Mathematics by Johnson Bough R., 5th Edition,
PEA, 2001..
Concrete Mathematics: A Foundation for Computer Science,
Ronald Graham, Donald
Knuth and Oren Patashik, 1989, Addison-Wesley.
Mathematical Structures for Computer Science, Judith L.
Gersting, 1993, Computer Science Press.

PDM CSE

Reference Books
Applied Discrete Structures for Computer Science, Doerr and
Levasseur, (Chicago:1985,SRA)
Discrete Mathematics by A. Chtewynd and P. Diggle (Modular
Mathematics series),1995, Edward Arnold, London,
Schaums Outline series: Theory and problems of Probability
by S. Lipshutz, 1982,McGraw-Hill Singapore
Discrete Mathematical Structures, B. Kolman and R.C. Busby,
1996, PHI
Discrete Mathematical Structures with Applications to
Computers by Tembley & Manohar, 1995, Mc Graw Hill.
PDM CSE

Background
Knowledge of Mathematics.
Basic idea of digital gates.

PDM CSE

SECTION-A

PDM CSE

SETS
Set Theory starts very simply :- it examines whether an
object belongs, or does not belong, to a set of objects which
has been described.

PDM CSE

Defintion of Set
A set can be defined as a collection of things that are brought
together because they obey a certain rule.
These 'things' may be anything you like: numbers, people,
shapes, cities, bits of text ..., literally anything.
The key fact about the 'rule' they all obey is that it must
be well-defined.

PDM CSE

Elements
Elements
A 'thing' that belongs to a given set is called an element of that
set. For example:
A: {1,2,5,4} here 1 ,2 ,5,4 are elements of set.
Sets will usually be denoted using upper case letters: A , B, ...
Elements will usually be denoted using lower case letters: x , y

PDM CSE

10

Notation
Curly brackets {} are used to stand for the phrase 'the set
of ...' . These braces can be used in various ways. For example:
We may list the elements of a set:
{-3,-2,-1,0,1,2,3}
We may describe the elements of a set:
{integers between -3 and 3 inclusive}
We may use an identifier (the letter for example) to represent
a typical element, a symbol to stand for the phrase 'such that',
and then the rule or rules that the identifier must obey:
{x| x is an integer and |x|=4}
PDM CSE

11

Set Representation
Tabular Form:
{-1,-2,-3,0,1,2,3,4}
Builder Form:
{x|x is an integer and |x|=4}

PDM CSE

12

Finite Set
means 'is an element of ...'. For example:
dog animal
Finite set A set can be finite when it consists of specific no. of different
elements.

Q = {2,4,6,9}

R = {months of year}

P = {x: x N, 3<x<9 }.

PDM CSE

13

Infinite Set
Infinite set A set can be infinite when it consists of infinite number of
different elements.
A = { 2,4,6,8,}
This ellipse.. shows that there is infinite number of elements
in the set.
B ={set of all integers }

PDM CSE

14

Universal Set
Universal Set
It is denoted by U.
All the sets under investigation are subsets of fixed set U, then
set U is called universal set .The universal set may be
{alphabetic characters} or {all living people}, etc.

PDM CSE

15

Sets Of Numbers
The natural numbers
The 'counting' numbers starting at 1, are called the natural
numbers. This set is denoted by N. So N = {1, 2, 3, ...}
Integers
All natural numbers, positive, negative and zero form the set
of integers. It is denoted by Z. So Z = {..., -3, -2, -1, 0, 1, 2, 3,
...}

PDM CSE

16

Contd..
Real numbers
If we expand the set of integers to include all decimal
numbers, we form the set of real numbers. The set of reals is
denoted by R.
A real number may have a finite number of digits after the
decimal point (e.g. 3.625), or an infinite number of decimal
digits. In the case of an infinite number of digits, these digits
may:
recur; e.g. 8.127127127...
... or they may not recur; e.g. 3.141592653...
PDM CSE

17

Contd..
Rational numbers
Those real numbers whose decimal digits are finite in number,
or which recur, are called rational numbers. The set of
rationals is denoted by the letter Q.
A rational number can always be written as exact fraction p/q;
where p and q are integers. If q equals 1, the fraction is just the
integer p.
Note that q may NOT equal zero as the value is then
undefined.
For example: 0.5, -17, 2/17, 82.01, 3.282828... are all rational
numbers.
PDM CSE

18

Contd..
Irrational numbers
If a number can't be represented exactly by a fraction p/q, it is
said to be irrational.
Examples include: 2, 3, .

PDM CSE

19

Equality Of sets
Two sets A and B are said to be equal if and only if they have
exactly the same elements. In this case, we simply write:
A= B
facts about equal sets:
The order in which elements are listed does not matter.
If an element is listed more than once, any repeat occurrences
are
ignored.
So, for example, the following sets are all equal:
{1, 2, 3} = {3, 2, 1} = {1, 1, 2, 3, 2, 2}

PDM CSE

20

Subset
If all the elements of a set A are also elements of a set B, then
we say that A is a subset of B, and we write:
A B
For example:
If T = {2, 4, 6, 8, 10} and E = {even integers},
then T E
If A = {alphanumeric characters} and P =
{printable characters}, then A P
If Q = {quadrilaterals} and F = {plane figures
bounded by four straight lines}, then Q F
PDM CSE

21

Proper Subset
If B does contain at least one element that isnt in A, then we
say that A is a proper subset of B. In such a case we would
write:
A B
In the examples above:
E contains 12, 14, ... , so T E
P contains $, ;, &, ..., so A P

PDM CSE

22

Disjoint Sets
Two sets are said to be disjoint if they have no elements in
common. For example:
If A = {even numbers} and B = {1, 3, 5, 11, 19},
then A and B are disjoint.

PDM CSE

23

Venn Diagram
A Venn diagram can be a useful way of illustrating
relationships between sets.
In a Venn diagram:
The universal set is represented by a rectangle.
Other sets are represented by loops, usually oval or circular in
shape, drawn inside the rectangle.

PDM CSE

24

Operation On Sets
Intersection
In Venn diagrams where the two loops overlap is called
the intersection of the sets A and B. It is denoted by A B. So
we can define intersection as follows:
The intersection of two sets A and B, written A B, is the set
of elements that are in A and in B.
For example,
if A = {1, 2, 3, 4} and B = {2, 4, 6, 8}, then A B = {2,
4}.

PDM CSE

25

Contd..
Union
The union of two sets A and B, written A B, is the set of
elements that are in A or in B (or both).
So, for example,:
{1, 2, 3, 4} {2, 4, 6, 8} = {1, 2, 3, 4, 6, 8}.

PDM CSE

26

Difference
Difference
The difference of two sets A and B (also known as the settheoretic
difference of A and B,
or
the relative
complement of B in A) is the set of elements that are in A but
not in B.
This is written A - B, or sometimes A \ B.
For example,
if A = {1, 2, 3, 4} and B = {2, 4, 6, 8}, then A - B = {1,
3}.

PDM CSE

27

Unary
It is an unary operation - one that involves just one set.
The set of elements that are not in a set A is called
the complement of A. It is written A (or sometimes AC, or ).
For example,
if U = N and A = {odd numbers}, then A = {even
numbers}.
The word complement: its literal meaning is 'a complementary
item or items'; in other words, 'that which completes'. So if we
already have the elements of A, the complement of A is the set
that completes the universal set.
PDM CSE

28

Symmetric Difference
Symmetric Difference: things that are in A or in B but
not both.
A set containing all the elements that are in A or in B but not in
both is called as symmetric difference of set A and set B.
It is denoted as A +
B

PDM CSE

29

Cardinality
The cardinality of a finite set A, written | A | (sometimes #(A)
or n(A)), is the number of (distinct) elements in A. So, for
example:
If A = {lower case letters of the alphabet}, | A | = 26.

PDM CSE

30

Power Set
The power set of a set A is the set of all its subsets (including,
of course, itself and the empty set). It is denoted by P(A).
Using set comprehension notation, P(A) can be defined as
P(A) = { Q | Q A }

PDM CSE

31

Power Sets
Example
Write down the power sets of A if:

(a) A = {1, 2, 3}
(b) A = {1, 2}
(c) A = {1}
(d) A =

Solution

(a) P(A) = { {1, 2, 3}, {2, 3}, {1, 3}, {1, 2}, {1}, {2},
{3}, }

PDM CSE

32

Contd..
(b) P(A) = { {1, 2}, {1}, {2}, }
(c) P(A) = { {1}, }
(d) P(A) = { }

PDM CSE

33

Foundational Rules Of
Set theory
The Idempotent Laws
A A= A
A A= A
De Morgan's Laws
(A B) = A B
(A B) = A B
Commutative Laws
A B = B A
A B = B A
PDM CSE

34

Contd..
Associative Law
(A B) C = A (B C)
(A B) C = A (B C)
Distributive Laws
A (B C) = (A B) (A C)
A (B C) = (A B) (A C)

PDM CSE

35

Contd..
Idempotent Laws
A A= A
A A= A
Involution Law
(A ) = A
Identity Laws
A =A
A U =A
A U = U
PDM CSE

36

Contd..
Complement Laws
A A' = U
A A' =
U=
=U

PDM CSE

37

Duality & Boolean


Algebra
You may notice that the above Laws of Sets occur in pairs: if
in any given law, you exchange for and vice versa (and, if
necessary, swap U and ) you get another of the laws. The
'partner laws' in each pair are called duals, each law being the
dual of the other.
For example,
each of De Morgan's Laws is the dual of the other.

PDM CSE

38

Contd..
The first complement law, A A = U, is the dual of the
second: A A = .
... and so on.
This is called the Principle of Duality. This set of laws
constitutes the axioms of a Boolean Algebra.

PDM CSE

39

Ordered Pairs
If an event R can occur in r ways and a second event S can
then occur in s ways, then the total number of ways that the
two events, R followed by S, can occur is r s. This is
sometimes called the r-s Principle.

As the name says, an ordered pair is simply a pair of 'things'


arranged in a certain order.
The two 'things' that make up an ordered pair are written in
round brackets, and separated by a comma; like this:
(Lasagne, Gateau)
PDM CSE

40

Relations
A relation is any association between elements of one set,
called the domain or (less formally) the set of inputs, and
another set, called the range or set of outputs.

For example, if the domain is a set Fruits = {apples, oranges,


bananas} and the codomain is a set Flavors = {sweetness,
tartness, bitterness}, the flavors of these fruits form a relation.

PDM CSE

41

Definition
A relation is a subset of ordered pairs drawn from the set
of all possible ordered pairs (of elements of two other sets,
which we normally refer to as the Cartesian product of those
sets). Formally, R is a relation if
R {(x, y) | x X, y Y}
for the domain X and codomain Y.

PDM CSE

42

Notations
When we have the property that one value is related to
another, we call this relation a binary relation and we write it
as
xRy
where R is the relation.

PDM CSE

43

Properties
Reflexive
A relation is reflexive if, we observe that for all values a:
aRa
Symmetric
A relation is symmetric if, we observe that for all values a and
b:
a R b implies b R a

PDM CSE

44

Contd..
Transitive
A relation is transitive if for all values a, b, c:
a R b and b R c implies a R c
The relation greater-than ">" is transitive.
If x > y, and y > z, then it is true that x > z. This becomes
clearer when we write down what is happening into
words. x is greater than y and y is greater than z. So x is
greater than both y and z.

PDM CSE

45

Contd..
Antisymmetric
A relation is antisymmetric if we observe that for all
values a and b:
a R b and b R a implies that a=b
Trichotomy
A relation satisfies trichotomy if we observe that for all values
a and b it holds true that:
aRb or bRa

PDM CSE

46

Equivalence Relations
We have seen that certain common relations such as "=", and
congruence obey some of these rules above.
Characteristics of equivalence relations
For a relation R to be an equivalence relation, it must have the
following properties, viz. R must be:
symmetric
transitive

PDM CSE

47

Contd..
reflexive
(A helpful mnemonic, S-T-R)
In the previous problem set you have shown equality, "=", to
be reflexive, symmetric, and transitive. So "=" is an
equivalence relation.

PDM CSE

48

Partial Orders
The partial order , as the name suggests, this relation gives
some kind of ordering to numbers.
Characteristics of partial orders
For a relation R to be a partial order, it must have the
following three properties, viz R must be:
reflexive
antisymmetric
transitive
(A helpful mnemonic, R-A-T).We denote a partial order, in
general, by x y.
PDM CSE

49

Posets
A partial order imparts some kind of "ordering" amongst
elements of a set. For example, we only know that 2 1
because of the partial ordering .
We call a set A, ordered under a general partial ordering ,
a partially ordered set, or simply just poset, and write it
(A, ).
Terminology
When we have a partial order , such that a b, we write <
to say that a but a b. We say in this instance that
a precedes b, or a is a predecessor of b.
PDM CSE

50

Posets
If (A, ) is a poset, we say that a is an immediate predecessor
of b (or a immediately precedes b) if there is no x in A such
that a < x < b.
If we have the same poset, and we also have a and b in A, then
we say a and b are comparable if a b and b a. Otherwise
they are incomparable.

PDM CSE

51

Hasse Diagram
Hasse diagrams are special diagrams that enable us to
visualize the structure of a partial ordering.
A Hasse diagram of the poset (A, ) is constructed by
placing elements of A as points
if a and b A, and a is an immediate predecessor of b, we
draw a line from a to b
if a < b, put the point for a lower than the point for b
not drawing loops from a to a (this is assumed in a partial
order because of reflexivity)

PDM CSE

52

Operations on Relations
Inversion
Let R be a relation, then its inversion, R-1 is defined by
R-1 := {(a,b) | (b,a) in R}.
Concatenation
Let R be a relation between the sets A and B, S be a relation
between B and C. We can concatenate these relations by
defining
R S := {(a,c) | (a,b) in R and (b,c) in S for some b out
of B}

PDM CSE

53

Operations contd..
Diagonal of a Set
Let A be a set, then we define the diagonal (D) of A by
D(A) := {(a,a) | a in A}

PDM CSE

54

Functions
A function is a relationship between two sets of numbers.
This is as a mapping; a function maps a number in one set to a
number in another set.
Notice that a function maps values to one and only
one value. Two values in one set could map to one value, but
one value must never map to two values: that would be a
relation, not a function.

PDM CSE

55

Range ImageCodomain
If D is a set, we can say:
which forms a new set, called the range of f.
D is called the domain of f, and represents all values
that f takes.
In general, the range of f is usually a subset of a larger set.
This set is known as the co-domain of a function.
For example, with the function f(x) = cos x,
the range of f is [-1,1], but
the co-domain is the set of real numbers.

PDM CSE

56

Compositions and
Inverse Functions
Given two functions f : A B and g : B C
we can define a new function g o f : A C by (g o f)(x) =
g(f(x)) for all x A.
One useful function that can be defined for any set A is the
identity function
iA : A A, defined by iA(x) = x for all x A.
We can use identity functions to define inverse functions.
Specifically, if f : A B is a bijection,
then its inverse f-1: B A is defined so that f1 o f =
iA and f o f1 = iB.
PDM CSE

57

Contd..
Another result that is sometimes used is the following:
If f : A B and g : BC are bijections
then g o f : A C is a bijection,
and (g o f)1 = f1 o g1.

PDM CSE

58

Mathematical Logic
Perhaps the most distinguishing characteristic of mathematics
is its reliance on logic.
Familiarity with the concepts of logic is also a prerequisite to
studying a number of central areas of computer science,
including databases, compilers, a complexity theory.

PDM CSE

59

Prepositions
A proposition is a statement that is either true or false.

For example, It will rain tomorrow and It will not


rain tomorrow are propositions.

PDM CSE

60

Compound Prepositions
A complex preposition that can be split into number of simpler
prepositions is called as compound prepositions.
Example-It was raining and I had to go to school,so I took my
umbrella and went to school

PDM CSE

61

Tautology
Whan all conclusions are true ,statement is called a tautology.
Whatmayever be the premises but conclusion will always
comes to be true.
Tautology is calles as a truth statement.

PDM CSE

62

Contradiction
Exactly reverse of tautology is called contradiction.
When all the conclusion comes out to be false ,the statement is
called as a contradiction.

PDM CSE

63

Contingency
When the statement can be either true or false depending upon
the situation and premises,it is called as a contingency.

PDM CSE

64