SlideShare une entreprise Scribd logo
1  sur  36
Introduction
Why do we study Theory of
Computation ?
Outline
• Importance of Theory of Computation
• Languages
• Languages and Problems
What is Computation ?
• Sequence of mathematical operations ?
– What are, and are not, mathematical operations?
• Sequence of well-defined operations
– How many operations ?
• The fewer, the better.
– Which operations ?
• The simpler, the better.
What do we study in Theory of Computation ?
• What is computable,
and what is not ?
• Basis of
– Algorithm analysis
– Complexity theory
• What a computer can
and cannot do
• Are you trying to write a
non-existing program?
– Can you make your
program more efficient?
What do we study in Complexity Theory ?
• What is easy, and what
is difficult, to compute ?
• What is easy, and what
is hard for computers to
do?
• Is your cryptograpic
scheme safe?
Applications in Computer Science
• Analysis of
algorithms
• Complexity Theory
• Cryptography
• Compilers
• Circuit design
History of Theory of Computation
• 1936 Alan Turing invented the Turing machine, and
proved that there exists an unsolvable problem.
• 1940’s Stored-program computers were built.
• 1943 McCulloch and Pitts invented finite automata.
• 1956 Kleene invented regular expressions and
proved the equivalence of regular expression and
finite automata.
History of Theory of Computation
• 1956 Chomsky defined Chomsky hierarchy, which
organized languages recognized by different
automata into hierarchical classes.
• 1959 Rabin and Scott introduced nondeterministic
finite automata and proved its equivalence to
(deterministic) finite automata.
• 1950’s-1960’s More works on languages,
grammars, and compilers
History of Theory of Computation
• 1965 Hartmantis and Stearns defined time
complexity, and Lewis, Hartmantis and Stearns
defined space complexity.
• 1971 Cook showed the first NP-complete problem,
the satisfiability prooblem.
• 1972 Karp Showed many other NP-complete
problems.
History of Theory of Computation
• 1976 Diffie and Helllman defined Modern
Cryptography based on NP-complete problems.
• 1978 Rivest, Shamir and Adelman proposed a
public-key encryption scheme, RSA.
Alphabet and Strings
• An alphabet is a finite, non-empty set of symbols.
– {0,1 } is a binary alphabet.
– { A, B, …, Z, a, b, …, z } is an English alphabet.
• A string over an alphabet  is a sequence of any
number of symbols from .
– 0, 1, 11, 00, and 01101 are strings over {0, 1 }.
– Cat, CAT, and compute are strings over the English
alphabet.
Empty String
• An empty string, denoted by , is a string
containing no symbol.
– is a string over any alphabet.
Length
• The length of a string x, denoted by length(x),
is the number of positions of symbols in the
string.
Let Σ = {a, b, …, z}
length(automata) = 8
length(computation) = 11
length(ε) = 0
• x(i), denotes the symbol in the ith position of a
string x, for 1 i  length(x).
String Operations
• Concatenation
• Substring
• Reversal
Concatenation
• The concatenation of strings x and y,
denoted by xy or x y, is a string z such that:
– z(i) = x(i) for 1  i  length(x)
– z(i) = y(i) for length(x)<ilength(x)+length(y)
• Example
– automatacomputation = automatacomputation
Concatenation
The concatenation of string x for n times,
where n0, is denoted by xn
– x0 = 
– x1 = x
– x2 = x x
– x3 = x x x
– …
Substring
Let x and y be strings over an alphabet Σ
The string x is a substring of y if there exist strings
w and z over Σ such that y = w x z.
– ε is a substring of every string.
– For every string x, x is a substring of x itself.
Example
– ε, comput and computation are substrings of
computation.
Reversal
Let x be a string over an alphabet Σ
The reversal of the string x, denoted by x r, is a
string such that
– if x is ε, then xr is ε.
– If a is in Σ, y is in Σ* and x = a y, then xr = yr a.
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
Σ*
• 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, … }.
Σ+
• 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.
Languages
• A language over an alphabet Σ is a set of
strings over Σ.
– Let Σ = {0, 1} be the alphabet.
– Le = {Σ* | the number of 1’s in  is even}.
– , 0, 00, 11, 000, 110, 101, 011, 0000, 1100, 1010,
1001, 0110, 0101, 0011, … are in Le
Operations on Languages
• Complementation
• Union
• Intersection
• Concatenation
• Reversal
• Closure
Complementation
Let L be a language over an alphabet Σ.
The complementation of L, denoted byL, is Σ*–L.
Example:
Let Σ = {0, 1} be the alphabet.
Le = {Σ* | the number of 1’s in  is even}.
Le= {Σ* | the number of 1’s in  is not even}.
Le= {Σ* | the number of 1’s in  is odd}.
Union
Let L1 and L2 be languages over an alphabet Σ.
The union of L1 and L2, denoted by L1L2,
is {x | x is in L1 or L2}.
Example:
{x{0,1}*|x begins with 0}  {x{0,1}*|x ends with 0}
= {x  {0,1}*| x begins or ends with 0}
Intersection
Let L1 and L2 be languages over an alphabet Σ.
The intersection of L1 and L2, denoted by
L1L2, is { x | x is in L1 and L2}.
Example:
{ x{0,1}*| x begins with 0}  { x{0,1}*| x ends with 0}
= { x{0,1}*| x begins and ends with 0}
Concatenation
Let L1 and L2 be languages over an alphabet Σ.
The concatenation of L1 and L2, denoted by L1L2, is
{w1w2| w1 is in L1 and w2 is in L2}.
Example
{ x  {0,1}*| x begins with 0}{x  {0,1}*| x ends with 0}
= { x  {0,1}*| x begins and ends with 0 and length(x)  2}
{ x  {0,1}*| x ends with 0}{x  {0,1}*| x begins with 0}
= { x  {0,1}*| x has 00 as a substring}
Reversal
Let L be a language over an alphabet Σ.
The reversal of L, denoted by Lr, is {wr| w is in L}.
Example
{x  {0,1}*| x begins with 0} r
= {x  {0,1}*| x ends with 0}
{x  {0,1}*| x has 00 as a substring} r
= {x  {0,1}*| x has 00 as a substring}
Kleene’s closure
Let L be a language over an alphabet Σ.
The Kleene’s closure of L, denoted by L*, is {x | for an
integer n  0 x = x1 x2 … xn and x1, x2 , …, xn are in L}.
That is, L* = i

