{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

assign2

# assign2 - 5 L = x y | x,y ∈ 1,x n = y a Describe an...

This preview shows page 1. Sign up to view the full content.

CS 220 Winter 2011, Assignment 2, Due: February 1 1. Describe a polynomial-time algorithm to determine, given a 2NFA M and an input x , whether M accepts x (i.e., the time should be polynomial in the length of the descrption of M and x ). 2. Let L = { xyy R | x,y in { 0 , 1 } + } . (Note that x and y must be nonnull.) Describe (in English) a 2DPDA that accepts L . 3. Let L = { 0 k 1 2 k | k 1 } . Describe (in English) an efficient single tape (i.e., basic) deterministic TM accepting L . What is the time complexity of your TM (i.e., it’s running time as a function of the input length)? 4. Let L = { 1 k 2 | k 1 } . Describe an efficient single tape deterministic TM which accepts L . What is the time complexity of your TM?
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 5. L = { x # y | x,y ∈ { , 1 } + ,x n = y } . a) Describe an e±cient single-tape deterministic TM accepting L . What is the time complexity of your TM? b) Describe a single-tape nondeterministic TM accepting L whose time complexity is O ( n log n ). 6. A write-once TM is a single-tape TM that can alter the content of each tape cell at most once (including the input portion of the tape); but it can visit the cell more than once. Show any single-tape TM can be simulated by a write-once TM. [Hint: Use lots of tape.]...
View Full Document

{[ snackBarMessage ]}