0% found this document useful (0 votes)
75 views39 pages

TCS Module 1-Part 1-Intro-RS

This document provides an overview of the Theory of Computer Science course taught by Dr. Rekha Sharma. It outlines the course scheme, modules, and topics that will be covered. The course covers fundamental concepts like finite automata, regular expressions, context-free grammars, pushdown automata, Turing machines, and the limits of computation. It aims to introduce students to mathematical models of computation and language recognition. Key topics include finite automata with and without output, regular languages, pumping lemma, Chomsky hierarchy, decidability, and applications of theoretical models. The document emphasizes learning the logic and relationships between different models to understand their capabilities and limitations.

Uploaded by

Rishabh Shukla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views39 pages

TCS Module 1-Part 1-Intro-RS

This document provides an overview of the Theory of Computer Science course taught by Dr. Rekha Sharma. It outlines the course scheme, modules, and topics that will be covered. The course covers fundamental concepts like finite automata, regular expressions, context-free grammars, pushdown automata, Turing machines, and the limits of computation. It aims to introduce students to mathematical models of computation and language recognition. Key topics include finite automata with and without output, regular languages, pumping lemma, Chomsky hierarchy, decidability, and applications of theoretical models. The document emphasizes learning the logic and relationships between different models to understand their capabilities and limitations.

Uploaded by

Rishabh Shukla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

Theory of Computer Science

Dr. Rekha Sharma


Orientation
1. Scheme
2. Syllabus and Modules
3. Books
Scheme
T.E. Semester –V
Module1: Basic Concepts and Finite Automata
1. Basic Concepts: Alphabets, Strings, Languages, Closure properties.

2. FA without output: Finite Automata (FA), Deterministic Finite Automata (DFA)

3. Nondeterministic Finite Automata (NFA): Definitions, transition diagrams and Language recognizers

4. NFA to DFA Conversion, Equivalence of Deterministic and Nondeterministic Finite Automata,

5. Applications of Finite Automata,

6. Finite Automata with Epsilon Transitions, Eliminating Epsilon transitions,

7. Minimization of DFA.

8. FA with output: Definition and construction of Moore and Mealy machines and Equivalence ,Applications and
limitations of FA.
Module 2:Regular Expressions and Languages

1. Regular Expression (RE): Equivalence of RE and FA,


2. Arden‘s Theorem,
3. RE Applications.
4. Grammars and Chomsky hierarchy.
5. Regular Language (RL): Proving languages to be
Nonregular -Pumping lemma and
6. Closure properties of regular languages.
Module 3: Context Free Grammar
1. Definition, Sentential forms,
2. Leftmost and Rightmost derivations, Parse tree,
3. Ambiguity. Simplification and Applications.
4. Normal Forms: Chomsky Normal Forms (CNF) and
5. Greibach Normal Forms (GNF),
6. CFLs - Pumping lemma,
7. Closure properties
Module 4:Push Down Automata
1. Definition, Model,
2. Acceptance of CFL,
3. Acceptance by Final State and
4. Acceptance by Empty stack and its Equivalence,
5. Deterministic PDA ,
6. Non-Deterministic PDA ,
7. Equivalence of CFG and PDA,
8. Application of PDA
Module 5:Turing Machine
1. Definition, Transitions,
2. Design of TM as generator, decider and acceptor.
3. Variants of TM: Multitrack, Multitape , Universal TM,
4. Equivalence of Single and Multi Tape TMs.
5. Applications, Power and Limitations of TMs.
Module 6:Undecidability
1. Properties of recursive and recursively enumerable languages,
Decidability and Undecidability,
2. Halting problem ,
3. Linear bounded automata (LBA),
4. Rice‘s Theorem,
5. Post's correspondence problem (PCP).
Introduction to
Theory of Computer Science
Outline……
1. What is Theory of Computer Science?
2. Prerequisites
3. What We Study?
4. Why We Study?
5. Application
6. How to Study?
What is Theory of Computer Science?

• It is a different science deals with logic for problem


solving using mathematical models.
• It will take some time to get the grip of the subject.
• TCS is helpful for preparing GATE exam
Prerequisites

TCS
Discrete Structures Data Structures

• Set theory • Recursion


Graph Theory
• Functions
• logic
• Proofing • Graphs
• Techniques • Trees
What We Study?

Mathematical Models
FA
(Finite Automata)

PDA
(Push Down Automata)

LBA
(Linear Bound Automata)

TM
(Turing Machine)
Why We Study?
• What is computable?
• What is not computable?
• What are the limitations?
• Whether the given problem can be solved or can not be
solved?
• If it can be solved then How much time and space is
required to solve a problem?
Application of TCS
1. Pattern Matching
2. Compiler and Interpreters
3. Machine Learning
4. Complexity Theory
5. Natural Language Processing
How to Study?
1. Start with the basic Model i.e. Finite Automata

2. Learn the logic of construction of Finite Automata.

3. How Regular Expressions/Regular language are related to FA

4. Solve many examples of different types.

5. Understand the applications of FA and RE