= 0 Li
Example: Let Σ = {0,1} and
Le = {Σ* | the number of 1’s in  is even}
Le* = {Σ* | the number of 1’s in  is even}
(Le)* = {Σ*| the number of 1’s in  is odd}*
= {Σ*| the number of 1’s in  > 0}
Closure
Let L be a language over an alphabet Σ.
The closure of L, denoted by L+, is { x |for an
integer n  1, x = x1x2…xn and x1, x2 , …, xn are in L}
That is, L+ = i

= 1 Li
Example:
Let Σ = {0, 1} be the alphabet.
Le = {Σ* | the number of 1’s in  is even}
Le
+ = {Σ* | the number of 1’s in  is even} = Le*
Observation about Closure
L+ = L*  {ε} ?
Example:
L = {Σ* | the number of 1’s in  is even}
L+ = {Σ* | the number of 1’s in  is even} = Le*
Why?
L* = L+  {ε} ?
Languages and Problems
• Problem
– Example: What are prime numbers > 20?
• Decision problem
– Problem with a YES/NO answer
– Example: Given a positive integer n, is n a prime number
> 20?
• Language
– Example: {n | n is a prime number > 20}
= {23, 29, 31, 37, …}
Language Recognition and Problem
• A problem is represented by a set of strings of the
input whose answer for the corresponding problem
is “YES”.
• a string is in a language = the answer of the
corresponding problem for the string is “YES”
– Let “Given a positive integer n, is n a prime number > 20?”
be the problem P.
– If a string represents an integer i in {m | m is a prime
number > 20} , then the answer for the problem P for n = i
is true.
Common misconception
Beware
A language is a set.
1
01
001
0001
00001
1
10
100
1000
10000
L1 L2
And, there is also a set of languages.
1
01
001
0001
00001
L1
1
10
100
1000
10000
L2
L1
L2
A class of language

Contenu connexe

Tendances

Chapter2CDpdf__2021_11_26_09_19_08.pdf
Chapter2CDpdf__2021_11_26_09_19_08.pdfChapter2CDpdf__2021_11_26_09_19_08.pdf
Chapter2CDpdf__2021_11_26_09_19_08.pdfDrIsikoIsaac
 
3.1 intro toautomatatheory h1
3.1 intro toautomatatheory  h13.1 intro toautomatatheory  h1
3.1 intro toautomatatheory h1Rajendran
 
Regular expression (compiler)
Regular expression (compiler)Regular expression (compiler)
Regular expression (compiler)Jagjit Wilku
 
Regular language and Regular expression
Regular language and Regular expressionRegular language and Regular expression
Regular language and Regular expressionAnimesh Chaturvedi
 
Ch3 4 regular expression and grammar
Ch3 4 regular expression and grammarCh3 4 regular expression and grammar
Ch3 4 regular expression and grammarmeresie tesfay
 
Chapter3pptx__2021_12_23_22_52_54.pptx
Chapter3pptx__2021_12_23_22_52_54.pptxChapter3pptx__2021_12_23_22_52_54.pptx
Chapter3pptx__2021_12_23_22_52_54.pptxDrIsikoIsaac
 
Theory of computing
Theory of computingTheory of computing
Theory of computingRanjan Kumar
 
01 alphabets strings and languages
01 alphabets strings and languages01 alphabets strings and languages
01 alphabets strings and languagesJohnDevaPrasanna1
 
Regular Expression in Compiler design
Regular Expression in Compiler designRegular Expression in Compiler design
Regular Expression in Compiler designRiazul Islam
 
Theory of Computation Lecture Notes
Theory of Computation Lecture NotesTheory of Computation Lecture Notes
Theory of Computation Lecture NotesFellowBuddy.com
 
Flat notes iii i (1)(7-9-20)
Flat notes iii i (1)(7-9-20)Flat notes iii i (1)(7-9-20)
Flat notes iii i (1)(7-9-20)saithirumalg
 
Formal language & automata theory
Formal language & automata theoryFormal language & automata theory
Formal language & automata theoryNYversity
 
A195259101 22750 24_2018_grammars and languages generated by grammars
A195259101 22750 24_2018_grammars and languages generated by grammarsA195259101 22750 24_2018_grammars and languages generated by grammars
A195259101 22750 24_2018_grammars and languages generated by grammarsMohd Arif Ansari
 

Tendances (20)

Chapter2CDpdf__2021_11_26_09_19_08.pdf
Chapter2CDpdf__2021_11_26_09_19_08.pdfChapter2CDpdf__2021_11_26_09_19_08.pdf
Chapter2CDpdf__2021_11_26_09_19_08.pdf
 
3.1 intro toautomatatheory h1
3.1 intro toautomatatheory  h13.1 intro toautomatatheory  h1
3.1 intro toautomatatheory h1
 
Regular expression (compiler)
Regular expression (compiler)Regular expression (compiler)
Regular expression (compiler)
 
Flat unit 1
Flat unit 1Flat unit 1
Flat unit 1
 
Regular language and Regular expression
Regular language and Regular expressionRegular language and Regular expression
Regular language and Regular expression
 
Ch3 4 regular expression and grammar
Ch3 4 regular expression and grammarCh3 4 regular expression and grammar
Ch3 4 regular expression and grammar
 
Theory of automata
Theory of automataTheory of automata
Theory of automata
 
Chapter3pptx__2021_12_23_22_52_54.pptx
Chapter3pptx__2021_12_23_22_52_54.pptxChapter3pptx__2021_12_23_22_52_54.pptx
Chapter3pptx__2021_12_23_22_52_54.pptx
 
Specification-of-tokens
Specification-of-tokensSpecification-of-tokens
Specification-of-tokens
 
