Theory of Computation Introduction: Dr. Abdulhussein M. Abdullah

T
h
e
o
r
y
 
o
f
 
C
o
m
p
u
t
a
t
i
o
n
Introduction
2
nd
  Semester  2017-2018
Dr. Abdulhussein M. Abdullah
Lec #1
 
ا
لا
م‍
‍ت‍
‍ح‍
‍ا
ن
 
ا
لا
و
ل
 
:
 
ا
لا
ر
ب‍
‍ع‍
‍ا
ء
 
2
5
/
4
/
2
0
1
8
ا
لا
م‍
‍ت‍
‍ح‍
‍ا
ن
 
ا
ل‍
‍ث‍
‍ا
ن‍
‍ي
 
:
 
ا
لا
ر
ب‍
‍ع‍
‍ا
ء
 
2
3
/
5
/
2
0
1
8
ا
ل‍
‍د
ر
ج‍
‍ا
ت
 
 
 
3
0
 
د
ر
ج‍
‍ة
 
(
ا
م‍
‍ت‍
‍ح‍
‍ا
ن
1
 
+
 
ا
م‍
‍ت‍
‍ح‍
‍ا
ن
2
)
 
 
 
2
0
 
د
ر
ج‍
‍ة
 
و
ا
ج‍
‍ب‍
‍ا
ت
 
ب‍
‍ي‍
‍ت‍
‍ي‍
‍ة
 
+
 
q
u
i
z
e
s
ا
لا
م‍
‍ت‍
‍ح‍
‍ا
ن‍
‍ا
ت
 
ا
ل‍
‍ي‍
‍و
م‍
‍ي‍
‍ة
 
م‍
‍ف‍
‍ا
ج‍
‍ئ‍
‍ة
 
و
 
ت‍
‍ك‍
‍و
ن
 
ب‍
‍م‍
‍ح‍
‍ا
ض‍
‍ر
ا
ت
 
ا
لا
س‍
‍ب‍
‍و
ع
ا
ل‍
‍م‍
‍ا
ضي
.
ع‍
‍ن‍
‍د
 
ح‍
‍ص‍
‍و
ل
 
غ‍
‍ش
 
ف‍
‍ي
 
ا
ل‍
‍و
ا
ج‍
‍ب‍
‍ا
ت
 
ا
ل‍
‍ب‍
‍ي‍
‍ت‍
‍ي‍
‍ة
 
ت‍
‍ح‍
‍س‍
‍ب
 
0
 
 
م‍
‍ن
 
2
0
.
ي‍
‍م‍
‍ك‍
‍ن
 
ل‍
‍ل‍
‍ط‍
‍ا
ل‍
‍ب
 
م‍
‍غ‍
‍ا
د
ر
ة
 
ا
ل‍
‍ق‍
‍ا
ع‍
‍ة
 
و
ا
ل‍
‍ع‍
‍و
د
ة
 
ل‍
‍ه‍
‍ا
 
ب‍
‍د
و
ن
 
ا
خ‍
‍ذ
 
ا
ذ
ن
 
م‍
‍ن‍
‍ي
.
Textbook
 
What can be computed
?
 (
Computing models and computability
)
 
 
What can be computed efficiently
?
     (
Complexity
)
 
 
How can we build practical computing devices
and systems
?
     (
Architectures and Systems
)
 
T
h
r
e
e
 
f
u
n
d
a
m
e
n
t
a
l
 
q
u
e
s
t
i
o
n
s
 
Objective
 
Make a theory out of the idea of computation.
 
What is “computation”?
 
“Processing of information based on a finite set of
operations or rules.”
 
• Paper + Pencil Arithmetic
 
 
 
• Abacus
• Calculator w/moving parts (Babbage wheels, Mark I)
• Ruler & compass geometry constructions
• Digital Computers
 
What do we want in a “theory”?
 
Generality
• Technology-independent
• Abstraction: ignores inessential details
Precision
• Mathematical, formal.
• Can prove theorems about computation, both
positive (what can be computed) and negative
(what cannot be computed).
 
R
e
p
r
e
s
e
n
t
i
n
g
 
I
n
f
o
r
m
a
t
i
o
n
 
