CISC 223 - Assignment 1 (Winter 2014) Due: beginning of class (3:30 PM), Wednesday January 15 1. (3 marks) Let > = {0, 1} and consider the languages A and B over 2 where A = {1,10,010}, B={1,01} (a) Write down all strings over 2 that have length at most three. (b) Write down all strings in the set A . B. How many strings there are in A . B? (c) Write down all strings in the set B . A. How many strings there are in B · A? 2. (3 marks) In this question the alphabet is 2 = {a, b}. Let R = (a*ba*b)*a* and S = (a*ba + aba*) *. (a) Give an example of a string z that is both in R and in S (that is, z E Rn S). (b) Give an example of a string x that is in R and is not in S (that is, x E RnS where S is the complement of S). (c) Give an example of a string y that is in S and is not in R (that is, y E Rn S). 3. (4 marks) Show how to define the following languages over > = {0, 1} using only &, the alphabet symbols 0 and 1, and the operations of union, concatenation, and closure. Note: Your answer cannot use the intersection or complementation operation. (a) All strings that have 10101010 as a substring. (b) All strings of odd length. (c) All strings that begin with 101 and end with 010. (Note that the prefix 101 and the suffix 010 may overlap.) (d) All strings that have 1 both as a prefix and a suffix and do not have 101 as a substring. 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.