

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Theory of Computation. Sample Final. This exam is closed book. Answer all questions. 1. (10 points.) Give a regular expression for the following language A.
Typology: Exercises
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Theory of Computation Sample Final.
This exam is closed book. Answer all questions.
A = {uv | u, v ∈ {a, b, c}∗, u, v 6 = , and u and v have no character in common}.
e.g. abc ∈ A, cacbb ∈ A, abcabc /∈ A, abab /∈ A.
B = {w | w ∈ { 0 , 1 }∗^ and w includes a 1 but not as its third character}.
b. Show that the following language C is not regular.
C = {wcuwRv | w, u, v ∈ {a, b}∗}.
b. Show that the following language D is not context free.
D = {aibaj^ bakbal^ | i = k and j = l}.
E = {x 1 #x 2 # · · · #xk | k ≥ 2 , xh ∈ {a, b}∗, 1 ≤ h ≤ k, and xi = xRj for some i < j}.
Using AF as a subroutine, give an algorithm AAP rog to decide AP rog. Recall that AP rog = {〈P, w〉 | P halts on input w}.
Show that Clique ≤P Half-Clique.
Recall that clique is the following problem: Input: (H, k), where H = (W, F ) is an undirected graph and k is an integer. Question: Does G have a clique of size k?