topics_apm381_w07
TRANSCRIPT
8/7/2019 topics_apm381_W07
http://slidepdf.com/reader/full/topicsapm381w07 1/4
TOPICS
APM 381—Winter 2007
Oakland University,
1. LanguagesDef: alphabet, string, language, length of a string, empty string (Λ), concatenation of strings, substring, prefix, suffix, concatenation of languages, L∗
2. Regular languages and finite automata
Def: regular language, regular expression, finite automaton (FA), δ∗ for FA, stringaccepted by FA, language accepted by FA, distinguishable strings, indistinguishablestrings
Thm: If n strings are pairwise distinguishable with respect to language L, then any FAaccepting L must have at least n states.
Thm: pal is not regular.
Thm: If two languages are regular, so is their union, intersection, difference, and theircomplements.
3. Nondeterministic FA
Def: nondeterministic FA (NFA), δ∗ for NFA, language accepted by NFA
Thm: NFA accept the same languages as FA.
Def: NFA with with Λ-transitions (NFA-Λ), Λ-closure, δ∗ for NFA-Λ, language acceptedby NFA-Λ
Alg: Find the Λ-closure of a set of states in an NFA-Λ.Thm: NFA accept the same languages as NFA-Λ.
Thm: (Kleene) A language L is regular iff L is accepted by an FA.
4. Minimal FA
Def: indistinguishable relation corresponding to language L (I L)
Thm: The indistinguishable relation is an equivalence relation.
Thm: A language L is regular iff the set of equivalence classes of the indistinguishablerelation is finite.
Alg: Given a FA, find minimal FA by finding those pairs of states that can’t be merged.5. Pumping lemma for FA
Thm: Pumping lemma
Thm: L = {aibi | i ≥ 1} is not regular.
Thm: If FA M accepts language L, the following questions can be decided using M :(a) Is L empty?(b) Is L finite?
8/7/2019 topics_apm381_W07
http://slidepdf.com/reader/full/topicsapm381w07 2/4
APM 381—Winter 2007 Topics Page 2
6. Context-free Grammars
Def: context-free grammar (CFG), derivation, transitive closure, language generatedby a CFG, context-free language (CFL)
Thm: pal is a CFL.
Thm: If two languages are CFL’s, then their union, concatenation and ∗ are CFL’s aswell.
Thm: Every regular language is a CFL.
7. Regular Grammars
Def: regular grammar
Thm: A language is regular iff it is generated by a regular grammar.
8. Derivation trees, ambiguity
Def: derivation tree, leftmost derivation, ambiguous grammar, nullable variables, unitproductions
Alg: Given a CFG, find another CFG generating the same language in which each stepof a derivation increases the length of the string except when a variable is replaced witha terminal.
Thm: The grammar obtained by this algorithm has the property that if a string x of length n can be derived, then the derivation has length at most 2n − 1.
Thm: Given a CFG and a string x, it can be decided whether x can be generated inthe grammar.
9. Pushdown automata
Def: pushdown automaton (PDA), configuration of a PDA, move of a PDA, string is
accepted by a PDA, language accepted by a PDA, deterministic PDA (DPDA), deter-ministic CFL (DCFL)
Thm: pal is not a DCFL, but it is a CFL.
Thm: A language is a CFL iff it is accepted by a PDA.
10. Pumping lemma for CFG’s
Def: path in a derivation tree, length of path, height of a tree
Thm: If a binary tree has more than 2h−1 leaves, then its height is more than h.
Thm: Pumping lemma for CFG’s
Thm: L = {aibici | i ≥ 1} and L = {ww | w ∈ {a, b}∗} are not CFL’s.
Thm: There are CFL’s whose intersection is not a CFL. There is a CFL whose com-plement is not a CFL.
Thm: The intersection of a regular language and a CFL is a CFL. The complement of a DCFL is a DCFL.
Thm: If PDA M accepts language L, the following questions can be decided using M :(a) Is x ∈ L for a given string x?(b) Is L empty?(c) Is L finite?
8/7/2019 topics_apm381_W07
http://slidepdf.com/reader/full/topicsapm381w07 3/4
APM 381—Winter 2007 Topics Page 3
11. Turing Machines
Def: Turing machine (TM), blank symbol (∆), halting states, move of a TM, configu-ration of a TM, string is accepted by a TM, language accepted by a TM
Thm: pal , L = {aibici | i ≥ 1}, L = {ww | w ∈ {a, b}∗} can be accepted by a TM.
Def: combining TM’s, output of a TM
12. Variations of TM’s
Def: TM with several tapes, nondeterministic TM (NTM)
Thm: A language accepted by a TM with several tapes can be accepted by a TM withone tape.
Thm: A language is accepted by a NTM iff it is accepted by a TM.
Thm: There is a universal TM that can simulate every TM.
13. Unrestricted grammars
Def: unrestricted grammarThm: A language can be generated by an unrestricted grammar iff it can be acceptedby a TM.
14. Recursive languages
Def: recursive language, recursively enumerable language, a TM enumerates a language
Thm: If L is recursive, it is also recursively enumerable.
Thm: If L is accepted by a TM, and every sequence of moves results in halting, thenL is recursive.
Thm: Union and intersection of recursively enumerable (resp. recursive) languages arealso recursively enumerable (resp. recursive).
Thm: The complement of a recursive language is also recursive. If a language and itscomplement are both recursively enumerable, then it is also recursive.
Thm: A language is recursively enumerable iff there is a TM that enumerates it.
Thm: A language is recursive iff there is a TM that enumerates it in a canonical order.
8/7/2019 topics_apm381_W07
http://slidepdf.com/reader/full/topicsapm381w07 4/4
APM 381—Winter 2007 Topics Page 4
15. Nonrecursive languages
Def: cardinality of a set, finite, countably infinite, countable, smaller than or equalcardinality, power set
Thm: The union of countable many countable sets is countable.
Thm: Σ∗ is countable. The set of TM’s is countable. The set of recursively enumerablelanguages is countable.
Thm: The power set has larger cardinality than the original set.
Thm: If a set is countably infinite, then its power set is uncountable.
Thm: There is a language that is not recursively enumerable.
Thm: N SA (the set of encodings of TM’s that do not accept their own encodings) isnot recursively enumerable.
Thm: SA (set of encodings of TM’s that accept their own encodings) is recursivelyenumerable but not recursive.
16.Unsolvable problems
Def: unsolvable problem, reduction of a language to another
Thm: SA is unsolvable.
Thm: Assume that language L1 can be reduced to language L2.(a) If L2 is recursive, then L1 is recursive.(b) If L1 is not recursive, then L2 is not recursive.
Thm: The halting problem is unsolvable.
Thm: The problem whether a TM accepts Λ is unsolvable.
Thm: (Rice) Let P be a nontrivial property of languages. Then the decision problem
whether the language accepted by a given TM has property P is unsolvable.17. Complexity of languages
Def: time complexity and space complexity of TM’s, f = O(g), f = o(g), f = Θ(g),growth rates, time complexity of NTM’s
Thm: Let p(n) be a polynomial of degree k, and let a > 1. Then p(n) = Θ(nk), and p(n) = o(an).
18. NP -complete problems
Def: P , NP , polynomial time reduction of languages, literal, clause, conjunctive normalform (CNF), CNF-Sat, NP -hard language, NP -complete language
Thm: Every logical expression has a CNF whose length is bounded by a function onthe number of variables.
Thm: (Cook) CNF-Sat is NP -complete
Thm: The complete subgraph problem is NP -complete.
Thm: 3-Sat is NP -complete.
Thm: The vertex cover problem is NP -complete.
Thm: The k-colorability problem is NP -complete.