Prove/disprove for any regular expressions R and S: (a) (R + S)∗S = (R∗S)∗ (b) (R + S)∗ = (R∗S)∗
Note: when disproving a statement, you must give a concrete example of R and S, meaning a definition of R and S over some chosen alphabet.
a) Incorrect
Counter Example
R = aa
S = bb
(R + S)∗S is not generating epsilon
(R∗S)∗ is generating epsilon
b) Incorrect
Counter Example
R = aa
S = bb
(R + S)* generates RR = aaaa
(R*S)* doesn't generate RRR
Prove/disprove for any regular expressions R and S: (a) (R + S)∗S = (R∗S)∗ (b) (R...
Problem 1 [20 pts Prove that for any regular expressions R, S, and T, we have (R+S)"T (RS)T
(3 + 3 = 6 pts.) Prove or disprove the following statements. If you are proving a statement, then give proper reasoning. If you are disproving a statement, then it is enough to give an example which demonstrates that the statement is false. i. If A and B are two n x n matrices, then (A + B)2 = A + 2AB + B2. ii. Let A be a nxn matrix and let I be the n x n identity...
Consider the empty set as a relation, R, on any non-empty set S. Prove or disprove: R is transitive.
This question deals with NFAs, DFAs, and regular expressions. (a) Using only the symbols described in the lecture slides, write a regular expression that describes all strings over the alphabet Σ = {0,1} that are at are at least four bits long and begin and end with the same bit. (b) Draw a DFA, that accepts strings strings over the alphabet Σ = {0, 1} such that if you read the string from left to right, the difference between the...
Give regular expressions generating the languages of 1. {w over the alphabet of {0, 1} | w is any string except 11 and 111} 2. {w over the alphabet of {0, 1} | w contains at least two 0’s and at most one 1} 3. {w over the alphabet of {0, 1} | the length of w is at most 9} 4. {w over the alphabet of {0, 1} | w contains at least three 1 s} 5. {w over...
(1) Suppose R and S are reflexive relations on a set A. Prove or disprove each of these statements. (a) RUS is reflexive. (b) Rn S is reflexive. (c) R\S is reflexive. (2) Define the equivalence relation on the set Z where a ~b if and only if a? = 62. (a) List the element(s) of 7. (b) List the element(s) of -1. (c) Describe the set of all equivalence classes.
3. Create a CFG describing regular expressions over the alphabet {0, 1}. You will need to quote the regular expression operators and the template given you has them quoted as terminals. We expect the grammar to generate the following syntactic constructions: • Union via "|", for example, 0 1 "|" 1 should be in the language generated by the grammar • Intersection via "&", for example, 0 1 "&" 1 should be in the language • Concatenation: any nonempty sequence...
4. (15 pts) Suppose that R and S are reflexive relations on a set A. Prove or disprove each of these statements. (Note that RI R2 consists of all ordered pairs (a, b), where student a has taken course b but does not need it to graduate or needs course b to graduate but has not taken it.) a) R U S is reflexive. b) R S is reflexive. c) R田s is irreflexive. d) R- S is irreflexive. e) S。R...
1. Prove that for any set S S R, S is closed if and only if Se is open. Notice the book has a proof of this, but it uses a different notation for set complements and a different definition of neighborhood. You may consult it, but you must write your proof using the definition for interior point I presented in class (also in the notes on blackboard). If you copy the proof from the book you will not receive...
1. Let A -(a, b) a, b Q,a b. Prove that A is denumerable. (You may cite any results from the text.) 2. Let SeRnE N) and define f:N-+S by n)- n + *. Since, by definition, S-f(N), it follows that f is onto (a) Show that f is one-to-one (b) Is S denumerable? Explain 3. Either prove or disprove each of the following. (You may cite any results from the text or other results from this assignment.) (a) If...