Thanks to visit codestin.com
Credit goes to www.scribd.com

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

Questions Set 1

This document provides exercises for COMP 2613 students in the Fall 2018 semester. It includes 6 problems covering topics like language characteristics, operations on languages, finite automata that count modulo a constant, and finite state automata for various languages. Students are asked to characterize languages, compute operations on languages, determine if statements about languages are true or false, and provide finite automata for certain languages. The exercises are due between September 17-21.
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)
95 views2 pages

Questions Set 1

This document provides exercises for COMP 2613 students in the Fall 2018 semester. It includes 6 problems covering topics like language characteristics, operations on languages, finite automata that count modulo a constant, and finite state automata for various languages. Students are asked to characterize languages, compute operations on languages, determine if statements about languages are true or false, and provide finite automata for certain languages. The exercises are due between September 17-21.
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

COMP 2613- Fall 2018

Exercises #1 - September 17-21

September 11, 2018

1. Language Characteristics
Consider the following languages over the alphabet Σ = {a, b}:

1. Let L = {λ, a}. Characterize L20 .

2. Compute L1 L2 , L1 L3 and L2 L3 where L1 = {}, L2 = {λ}, and L3 = {b}.

3. Give a non-empty language L for which L = L2 .

2. Complementation and Kleene Star


For each of the following four languages L over the alphabet Σ = {a, b}, compute Σ∗ −L∗ :
(1) L1 = {λ, a, bb}, (2) L2 = {a, bb}, (3) L3 = {a}, and (4) L4 = {ab, ba}. Express each
of the resulting languages in plain English.

3. Which language?
Let P REF IX(L) = {u|u is a prefix of w where w ∈ L} be the set of all prefixes of
strings in L.

1. Let L = Σ∗ .{a}. Characterize P REF IX(L).

2. Let L = {an bn | n ≥ 0}. Characterize P REF IX(L).

3. Let L = {am bn | 0 ≤ m ≤ n}. Characterize P REF IX(L).

1
4. Language operations Answer True or False to each of the following four statements
and give a brief justification for your answers. The alphabet is {a, b, c} in questions 1
and 3, and it is {a, b, c, d} in questions 2 and 4.

1. Let L1 = {ai bi | i ≥ 0} and L2 = {ai bi ci | i ≥ 0}, then L1 ∩ L2 = ∅.

2. Let L1 = {ai bi | i ≥ 0} and L2 = {ci di | i ≥ 0}, then L1 L2 = {ai bi ci di | i ≥ 0}.

3. Let L = {ai bi ci | i ≥ 0} then L = {ai bj ck | (i 6= j) or (i 6= k) or (j 6= k)}.

4. Let L = {ai bi ci | i ≥ 0} and L2 = {ai bi ci di | i ≥ 0} then L1 − L2 = ∅.

5. Finite automata that count modulo a constant


Give an finite automata (FA) for each of the following languages over the alphabet
Σ = {a, b}. Your FA can be deterministic or non-deterministic.

1. L1 = {w ∈ Σ∗ |w starts with the symbol a}.

2. L2 = {w ∈ Σ∗ |w starts and ends with the symbol a}.

3. L3 = {w ∈ Σ∗ |w contains exactly one a}.

4. L4 = {w ∈ Σ∗ | every a in w is immediately followed by a b}.

5. L5 = {w ∈ Σ∗ | the number of a symbols in w is not 2}.

6. Finite Automata
Give an finite automata (FA) for each of the following languages. Your FA can be
deterministic or non-deterministic.

1. L1 = {ai | i is even }.

2. L2 = {ai bj | both i and j are even }.

3. L3 = {ai bj | i + j is even }.

4. L4 = {ai bj ck | i + j + k is even }.

5. L5 = {ai bj | either i or j is even }.

The language L1 is over the alphabet Σ = {a}. The languages L2 , L3 , L5 are over the
alphabet Σ = {a, b}. The languages L4 is over the alphabet Σ = {a, b, c}.

You might also like