Language & Computation Flashcards
TW3V19002 UU (196 cards)
Formal automata
Models with step by step computation.
Formal grammars
Recipes to create patterns and sentences.
List the four language types from Chomsky’s hierarchy from simplest to most complicated:
- Regular
- Context-free
- Context-sensitive
- Recursively enumerable
List the four automata from Chomsky’s hierachy from simplest to most complicated:
- Finite state
- Pushdown
- Linearly bounded
- Turing machine
Describe the language and automaton of the type 3 grammar in Chomsky’s hiearchy:
Type 3 grammar has a regular language and a finite state automaton.
Describe the language and automaton of the type 2 grammar in Chomsky’s hiearchy:
Type 2 grammar has a context-free language and a pushdown automaton.
Describe the language and automaton of the type 1 grammar in Chomsky’s hiearchy:
Type 1 grammar has a context-sensitive language and a linearly bounded automaton.
Describe the language and automaton of the type 0 grammar in Chomsky’s hiearchy:
Type 0 grammar has a recursively enumerable language and a turing machine.
What is the trade-off found in Chomsky’s hierarchy concerned with?
Expressivity and complexity.
Greater expressivity requires…
greater complexity.
What does a(n English) syllable consist of?
The onset, the nucleus and the coda.
Concatenation
One symbol after another that form a sequence.
In what three ways can you make combinations in the formal grammar RegEx?
- Concatenation
- Choice
- Repetition
FSA
finite state automaton
What is the problem for finite automata on palindroms?
The computational power is not enough, it does not have any memory.
How is the stack of a pushdown automaton organized?
First In, Last Out
FILO
first in, last out
PDA
Pushdown automaton
Which grammar types have polynomial complexity?
Type 3 and type 2.
FA
finite automaton
The program (in FA/FSA)
The finite set of instructions for changing from state to state while reading.
Deterministic FA
FAs where there is only one instruction for each combination of state and read symbol.
State diagram
A representation for an FA in which each state is a circle and the instructions are arrows.
Give the formal definition of a deterministic FA:
A deterministic FA M is a quintuple [K, Sigma, delta, q0, F] with
K = finite set of states,
Sigma = finite set (the alphabet),
Q0 E K = the initial state,
F [subset] K = set of final states,
delta = f: K x Sigma -> K (the transition function).