CS 454, Section 001 Sonoma State University Spring, 2026
 
Theory of Computation
Instructor: Henry M. Walker

Lecturer, Sonoma State University
Professor Emeritus of Computer Science and Mathematics, Grinnell College

Although much of this course has been well developed in recent semesters, some details may be adjusted from semester to semester. For example, the Signature Project for this course has satisfied SSU's Upper Division GE Area B Requirement for CS Majors for several years, and satisfying that requirement again this semester. However, details of this project likely vary from instructor to instructor and from semester to semester. Also,

Assignment on Decidability

  1. Categorization of Regular Languages: Regular languages can be grouped into three categories:
    1. Languages that are empty
    2. Languages that are non-empty and finite
    3. Languages that are infinite

    Since these categories are clearly disjoint, a natural question is whether the placement of a regular language into the proper category is decidable. The following argument outlines a three-step claim that placing a regular language L into its proper category is decidable.

    Step 1: L in Category A (empty) is decidable:.

    Proof Outline for Step 1:

    Step 2: L is in Category C (infinite) is decidable.

    Proof Outline for Step 2: Using the same notation for L, R, and c from Step 1:

    Step 3: L is in Category B (non-empty and finite) is decidable.

    Proof Outline for Step 3: Deciding the proper category for a regular language L

    Exercise for Problem 1

    1. Review the Proof Outline for Step 1. Is this proof outline valid? That is,
      • If the outline is valid, give details to prove this is indeed a correct argument that it is decidable whether a regular language is empty.
      • If the outline is not valid, explain where the logic fails. For example, you might give a counter example to some part of the proof outline.
    2. Using the same notation of L, R, and c from Step 1, review the Proof Outline for Step 2. Is this proof outline valid? (As in Part a, either provide details of the proof to show the argument is valid, or explain where the argument fails.)
  2. Categorization of Context-Free Languages: Motivated by Problem 1, Context-Free Langauges can be categorized into three disjoint categories: empty, non-empty but finite, and infinite.

    Exercise: To what extent can the arguments of Problem 1 be modified to yield analogous proofs that this categorization of Context-Free Langauges is decidable? In particular, can c be changed to some other computable value, so that:

    1. the argument from Problem 1 can be modified to show that determining whether a Context-Free Language is empty is decidable? Explain.
    2. the argument from Problem 1 can be modified to show that determining whether a Context-Free Language is infinite is decidable? Explain.
    3. Combining arguments given a Context-Free Language L and this changed value for c, is it decidable whether L is empty, non-empty but finite, or infinite? Explain.
  3. Pythagorean Triples as Roots of a Polynomial: In number theory, a Pythagorean triple consists of three positive integers (a, b, c), so that a2 + b2 = c2. Also, a polynomial of three variables p(x, y, z) is a sum of terms as described during the discussion of Hilbert's Problems in Section 3.3. In this problem, we consider only polynomials with integer coefficients.

    Consider the language Polyint = {p(x, y, z) | p(x, y, z) is a polynomial with integer coefficients, such that there exists a Pythagorean triple (a, b, c) where p(a, b, c) = 0}

    Show that Polyint is Turing recognizable.

    Notes:

  4. Reviewing the Halting Problem: The Halting Problem is said to be "unsolvable".

    1. Outline the basic argument that shows that the Halting Problem is unsolvable.
    2. How is being "unsolvable" different from stating that we have not yet found an algorithm that solves the problem?
  5. How Far Can Automated Testing/Program Verification Go? A company believes there would be a strong market for a software package that would take the specifications of a problem and the code for a program as input and would prove whether the program meets its specifications in all cases. That is, the software package would prove whether or not a program always meets its specifications.

    Although the prospect of such software package might capture one's imagination, such can package cannot be successfully produced. Explain why an error-free version of this software is impossible to develop.

created Fall, 2023
revised Fall, 2023
revised September, 2025
Valid HTML 4.01! Valid CSS!
For more information, please contact Henry M. Walker at walker@cs.grinnell.edu.
ccbyncsa.png

Copyright © 2011-2026 by Henry M. Walker.
Selected materials copyright by Marge Coahran, Samuel A. Rebelsky, John David Stone, and Henry Walker and used by permission.
This page and other materials developed for this course are under development.
This and all laboratory exercises for this course are licensed under a Creative Commons Attribution-NonCommercial-Share Alike 4.0 International License.