Question: question 1,2 and 3 please Question 1 Give a regular expression for each of the following languages over ={0,1,2}. 1. Strings that contain the substring

question 1,2 and 3 please
question 1,2 and 3 please Question 1 Give a regular expression for

Question 1 Give a regular expression for each of the following languages over ={0,1,2}. 1. Strings that contain the substring "012". A string s is a substring of a string t if s 's characters occur in t in a continuous order. For example, "00120" is valid, but "01120" is invalid. 2. Strings that contain the subsequence "012". A string s is a subsequence of a string t if s 's characters occur in t in the same order but they are not required to be continuous. For example, "00120" and "01120" are valid, but "0210" is invalid. Question 2 Draw a DFA, preferably minimal, for each of the languages in Question 1. Question 3 Give a CFG for each of the following languages over ={0,1,2}. 1. Strings that have the pattern {0n1m2kk=n+m}. 2. (extra 5 points) Decimal integers that are multiples of 3 . Hint: a decimal integer is a multiple of 3 if the sum of the digit values is a multiple of 3 . Question 4 Consider the following grammar. EE or T I T TT and NF I NF NFnotNF I F F(E)tf (a) Construct a parse tree for the sentence: not(tandnotf)ort (b) Transform the grammar into one that contains no left-recursive productions and is suitable for top-down parsing

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!