Introduction to Theory of Computation
Abstract
AI
AI
The Theory of Computation course aims to explore the mathematical foundations of computation, addressing key questions about algorithms, computability, and the limitations of computing systems. It covers three main areas: Complexity Theory, Computability Theory, and Automata Theory, providing students with a formal understanding of computational systems and their capabilities. Through theoretical analyses and practical exercises, students engage with mathematical models that reflect real-world computing scenarios.
References (22)
- w : 110 is not a substring of w}
- w : w contains at least five 1s}
- w : w contains the substring 1011}
- w : w contains at least two 1s and at most two 0s}
- w : w contains an odd number of 1s or exactly two 0s}
- w : w begins with 1 and ends with 0}
- w : every odd position in w is 1}
- w : w has length at least 3 and its third symbol is 0} 10. {ǫ, 0}
- 2 For each of the following languages, construct an NFA, with the specified number of states, that accepts the language. In all cases, the alphabet is {0, 1}.
- The language {w : w ends with 10} with three states.
- The language {w : w contains the substring 1011} with five states.
- The language {w : w contains an odd number of 1s or exactly two 0s} with six states.
- 3 For each of the following languages, construct an NFA that accepts the language. In all cases, the alphabet is {0, 1}. 1. {w : w contains the substring 11001}
- w : w has length at least 2 and does not end with 10} 3. {w : w begins with 1 or ends with 0}
- 4 Convert the following NFA to an equivalent DFA. 1. 2 ≤ a < x, 2. 2 ≤ b < x, and 3. x = ab.
- Clearly, these three conditions can be verified in polynomial time. Moreover, the length of this solution, i.e., the total number of bits in the binary rep- resentations of a and b, is polynomial in the number of bits in the binary representation of x. Languages having the property that the correctness of a proposed "solu- tion" can be verified in polynomial time, form the class NP: Definition 6.3.6 A language A belongs to the class NP, if there exist a polynomial p and a language B ∈ P, such that for every string w, w ∈ A ⇐⇒ ∃s : |s| ≤ p(|w|) and w, s ∈ B. In words, a language A is in the class NP, if for every string w, w ∈ A if and only if the following two conditions are satisfied: 1. There is a "solution" s, whose length |s| is polynomial in the length of w (i.e., |s| ≤ p(|w|), where p is a polynomial).
- In polynomial time, we can verify whether or not s is a correct "solu- tion" for w (i.e., w, s ∈ B and B ∈ P).
- Hence, the language B can be regarded to be the "verification language": B = { w, s : s is a correct "solution" for w}. We have given already informal proofs of the fact that the languages kColor, HC , SOS , and NPrim are all contained in the class NP. Below, we formally prove that NPrim ∈ NP. To prove this claim, we have to specify the polynomial p and the language B ∈ P. First, we observe that NPrim = { x : there exist a and b in N such that 2 ≤ a < x, 2 ≤ b < x and x = ab }. p(n) := n + 2, and the language B as B := { x, a, b : x ≥ 2, 2 ≤ a < x, 2 ≤ b < x and x = ab}.
- A ≤ P A, and 2. if A ≤ P B and B ≤ P C, then A ≤ P C. The following properties hold: 1. Every context-free language is in P. (We did not prove this).
- Every language in P is also in NP.
- It is not known if there exist languages that are in NP, but not in P. 4. Every language in NP is decidable.
- We have introduced reductions to define the notion of a language B to be "at least as hard" as a language A. A language B is called NP-complete, if 1. B belongs to the class NP, and 2. B is at least as hard as every language in the class NP. We have seen that NP-complete exist. The figure below summarizes the relationships among the various classes of languages.