CISC/CMPE 223 - Assignment 2 (Winter 2022) Due: Thursday February 10, 2:00 PM (Kingston time) Regulations on assignments · The assignments are graded according to the correctness, preciseness and legibility of the solutions. All handwritten parts, including figures, should be clear and legible. This assignment is marked out of 20 possible marks. . Please submit your solution in onQ before the due time. The submission must be in one of formats: . PDF, .JPG, .PNG, .DOCX. · The assignment must be based on individual work. Copying solutions from other students is a violation of academic integrity. See the course onQ site for more information. 1. (4 marks) Using the method described in Section 9.1 and in videos of Week 3 (video 12) convert the following regular expression into a state diagram: (01* + 10)*1* Note that the closure operation has highest precedence (see page 164 in the text). Thus the expression 01* denotes exactly one 0 followed by any number of 1's. Your answer should indicate how you arrived at the result: · As intermediate steps write down the state diagrams that you construct for subex- pressions of the given regular expression, and for each intermediate step clearly indicate which subexpression it corresponds to. · Please do not simplify/modify the state diagrams. Simplifications/modifications of the state diagrams are considered as errors when marking (independently of whether or not the state diagram remains equivalent). Please note: The question is marked based on how well you follow the steps of the algorithm of section 9.1.1 2. (3 marks) Using the method described in Section 9.2 (and in videos of Week 3), convert the state diagram given in Figure 1 into an equivalent regular expression. Here > = {a, b, c, d}. Your answer should include the intermediate step(s) used in the construction. 1 An NFA produced by some other method is considered incorrect independently of whether or not it may define the same language.
b d - 1 2 c b a a 3 c Figure 1: State diagram for Question 2. 3. Are the following languages A and B over the alphabet E = {a, b, c, d} regular or nonreg- ular? · For a language that is regular, give a regular expression that defines it. · For a nonregular language, using the pumping lemma prove that it is not regular. (a) (2 marks) A = {a2163k+1cm+3 | i > 0, k > 0,m > 0} U {\3r+1 (2+4 ds+1 r ? 0, s > 0, t > 0} | (b) (2 marks) B= {d2ic31/2k+1 | i > 1, k ? 1} - {63m+2a21+1 | m ? 1, r ? 1} In (b), "." stands for language concatenation. Hints: The languages A and B are expressed, respectively, as union or concatenation of two components. If one (or both) of the components is non-regular, this does not imply anything about the non-regularity of the union/concatenation. If trying to show that a language C is non-regular, we have to apply the pumping lemma