0% found this document useful (0 votes)
22 views27 pages

Lecture 1-2 (CMS)

This document provides an introduction to the Theory of Computation course offered at BITS Pilani Hyderabad Campus. It discusses key topics that will be covered, including automata theory, computability theory, and complexity theory. Models of computation like finite automata, pushdown automata, and Turing machines are introduced. The relation between models of computation and formal grammars is also covered. Evaluation criteria and textbooks are outlined. Important terminology is defined, such as alphabets, strings, languages, and the membership problem.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views27 pages

Lecture 1-2 (CMS)

This document provides an introduction to the Theory of Computation course offered at BITS Pilani Hyderabad Campus. It discusses key topics that will be covered, including automata theory, computability theory, and complexity theory. Models of computation like finite automata, pushdown automata, and Turing machines are introduced. The relation between models of computation and formal grammars is also covered. Evaluation criteria and textbooks are outlined. Important terminology is defined, such as alphabets, strings, languages, and the membership problem.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Theory of Computation

(CS F351)
BITS Dr. Raghunath
CS&IS Dept.
Pilani
Hyderabad Campus

BITS Pilani, Hyderabad Campus


Lectures -1 to 3
Introduction and DFA
BITS
Dr. Raghunath Reddy
Pilani
Hyderabad Campus

BITS Pilani, Hyderabad Campus


Theory of computations

Some questions:

What does it mean for a function to be computable?


Functions whose output values can be determined algorithmically from their
input values

 What can and can’t be computed ?

 What makes some problems computationally hard but others easy?

BITS Pilani, Hyderabad Campus


Models of computation:

 Finite memory
 finite automata

 Finite memory with stack


 Pushdown automata

 Unrestricted:
 Turing Machines

BITS Pilani, Hyderabad Campus


Grammars and languages
(Noam Chomsky)

 Regular grammars

 Context-free grammars

 Unrestricted grammars

BITS Pilani, Hyderabad Campus


Relation between models and
grammars ?

 Regular grammars = finite automata

 Context-free grammars = Pushdown


automata

 Unrestricted grammars = Turing


Machines

BITS Pilani, Hyderabad Campus


What course covers ?
 Automata Theory
 A string of parentheses is properly
balanced ?
 Is the given binary string ends with 00?

 Computability Theory
 Is the given function computable?
 Examples:
program verification, mathematical truth

 Complexity theory
 P vs NP problem
 Measures of complexity: Time and Space

BITS Pilani, Hyderabad Campus


Textbook and Reference books
 Reference books:
 Textbook:
Elements of Theory of Computation,
 J.E. Hopcroft and J. D. By Harry Lewis and Christos
Ullman, Introduction to Papadimitriou, Second Edition, PHI,
Automata Theory, Languages Asia 1998.
and Computation, Narosa, 1979.

 D. C. Kozen, Automata and


Computability, Springer-Verlag, 1997

M Sipser, Introduction to the Theory


of Computation, Thomson Asia, 1997.

BITS Pilani, Hyderabad Campus


Other Information
Course Team:
 Faculty: Dr. Raghunath (I/C) and Prof. Gururaj

Evaluation:

Component Duration Weightage (%) Marks Date & Nature of the


Time Component
Quiz-1 40 mins 12.5% 25 13 Sept Closed Book
2023
Quiz-2 40 mins 12.5% 25 15 Nov Closed Book
2023
Mid-Sem 90 mins 30% 60 9 Oct 2023 OPEN BOOK
4:00 PM (only handwritten notes)

Comprehensive 180 mins 45% 90 7 Dec 2023 Closed Book


Examination AN

Chamber Consultation hour: Wednesday 12:00 Noon – 12:50 PM (H-130)

Make-up Policy: Make-up will be granted only to genuine cases with prior permission from the IC.

BITS Pilani, Hyderabad Campus


Basic Terminology and Definitions
Alphabet
 An alphabet is a finite, non-empty set of symbol.

 We use the symbol to denote an alphabet

 Examples:

 Binary:

 Decimal:

 All lower-case letters:

 Alphanumeric:

BITS Pilani, Hyderabad Campus


Strings
 A string is a finite sequence of symbols chosen from .
 Ex: , strings are: 01010 ,110,0000,….
 How many strings are possible over an alphabet ? (Is the
set of strings over countable ?)

 The length of a string is the number of symbols in and denoted


by .

 Unique string of length 0 over called null string or empty string


and denoted by . Thus, .
 It’s epsilon, not the belongs to symbols.

BITS Pilani, Hyderabad Campus


Operations on Strings
 Concatenation: takes two strings and and makes a new string by
putting them together, symbols in followed by the symbols in .

 Note that and are different, in general.

 Concatenation is associative

 ( is an identity for concatenation)

BITS Pilani, Hyderabad Campus


Powers of symbols and strings
 denotes string of ’s of length (is symbol in .

 Inductive definition: and

 Let be a string over alphabet , is the string obtained by


concatenating copies of .

 Inductive definition: and

 Result:
 (i) for and is a symbol

 (i) for and is a string

BITS Pilani, Hyderabad Campus


Powers of an alphabet

Let be an alphabet

 is the set of all strings of length

 Kleene closure

 Positive closure

BITS Pilani, Hyderabad Campus


Substring and prefix

 Substring: A string is a substring of string if there are


strings and in such that .
 Example:

 Prefix: If for some then is a prefix of .


 Example:

Note: empty string is a prefix of every string.

BITS Pilani, Hyderabad Campus


Reverse of a string

 The reverse of a string , is the string obtained by re-


versing the string and denoted with .
i.e., if then

 Formal definition:

Result: For any two strings, and , .


BITS Pilani, Hyderabad Campus
Operations on sets of strings
The sets of strings are denoted by .

Let and be two sets of strings over an alphabet


i.e., .

 Complement (in :

 Union:

 Union:

BITS Pilani, Hyderabad Campus


Operations on sets of strings
 Set Concatenation:

 Note that and are different, in general.

BITS Pilani, Hyderabad Campus


Operations on sets of strings
 Reverse of a set of strings:

 Result: for any two sets of strings and .

BITS Pilani, Hyderabad Campus


Operations on sets of strings
 The powers of a set are defined as:

and

BITS Pilani, Hyderabad Campus


Operations on sets of strings: properties

(Associative)

(commutative)

 ( is an identity for union).

 ( is an identity for set concatenation).

 ( is an annihilator for set concatenation)

(set concatenation distributes over union)


BITS Pilani, Hyderabad Campus
Language
 is a said to be a language over alphabet , only if .

Examples:

 denotes the empty language.


Questions:
(1) Let . Is

(2) Is the set of all possible languages countable?

BITS Pilani, Hyderabad Campus


The Membership Problem
Given a string and a language , Is ?

BITS Pilani, Hyderabad Campus


Finite Automata

BITS Pilani, Hyderabad Campus


Finite Automaton

 Source: Google images BITS Pilani, Hyderabad Campus


Thank you

BITS Pilani, Hyderabad Campus

You might also like