Theory of computing
Theory of computingTheory of computing
Theory of computing
 
Theory of computing
Theory of computingTheory of computing
Theory of computing
 
01 alphabets strings and languages
01 alphabets strings and languages01 alphabets strings and languages
01 alphabets strings and languages
 
Regular Expression in Compiler design
Regular Expression in Compiler designRegular Expression in Compiler design
Regular Expression in Compiler design
 
Theory of Computation Lecture Notes
Theory of Computation Lecture NotesTheory of Computation Lecture Notes
Theory of Computation Lecture Notes
 
Flat unit 2
Flat unit 2Flat unit 2
Flat unit 2
 
Flat notes iii i (1)(7-9-20)
Flat notes iii i (1)(7-9-20)Flat notes iii i (1)(7-9-20)
Flat notes iii i (1)(7-9-20)
 
Minimizing DFA
Minimizing DFAMinimizing DFA
Minimizing DFA
 
Formal language & automata theory
Formal language & automata theoryFormal language & automata theory
Formal language & automata theory
 
A195259101 22750 24_2018_grammars and languages generated by grammars
A195259101 22750 24_2018_grammars and languages generated by grammarsA195259101 22750 24_2018_grammars and languages generated by grammars
A195259101 22750 24_2018_grammars and languages generated by grammars
 
FLAT Notes
FLAT NotesFLAT Notes
FLAT Notes
 

Similaire à 1 introduction

Similaire à 1 introduction (20)

Module 1 TOC.pptx
Module 1 TOC.pptxModule 1 TOC.pptx
Module 1 TOC.pptx
 
01.ppt
01.ppt01.ppt
01.ppt
 
Unit-1-part-1.pptx
Unit-1-part-1.pptxUnit-1-part-1.pptx
Unit-1-part-1.pptx
 
01-Introduction&Languages.pdf
01-Introduction&Languages.pdf01-Introduction&Languages.pdf
01-Introduction&Languages.pdf
 
Theory of computation
Theory of computationTheory of computation
Theory of computation
 
intro.ppt
intro.pptintro.ppt
intro.ppt
 
Algorithms on Strings
Algorithms on StringsAlgorithms on Strings
Algorithms on Strings
 
A course on mathematical logic
A course on mathematical logicA course on mathematical logic
A course on mathematical logic
 
theory of computation lecture 02
theory of computation lecture 02theory of computation lecture 02
theory of computation lecture 02
 
2_2Specification of Tokens.ppt
2_2Specification of Tokens.ppt2_2Specification of Tokens.ppt
2_2Specification of Tokens.ppt
 
Lexical analyzer
Lexical analyzerLexical analyzer
Lexical analyzer
 
10651372.ppt
10651372.ppt10651372.ppt
10651372.ppt
 
L_2_apl.pptx
L_2_apl.pptxL_2_apl.pptx
L_2_apl.pptx
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
Automata
AutomataAutomata
Automata
 
Automata
AutomataAutomata
Automata
 
INFO-2950-Languages-and-Grammars.ppt
INFO-2950-Languages-and-Grammars.pptINFO-2950-Languages-and-Grammars.ppt
INFO-2950-Languages-and-Grammars.ppt
 
Resumen material MIT
Resumen material MITResumen material MIT
Resumen material MIT
 
9781284077247_PPTx_CH01.pptx
9781284077247_PPTx_CH01.pptx9781284077247_PPTx_CH01.pptx
9781284077247_PPTx_CH01.pptx
 
hghghghhghghgggggggggggggggggggggggggggggggggg
hghghghhghghgggggggggggggggggggggggggggggggggghghghghhghghgggggggggggggggggggggggggggggggggg
hghghghhghghgggggggggggggggggggggggggggggggggg
 

Plus de parmeet834

Problemes chap1 toc
Problemes chap1 tocProblemes chap1 toc
Problemes chap1 tocparmeet834
 
Nondeterministic Finite Automata
Nondeterministic Finite Automata Nondeterministic Finite Automata
Nondeterministic Finite Automata parmeet834
 
