SlideShare a Scribd company logo
1 of 40
Download to read offline
• A rational number is a number that is expressed as the ratio of two
integers, where the denominator should not be equal to zero
Slide 1
Introduction
Slide 3
Theory of Computation
• What are the capabilities /Problems solved /
Limitations of machine?
• What are the concepts of machine?
Theory
Slide 4
Theory of Computation
• Model or devices that perform some computation.
• Any task done by any machine like calculator,
computer, etc.,
Computation
Slide 5
Computation
•Computation is a general term for any type of information
processing that can be represented as an algorithm
precisely (mathematically).
Examples:
• Adding two numbers in our brains, on a piece of paper or
using a calculator.
• Converting a decimal number to its binary presentation or
vise versa.
• Finding the greatest common divisors of two numbers.
Slide 6
Computation
• These computations are used to represent
various mathematical models.
• Finite automate
• Pushdown automate
• Turning machine
Slide 7
1/24/2023 Chapter 1 Introduction
Theory of Computation
•TOC is a subject in which we study mathematical models
(abstract machines) as well as the computational problems
that can be solved by using these models.
•TOC can be considered as the study of all kinds of
computational model in the field of computer science and it
also how efficiently the problem can be solved .
Slide 8
Branches of TOC
• Automata Theory
It deals with definitions and properties of various mathematical
models/devices
• Computability Theory
– It deals with what can and cannot be computed by the model
• Complexity Theory
– It deals with computable problem based on the hardness. To calculate the
efficiency.
Slide 13
Problem
•Now a days machines (digital, analog,
mechanical) play a very important role in
the development of human, we need
some mechanism (language) to
communicate with the machines.
Slide 14
Solution
• We need a language for communication with machines.
• Languages can be two types formal and informal languages.
• We will only study formal languages
• Dictionary defines the term informally as ‘a system suitable for
the expression of certain ideas, facts or concepts including a
set of symbols for their manipulation’.
Slide 15
Methods to define language
•In natural language we define the list of words in a
dictionary because they are finite and predefined, but
we cannot list all the sentence which can be formed
using these words as they are infinite.
•So we have a mechanism called grammar/rules using
which we can decide which sentence is valid and
which is invalid.
Slide 16
Symbols, Alphabet, strings
• Symbols – An individual part of input symbol or single character is
known as symbol (in engish we call them as letters)
– Example: Digit - 0,1,2,…. 9
Alphabets- a,b,c ….z , A, B, …….,Z
Special symbols !@#$< >….
Symbols are used to build language for machine.
• Alphabet (∑)– It is a finite non empty set of input symbols (every
language has its own alphabet). We use symbol ∑ for depicting
alphabet.
∑ = {0,1,2}
∑ = {0,1} Binary alphabet
∑ = { a,b,c}
Slide 17
String
• String - It is a sequence of input symbols from the alphabet(∑)
( in English we called them as words)
∑ = {0,1} w= 01101 ( it is a string from binary )
∑ = {a,b} w= abbab ( it is a string from the alphabet)
Slide 18
Length of the string
• Definition − It is defined as number of symbol in the string.
(Denoted by |S|).
• Examples −
• If S = ‘cabcad’, |S|= 6
• If S = ε |S|= 0, it is called an empty string
Slide 19
1/24/2023 Chapter 1 Introduction
Empty String
• The string with zero occurrence of symbols.
It is denoted by , | | =0 .
Slide 20
1/24/2023 Chapter 1 Introduction
Concatenation of string
• Let x and y be two strings, then
concatenation is defined as the string
formed by making a copy of string x followed
by a copy of string y.
• Example: w= ab x=ba wx= abba
Slide 21
1/24/2023 Chapter 1 Introduction
Substring
A string of consecutive symbols in some string ‘w’ can
be collectively said as a substring.
Example. W = abab its substrings can be ab,a, ba…etc.,
– ε is a substring of every string.
Example
– ε, comput and computation are substrings of
computation.
Slide 22
1/24/2023 Chapter 1 Introduction
Reversal
If there is a string w then reverse of a string a
denoted by wr is just the same string but
written in reverse order.
W= w1 w2 w3 …wn
Wr = wn , wn-1 , …. ..w3,w2,w1
Slide 23
1/24/2023 Chapter 1 Introduction
Example of Reversal
(automata)r
= (utomata)r a
= (tomata)r ua
= (omata)r tua
= (mata)r otua
= (ata)r motua
= (ta)r amotua
= (a)r tamotua
= ()r atamotua
= atamotua
Slide 24
Power of Alphabet
• ∑ - Alphabet – set of symbols
• ∑k = set of all strings of length k
• Example ∑ = { 0, 1}
∑0 = {ɛ }
∑1 = {0,1}
∑2 = { 00,01,10,11}
∑3 = ∑2 ∑
= {00,01,10,11} { 0,1}
= { 000,001,010,011,100,101,110,111}
Slide 25
Kleene star – (∑* )
• It is a unary operator on a set of symbols or string, ∑ that
gives the infinite set of all possible strings of all possible
lengths over ∑ including ɛ.
∑* = ∑o ꓴ ∑1 ꓴ ∑2 ꓴ ….
Example: ∑ = {a, b}
∑* = { ɛ, a,b,aa,ab,ba,bb … }
Slide 26
1/24/2023 Chapter 1 Introduction
Σ*
• The set of strings created from any number (0
or 1 or …) of symbols in an alphabet  is
denoted by *.
• That is, * = i=

0 i
– Let = {0, 1}.
– * = {, 0, 1, 00, 01, 10, 11, 000, 001, 010, 011, … }.
Slide 27
Kleene closure / Plus (∑+ )
• It is the infinite set of all possible strings of all possible length
over ∑ excluding ɛ.
• ∑+ = ∑1 ꓴ ∑2 ꓴ ∑3 ꓴ …
• ∑* = ∑* - { ɛ }
• Example:
• ∑ = {a , b}
• ∑+ = {a,b,aa,ab,ba,bb……}
Slide 28
1/24/2023 Chapter 1 Introduction
Σ+
• The set of strings created from at least one symbol
(1 or 2 or …) in an alphabet  is denoted by +.
• That is, + = i=

1 i
= i=0.. i
- 0
=  i=0.. i
- {}
• Let = {0, 1}. + = {0, 1, 00, 01, 10, 11, 000, 001, 010, 011,
… }.
* and + are infinite sets.
Slide 29
Language
• A Language is defined as a set of strings. ( in natural language
set of words(predefined) and grammar) we apply this model
from words to sentence).
• In the next level we consider programs as a string and
programming constructs/ tokens like int, floats as
letters/symbols.
Slide 30
Language
• A language is a collection of strings over ∑
• Example ∑ = {a,b}
1. L = set of all string of length 2
L= {aa, ab, ba, bb}
Here, L is a finite set
2. L = set of all string of length 3
L = {aaa,aab, aba, abb, baa,bab,bba,bbb}
Here L is also finite set
3. L = set of all strings where each string start with an ‘a’
L = {a,aa,ab, aab,aba,abb……}
Here L is an infinite set.
So, A Language which can be formed over an alphabet can be finite or infinite set.

More Related Content

Similar to Mod1.pdf

Basic Foundations of Automata Theory
Basic Foundations of Automata TheoryBasic Foundations of Automata Theory
Basic Foundations of Automata Theorysaugat86
 
Regular expressions h1
Regular expressions h1Regular expressions h1
Regular expressions h1Rajendran
 
Word2vec slide(lab seminar)
Word2vec slide(lab seminar)Word2vec slide(lab seminar)
Word2vec slide(lab seminar)Jinpyo Lee
 
DAA - chapter 1.pdf
DAA - chapter 1.pdfDAA - chapter 1.pdf
DAA - chapter 1.pdfASMAALWADEE2
 
Winter 10 Undecidability.pptx
Winter 10 Undecidability.pptxWinter 10 Undecidability.pptx
Winter 10 Undecidability.pptxHarisPrince
 
theory of computation lecture 01
theory of computation lecture 01theory of computation lecture 01
theory of computation lecture 018threspecter
 
Algorithms presentation on Path Matrix, Bell Number and Sorting
Algorithms presentation on Path Matrix, Bell Number and SortingAlgorithms presentation on Path Matrix, Bell Number and Sorting
Algorithms presentation on Path Matrix, Bell Number and SortingRishabh Mehan
 
DAA-Unit1.pptx
DAA-Unit1.pptxDAA-Unit1.pptx
DAA-Unit1.pptxNishaS88
 
Data structure and algorithm All in One
Data structure and algorithm All in OneData structure and algorithm All in One
Data structure and algorithm All in Onejehan1987
 
Digital communication lab lectures
Digital communication lab  lecturesDigital communication lab  lectures
Digital communication lab lecturesmarwaeng
 
Introduction To Autumata Theory
 Introduction To Autumata Theory Introduction To Autumata Theory
Introduction To Autumata TheoryAbdul Rehman
 
