2. COMPLEXITY THEORY
The main question asked in this area is “What makes some problems
computationally hard and other problem easy?”
What makes some problems computationally hard and others easy?
Basing upon the properties
Basing upon the difficulty level set
Problem can be hard in worst case scenario
3. COMPUTABILITY THEORY
Determining whether a mathematical statement is true or false.
The theoretical models that were proposed in order to understand solvable and
unsolvable problems led to the development of real computers.
The theories of computability and complexity are closely related. In complexity
theory, the objective is to classify problems as easy ones and hard ones;
whereas in computability theory, the classification of problems is by those that
are solvable and those that are not.
4. AUTOMATA THEORY
Automata theory deals with the definitions and properties of mathematical
models of computation.
Automata Theory deals with definitions and properties of different types of
“computation models”.
Examples of such models are:
Finite Automata. These are used in text processing, compilers, and hardware
design.
Context-Free Grammars. These are used to define programming languages and
in Artificial Intelligence.
Turing Machines. These form a simple abstract model of a “real” computer,
such as your PC at home.
6. SETS
A set is a collection of well-defined objects.
The set of natural numbers is N = {1, 2, 3, . . .}.
The set of integers is Z = {. . . , −3, −2, −1, 0, 1, 2, 3, . . .}.
The set of rational numbers is Q = {m/n : m ∈ Z, n ∈ Z, n 6= 0}.
The set of real numbers is denoted by R.
If A and B are sets, then A is a subset of B, written as A ⊆ B, if every element of
A is also an element of B. For example, the set of even natural numbers is a
subset of the set of all natural numbers. Every set A is a subset of itself, i.e., A ⊆
A. The empty set is a subset of every set A, i.e., ∅ ⊆ A.
If B is a set, then the power set P(B) of B is defined to be the set of all subsets of
B: P(B) = {A : A ⊆ B}. Observe that ∅ ∈ P(B) and B ∈ P(B).
7. SETS
If A and B are two sets, then
a) Their union is defined as A ∪ B = {x : x ∈ A or x ∈ B},
b) Their intersection is defined as A ∩ B = {x : x ∈ A and x ∈ B},
c) Their difference is defined as A B = {x : x ∈ A and x ∉B},
d) The Cartesian product of A and B is defined as A × B = {(x, y) : x ∈ A and y ∈
B},
e) The complement of A is defined as A = {x : x ∉A}.
A binary relation on two sets A and B is a subset of A × B.
8. FUNCTION
A function f from A to B, denoted by f : A → B, is a binary relation R, having
the property that for each element a ∈ A, there is exactly one ordered pair in R,
whose first component is a.
We will also say that f(a) = b, or f maps a to b, or the image of a under f is b.
The set A is called the domain of f, and the set {b ∈ B : there is an a ∈ A with
f(a) = b} is called the range of f.
A function f : A → B is one-to-one (or injective), if for any two distinct elements
a and a ′ in A, we have f(a) 6= f(a ′ ).
The function f is onto (or surjective), if for each element b ∈ B, there exists an
element a ∈ A, such that f(a) = b; in other words, the range of f is equal to the
set B. A function f is a bijection, if f is both injective and surjective.
9. EQUIVALENCE RELATION
A binary relation R ⊆ A × A is an equivalence relation, if it satisfies the
following three conditions:
a) R is reflexive: For every element in a ∈ A, we have (a, a) ∈ R.
b) R is symmetric: For all a and b in A, if (a, b) ∈ R, then also (b, a) ∈ R.
c) R is transitive: For all a, b, and c in A, if (a, b) ∈ R and (b, c) ∈ R, then also (a,
c) ∈ R.
10. GRAPH
An undirected graph, or simply a graph, is a set of points with lines connecting
some of the points. The points are called nodes or vertices, and the lines are
called edges, as shown in the following figure.
The number of edges at a particular node
is the degree of that node.
An edge from a node to itself, called a self-loop.
In a graph G that contains nodes i and j,
the pair(i, j)represents the edge that
connects i and j.
The order of i and j doesn’t matter in an undirected graph, so the pairs (i, j) and
(j, i) represent the same edge.
Formal description of the graph ({1, 2, 3, 4, 5}, {(1, 2), (2, 3), (3, 4), (4, 5), (5, 1)})
and ({1, 2, 3, 4}, {(1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4)})
11. GRAPH
When we label the nodes and/or edges of a graph, which then is called a labeled
graph.
We say that graph G is a subgraph of graph H if the nodes of G are a subset of
the nodes of H, and the edges of G are the edges of H on the corresponding
nodes.
12. GRAPH
A path in a graph is a sequence of nodes connected by edges. A simple path is a
path that doesn’t repeat any nodes. A graph is connected if every two nodes
have a path between them.
A path is a cycle if it starts and ends in the same node. A simple cycle is one that
contains at least three nodes and repeats only the first and last nodes.
A graph is a tree if it is connected and has no simple cycles. A tree may contain
a specially designated node called the root. The nodes of degree 1 in a tree,
other than the root, are called the leaves of the tree.
Path in a Graph Cycle in a Graph Tree
13. GRAPH
A directed graph has arrows instead of lines, as shown in the following figure.
The number of arrows pointing from a particular node is the outdegree of that
node, and the number of arrows pointing to a particular node is the indegree.
In a directed graph, we represent an edge from i to j as a pair (i, j). The formal
description of a directed graph G is (V,E), where V is the set of nodes and E is
the set of edges.
{1,2,3,4,5,6}, {(1,2),(1,5),(2,1),(2,4),(5,4),(5,6),(6,1),(6,3)}
A path in which all the arrows point in the same direction as its steps is called a
directed path. A directed graph is strongly connected if a directed path connects
every two nodes.
14. SYMBOLS & ALPHABETS
Symbols are an entity or individual objects, which can be any letter, alphabets
or any picture.
Ex 1,a,b,#
Alphabets are a finite set of symbols.
It is denoted by Σ.
Ex Σ={a,b}, Σ={A,B,C}, Σ={0,1,2}
15. STRING
A string is a finite collection of symbols from the alphabet. The string is
denoted by “w”.
If Σ={a,b} , string generated from Σ are {aa,ab,aaa,bb,ba,aba....}.
A string with zero occurrence of symbols is known as an empty string. It is
represented by ε.
The number of symbols in a string is called length of the string. It is denoted by
|w|.
Ex w=010, length of string |w|=3.
16. LANGUAGE
A language is a collection of appropriate string. A language which is formed
over Σ can be finite or infinite.
L1={set of string of length 2}={aa,bb,ba,ab} finite language
L2={set of all strings starts with ‘a’}={a,aa,aab,abb,abab} infinite language
17. BOOLEAN
The Boolean values are 1 and 0, that represent true and false, respectively. The
basic Boolean operations include
a) Negation (or NOT ), represented by ¬,
b) Conjunction (or AND), represented by ∧,
c) Disjunction (or OR), represented by ∨,
d) Exclusive-or (or XOR), represented by ⊕,
e) Equivalence, represented by ↔ or ⇔,
f) Implication, represented by → or ⇒.