0% found this document useful (0 votes)
86 views2 pages

CS5371 Theory of Computation

This document contains 8 questions about theory of computation concepts for homework 1. The questions cover topics such as DFA state diagrams for specific languages, proving languages are/aren't regular, the pumping lemma, closures of regular languages under operations, and the Myhill-Nerode theorem relating automata states to language indistinguishability. The final bonus question asks about regularity of the language of first halves of strings from a regular language.

Uploaded by

Houssem Nasri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views2 pages

CS5371 Theory of Computation

This document contains 8 questions about theory of computation concepts for homework 1. The questions cover topics such as DFA state diagrams for specific languages, proving languages are/aren't regular, the pumping lemma, closures of regular languages under operations, and the Myhill-Nerode theorem relating automata states to language indistinguishability. The final bonus question asks about regularity of the language of first halves of strings from a regular language.

Uploaded by

Houssem Nasri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CS5371 Theory of Computation

Homework 1
Due: 3:20 pm, October 13, 2006 (before class)

1. Assume that the alphabet is {0, 1}. Give the state diagram of a DFA that recognizes the
language {w | w ends with 00}.

2. Assume that the alphabet is {0, 1}. Give the state diagram of a DFA that recognizes the
language {w | w contains an equal number of occurrences of the substrings 01 and 10}.

3. Prove that the language {wp | p is prime} is not regular. (You may assume that the number
of primes is infinite.)
n o
4. Consider the language F = ai bj ck | i, j, k ≥ 0 and if i = 1 then j = k .

(a) Show that F is not regular.


(b) Show that F acts like a regular language in the pumping lemma. In other words,
give a pumping length p and demonstrate that F satisfies the three conditions of the
pumping lemma for this value of p.
(c) Explain why parts (a) and (b) do not contradict the pumping lemma.

5. For languages A and B, let the perfect shuffle of A and B be the language

{w | w = a1 b1 · · · ak bk , where a1 · · · ak ∈ A and b1 · · · bk ∈ B, each ai , bi ∈ Σ} .

Show that the class of regular languages is closed under perfect shuffle.

6. For languages A and B, let the shuffle of A and B be the language

{w | w = a1 b1 · · · ak bk , where a1 · · · ak ∈ A and b1 · · · bk ∈ B, each ai , bi ∈ Σ∗ } .

Show that the class of regular languages is closed under shuffle.

7. (Myhill-Nerode Theorem.) Let L be any language.


Definition 1. Let x and y be strings. We say that x and y are distinguishable by L if some
string z exists whereby exactly one of the strings xz and yz is a member of L; otherwise,
for every string z, we have xz ∈ L whenever yz ∈ L.
Definition 2. Let X be a set of strings. We say that X is pairwise distinguishable by L
if every two distinct strings in X are distinguishable by L.
Definition 3. Define the index of L to be the maximum number of elements in any set of
strings that is pairwise distinguishable by L. The index of L may be finite or infinite.

(a) Show that if L is recognized by a DFA with k states, L has index at most k.
(b) Show that, if the index of L is a finite number k, it is recognized by a DFA with k
states.
(c) Conclude that L is regular if and only if it has finite index. Moreover, its index is the
size of the smallest DFA recognizing it.

1
8. (Bonus Question) If A is any language, let A 1 be the set of all first halves of strings in A
2
so that
A 1 = {x | for some y, |x| = |y| and xy ∈ A} .
2

Show that, if A is regular, then so is A 1 .


2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy