CISC/CMPE 223 - Assignment 2 (Winter 2023) Due: Thursday February 9, 2:00 PM 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 class 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 class), 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 a d c 3 1 c 1 d b 2 a Figure 1: State diagram for Question 2. 3. Are the following languages A and B over the alphabet 2 = {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) (b) (2 marks) A= { ajbk+2cm+1 | j? 1, k ? 1, m ? 1} U { br cs+2d+1 |> >> >1, s > 1}. B = { a}+362k+2cm | j > 1, k > 1, m > 1} U { br+3 cd21-1 | > 1, s > 1, t ? 1} Hints: The languages A and B are each expressed as a union of two sets. If one (or both) of the sets is non-regular, this does not imply anything about the non-regularity of the union. When trying to show that a language C is non-regular, we have to apply the pumping lemma to the entire language C (and not to the components of the union).