Question

Questions from my recent quiz that I had problems with. Can anyone assist?

A. Closure Properties of Regular Languages 1. **Show that if a language family is closed under union and complementation, it must also be closed under intersection 2. The symmetric difference of two sets S1 and S2 is defined as SheS2 {r r E S1 or z E S2, but z is not in both S1 and S2) Show that the family of regular languages is closed under symmetric difference

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Let the two languages be L1 and L2. As they are regular they have DFA's so let us call them D1 and D2 respectively.

1) Union:

Let us construct a new DFA. We create a new start symbol and join it with ϵ to the start states of D1 and D2. The final state of new DFA will be the union of final states of D1 and D2. The state transition function will be the same. The set of states will union of set of states of D1 and D2 and new start symbol. The set of alphabets is same as D1,D2.

So the new DFA looks like:

P1 4も C )2) Completement:

Let D1 be DFA of L1.

D1 = (A, Q, S, F, t)

A -> set of all alphabets

Q -> set of all the states

S -> start states

F - > set of all final states

t -> state transition function

The DFA for complement of L1 will be:

DC = (A, Q, S, F1, t)

Where A,Q,S,t are same as above

We make F1 as Q-F (F from D1)

3) Intersection:

Let D1 be DFA of L1.

D1 = (A, Q1, S1, F1, t1)

A -> set of all alphabets

Q1 -> set of all the states

S1 -> start states

F1 - > set of all final states

t1-> state transition function

Let D2 be DFA of L2.

D2 = (A, Q2, S2, F2, t2)

A -> set of all alphabets

Q2 -> set of all the states

S2 -> start states

F2 - > set of all final states

t2-> state transition function

Let us construct the DFA of intersection D3

Let D1 be DFA of L1.

D3 = (A, Q, S, F, t)

A -> same as above

Q -> we create new states by pairing states from states from Q1 and Q2. So Q contains (qi,qj) where qi and qj belong to Q1 and Q2. Such that we make all possible pairs.

S -> (S1,S2)

F - > (Fi,Fj) all possible pairs. Such that Fi belongs to F1 and  Fj belongs to F2

t -> state transition function such (qi,qj) goes to (t1(qi,a),t2(qj,a)) for an alphabet a.

Add a comment
Know the answer?
Add Answer to:
Questions from my recent quiz that I had problems with. Can anyone assist? Closure Properties of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • (express the language in terms of basic set operations) a) Prove that if L and Ly...

    (express the language in terms of basic set operations) a) Prove that if L and Ly are regular then //\/2 (set difference) is also regular. b) The symmetric difference of two sets S, and S2 is defined as: sas, = {x:xes, or xes, but x is not in both S, and S2}. Show that the family of regular languages is closed under symmetric difference.

  • 1. Complete the following exercises a) For Σ = {a, b} find regular expressions for the...

    1. Complete the following exercises a) For Σ = {a, b} find regular expressions for the compliment of the following languages L = L(aa*bb) b) Let Li = L(ab*aa), L2 = L(a"bba"). Find a regular expression for (L1 n Ljl2. c) The symmetric difference of two sets Sı and S2 is defined as sı Θ s,-(x : x E Si or x E S2 but x is not in both S1 and S2). Show that the family of regular languages...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT