0% found this document useful (0 votes)
91 views1 page

COMP 335: Theoretical Computer Science Winter 2006 Assignment 1

This document outlines 6 assignments for the theoretical computer science course COMP 335. The assignments cover topics such as: 1) Determining if strings are in various languages and providing examples. 2) Identifying which strings are in the Kleene closure of a language. 3) Constructing DFAs for languages with certain properties. 4) Using subset construction to convert NFAs to equivalent DFAs. 5) Finding regular expressions for given languages.

Uploaded by

Wing Long Chung
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)
91 views1 page

COMP 335: Theoretical Computer Science Winter 2006 Assignment 1

This document outlines 6 assignments for the theoretical computer science course COMP 335. The assignments cover topics such as: 1) Determining if strings are in various languages and providing examples. 2) Identifying which strings are in the Kleene closure of a language. 3) Constructing DFAs for languages with certain properties. 4) Using subset construction to convert NFAs to equivalent DFAs. 5) Finding regular expressions for given languages.

Uploaded by

Wing Long Chung
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/ 1

COMP 335: Theoretical Computer Science

Winter 2006
Assignment 1
Due date: January 30, 2006.
1. Let = {a, b}. For each of the following languages below,
(i) state whether is in the language,
(ii) give an example of a string different from which is in the language, if such a string exists,
(iii) give an example of a string different from which is not in the language, if such a string
exists.
(a) {w | w = uuR v for some strings u, v }.
(b) {w | w = uuR v for some strings u and v 3 }.
(c) {w | ww = uuu for some string u .
2. Let L = {ab, bb, aba}. Which of the following strings is in L ? Justify your answer.
, abababa, abbbbbabaabb, abaabbbababbaba
3. Find a DFA that accepts the following language on = {0, 1}.
(a) {w : w does not contain substring 0000 or 1111}
(b) {w : w contains exactly three 0s and it ends with 011}
(c) {w : the number of 0 in w is equal to 0 mod 5 and w begins with 01.
4. Find an NFA that accepts the following language:
(a) {w : w contains 1111 or 00000 or 11100111 as a substring}
(b) {w {0, 1, . . . , 9} such that the final digit in w is different from all other symbols in w }
5. For each of the two NFA below, use the subset construction to construct an equivalent DFA.
(The initial state is marked with > and any final state is underlined)
A1
>0
1
2
3

A2
a
{0}
{2,3}
{3}
{1}

b
{1}
{2}
{0}
{2}

>0
1
2
3
4
5

a
{1,2}
{0}
{3}

{1}
{3}

b

{1,3}
{2}
{0}

{0}

{3}


{5}
{5}

6. Find a regular expression for each of the following languages


(a)
(b)
(c)
(d)

{w : w does not contain substring 0000}


{w : w contains exactly three 0s and it ends with 011}
{w : the number of 0s in w is equal to 0 mod 5 and w begins with 01}.
L = {an bm : mn 5}

You might also like