Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Introduction to Computational Complexity - Homework 2 | CS 530, Assignments of Computer Science

Material Type: Assignment; Class: Theory of Computation; Subject: Computer Science; University: Illinois Institute of Technology; Term: Fall 2008;

Typology: Assignments

Pre 2010

Uploaded on 08/18/2009

koofers-user-6yf
koofers-user-6yf 🇺🇸

10 documents

1 / 1

Toggle sidebar

Related documents


Partial preview of the text

Download Introduction to Computational Complexity - Homework 2 | CS 530 and more Assignments Computer Science in PDF only on Docsity! 1.5em CS530: Introduction to Computational Complexity Xiang-Yang Li Homework 2 Due: Oct 2nd, 2008 YanWei Wu Problem 1: Sipser problem 1.45 (page 90). Let A/B = {w | wx ∈ A for some x ∈ B}. Show that if A is regular and B = Σ∗ (B is a language containing all possible strings), then A/B is regular. Problem 2: Sipser exercise 2.4 and 2.6 (page 128). Given contex free grammmars that generate the following languages. In all parts, the alphabet Σ is {0, 1}. 1. {w | w starts and ends with the same symbol} 2. {w | the length of w is odd} 3. {w | w = wR}. Here wR is the reverse of w. 4. The complement of the language {0n1n | n ≥ 0}, i.e., {w | w not in format 0n1n}. 5. {w | w has equal number of 0s and 1s}. 6. {0m1n | m 6= n, and 2m 6= n} Problem 3: Sipser problem 2.20 (page 130). Let A/B = {w | wx ∈ A for some x ∈ B}. Show that if A is context-free and B is regular language, then A/B is context-free. Problem 4: Given pushdown automatas that generate the following languages. You have to explicitly explain the meaings of the states used in your automata. 1. {w | w has equal number of 0s and 1s}. Here the alphabet Σ = {0, 1}. 2. {aibjck | i = j, or j = k, i, j, k ≥ 0}. Here the alphabet Σ = {a, b, c}. Problem 5: Assume that you are given the DFA automata MA = (QA, ΣA, qa, FA) for a regular language A and the DFA automata MB = (QB ,ΣB , qb, FB) for a regular language B. Construct a pushdown automata for the following language using MA and MB . A ¦B = {xy | x ∈ A and y ∈ B and |x| = |y|}. Here |x| is the length of the string x. Problem 6: Prove that the following languages are not context-free. 1. L1 = {w | N(w, a) = N(w, b) = N(w, c)}. Here the alphabet Σ = {a, b, c} and N(w, a) denotes the number of a’s in the string w. 2. L2 = {w | N(w, a) is a prime number}. Here the alphabet Σ = {a, b}. 2-1
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved