Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

7.5 Prove that each of the following problems is undecidable. Each problem receives a single program P as input. (a) EmPTYONEMPTY: Does P()= ? (b)

image text in transcribed
image text in transcribed
7.5 Prove that each of the following problems is undecidable. Each problem receives a single program P as input. (a) EmPTYONEMPTY: Does P()= ? (b) GAGAONEMPTY: Does P()= "GAGA"? (c) NoONSOME: Does P(I)= "no" for some I ? (d) YESONGAGA: Does P( "GAGA") = "yes"? (e) LONGERTHAN3ONALL: Is P(I)>3 for all P. Criteria for Success: For each of the five problems, you have a complete clear proof that the problem is undecidable. You do this by reducing a problem we already know is undecidable to the given problem. I suggest you use the "technique 2 " of writing two Python functions to perform the reduction. I reduced either yes0nString or yes0nEmpty to the given problems to show they are undecidable. Your Python functions could look something like: def alterP(inString): \#alter the program P that is input to yesOnString \# execute P(I) val = universal (rf ('progString.txt'),rf('inString.txt')) if val = "yes": return else: return def yesonStringViaNowProblem (P, I): utils.writeFile ('progString.txt', ,P) utils, writeFile ('inString,txt', ) \# use the new decision problom on your alterP program \# to answer yesonString

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Databases Concepts And Practice

Authors: Suzanne W Dietrich

1st Edition

1119827949, 9781119827948

More Books

Students also viewed these Databases questions

Question

What do Dimensions represent in OLAP Cubes?

Answered: 1 week ago