4 déc 2012 · Answer: If A ≤m B and B is regular, it does NOT necessarily imply that A is also regular This is because the reduction function can be more than the “power” of a DFA In fact, reduction functions are re- quired only to halt on all inputs but can be perform very sophisticated computations
HW Solutions
If A ≤m B and B is a regular language, does that imply that A is a regular language? Answer: Suppose for a contradiction that ATM ≤m ETM via reduction f
hwsoln
Answer: Language B is NP-hard if for every language A ∈ NP, we have A ≤P B (b) Give the transition functions δ of a DFA, NFA, PDA, Turing machine and
practice final soln
b We construct a NTM M' that decides the concatenation of L1 and L2: If A ≤m B and B is a regular language, does that imply that A is a regular language? We refer to the two languages as A and B, and TM MA and MB are the Non-
hw ans
If M does not halt and does not go beyond 2r squares, M∗ rejects 2 If A ≤m B and B is a regular language, does that imply that A is a regular language? NO
final review sp sol
If there is a mapping reduction from language A to language B, we TM for language B Machine R YES NO Compute f f(w) w Machine H A ≤ M B H = “ On input w This means that some TMs accept regular languages and some TMs do
Small
of properties of Turing machine behavior (or program B ⊆ Σ 2 * be languages Then A is mapping-reducible to B, A ≤ m accepts a regular language
MIT JS lec
technique of mapping reducibilities for prove that languages are Does a TM accept a regular language? Theorem: If A ≤mB and B is decidable, then A is
Compute
Most modern implementations of regular expression engines allow the use of variables (also there is a β ∈ RegEx(l) with L(β) = L(α) and c(β) ≤ fc(c(α)) If no
Let f be a reduction from A to B and let MB be a Turing Machine recognizing B Then the Turing Corollary 6 If A ≤m B and A is undecidable, then B is undecidable 2 The language REGULAR = {M L(M) is regular} is undecidable Proof
notes
CS 341: Foundations of Computer Science II. Prof. Marvin Nakayama. Homework 10 Solutions. 1. If A ?m B and B is a regular language does that imply that A
4 déc. 2012 regular expression are equivalent) as the following language: ... Finally M1 accepts ?A? if M accepts ?A
b. We construct a NTM M' that decides the concatenation of L1 and L2: If A ?m B and B is a regular language does that imply that A is a regular ...
Answer: A language is regular if and only if it has a regular expression. Language A is polynomial-time mapping reducible to language B A ?P B.
then I can't solve B. ? Equivalently if A is undecidable
That is if a language satisfies the pumping lemma
such that L(MA) = A and L(MB) = B. We will make use of these DFAs as we prove that the languages A ? B AB
(In each case a fixed alphabet. ? is assumed.) (a) Every subset of a regular language is regular. (b) Let L? = L1 ? L2. If
Any finite set of strings is a regular language as we can easily construct an NFA Suppose MA is a PDA recognizing A and MB a DFA recognizing B. To show.
We then de?ne the shu?e of two languages A and B as S(AB) = {w? u ? Av ? B s t w is a shu?e of u and v} Show that if A and B are regular languages over a common alphabet ? then so is S(AB) [20 points] Solution: Let M A = (Q A?? Aq 0AF A) and M B = (Q B?? Bq 0BF B) be two DFAs accepting the languages A and B
m B and B is a regular language does that imply that A is a regular language? Answer: No For example de ne the languages A = f0n1n jn 0gand B = f1g both over the alphabet = f0;1g De ne the function f : ! as f(w) = n 1 if w 2A; 0 if w 62A: Observe that A is a context-free language so it is also Turing-decidable Thus f is a computable
accept so MA accepts b) If x ? A then x is a DFA which accept some string containing an odd number of 1’s Then L(F) = L(x) ? L(G) ? ? Therefor TM T on input rejects so MA rejects From a) and b) above we have shown that MA decides A 5 4 If A ?m B and B is a regular language does that imply that A is a regular language
In problem 1(b) we constructed a DFA that recognizes the language that contains only the empty string and thus this language is regular Induction: Let L be a language that recognizes a single string w over ? We can rewrite w =w 1w 2 w n such that w i ?? for all i Suppose that a DFA M ={Q??q 0F } exists that recognizes L ={w =w
If L and M are regular languages then so is L – M = strings in L but not M Proof: Let A and B be DFA’s whose languages are L and M respectively Construct C the product automaton of A and B Make the final states of C be the pairs where A-state is final but B-state is not
The regular expression (a + b)* represents the following regular language: L((a + b)*)= (L(a + b))* = {a b}* the set of all possible strings over {a b} Back to the Problem: Suppose the input strings to a program must be strings over the alphabet {a b} that contain exactly one substring bb In other words the strings must be of
What is you language L = A N B M?
What is you language L = {a n b m | n,m = 0,1,2,..., n