CS 162 Fall 2015 Homework 1 Problems September 29, 2015 Timothy Johnson 1. Ex...
CS 162 Fall 2015 Homework 1 Problems September 29, 2015 Timothy Johnson 1. Ex...CS 162 Fall 2015 Homework 1 Problems September 29, 2015 Timothy Johnson 1. Ex...
CS 162 Fall 2015 Homework 1 Problems September 29, 2015 Timothy Johnson 1. Ex...parmeet834
 
Introduction to the Theory of Computation, Winter 2003 A. Hevia and J. Mao S...
 Introduction to the Theory of Computation, Winter 2003 A. Hevia and J. Mao S... Introduction to the Theory of Computation, Winter 2003 A. Hevia and J. Mao S...
Introduction to the Theory of Computation, Winter 2003 A. Hevia and J. Mao S...parmeet834
 
Graph representation of DFA’s Da
Graph representation of DFA’s DaGraph representation of DFA’s Da
Graph representation of DFA’s Daparmeet834
 
Pushdown automata
Pushdown automataPushdown automata
Pushdown automataparmeet834
 
Pushdown Automata
Pushdown AutomataPushdown Automata
Pushdown Automataparmeet834
 
Assignment Theory of computation TOC
Assignment Theory of computation TOCAssignment Theory of computation TOC
Assignment Theory of computation TOCparmeet834
 
5 decidability theory of computation
5 decidability theory of computation 5 decidability theory of computation
5 decidability theory of computation parmeet834
 
Turing Machines (TM)
Turing Machines (TM)Turing Machines (TM)
Turing Machines (TM)parmeet834
 
Regular Languages
Regular LanguagesRegular Languages
Regular Languagesparmeet834
 
Finite Automata
Finite AutomataFinite Automata
Finite Automataparmeet834
 

Plus de parmeet834 (14)

DFA
DFA DFA
DFA
 
Problemes chap1 toc
Problemes chap1 tocProblemes chap1 toc
Problemes chap1 toc
 
Nondeterministic Finite Automata
Nondeterministic Finite Automata Nondeterministic Finite Automata
Nondeterministic Finite Automata
 
Hwsoln03 toc
Hwsoln03 tocHwsoln03 toc
Hwsoln03 toc
 
CS 162 Fall 2015 Homework 1 Problems September 29, 2015 Timothy Johnson 1. Ex...
CS 162 Fall 2015 Homework 1 Problems September 29, 2015 Timothy Johnson 1. Ex...CS 162 Fall 2015 Homework 1 Problems September 29, 2015 Timothy Johnson 1. Ex...
CS 162 Fall 2015 Homework 1 Problems September 29, 2015 Timothy Johnson 1. Ex...
 
Introduction to the Theory of Computation, Winter 2003 A. Hevia and J. Mao S...
 Introduction to the Theory of Computation, Winter 2003 A. Hevia and J. Mao S... Introduction to the Theory of Computation, Winter 2003 A. Hevia and J. Mao S...
Introduction to the Theory of Computation, Winter 2003 A. Hevia and J. Mao S...
 
Graph representation of DFA’s Da
Graph representation of DFA’s DaGraph representation of DFA’s Da
Graph representation of DFA’s Da
 
Pushdown automata
Pushdown automataPushdown automata
Pushdown automata
 
Pushdown Automata
Pushdown AutomataPushdown Automata
Pushdown Automata
 
Assignment Theory of computation TOC
Assignment Theory of computation TOCAssignment Theory of computation TOC
Assignment Theory of computation TOC
 
5 decidability theory of computation
5 decidability theory of computation 5 decidability theory of computation
5 decidability theory of computation
 
Turing Machines (TM)
Turing Machines (TM)Turing Machines (TM)
Turing Machines (TM)
 
Regular Languages
Regular LanguagesRegular Languages
Regular Languages
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 

Dernier

Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptxJonalynLegaspi2
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvRicaMaeCastro1
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 

Dernier (20)

Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 

