Sale!

CS 334: Problem Set 1

$30.00

Category:
Rate this product

CS 334: Problem Set 1.
Problem 1. (30 points) Construct deterministic FSAs for each of the following languages over
the alphabet {π‘Ž, 𝑏}:
1. 𝐿1 = {𝑀: 𝑀 π‘π‘œπ‘›π‘‘π‘Žπ‘–π‘›π‘  π‘‘β„Žπ‘’ π‘ π‘‘π‘Ÿπ‘–π‘›π‘” π‘Žπ‘Žπ‘Ž π‘Žπ‘›π‘‘ π‘‘β„Žπ‘’ π‘ π‘‘π‘Ÿπ‘–π‘›π‘” 𝑏𝑏𝑏}.
2. 𝐿2 = {𝑀: 𝑀 π‘π‘œπ‘›π‘‘π‘Žπ‘–π‘›π‘  π‘Žπ‘› 𝑒𝑣𝑒𝑛 π‘›π‘’π‘šπ‘π‘’π‘Ÿ π‘œπ‘“ π‘Ž
β€²
𝑠 π‘Žπ‘›π‘‘ π‘’π‘Žπ‘β„Ž π‘Ž 𝑖𝑠 π‘“π‘œπ‘™π‘™π‘œπ‘€π‘’π‘‘
π‘–π‘šπ‘šπ‘’π‘‘π‘–π‘Žπ‘‘π‘’π‘™π‘¦ 𝑏𝑦 π‘Žπ‘‘ π‘™π‘’π‘Žπ‘ π‘‘ π‘œπ‘›π‘’ 𝑏}
Hint: 𝐿2
is the intersection of two languages. It’s trivial to design an FSA for each of
these. Once you do that, use the construction of Theorem 1.25 (but for intersection
rather than union) to construct the FSA for 𝐿2
.
3. 𝐿3 = {𝑀:π‘‘β„Žπ‘’ 3π‘Ÿπ‘‘ π‘™π‘Žπ‘ π‘‘ π‘ π‘¦π‘šπ‘π‘œπ‘™ 𝑖𝑛 𝑀 𝑖𝑠 π‘Ž}.
So, for example, π‘Žπ‘π‘π‘Žπ‘π‘Ž ∈ 𝐿3 𝑏𝑒𝑑 π‘Žπ‘π‘Žπ‘π‘π‘Ž βˆ‰ 𝐿3
. To get started see how trivial it
would be if the FSA had to check the last symbol of the input. Then try to design an FSA
that must check only the 2nd last symbol. What does each state in this FSA represent?
Now extend this idea to design an FSA that accepts 𝐿3
.
Problem 2. (10 points) Modify the proof of Theorem 1.25 in the textbook to cover the case
when the machines 𝑀1
,𝑀2 have different input alphabets Ξ£1
,Ξ£2
. Hint: the machine 𝑀 that
recognizes the union of the languages of 𝑀1
,𝑀2 will have input alphabet Ξ£ = Ξ£1 βˆͺ Ξ£2
. Take
care when defining 𝛿((π‘Ÿ1
, π‘Ÿ2
), π‘Ž) as the symbol π‘Ž could belong to one alphabet but not the
other!
Optional Problem. (Present your solution anytime this term to Sandeep for credit.) Suppose
that you are asked to design an FSA to operate a building elevator. How would you go about
this design process? What would a state of the FSA correspond to? What should be the
alphabet? What constraints would be reasonable to impose on the movement of the elevator?
This is an open-ended problem – we don’t expect a full design, but rather things you considered
and what constraints you found difficult to design for. To get started, imagine a 2-storey
building, then a 3-storey building, etc.

Open chat
Need help?
Hello
Can we help you?