Chapter 5.pptx
Chapter 5.pptxChapter 5.pptx
Chapter 5.pptxTekle12
 
unit-4-dynamic programming
unit-4-dynamic programmingunit-4-dynamic programming
unit-4-dynamic programminghodcsencet
 
Lecture1_computer vision-2023.pdf
Lecture1_computer vision-2023.pdfLecture1_computer vision-2023.pdf
Lecture1_computer vision-2023.pdfssuserff72e4
 
Unit-1 Basic Concept of Algorithm.pptx
Unit-1 Basic Concept of Algorithm.pptxUnit-1 Basic Concept of Algorithm.pptx
Unit-1 Basic Concept of Algorithm.pptxssuser01e301
 

Similar to Mod1.pdf (20)

Basic Foundations of Automata Theory
Basic Foundations of Automata TheoryBasic Foundations of Automata Theory
Basic Foundations of Automata Theory
 
Regular expressions h1
Regular expressions h1Regular expressions h1
Regular expressions h1
 
intro.ppt
intro.pptintro.ppt
intro.ppt
 
Word2vec slide(lab seminar)
Word2vec slide(lab seminar)Word2vec slide(lab seminar)
Word2vec slide(lab seminar)
 
DAA - chapter 1.pdf
DAA - chapter 1.pdfDAA - chapter 1.pdf
DAA - chapter 1.pdf
 
Winter 10 Undecidability.pptx
Winter 10 Undecidability.pptxWinter 10 Undecidability.pptx
Winter 10 Undecidability.pptx
 
theory of computation lecture 01
theory of computation lecture 01theory of computation lecture 01
theory of computation lecture 01
 
Algorithms presentation on Path Matrix, Bell Number and Sorting
Algorithms presentation on Path Matrix, Bell Number and SortingAlgorithms presentation on Path Matrix, Bell Number and Sorting
Algorithms presentation on Path Matrix, Bell Number and Sorting
 
DAA-Unit1.pptx
DAA-Unit1.pptxDAA-Unit1.pptx
DAA-Unit1.pptx
 
Data structure and algorithm All in One
Data structure and algorithm All in OneData structure and algorithm All in One
Data structure and algorithm All in One
 
presentation.pptx
presentation.pptxpresentation.pptx
presentation.pptx
 
Lexical
LexicalLexical
Lexical
 
Digital communication lab lectures
Digital communication lab  lecturesDigital communication lab  lectures
Digital communication lab lectures
 
Introduction To Autumata Theory
 Introduction To Autumata Theory Introduction To Autumata Theory
Introduction To Autumata Theory
 
Chapter 5.pptx
Chapter 5.pptxChapter 5.pptx
Chapter 5.pptx
 
Unit 1.pptx
Unit 1.pptxUnit 1.pptx
Unit 1.pptx
 
unit-4-dynamic programming
unit-4-dynamic programmingunit-4-dynamic programming
unit-4-dynamic programming
 
Sparse autoencoder
Sparse autoencoderSparse autoencoder
Sparse autoencoder
 
Lecture1_computer vision-2023.pdf
Lecture1_computer vision-2023.pdfLecture1_computer vision-2023.pdf
Lecture1_computer vision-2023.pdf
 
Unit-1 Basic Concept of Algorithm.pptx
Unit-1 Basic Concept of Algorithm.pptxUnit-1 Basic Concept of Algorithm.pptx
Unit-1 Basic Concept of Algorithm.pptx
 

Recently uploaded

Statistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbersStatistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numberssuginr1
 
💞 Safe And Secure Call Girls Agra Call Girls Service Just Call 🍑👄6378878445 🍑...
💞 Safe And Secure Call Girls Agra Call Girls Service Just Call 🍑👄6378878445 🍑...💞 Safe And Secure Call Girls Agra Call Girls Service Just Call 🍑👄6378878445 🍑...
💞 Safe And Secure Call Girls Agra Call Girls Service Just Call 🍑👄6378878445 🍑...vershagrag
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...gajnagarg
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangeThinkInnovation
 
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...kumargunjan9515
 
Giridih Escorts Service Girl ^ 9332606886, WhatsApp Anytime Giridih
Giridih Escorts Service Girl ^ 9332606886, WhatsApp Anytime GiridihGiridih Escorts Service Girl ^ 9332606886, WhatsApp Anytime Giridih
Giridih Escorts Service Girl ^ 9332606886, WhatsApp Anytime Giridihmeghakumariji156
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNKTimothy Spann
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareGraham Ware
 
Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraGovindSinghDasila
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...HyderabadDolls
 
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...HyderabadDolls
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...nirzagarg
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Vastral Call Girls Book Now 7737669865 Top Class Escort Service Available
Vastral Call Girls Book Now 7737669865 Top Class Escort Service AvailableVastral Call Girls Book Now 7737669865 Top Class Escort Service Available
Vastral Call Girls Book Now 7737669865 Top Class Escort Service Availablegargpaaro
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...gajnagarg
 
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...ThinkInnovation
 
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...SOFTTECHHUB
 
Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?RemarkSemacio
 
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...HyderabadDolls
 

Recently uploaded (20)

Statistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbersStatistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbers
 
💞 Safe And Secure Call Girls Agra Call Girls Service Just Call 🍑👄6378878445 🍑...
💞 Safe And Secure Call Girls Agra Call Girls Service Just Call 🍑👄6378878445 🍑...💞 Safe And Secure Call Girls Agra Call Girls Service Just Call 🍑👄6378878445 🍑...
💞 Safe And Secure Call Girls Agra Call Girls Service Just Call 🍑👄6378878445 🍑...
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
 
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
 
Giridih Escorts Service Girl ^ 9332606886, WhatsApp Anytime Giridih
Giridih Escorts Service Girl ^ 9332606886, WhatsApp Anytime GiridihGiridih Escorts Service Girl ^ 9332606886, WhatsApp Anytime Giridih
Giridih Escorts Service Girl ^ 9332606886, WhatsApp Anytime Giridih
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 
Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - Almora
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
 
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Vastral Call Girls Book Now 7737669865 Top Class Escort Service Available
Vastral Call Girls Book Now 7737669865 Top Class Escort Service AvailableVastral Call Girls Book Now 7737669865 Top Class Escort Service Available
Vastral Call Girls Book Now 7737669865 Top Class Escort Service Available
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
 
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
 
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
 
Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?
 
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
 

Mod1.pdf

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. • A rational number is a number that is expressed as the ratio of two integers, where the denominator should not be equal to zero
  • 12.
  • 13.
  • 14.
  • 15.
  • 17. Slide 3 Theory of Computation • What are the capabilities /Problems solved / Limitations of machine? • What are the concepts of machine? Theory
  • 18. Slide 4 Theory of Computation • Model or devices that perform some computation. • Any task done by any machine like calculator, computer, etc., Computation
  • 19. Slide 5 Computation •Computation is a general term for any type of information processing that can be represented as an algorithm precisely (mathematically). Examples: • Adding two numbers in our brains, on a piece of paper or using a calculator. • Converting a decimal number to its binary presentation or vise versa. • Finding the greatest common divisors of two numbers.
  • 20. Slide 6 Computation • These computations are used to represent various mathematical models. • Finite automate • Pushdown automate • Turning machine
  • 21. Slide 7 1/24/2023 Chapter 1 Introduction Theory of Computation •TOC is a subject in which we study mathematical models (abstract machines) as well as the computational problems that can be solved by using these models. •TOC can be considered as the study of all kinds of computational model in the field of computer science and it also how efficiently the problem can be solved .
  • 22. Slide 8 Branches of TOC • Automata Theory It deals with definitions and properties of various mathematical models/devices • Computability Theory – It deals with what can and cannot be computed by the model • Complexity Theory – It deals with computable problem based on the hardness. To calculate the efficiency.
  • 23. Slide 13 Problem •Now a days machines (digital, analog, mechanical) play a very important role in the development of human, we need some mechanism (language) to communicate with the machines.
  • 24. Slide 14 Solution • We need a language for communication with machines. • Languages can be two types formal and informal languages. • We will only study formal languages • Dictionary defines the term informally as ‘a system suitable for the expression of certain ideas, facts or concepts including a set of symbols for their manipulation’.
  • 25. Slide 15 Methods to define language •In natural language we define the list of words in a dictionary because they are finite and predefined, but we cannot list all the sentence which can be formed using these words as they are infinite. •So we have a mechanism called grammar/rules using which we can decide which sentence is valid and which is invalid.
  • 26. Slide 16 Symbols, Alphabet, strings • Symbols – An individual part of input symbol or single character is known as symbol (in engish we call them as letters) – Example: Digit - 0,1,2,…. 9 Alphabets- a,b,c ….z , A, B, …….,Z Special symbols !@#$< >…. Symbols are used to build language for machine. • Alphabet (∑)– It is a finite non empty set of input symbols (every language has its own alphabet). We use symbol ∑ for depicting alphabet. ∑ = {0,1,2} ∑ = {0,1} Binary alphabet ∑ = { a,b,c}
  • 27. Slide 17 String • String - It is a sequence of input symbols from the alphabet(∑) ( in English we called them as words) ∑ = {0,1} w= 01101 ( it is a string from binary ) ∑ = {a,b} w= abbab ( it is a string from the alphabet)
  • 28. Slide 18 Length of the string • Definition − It is defined as number of symbol in the string. (Denoted by |S|). • Examples − • If S = ‘cabcad’, |S|= 6 • If S = ε |S|= 0, it is called an empty string
  • 29. Slide 19 1/24/2023 Chapter 1 Introduction Empty String • The string with zero occurrence of symbols. It is denoted by , | | =0 .
  • 30. Slide 20 1/24/2023 Chapter 1 Introduction Concatenation of string • Let x and y be two strings, then concatenation is defined as the string formed by making a copy of string x followed by a copy of string y. • Example: w= ab x=ba wx= abba
  • 31. Slide 21 1/24/2023 Chapter 1 Introduction Substring A string of consecutive symbols in some string ‘w’ can be collectively said as a substring. Example. W = abab its substrings can be ab,a, ba…etc., – ε is a substring of every string. Example – ε, comput and computation are substrings of computation.
  • 32. Slide 22 1/24/2023 Chapter 1 Introduction Reversal If there is a string w then reverse of a string a denoted by wr is just the same string but written in reverse order. W= w1 w2 w3 …wn Wr = wn , wn-1 , …. ..w3,w2,w1
  • 33. Slide 23 1/24/2023 Chapter 1 Introduction Example of Reversal (automata)r = (utomata)r a = (tomata)r ua = (omata)r tua = (mata)r otua = (ata)r motua = (ta)r amotua = (a)r tamotua = ()r atamotua = atamotua
  • 34. Slide 24 Power of Alphabet • ∑ - Alphabet – set of symbols • ∑k = set of all strings of length k • Example ∑ = { 0, 1} ∑0 = {ɛ } ∑1 = {0,1} ∑2 = { 00,01,10,11} ∑3 = ∑2 ∑ = {00,01,10,11} { 0,1} = { 000,001,010,011,100,101,110,111}
  • 35. Slide 25 Kleene star – (∑* ) • It is a unary operator on a set of symbols or string, ∑ that gives the infinite set of all possible strings of all possible lengths over ∑ including ɛ. ∑* = ∑o ꓴ ∑1 ꓴ ∑2 ꓴ …. Example: ∑ = {a, b} ∑* = { ɛ, a,b,aa,ab,ba,bb … }
  • 36. Slide 26 1/24/2023 Chapter 1 Introduction Σ* • The set of strings created from any number (0 or 1 or …) of symbols in an alphabet  is denoted by *. • That is, * = i=  0 i – Let = {0, 1}. – * = {, 0, 1, 00, 01, 10, 11, 000, 001, 010, 011, … }.
  • 37. Slide 27 Kleene closure / Plus (∑+ ) • It is the infinite set of all possible strings of all possible length over ∑ excluding ɛ. • ∑+ = ∑1 ꓴ ∑2 ꓴ ∑3 ꓴ … • ∑* = ∑* - { ɛ } • Example: • ∑ = {a , b} • ∑+ = {a,b,aa,ab,ba,bb……}
  • 38. Slide 28 1/24/2023 Chapter 1 Introduction Σ+ • The set of strings created from at least one symbol (1 or 2 or …) in an alphabet  is denoted by +. • That is, + = i=  1 i = i=0.. i - 0 =  i=0.. i - {} • Let = {0, 1}. + = {0, 1, 00, 01, 10, 11, 000, 001, 010, 011, … }. * and + are infinite sets.
  • 39. Slide 29 Language • A Language is defined as a set of strings. ( in natural language set of words(predefined) and grammar) we apply this model from words to sentence). • In the next level we consider programs as a string and programming constructs/ tokens like int, floats as letters/symbols.
  • 40. Slide 30 Language • A language is a collection of strings over ∑ • Example ∑ = {a,b} 1. L = set of all string of length 2 L= {aa, ab, ba, bb} Here, L is a finite set 2. L = set of all string of length 3 L = {aaa,aab, aba, abb, baa,bab,bba,bbb} Here L is also finite set 3. L = set of all strings where each string start with an ‘a’ L = {a,aa,ab, aab,aba,abb……} Here L is an infinite set. So, A Language which can be formed over an alphabet can be finite or infinite set.