1 introduction

  • 1. Introduction Why do we study Theory of Computation ?
  • 2. Outline • Importance of Theory of Computation • Languages • Languages and Problems
  • 3. What is Computation ? • Sequence of mathematical operations ? – What are, and are not, mathematical operations? • Sequence of well-defined operations – How many operations ? • The fewer, the better. – Which operations ? • The simpler, the better.
  • 4. What do we study in Theory of Computation ? • What is computable, and what is not ? • Basis of – Algorithm analysis – Complexity theory • What a computer can and cannot do • Are you trying to write a non-existing program? – Can you make your program more efficient?
  • 5. What do we study in Complexity Theory ? • What is easy, and what is difficult, to compute ? • What is easy, and what is hard for computers to do? • Is your cryptograpic scheme safe?
  • 6. Applications in Computer Science • Analysis of algorithms • Complexity Theory • Cryptography • Compilers • Circuit design
  • 7. History of Theory of Computation • 1936 Alan Turing invented the Turing machine, and proved that there exists an unsolvable problem. • 1940’s Stored-program computers were built. • 1943 McCulloch and Pitts invented finite automata. • 1956 Kleene invented regular expressions and proved the equivalence of regular expression and finite automata.
  • 8. History of Theory of Computation • 1956 Chomsky defined Chomsky hierarchy, which organized languages recognized by different automata into hierarchical classes. • 1959 Rabin and Scott introduced nondeterministic finite automata and proved its equivalence to (deterministic) finite automata. • 1950’s-1960’s More works on languages, grammars, and compilers
  • 9. History of Theory of Computation • 1965 Hartmantis and Stearns defined time complexity, and Lewis, Hartmantis and Stearns defined space complexity. • 1971 Cook showed the first NP-complete problem, the satisfiability prooblem. • 1972 Karp Showed many other NP-complete problems.
  • 10. History of Theory of Computation • 1976 Diffie and Helllman defined Modern Cryptography based on NP-complete problems. • 1978 Rivest, Shamir and Adelman proposed a public-key encryption scheme, RSA.
  • 11. Alphabet and Strings • An alphabet is a finite, non-empty set of symbols. – {0,1 } is a binary alphabet. – { A, B, …, Z, a, b, …, z } is an English alphabet. • A string over an alphabet  is a sequence of any number of symbols from . – 0, 1, 11, 00, and 01101 are strings over {0, 1 }. – Cat, CAT, and compute are strings over the English alphabet.
  • 12. Empty String • An empty string, denoted by , is a string containing no symbol. – is a string over any alphabet.
  • 13. Length • The length of a string x, denoted by length(x), is the number of positions of symbols in the string. Let Σ = {a, b, …, z} length(automata) = 8 length(computation) = 11 length(ε) = 0 • x(i), denotes the symbol in the ith position of a string x, for 1 i  length(x).
  • 14. String Operations • Concatenation • Substring • Reversal
  • 15. Concatenation • The concatenation of strings x and y, denoted by xy or x y, is a string z such that: – z(i) = x(i) for 1  i  length(x) – z(i) = y(i) for length(x)<ilength(x)+length(y) • Example – automatacomputation = automatacomputation
  • 16. Concatenation The concatenation of string x for n times, where n0, is denoted by xn – x0 =  – x1 = x – x2 = x x – x3 = x x x – …
  • 17. Substring Let x and y be strings over an alphabet Σ The string x is a substring of y if there exist strings w and z over Σ such that y = w x z. – ε is a substring of every string. – For every string x, x is a substring of x itself. Example – ε, comput and computation are substrings of computation.
  • 18. Reversal Let x be a string over an alphabet Σ The reversal of the string x, denoted by x r, is a string such that – if x is ε, then xr is ε. – If a is in Σ, y is in Σ* and x = a y, then xr = yr a.
  • 19. 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
  • 20. Σ* • 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, … }.
  • 21. Σ+ • 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.
  • 22. Languages • A language over an alphabet Σ is a set of strings over Σ. – Let Σ = {0, 1} be the alphabet. – Le = {Σ* | the number of 1’s in  is even}. – , 0, 00, 11, 000, 110, 101, 011, 0000, 1100, 1010, 1001, 0110, 0101, 0011, … are in Le
  • 23. Operations on Languages • Complementation • Union • Intersection • Concatenation • Reversal • Closure
  • 24. Complementation Let L be a language over an alphabet Σ. The complementation of L, denoted byL, is Σ*–L. Example: Let Σ = {0, 1} be the alphabet. Le = {Σ* | the number of 1’s in  is even}. Le= {Σ* | the number of 1’s in  is not even}. Le= {Σ* | the number of 1’s in  is odd}.
  • 25. Union Let L1 and L2 be languages over an alphabet Σ. The union of L1 and L2, denoted by L1L2, is {x | x is in L1 or L2}. Example: {x{0,1}*|x begins with 0}  {x{0,1}*|x ends with 0} = {x  {0,1}*| x begins or ends with 0}
  • 26. Intersection Let L1 and L2 be languages over an alphabet Σ. The intersection of L1 and L2, denoted by L1L2, is { x | x is in L1 and L2}. Example: { x{0,1}*| x begins with 0}  { x{0,1}*| x ends with 0} = { x{0,1}*| x begins and ends with 0}
  • 27. Concatenation Let L1 and L2 be languages over an alphabet Σ. The concatenation of L1 and L2, denoted by L1L2, is {w1w2| w1 is in L1 and w2 is in L2}. Example { x  {0,1}*| x begins with 0}{x  {0,1}*| x ends with 0} = { x  {0,1}*| x begins and ends with 0 and length(x)  2} { x  {0,1}*| x ends with 0}{x  {0,1}*| x begins with 0} = { x  {0,1}*| x has 00 as a substring}
  • 28. Reversal Let L be a language over an alphabet Σ. The reversal of L, denoted by Lr, is {wr| w is in L}. Example {x  {0,1}*| x begins with 0} r = {x  {0,1}*| x ends with 0} {x  {0,1}*| x has 00 as a substring} r = {x  {0,1}*| x has 00 as a substring}
  • 29. Kleene’s closure Let L be a language over an alphabet Σ. The Kleene’s closure of L, denoted by L*, is {x | for an integer n  0 x = x1 x2 … xn and x1, x2 , …, xn are in L}. That is, L* = i  = 0 Li Example: Let Σ = {0,1} and Le = {Σ* | the number of 1’s in  is even} Le* = {Σ* | the number of 1’s in  is even} (Le)* = {Σ*| the number of 1’s in  is odd}* = {Σ*| the number of 1’s in  > 0}
  • 30. Closure Let L be a language over an alphabet Σ. The closure of L, denoted by L+, is { x |for an integer n  1, x = x1x2…xn and x1, x2 , …, xn are in L} That is, L+ = i  = 1 Li Example: Let Σ = {0, 1} be the alphabet. Le = {Σ* | the number of 1’s in  is even} Le + = {Σ* | the number of 1’s in  is even} = Le*
  • 31. Observation about Closure L+ = L*  {ε} ? Example: L = {Σ* | the number of 1’s in  is even} L+ = {Σ* | the number of 1’s in  is even} = Le* Why? L* = L+  {ε} ?
  • 32. Languages and Problems • Problem – Example: What are prime numbers > 20? • Decision problem – Problem with a YES/NO answer – Example: Given a positive integer n, is n a prime number > 20? • Language – Example: {n | n is a prime number > 20} = {23, 29, 31, 37, …}
  • 33. Language Recognition and Problem • A problem is represented by a set of strings of the input whose answer for the corresponding problem is “YES”. • a string is in a language = the answer of the corresponding problem for the string is “YES” – Let “Given a positive integer n, is n a prime number > 20?” be the problem P. – If a string represents an integer i in {m | m is a prime number > 20} , then the answer for the problem P for n = i is true.
  • 35. A language is a set. 1 01 001 0001 00001 1 10 100 1000 10000 L1 L2
  • 36. And, there is also a set of languages. 1 01 001 0001 00001 L1 1 10 100 1000 10000 L2 L1 L2 A class of language