• Alphabet
Ex: a, b, c, . . . , z.
• Strings: finite concatenation of alphabet
symbols, order matters
Ex: qaz, abbab
ɛ
 = empty string (length 0; sometimes e)
• Inputs (& outputs) of computations are strings.
 
Computational Problems (i.e. Tasks)
 
A single question that has infinitely many
different instances
 
• given a string x, does it have an even number of
a’s?
• given a string x, does it have more a’s than b’s?
 
Examples of computational problems on
numbers
 
• ADDITION: given two numbers x, y, compute
                        x + y.
 
• PRIMALITY: given a number x, is x prime?
Examples of computational problems 
about computer programs
 
• SYNTACTICALLY CORRECT C PROGRAM: given a
string of ASCII symbols, does it follow the syntax
rules for the C programming language?
 
• HALTING PROBLEM: given a computer
program (say in C), can it ever get stuck in an
infinite loop?
C
h
a
r
a
c
t
e
r
i
s
t
i
c
s
 
o
f
 
c
o
m
p
u
t
a
t
i
o
n
a
l
 
p
r
o
b
l
e
m
s
 
 
Discreteness
     “State of the system” can be represented as a
finite amount of information”
Abstraction
      “Irrelevant details” can be ignored
Generality
      A single mathematical model applies to many
devices
The (Mathematical) Idea of a Language
 
Underlying Principle
: Whatever can be
computed can be written down
Alphabet
Ex: a, b, c, . . . , z.
Strings
: finite concatenation of alphabet
symbols, order matters
Ex: qaz, abbab
Language
: any set of strings
 
Computation
 
means
solving problems through the
mechanical, preprogrammed execution
of a series of small, unambiguous steps
.
What is computing?
 
First Definition
         “Computing a yes/no answer”
 
              means
 
           “Determining if a string is in a language”
T
h
e
o
r
y
 
o
f
 
c
o
m
p
u
t
a
t
i
o
n
 
is the branch that deals with how
efficiently problems can be solved on a
model of computation, using an
algorithm.
 
 
model of computation
 is
an 
abstract
 device used to perform
computation.
 
model of computation 
 is
the 
definition
 of the set of allowable
operations used in 
computation
 and
their respective costs.
Three Basic Concepts
 
1. languages
 
2. grammars
 
3. automata
Language Concepts
 
An 
alphabet
, denoted by 
 , is a finite,
nonempty set of symbols.
A 
string
 
is a finite sequence of symbols from
the alphabet.
 
 
Powers of  an alphabet, 
A
k
, is the set of strings
of length k with symbols from A.
           Alphabet:      A = {0, 1}
                                A
0
 = { }
                                A
1
 = {0, 1}
                                A
2
 = {00,01, 10, 11}
 
 
The empty language 
ɸ
.
 
The language 
{ɛ}
 consisting of the empty
string.
 
      ɸ 
 {ɛ}
Grammar Concepts
 
A 
grammar 
G 
is a quadruple 
G 
= (
V, T, S, P
)
where:
 
V
 
is a finite set of objects called 
variables
.
T
 
is a finite set of objects called 
terminal symbols
.
S
 
ϵ
 
V 
is a special symbol called the 
start symbol
.
P
 
is a finite set of 
productions
.
V
 
and 
T 
are nonempty and disjoint.
 
Productions 
have form 
x 
y 
where:
x 
ϵ
 (
V 
T
)⁺, i.e., 
x 
is some non-null string of
terminals and variables.
y 
ϵ
 (
V 
 
T
)*, i.e., 
y 
is some, possibly null, string of
terminals and variables.
w
1                   
w
n     
means that 
w
1
  
derives 
w
n
      
in zero or
     more production steps.
 
Mathematical abstractions (models)
    can be used to represent real systems
Formal reasoning can improve our
    ability to describe, design and build systems
> 
Precisely define requirements
>
Uncover design flaws
> 
Produce rational implementations
Different models and logics have different
strengths and weaknesses
  
The End
Slide Note
Embed
Share

Delve into the theory of computation with Dr. Abdulhussein M. Abdullah in the 2nd semester of 2017-2018. Explore the fundamental questions regarding what can be computed, computational problems, and the representation of information. Gain insights into computational models and computability, complexity, and practical computing devices and systems through this comprehensive introductory lecture.

  • Theory of Computation
  • Dr. Abdulhussein M. Abdullah
  • Computational Models
  • Computability
  • Complexity

Uploaded on Oct 08, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Theory of Computation Introduction 2ndSemester 2017-2018 Dr. Abdulhussein M. Abdullah Lec #1

  2. : : 25/4/2018 23/5/2018 2 ) quizes 1 + ( 30 20 + . . . 20 0

  3. Textbook

  4. Three fundamental questions What can be computed? (Computing models and computability) What can be computed efficiently? (Complexity) How can we build practical computing devices and systems? (Architectures and Systems)

  5. Objective Make a theory out of the idea of computation.

  6. What is computation? Processing of information based on a finite set of operations or rules. Paper + Pencil Arithmetic Abacus Calculator w/moving parts (Babbage wheels, Mark I) Ruler & compass geometry constructions Digital Computers

  7. What do we want in a theory? Generality Technology-independent Abstraction: ignores inessential details Precision Mathematical, formal. Can prove theorems about computation, both positive (what can be computed) and negative (what cannot be computed).

  8. Representing Information Alphabet Ex: a, b, c, . . . , z. Strings: finite concatenation of alphabet symbols, order matters Ex: qaz, abbab = empty string (length 0; sometimes e) Inputs (& outputs) of computations are strings.

  9. Computational Problems (i.e. Tasks) A single question that has infinitely many different instances given a string x, does it have an even number of a s? given a string x, does it have more a s than b s?

  10. Examples of computational problems on numbers ADDITION: given two numbers x, y, compute x + y. PRIMALITY: given a number x, is x prime?

  11. Examples of computational problems about computer programs SYNTACTICALLY CORRECT C PROGRAM: given a string of ASCII symbols, does it follow the syntax rules for the C programming language? HALTING PROBLEM: given a computer program (say in C), can it ever get stuck in an infinite loop?

  12. Characteristics of computational problems Discreteness State of the system can be represented as a finite amount of information Abstraction Irrelevant details can be ignored Generality A single mathematical model applies to many devices

  13. The (Mathematical) Idea of a Language Underlying Principle: Whatever can be computed can be written down Alphabet Ex: a, b, c, . . . , z. Strings: finite concatenation of alphabet symbols, order matters Ex: qaz, abbab Language: any set of strings

  14. Computation means solving problems through the mechanical, preprogrammed execution of a series of small, unambiguous steps.

  15. What is computing? First Definition Computing a yes/no answer means Determining if a string is in a language

  16. Theory of computation is the branch that deals with how efficiently problems can be solved on a model of computation, using an algorithm.

  17. A model of computation is an abstract device used to perform computation. A model of computation is the definition of the set of allowable operations used in computation and their respective costs.

  18. Three Basic Concepts 1. languages 2. grammars 3. automata

  19. Language Concepts An alphabet, denoted by , is a finite, nonempty set of symbols. A string is a finite sequence of symbols from the alphabet.

  20. Powers of an alphabet, Ak, is the set of strings of length k with symbols from A. Alphabet: A = {0, 1} A0= { } A1= {0, 1} A2= {00,01, 10, 11}

  21. The set of all strings over A is denoted A* A language L over an alphabet A is a subset of A*. That is, L A*. Examples: The set of legal English words. The set of legal C programs. The set of strings consisting of n 0's followed by n 1's. {01, 0011, 000111, }

  22. The empty language . The language { } consisting of the empty string. { }

  23. Grammar Concepts A grammar G is a quadruple G = (V, T, S, P) where: V is a finite set of objects called variables. T is a finite set of objects called terminal symbols. S V is a special symbol called the start symbol. P is a finite set of productions. V and T are nonempty and disjoint.

  24. Productions have form x y where: x (V T) , i.e., x is some non-null string of terminals and variables. y (V T)*, i.e., y is some, possibly null, string of terminals and variables. w1 wn means that w1derives wn in zero or more production steps.

  25. Mathematical abstractions (models) can be used to represent real systems Formal reasoning can improve our ability to describe, design and build systems > Precisely define requirements >Uncover design flaws > Produce rational implementations Different models and logics have different strengths and weaknesses

  26. The End

Related


More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#