6. See what are limitations of FA and how we can incorporate them using PDA.

7. Learn the other models like PDA, LBA, TM and how they differ in power and limitations.

8. Learn Universal Turing machine, computability, satisfiability and limitations of computing


Let us start with syllabus…

Basic Concepts
Basic Concepts:

Symbols Alphabets Strings Languages


Symbols
• Symbols are indivisible objects or entities that cannot be defined.
• Symbols are the atoms of the world of languages.
• A symbol is any single object such as A, a, 0, 1, #, begin, or do.
• Characters from A typical keyboard are only used as symbols.
xample:

Alphabets

• An alphabet is a finite, nonempty set of symbols.


• The alphabet of a language is normally denoted by ∑ .
• Examples:
Strings or Words
• A string or word over an alphabet is a finite sequence of
concatenated symbols of Alphabet.
Example:
0110, 11, 001 are three strings over the binary alphabet { 0, 1 } .
aab, abcb, b, cc are four strings over the alphabet { a, b, c }.
• It is not the case that a string over some alphabet should contain
all the symbols from the alphabet.
Example: the string cc over the alphabet { a, b, c } does not contain
the symbols a and b.
Length of a string:
• The number of symbols in a string w is called its length, denoted by |w|
Example : | 0011 | = 4
|11| = 2
|b|=1
• It is convenient to introduce a notation e (Epsilon) for the empty string, which contains
no symbols at all.
• The length of the empty string e is zero.
|e |=0
Languages
• A general language must cover a variety of distinct categories:
Natural languages, Programming languages, Mathematical languages, etc.

• The notion of natural languages like Hindi, English etc.

• Language can be defined as a system suitable for expression of certain ideas, facts, or concepts, which
includes a set of symbols and rules to manipulate these.

• The languages we consider for our discussion is an abstraction of natural languages.

• We will be focusing on formal languages that need precise and formal definitions.

• Programming languages belong to this category.


Languages

Context Recursively
Regular Context Free
Sensitive enumerable
Languages Languages
languages languages

FA PDA LBA TM
Finite Automata
Finite Automata (FA) (meaning-”self-acting”)

1. Deterministic Finite Automata (DFA)

2. Nondeterministic Finite Automata (NFA)


FA

FA With FA Without
Output Output

Mealy m/c Moore m/c DFA NFA

NFA with NFA without


epsilon epsilon
Finite Automata (FA)
1. Real life examples
2. Working model-(meaning-”self-acting”)
3. Formal Definition
4. Example
5. Construction
Finite Automata-Example
Fan Regulator

0 2
Start

3
Finite Automata-Example
Vending Machines:

• A vending machine is an automated machine that dispenses numerous


items such as cold drinks, snacks, beverages, etc. to sell automatically,
after a buyer inserts currency or credit into the machine.

• Vending machine works on finite state automata to control the


functional process.
Finite Automata-Example
Traffic Lights: The optimization of traffic light controllers in a city is a systematic representation of handling the instructions of
traffic rules. Its process depends on a set of instruction works in a loop with switching among instruction to control traffic.

Video Games: Video games levels represent the states of automata. In which a sequence of instructions are followed by the
players to accomplish the task.

Text Parsing: Text parsing is a technique which is used to derive a text string using the production rules of a grammar to check
the acceptability of a string.

Regular Expression Matching: It is a technique to checking the two or more regular expression are similar to each other or
not. The finite state machine is useful to checking out that the expressions are acceptable or not by a machine or not.

Speech Recognition: Speech recognition via machine is the technology enhancement that is capable to identify words and
phrases in spoken language and convert them to a machine-readable format. Receiving words and phrases from real world and
then converted it into machine readable language automatically is effectively solved by using finite state machine.
Finite Automata-Model
Finite Automata-Model

1. A tape to hold the input string. The tape is divided into a finite
number of cells. Each cell holds a symbol from .
2. A tape head for reading symbols from the tape
3. A control , which itself consists of 3 things:
• finite number of states that the machine is allowed to be in (zero
or more states are designated as accept or final states),
• a current state, initially set to a start state,
• a state transition function for changing the current state.
Deterministic Finite State Automaton:
Formal Definition
Deterministic Finite State Automaton: A Deterministic Finite State Automaton (DFA) is a 5-tuple:

 Q is a finite set of states.


 is a finite set of input symbols or alphabet.

 is the “next state” transition function (which is total ). Intuitively, is a function that
tells which state to move to in response to an input, i.e., if M is in state q and sees input a, it moves

to state .

 is the start state.

 is the set of accept or final states.


Examples
Tutorial 1
1. Design a FA to check whether the given decimal no is divisible by 5.
2. Design a FA for divisibility by 4 tester for binary no.
3. Design a FA in which input is valid if it ends in ‘100’ over Σ={0,1}.
4. Design a FA in which input is valid if second last symbol is ‘a’ over
Σ={a,b}.
OR
Design a FA in which input is valid if it ends either in ‘aa’ or ‘ab’
5. Design a FA in which input is valid if it contains ‘abb’ over Σ={a,b}.

You might also like