CISC 223 - Assignment 3 (Winter 2014) Due: beginning of class (3:30 PM), Wednesday January 29 1. (3 marks) Using the method described in Section 9.1 (and in class), convert the following regular expression into a state diagram: ((10)* + 1)* 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. 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}. Your answer should include the intermediate step(s) used in the construction. 1 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) A = {a2i+5}3k+2 | i, k ?0} {b2c4m+1 d2z+3 | l,m,z ?0}
(b) (2 marks) B = {s E {c, d}* | s has fewer occurrences of c's than of d's } For example, d, dcd, dddccccdd are all in the language B. Examples of strings not in B are c, cd, ddccc. Regulations on assignments · The assignments may be done in groups consisting of one, two, three or four students. If more than one students are collaborating on an assignment, they must submit a single joint solution. . Clearly print (or type) the name(s) and student number(s), and course number, at the top of the first page. Additionally each student collaborating on an assignment must sign the top of the first page. · If the submission consists of more than one page, the pages must be stapled together. · Note: You are asked to write your solutions using non-erasable pen (or to type the solutions). Solutions written in pencil or erasable ink will be marked, but they will not be considered for remarking after the assignments are returned.