Module04Worksheet

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

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

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?

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

View Full Document
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

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern