# hwsoln10 - CS 341 Foundations of Computer Science II Prof...

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

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 is a regular language? Answer: No. For example, define the languages A = { 0 n 1 n | n 0 } and B = { 1 } , both over the alphabet Σ = { 0 , 1 } . Define the function f : Σ Σ as f ( w ) = braceleftBig 1 if w A, 0 if w negationslash∈ A. Observe that A is a context-free language, so it is also Turing-decidable. Thus, f is a computable function. Also, w A if and only if f ( w ) = 1 , which is true if and only if f ( w ) B . Hence, A m B . Language A is nonregular, but B is regular since it is finite. 2. Show that A TM is not mapping reducible to E TM . In other words, show that no computable function reduces A TM to E TM . (Hint: Use a proof by contradiction, and facts you already know about A TM and E TM .) Answer: Suppose for a contradiction that A TM m E TM via reduction f . This means that w A TM if and only if f ( w ) E TM , which is equivalent to saying w negationslash∈ A TM

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.

{[ 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