View
5
Download
0
Category
Preview:
Citation preview
TDDC95Introduction to the Theory of Computation
Lecture 1
Gustav NordhDepartment of Computer and Information Science
gusno@ida.liu.se
2009-08-31
Outline - Lecture 1
Objectives and MotivationContentsCourse OrganizationBasic NotionsFinite Automata
Objectives and Motivation
“Theoretical Computer Science (TCS) studies the inherentpowers and limitations of computation, that is broadly defined toinclude both current and future, man-made and naturally arisingcomputing phenomena.”
The objective of this course is to give an introduction to1 Formal Languages and Automata2 Computability3 Complexity
Objectives and Motivation
“Theoretical Computer Science (TCS) studies the inherentpowers and limitations of computation, that is broadly defined toinclude both current and future, man-made and naturally arisingcomputing phenomena.”
The objective of this course is to give an introduction to1 Formal Languages and Automata2 Computability3 Complexity
Formal Languages and Automata
What can be computed with very limited memory?
Such memory restricted devices are all around us
Many applications within CS ranging from compilerconstruction and text search to computer opponents invideo games
Formal Languages and Automata
What can be computed with very limited memory?Such memory restricted devices are all around us
Many applications within CS ranging from compilerconstruction and text search to computer opponents invideo games
Formal Languages and Automata
What can be computed with very limited memory?Such memory restricted devices are all around us
Many applications within CS ranging from compilerconstruction and text search to computer opponents invideo games
Computability
What can be computed at all?
Understanding the fundamental limits of computationincluding the limits of
and any future “computers”There are fundamental problems that cannot be solved.
Computability
What can be computed at all?Understanding the fundamental limits of computationincluding the limits of
and any future “computers”
There are fundamental problems that cannot be solved.
Computability
What can be computed at all?Understanding the fundamental limits of computationincluding the limits of
and any future “computers”There are fundamental problems that cannot be solved.
Complexity
What can be computed efficiently?
Understanding the fundamental limits of computationincluding the limits of
and any future “computers”Some problems seems to require more resources to solvethan others, for example coming up with a correct proof fora mathematical statement seems to take more time thanverifying the correctness of a proofOne of the most important open questions in all ofmathematics
Complexity
What can be computed efficiently?Understanding the fundamental limits of computationincluding the limits of
and any future “computers”
Some problems seems to require more resources to solvethan others, for example coming up with a correct proof fora mathematical statement seems to take more time thanverifying the correctness of a proofOne of the most important open questions in all ofmathematics
Complexity
What can be computed efficiently?Understanding the fundamental limits of computationincluding the limits of
and any future “computers”Some problems seems to require more resources to solvethan others, for example coming up with a correct proof fora mathematical statement seems to take more time thanverifying the correctness of a proof
One of the most important open questions in all ofmathematics
Complexity
What can be computed efficiently?Understanding the fundamental limits of computationincluding the limits of
and any future “computers”Some problems seems to require more resources to solvethan others, for example coming up with a correct proof fora mathematical statement seems to take more time thanverifying the correctness of a proofOne of the most important open questions in all ofmathematics
Contents
1 Formal Languages and Automata (6h)Finite Automata and Regular LanguagesPushdown Automata and Context-free Languages
2 Computability (3h)Turing machines and the notion of an AlgorithmProblems that cannot be solved (Undecidability)
3 Complexity (6h)Big-O notation and analysis of algorithmsTime-complexity classes, P, NPNP-completenessSpace complexity? P vs NP?
Course Organization
Course Book:Michael Sipser. Introduction to the Theory of Computation,(2nd ed.), Thomson 2006
Webpage: www.ida.liu.se/∼TDDC95LecturesProblem Solving SessionsHomeworks (1 ECTS)Exam (3 ECTS)
Course Organization: Homeworks (1 ECTS)
Two batches of obligatory homework (HW1 posted on web,deadline September 18)The grade is pass/fail and to pass (and get your 1 ECTS)you need to pass both batchesTo pass a batch of homeworks you need to make a realeffort on every problem and solve more than 2/3 of theproblems correctlyIf you fail, you will have to wait and do the homeworks fornext years courseYou need to sign up in webreg so that I can report yourgrade (follow the link on the homepage)
Course Organization: Homeworks (1 ECTS)
Collaboration policy: “General discussions about the homeworkproblems is allowed (and encouraged). However, you mustwrite up your own solutions separately. If your solution isheavily inspired by someone else’s ideas, please give propercredit in your write-up to the people with whom you worked. Ifyou consult any reference material other than the textbook,please note on your homework which sources you used foreach problem. You MUST understand all the solutions in yourwrite-up and be prepared to explain them to me!”
Course Organization: Exam (3 ECTS)
Written exam: 2009-10-20 (2010-01-12, Aug 2010, Oct2010, Jan 2011,...)The grades are fail/3/4/5 and will be your final grade for thecourse
Basic Notions: Strings and Languages
An alphabet is a finite set of symbols (denoted Σ, Γ)A string over Σ is a finite sequence of symbols from Σ
Example
1010 is a string over Σ1 = {0, 1}theory is a string over Σ2 = {a, b, c, . . . , z}
Basic Notions: Strings and Languages
An alphabet is a finite set of symbols (denoted Σ, Γ)A string over Σ is a finite sequence of symbols from Σ
Example
1010 is a string over Σ1 = {0, 1}theory is a string over Σ2 = {a, b, c, . . . , z}
Basic Notions: Strings and Languages
An alphabet is a finite set of symbols (denoted Σ, Γ)A string over Σ is a finite sequence of symbols from Σ
Example
1010 is a string over Σ1 = {0, 1}theory is a string over Σ2 = {a, b, c, . . . , z}
Basic Notions: Strings and Languages
An alphabet is a finite set of symbols (denoted Σ, Γ)A string over Σ is a finite sequence of symbols from Σ
Example
1010 is a string over Σ1 = {0, 1}theory is a string over Σ2 = {a, b, c, . . . , z}
The length of a string w (denoted |w |) is the number ofsymbols it contains. |1010| = 4, |theory | = 6The empty string (denoted ε) is the string of length 0The concatenation of strings x and y is written xy .x = slum and y = dog gives xy = slumdog.xk denotes the concatenation of x with itself k times.0150 = 0111110, x2y = slumslumdog.
Basic Notions: Strings and Languages
A language is a set of strings over an alphabetΣ∗ is the language consisting of all strings over Σ
Union and intersection: A ∪ B = {x | x ∈ A or x ∈ B},A ∩ B = {x | x ∈ A and x ∈ B}Complement: A = {x ∈ Σ∗ | x /∈ A}Concatenation: AB = {xy | x ∈ A and y ∈ B}Ak denotes the concatenation of A with itself k times(note: A0 = {ε})Star: A∗ = A0 ∪ A1 ∪ A2 ∪ . . .
Basic Notions: Strings and Languages
A language is a set of strings over an alphabetΣ∗ is the language consisting of all strings over Σ
Union and intersection: A ∪ B = {x | x ∈ A or x ∈ B},A ∩ B = {x | x ∈ A and x ∈ B}Complement: A = {x ∈ Σ∗ | x /∈ A}Concatenation: AB = {xy | x ∈ A and y ∈ B}
Ak denotes the concatenation of A with itself k times(note: A0 = {ε})Star: A∗ = A0 ∪ A1 ∪ A2 ∪ . . .
Basic Notions: Strings and Languages
A language is a set of strings over an alphabetΣ∗ is the language consisting of all strings over Σ
Union and intersection: A ∪ B = {x | x ∈ A or x ∈ B},A ∩ B = {x | x ∈ A and x ∈ B}Complement: A = {x ∈ Σ∗ | x /∈ A}Concatenation: AB = {xy | x ∈ A and y ∈ B}Ak denotes the concatenation of A with itself k times(note: A0 = {ε})Star: A∗ = A0 ∪ A1 ∪ A2 ∪ . . .
Examples of Languages
the set of odd binary numbersthe set of prime numbersthe set of syntactically correct Java programsthe set of positive integer solutions to xn + yn = zn forn > 2the set of true mathematical statements
Examples of Languages
the set of odd binary numbersthe set of prime numbersthe set of syntactically correct Java programsthe set of positive integer solutions to xn + yn = zn forn > 2the set of true mathematical statements
Recommended