Question: 1. Given two languages P = {ab, ba} and Q = {xy, z} , calculate: a) The language resulting from the concatenation of P and

1. Given two languages P = {ab, ba} and Q = {xy, z} , calculate: a) The language resulting from the concatenation of P and Q, i.e., PQ and QP b) P^0 c) Q3^3 2. For the following languages, give a regular expression for the set of strings over {a,b} that: a) contain both the substring ab and ba b) have length of 2 or more, and in which any and all as precede any and all bs c) have an odd number of bs d) do not contain the substring aaa 3. (Generate a regular expression for the language {a^n | n mod 2 = 1} 4. For the context-free grammar G : S->aS|Sb|a a) Give a derivation for the string aaabb b) Give a derivation tree for the above string c) Write a regular expression for G

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!