Consider the first-order language L that consists of only one binary predicate symbol E, and consider the structure S for L whose domain is the collection of all sets and where E^S(x,y) holds iff x is an element of y. Translate each of the following predicates using a short english sentence. - forall z (E(z,x) -> E(z,y)) answer: x is a subset of y - forall w (E(w,z) <-> E(w,x) \/ E(w,y)) answer: z is the union of x and y - forall z (E(z,x) <-> E(z,y)) answer: x=y - forall z (forall y ~E(y,z) -> forall w (E(w,z) -> E(w,x))) answer: the empty set is a subset of x For each of the following regulare expressions, state whether or not the given string belongs to the langues denoted by the regular expression. (e is the empty string) (a) string aba in (e+a)b^*ab^* answer: yes, pick a from L(e+a), b from L(b^*), a from L(a) and e from L(b^*) to form abae=aba (b) string aa in a(bb)^*a answer: yes, pic a from L(a), e from L((bb)^*), and a from L(a) (c) string aba in a(bb)^*a answer: No, every string in L(a(bb)^*a) contains an even number of b's (0 or 2 or ...) (d) string abba (e+b)(ba^*)^*a(a+b) answer: No, because to form abba from (e+b) we must pick e, and from L((ba^*)^*) we must pick e since everything starts with b. From the rest, i.e L(a(a+b)) we only can get aa or ab. (e) baaab in (a+b)b^*(a+b)^* answer: yes, pick b from L(a+b), e from L(b^*), and then aaab from L((a+b)^*) For each regular expression below, give a short english description. (a) (b+ab^*a)^* answer: any string over {a,b} with an even number of a's (b) a^*(b+e)a^*(b+e)a^* answer: any string over {a,b} that contains at most two b's. For each of the languages below find a regulare expression that denotes it. (a) {s in {a,b}^* : the first and the last symbos of s are different} answer: a(a+b)^*b+b(a+b)^*a (b) {s in {a,b}^* : ever a in s is immediately preceded by a b} answer: e+(b+ba)^* (c) {a^nb^m: n,m>=0 and n+m is odd} answer: (aa)^*(a+b)(bb)^*