COMPUTABILITY AND COMPLEXITY, 2020 FALL SEMESTER
Lec 01. Finite-state automata Eunjung Kim F UNDAMENTAL QUESTIONS FOR - - PowerPoint PPT Presentation
Lec 01. Finite-state automata Eunjung Kim F UNDAMENTAL QUESTIONS FOR - - PowerPoint PPT Presentation
C OMPUTABILITY AND C OMPLEXITY , 2020 F ALL SEMESTER Lec 01. Finite-state automata Eunjung Kim F UNDAMENTAL QUESTIONS FOR CS What do we mean by "computation"? "Computation is to solve a problem by an effective manner."
FUNDAMENTAL QUESTIONS FOR CS
What do we mean by "computation"? "Computation is to solve a problem by an effective manner." Vague.
COMPUTABILITY & COMPLEXITY
1 / 16
FUNDAMENTAL QUESTIONS FOR CS
What do we mean by "computation"? "Computation is to solve a problem by an effective manner." Vague. What is a computer? What can it do and cannot?
COMPUTABILITY & COMPLEXITY
1 / 16
FUNDAMENTAL QUESTIONS FOR CS
What do we mean by "computation"? "Computation is to solve a problem by an effective manner." Vague. What is a computer? What can it do and cannot? Can anyone on earth devise a fundamentally more powerful computer? (An alien? In another universe?)
COMPUTABILITY & COMPLEXITY
1 / 16
COMPUTATION: WHAT AND HOW
Any well-formulated information can be represented as a string of 0 and 1, or any finite alphabet Σ. The object for computation can be stated as a function.
COMPUTE WHAT
computational problem ⇔ compute a function f : {0, 1}∗ → {0, 1}∗.
COMPUTABILITY & COMPLEXITY
2 / 16
COMPUTATION: WHAT AND HOW
Compute HOW Let us agree: "computing a function f" means "there is an effective methodalgorithm which outputs f(x) for each input x". The concept of "algorithm" is still vague.
COMPUTABILITY & COMPLEXITY
3 / 16
COMPUTATION: WHAT AND HOW
What do we expect for an algorithm, intuitively? a finite number of finitely describable instructions. each instruction and what to do next are unambiguous. all the basic operation should be executable by the concerned executor. terminates at some point (i.e. in finite number of steps)
TOWARD A RIGOROUS NOTION OF ALGORITHM
A mathematically rigorous description of an executor (computing device/machine...) and instructions is needed.
COMPUTABILITY & COMPLEXITY
4 / 16
MODEL OF COMPUTATION
Exercutor(machine) constituents: an alphabet Σ it recognizes, a gadget to read an input x ∈ Σ∗, a finite set of states to recognize its status ("where am I?"), memory to write and read later. Basic operation: read one alphabet from input tape (or from memory), update its internal state, move the header (only in one fixed direction, or both direction, or neither) on input tape or memory, write/change on memory tape.
COMPUTABILITY & COMPLEXITY
5 / 16
SET-UP
Concatenation xy of x and y. Cartesian product A × B Notations: Σ, Σi, ǫ, Σ∗. Computing a function f : Σ∗ → Γ∗ means ... Special function f : Σ∗ → {0, 1} language. Language: a subset A of Σ∗, indicator function fA. Computing fA ⇔ membership test for A
COMPUTABILITY & COMPLEXITY
6 / 16
FINITE (STATE) AUTOMATA
Example: vending machine Model of computation mimicking a simple computing device no/limited memory, basic operations: read one symbol from the input, update the state, and move to the next position in input.
COMPUTABILITY & COMPLEXITY
7 / 16
STATE DIAGRAM
Figure 1.4, Sipser 2012.
STRINGS ACCEPTED BY M
The set of all w ∈ {0, 1}∗ such that...
COMPUTABILITY & COMPLEXITY
8 / 16
FORMAL DEFINITION
A FINITE AUTOMATA IS A 5-TUPLE (Q, Σ,δ, q0, F)
Q a finite set called the states, Σ a finite set called the alphabet,
δ a function from Q × Σ to Q called the transition function,
q0 ∈ Q the start state, F ⊆ Q the set of accept states.
Figure 1.4, Sipser 2012.
COMPUTABILITY & COMPLEXITY
9 / 16
LANGUAGE RECOGNIZED BY FA
DEFINITION
Let M be a finite automata. A string w ∈ Σ∗ is accepted by a finite automata M if M ends in an accept state upon w. L(M) denotes the set of all strings accepted by M. A language A is said to be recognized by M if A = L(M).
COMPUTABILITY & COMPLEXITY
10 / 16
EXAMPLES OF FINITE AUTOMATA
Figure 1.7, 9, 12 from Sipser 2012.
COMPUTABILITY & COMPLEXITY
11 / 16
FORMAL DEFINITION OF COMPUTATION
Configuration of a finite automata M = (Q, Σ,δ, q0, F) is a pair (q, w) ∈ Q × Σ∗. We interpret a configuration (q, w) as... (q, w) M (q′, w′) if... A sequence of configuration is a computation history if... (q, w) ∗
M (q′, w′) if there is...
A sequence of configurations is an accepting computation history if...
COMPUTABILITY & COMPLEXITY
12 / 16
LANGUAGE RECOGNIZED BY FA
REVISITED
DEFINITION: LANGUAGE RECOGNIZED BY FA
Let M be a finite automata. A string w ∈ Σ∗ is accepted by a finite automata M if M ends in an accept state upon w: using the formal notation, if there is an accepting computation history starting from (q0, w) ending in (q, ǫ) for some q ∈ F. L(M) denotes the set of all strings accepted by M. A language A is said to be recognized by M if A = L(M).
COMPUTABILITY & COMPLEXITY
13 / 16
REGULAR OPERATIONS
FIVE OPERATIONS
Languages A, B over an alphabet Σ, we define the following opera- tions. Union: A ∪ B = {w : w ∈ A or w ∈ B}. Concatenation: A ◦ B = {xy : x ∈ A, y ∈ B}. Kleene star: A∗ =
k≥0{w1w2 · · · wk : wi ∈ A}.
Complementation: ¯ A = {w ∈ Σ∗ : w / ∈ A}. Intersection: A ∩ B = {w : w ∈ A and w ∈ B}.
COMPUTABILITY & COMPLEXITY
14 / 16
CLOSURE UNDER OPERATIONS
THEOREM
The class of all languages recognizable by FA is closed under the union operation (concatenation, Kleene star, complementation, inter- section).
COMPUTABILITY & COMPLEXITY
15 / 16
REFERENCE
Lots of interesting chronicle and discussion on the search for definition of algorithm/computation can be found online, for example, here, here.
COMPUTABILITY & COMPLEXITY
16 / 16