CSE596, Fall 2015 Problem Set 3 Due Fri. 10/2

advertisement
CSE596, Fall 2015
Problem Set 3
Due Fri. 10/2
Reading. For next week, read the section of chapter 2 on RAMs in connection with skimming
my “Universal RAM Simulator” handout, which will be given out in hardcopy and is also at
the bottom of https://rjlipton.wordpress.com/2014/05/03/does-program-size-matter/. Then
start on Chapter 3, but please look ahead to page 51 where diagonalization over Turing
machines and their languages is finally introduced.
The First Prelim Exam is intended for Monday, Oct. 12.
Discussion problem (A), this time worth 3 “checkoff points”—you must submit something brief and on-point in writing: Verify that for any language L, the relation
x ∼L y
meaning
(∀z ∈ Σ∗ )[L(xz) = L(yz)]
is reflexive, symmetric, and transitive, making it an equivalence relation. Letting [x] denote
the equivalence class of any string x, then say why the DFA’s transition function δ([x], c) = [xc]
is the same if some other string y ∈ [x] (that is, y such that y ∼L x) is used in place of x. This
fact makes M = (Q, Σ, δ, s, F ) “well-defined” when Q = {[x] : x ∈ Σ∗ }, F = {[x] : x ∈ L},
and s = [λ].
(1) Consider the following three languages:
1. L1 = { xay : #a(x) = #a(y) },
2. L2 = { xby : #a(x) = #a(y) },
3. L3 = { xy : #a(x) = #b(y) }.
For each Li , say whether it is regular or not. If you say “regular,” design a DFA Mi and prove
(informally) that L(Mi ) = Li . Also give a regular expression ri such that L(ri ) = Li . If you
say “non-regular,” prove that using the Myhill-Nerode Theorem. (36 pts. in all)
(2)
Design a deterministic 2-tape Turing machine M such that L(M ) = L2 from problem
(1). Be sure to give strategy and analysis comments explaining the design of your machine
and making clear that it runs in linear time. Is it a pushdown automaton (DPDA)? (30 pts.
total, for 69 on the set—including problem A)
Download