Toc - Google Docs
Toc - Google Docs
ealy Machine: Output depends on both the current state and the
M
input symbol.
. Ambiguous Grammar:
3
A grammar is ambiguous if a string can be generated in more
than one way (i.e., has multiple leftmost derivations or parse trees).
1 2. Ambiguity in CFG:
A CFG is ambiguous if it generates a string with more than one
derivation tree. Example: The grammar is ambiguous as the string
"aa" has multiple derivations.
1 3. Null and Unit Production in CFG and Removal of Unit
Productions:
FA: Has a unique transition for each input symbol from each
D
state.
Acceptability of a String by FA: A string is accepted by a FA if there
exists a path from the start state to an accepting state with input
symbols being consumed.
1 7. Pumping Lemma:
A theorem used to prove that certain languages are not regular by
showing that any sufficiently long string in the language can be
"pumped" (repeated) and still be in the language.
5. Regular Expression:
2
A regular expression defines patterns in strings. It uses operators
like concatenation, union, and Kleene star to describe regular
languages.
FA: Has a unique transition for each input symbol from each
D
state.
quivalence: Both DFA and NFA recognize the same class of
E
languages, i.e., regular languages.
inal Form: All rules either have two non-terminals or one terminal
F
on the right side.
Method: Minimize both DFAs and check if their states are identical.
Identity 1: , .
Identity 2: , .
Identity 3: , .
Single-Tape TM: One tape and one head for reading and writing.
DFA: Has exactly one transition for each input symbol from a state.
esult: A DFA that accepts the same language but with unique
R
transitions for each input symbol.
quivalence: Both NFA and DFA recognize the same set of regular
E
languages.
inal Form: All productions are in the form of two non-terminals or
F
a single terminal.
perations: The machine can read, write, and move the head
O
based on the input symbol and the current state.
se: TMs recognize recursively enumerable languages, which
U
include all computable functions.
Example 1: defines strings with zero or more a's followed by one b.
---
Step 3: Use the stack to simulate the derivation process of the CFG.
ingle-Tape TM: One tape and one head to read and write symbols.
S
Can simulate any algorithm.
esult: The DFA has no epsilon transitions and each state has
R
exactly one transition for each input symbol.
teps: Define the tape alphabet, transition function, and set of
S
states.
---