Theory of Computation
By Rushabh Wadkar
Topics to be covered
Introduction to TOC
i. Solvability of a problem
ii. Order of an
algorithm(asymptotic
notations)
iii. Set theory
iv. Graphs and trees
Formal languages
Day 1
Introduction to TOC
In theoretical computer science and mathematics, the theory of computation is
the branch that deals with how efficiently problems can be solved on a model of
computation, using an algorithm.
The theory of computation can be considered the creation of models of all kinds
in the field of computer science. Therefore, mathematics and logic are used.
Solvability of a problem
Solvable Problems
● The problem has a definite solution.
● The problem will be solved in finite number
of steps.
● Example: Shortest Path problems
Unsolvable Problems
● The problem has no definite solution.
● The solution doesn’t exist yet. No finite
steps can provide u with a solution.
● Example: Division by Zero
All problems are divided into 2 categories, Solvable and Unsolvable
Königsberg
bridge problem
The Königsberg bridge problem
asks if the seven bridges of the city
of Königsberg (formerly in Germany
but now known as Kaliningrad and part of
Russia) over the river Preger can all
be traversed in a single trip without
doubling back, with the additional
requirement that the trip ends in the
same place it began.
Königsberg
bridge problem
Let us consider each land like a
node of a graph. And the bridges
are the edges connecting the
nodes.
The degree of each node is odd,
hence it is not possible to start from
a particular land and come back
there without traversing a bridge
more than once.
PROBLEM
SOLVABLE UNSOLVABLE
DECIDABLE UNDECIDABLE
Can be moved to
● Algorithm
+
Procedure
exists
● Only
Procedure
exists
Asymptotic Notations
● f(n)=O( g(n))
"Big O(micron)" – upper bound => worst case
● f(n) = Ω(g(n))
"Big Omega" – lower bound => best case
● f(n) = θ(g(n))
"Big Theta" – upper & lower bound => "average" case
Set theory
● (d1) A∩B = df {x: x∈A & x∈B} [simple intersection]
● (d2) A–B = df {x: x∈A & x≠B} [set-difference]
● (d3) A∪B = df {x: x∈A ∨ x∈B} [simple union]
● (d4) •(f) = df {x: ∃Y(Y∈f & x∈Y)} [general union]
● (d5) €(f) = df {x: ∀Y(Y∈f → x∈Y)} [general intersection]
Relations
● R is a relation => R is a set of ordered pair
(a,b)∈AxB
● R is a relation from A to B iff it satisfies the following restrictions
dom(R) ⊆ A
ran(R) ⊆ B
Functions
● A function is, by definition, a relation R satisfying the following
restriction.
∀xyz(xRy & xRz .→ y=z)
No two images will have same preimage.
DeMorgan’s Law
● (A∪B)’= A’∩ B’
● (A∩B)’= A’∪ B’
Important Set Properties
● Disjoint Sets: (A∩B) = ∅
● Size of Set= |S|, No. of elements in a set
● Graph consists of edges and
nodes.
● A non-cyclic graph is called a
tree.
● There exist directed and
undirected graphs.
Formal Languages & its comparison
Language: English Formal Language
(For a fan)
Symbols: (A . . . Z)
(a . . . z)
0 & 1
On and off states
Alphabet: Set of all symbols
(A, B . . . Y, Z, a, b . . . y, z)
Set of all symbols
(0 , 1)
Strings: Any set of words
(including, these, themselves) (0 , 1, 01, 10, 001, . . . )
End of Day 1
www.linkedin.com/in/wadkar-rushabh
@RushabhWadkar
Thank you...

Theory of Computation Introduction Session

  • 1.
  • 2.
    Topics to becovered Introduction to TOC i. Solvability of a problem ii. Order of an algorithm(asymptotic notations) iii. Set theory iv. Graphs and trees Formal languages Day 1
  • 3.
    Introduction to TOC Intheoretical computer science and mathematics, the theory of computation is the branch that deals with how efficiently problems can be solved on a model of computation, using an algorithm. The theory of computation can be considered the creation of models of all kinds in the field of computer science. Therefore, mathematics and logic are used.
  • 4.
    Solvability of aproblem Solvable Problems ● The problem has a definite solution. ● The problem will be solved in finite number of steps. ● Example: Shortest Path problems Unsolvable Problems ● The problem has no definite solution. ● The solution doesn’t exist yet. No finite steps can provide u with a solution. ● Example: Division by Zero All problems are divided into 2 categories, Solvable and Unsolvable
  • 5.
    Königsberg bridge problem The Königsbergbridge problem asks if the seven bridges of the city of Königsberg (formerly in Germany but now known as Kaliningrad and part of Russia) over the river Preger can all be traversed in a single trip without doubling back, with the additional requirement that the trip ends in the same place it began.
  • 6.
    Königsberg bridge problem Let usconsider each land like a node of a graph. And the bridges are the edges connecting the nodes. The degree of each node is odd, hence it is not possible to start from a particular land and come back there without traversing a bridge more than once.
  • 7.
    PROBLEM SOLVABLE UNSOLVABLE DECIDABLE UNDECIDABLE Canbe moved to ● Algorithm + Procedure exists ● Only Procedure exists
  • 8.
    Asymptotic Notations ● f(n)=O(g(n)) "Big O(micron)" – upper bound => worst case ● f(n) = Ω(g(n)) "Big Omega" – lower bound => best case ● f(n) = θ(g(n)) "Big Theta" – upper & lower bound => "average" case
  • 9.
    Set theory ● (d1)A∩B = df {x: x∈A & x∈B} [simple intersection] ● (d2) A–B = df {x: x∈A & x≠B} [set-difference] ● (d3) A∪B = df {x: x∈A ∨ x∈B} [simple union] ● (d4) •(f) = df {x: ∃Y(Y∈f & x∈Y)} [general union] ● (d5) €(f) = df {x: ∀Y(Y∈f → x∈Y)} [general intersection]
  • 10.
    Relations ● R isa relation => R is a set of ordered pair (a,b)∈AxB ● R is a relation from A to B iff it satisfies the following restrictions dom(R) ⊆ A ran(R) ⊆ B
  • 11.
    Functions ● A functionis, by definition, a relation R satisfying the following restriction. ∀xyz(xRy & xRz .→ y=z) No two images will have same preimage.
  • 12.
    DeMorgan’s Law ● (A∪B)’=A’∩ B’ ● (A∩B)’= A’∪ B’
  • 13.
    Important Set Properties ●Disjoint Sets: (A∩B) = ∅ ● Size of Set= |S|, No. of elements in a set
  • 14.
    ● Graph consistsof edges and nodes. ● A non-cyclic graph is called a tree. ● There exist directed and undirected graphs.
  • 15.
    Formal Languages &its comparison Language: English Formal Language (For a fan) Symbols: (A . . . Z) (a . . . z) 0 & 1 On and off states Alphabet: Set of all symbols (A, B . . . Y, Z, a, b . . . y, z) Set of all symbols (0 , 1) Strings: Any set of words (including, these, themselves) (0 , 1, 01, 10, 001, . . . )
  • 16.
    End of Day1 www.linkedin.com/in/wadkar-rushabh @RushabhWadkar Thank you...