CS Atlas GATE 2027
TOC course
0 / 91 complete

TOC/Phase 5 · Undecidability

Chapter review L5.2 · Item 79 of 91

Countability, diagonalization and halting

Read at your own pace. Try the questions before opening the answers.

On this page

Chapter recap

TMs (and so RE languages) are countable; languages are uncountable (Cantor), so non-RE languages exist. Diagonalizing against TMs gives L_d = {wᵢ : wᵢ ∉ L(Mᵢ)}, not RE. A_TM and HALT_TM are RE but undecidable (self-reference); their complements are not RE. Recursive = RE ∩ co-RE.

Practice questions

  1. MCQ

    The set of RE languages is:

    1. finite
    2. countable
    3. uncountable
    4. equal to all languages
  2. MSQ

    Which are not RE?

    1. L_d
    2. complement of A_TM
    3. complement of HALT_TM
    4. HALT_TM
  3. MCQ

    A_TM is:

    1. recursive
    2. RE but not recursive
    3. not RE
    4. context-free
  4. MCQ

    Which is uncountable?

    1. set of all DFAs
    2. set of all CFGs
    3. set of all languages over {0,1}
    4. {0,1}*
  5. MSQ

    Which statements are true?

    1. If L is RE and co-RE then L is recursive
    2. HALT_TM is co-RE
    3. L_d is co-RE
    4. Every co-RE language is RE
  6. MCQ

    The halting problem proof uses:

    1. pumping
    2. diagonalization / self-reference
    3. CYK
    4. subset construction

Answer key

Reveal answers when you’re ready
  1. B — One per TM at most.
    • A: Infinite.
    • C: Countable.
    • D: No.
  2. ABC — Complements of RE-undecidable languages.
    • D: RE.
  3. B — Universal TM recognizes it; diagonal argument.
    • A: No.
    • C: No.
    • D: No.
  4. C — P(Σ*).
    • A: Countable.
    • B: Countable.
    • D: Countable.
  5. AC — L̅_d is RE.
    • B: HALT_TM is RE but not co-RE (its complement is not RE).
    • D: L_d is co-RE but not RE.
  6. B — D runs on its own code.
    • A: No.
    • C: No.
    • D: No.

Ready for the next idea?

Mark this item complete when you’ve finished reading and working through it.