Questions: Rice's Theorem: Deciding Properties of Programs

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A software company wants to build a tool to automatically verify whether any submitted program correctly implements a given algorithm specification. What does Rice's theorem say about this goal?

AThis is a syntactic property (checking code structure against a spec), so such tools are fully decidable with sufficient engineering
BThis is a semantic property — 'does this program compute function f?' — and since it is non-trivial, Rice's theorem applies and it is undecidable for arbitrary programs
CRice's theorem does not apply here because the tool only checks finite programs submitted by users, not arbitrary Turing machines
DThis is decidable because modern compilers can trace all execution paths through any finite program
Question 2 Multiple Choice

Which of the following properties of Turing machines is decidable?

AThis machine halts on every possible input
BThis machine computes the squaring function (outputs n² on input n for all n)
CThis machine's description contains exactly 47 states
DThis machine ever outputs the string '42' on any input
Question 3 True / False

Rice's theorem implies that most questions about program behavior are undecidable, which means static analysis tools like type checkers and linters are fundamentally useless.

TTrue
FFalse
Question 4 True / False

The property 'Does this Turing machine accept any input at all?' is a semantic, non-trivial property to which Rice's theorem applies, making it undecidable.

TTrue
FFalse
Question 5 Short Answer

Explain the distinction between semantic and syntactic properties of Turing machines, and why correctly classifying a property is the critical first step in applying Rice's theorem.

Think about your answer, then reveal below.