Mathematical Foundations of Computer Science: Unit-I
Mathematical Foundations of Computer Science: Unit-I
UNIT- I
Discrete Mathematics
Discrete Mathematics is a branch of mathematics involving discrete elements that uses algebra and
arithmetic. It is increasingly being applied in the practical fields of mathematics and computer science.
It is a very good tool for improving reasoning and problem-solving capabilities.
Truth Table
Since we need to know the truth value of a proposition in all possible scenarios, we consider all
the possible combinations of the propositions which are joined together by Logical Connectives
to form the given compound proposition. This compilation of all possible scenarios in a tabular
format is called a truth table.
Most Common Logical Connectives-
1. Negation – If is a proposition, then the negation of is denoted by ,
which when translated to simple English means-
“It is not the case that ” or simply “not “.
The truth value of is the opposite of the truth value of .
The truth table of is-
Example,
The negation of “It is raining today”, is “It is not the case that is raining today” or simply “It is
not raining today”.
Logical Equivalence, Logical Implication, Use of Quantifiers, Definitions and the Proof of Theorems.
Set Theory: Set and Subsets, Set Operations, and the Laws of Set theory, Counting and Venn
Diagrams. Properties of the Integers: The well – ordering principle, Recursive Definitions, Division
Algorithms, Fundamental theorem of Arithmetic.
UNIT-II
Cartesian product,
Special Functions,
Pigeonhole Principle,
Composition and Inverse Functions.
Generalization of Principle.
UNIT–III
UNIT-IV
Algebraic Structures:
Algebraic System
Algebraic systems: An algebraic system, loosely speaking, is a set, together with some operations on
the set. Before formally defining what an algebraic system is, let us recall that a n -ary operation (or
operator) on a set A is a function whose domain is An and whose range is a subset of A . Here, n is a
non- negative integer. When n=0 , the operation is usually called a nullary operation, or a constant,
since one element of A is singled out to be the (sole) value of this operation. A finitary operation on
A is just an n -ary operation for some non-negative integer n .
Definition. An algebraic system is an ordered pair (A O) , where A is a set, called the underlying set of
the algebraic system, and O is a set, called the operator set, of finitary operations on A .
The study of algebraic systems is called the theory of universal algebra. The first important thing in
studying algebraic system is to compare systems that are of the same ``type''. Two algebras are said
to have the same type if there is a one-to-one correspondence between their operator sets such
that an n -ary operator in one algebra is mapped to an n -ary operator in the other algebra.
Examples:
Some recurring universes: N=natural numbers; Z=integers; Q=rational numbers; R=real numbers;
C=complex numbers.
N is a pointed unary system, and under addition and multiplication, is both the standard
interpretation of Peano arithmetic and a commutative semiring.
Boolean algebras are at once semigroups, lattices, and rings. They would even be abelian groups if
the identity and inverse elements were identical instead of complements.
– General Properties,
In the previous section, we have seen several algebraic system with binary operations. Here we
consider an algebraic system consisting of a set and an associative binary operation on the set and
then the algebraic system which possess an associative property with an identity element. These
algebraic systems are called semigroups and monoids.
Semi group
Let S be a nonempty set and let * be a binary operation on S. The algebraic system (S, *) is called a
semi-group if * is associative if a * (b*c) = (a * b) * c for all a, b, c Î S.
Example The N of natural numbers is a semi-group under the operation of usual addition of
numbers.
Monoids
Let M be a nonempty set with a binary operation * defined on it. Then (M, * ) is called a monoid if
• * is associative
It is easy to prove that the identity element is unique. From the definition it follows that (M,*) is a
semigroup with identity.
Example1 Let S be a nonempty set and r(S) be its power set. The algebras (r(S),U) and (r(S), Ç ) are
monoids with the identities f and S respectively.
Example2 Let N be the set of natural numbers, then (N,+), (N, X) are monoids with the identities 0
and 1 respectively.
Residue Arithmetic.
UNIT –V
Graph Theory:
Representation of Graphs:
Suppose G is a simple directed graph with m nodes, and suppose the nodes of G have been ordered
and are called v1, v2, . . . , vm. Then the adjacency matrix A = (aij) of the graph G is the m x m matrix
defined as follows:
1 if vi is adjacent to Vj, that is, if there is an edge (Vi, Vj) aij =0 otherwise
Suppose G is an undirected graph. Then the adjacency matrix A of G will be a symmetric matrix, i.e.,
one in which aij = aji; for every i and j.
Drawbacks
2 . If the number of edges is 0(m) or 0(m log2 m), then the matrix A will be sparse, hence a great
deal of space will be wasted.
Let G be a simple directed graph with m nodes, v1,v2, . . . ,vm. The path matrix of G is the m-square
matrix P = (pij) defined as follows:
Pij =0 otherwise
2.A set E of edges such that each edge e in E is identified with a unique
sub graphs,
Trees: Definitions, properties and Examples, Rooted Trees, Spanning Trees and Minimum Spanning
Trees.