Module04Worksheet - What is the resulting language L 4(S22...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Module 4 Worksheet In Class Questions 1) (S4) Decision sorting: Input: list of integers Yes/ No Question: is the list in nondecreasing order? For the decision sorting problem, specify the following sets Universe of legal input instances: Set of yes input instances: Set of no input instances: 2) (S7) Specify the language recognition problem for L = the set of even length strings over {a,b} using both formats (traditional, 3 sets). Input: Yes/No question: Universe of legal input instances: Set of yes input instances: Set of no input instances: 3) (S9) Define an encoding scheme E for converting the following problem into a language recognition problem over alphabet {a}. Input: Non-negative integer n Yes/No question: Is n a prime number? What would E(4) be under your scheme?
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: What is the resulting language L? 4) (S22) Which is true? a) A problem is solvable implies the problem is half-solvable. b) A problem is half-solvable implies the problem is solvable. Take home review questions 1) What is the type of an input instance in a language recognition problem? 2) Give both formulations (Input & Y/N question, 3 sets) of the LRP corresponding to the language L = the set of strings beginning with aaa over {a,b}. 3) What are Y(P), N(P), C(P), and I(P) for the following program? bool main(string x) { if ((x.length( ) % 2) = = 0) return (yes); else return(no); } Y(P) = N(P) = C(P) = I(P) = 4) For any program P that takes as input a string, can P ever solve a language other than Y(P)?...
View Full Document

This note was uploaded on 07/25/2008 for the course CSE 460 taught by Professor Torng during the Fall '07 term at Michigan State University.

Page1 / 2

Module04Worksheet - What is the resulting language L 4(S22...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online