Suppose Σ = {a,b,c,d} ,and regular expression
are:
1. [a b] ? [c d]
2.~dad?
show in standard notation and Write set of all the strings for above expressions?
1.
Regular Expression: (a+b+epsilon)(c+d)
Language in set: {c, d, ac, ad, bc, bd}
Explanation;
[ab]? means 0/1 letters from set of ab
[cd] one letter from set cd
2.
Regular expression: NONE
Language: {}
Because ~d should match literally but ~ is not in Σ
Otherwise if you think ~ is allowe
Regular Expression: ~da(epsilon+d)
Language in set: {~da, ~dad}
Please up vote.
Suppose Σ = {a,b,c,d} ,and regular expression are: 1. [a b] ? [c d] 2.~dad? show...
For each problem below (except #8), show a regular expression representing the described set. The set of strings over {c, l, e, a, n} with length less than 5. The set of strings over {c, l, e, a, n} with length greater than 7 If you take the union of the regular expressions from the previous two problems, how many strings more does the corresponding set need to contain all of Σ* , where Σ = {c, l, e, a,...
(a) Give 2 strings that are members of language specified by the regular expression (0+ 1)∗ but are not members of the language specified by 0∗ + 1∗ . Then give 2 strings that are members of both languages. Assume the alphabet is Σ = {0, 1}. (b) For each of the following languages specified by regular expressions, give 2 strings that are members and 2 strings that are not members (a total of 4 strings for each part). Assume...
1. Write regular expressions to capture the following regular languages: (a) The set of binary strings which have a 1 in every even position. (Note: odd positions may be either 0 or 1.) (b) The set of binary strings that do not contain 011 as a substring. (c) Comments in Pascal. These are delimited by (* and *) or by { and }, and can contain anything in between; they are NOT allowed to nest, however. 2. Write a DFA...
Create Regular Expression for the following language: Σ = { 0, 1 } All strings that optionally start with 1111 and must end with 0000.
Write a regular expression that captures the set of strings composed of 'a', 'b', and 'c', where any string uses at most two of the three letters (for example, "abbab" is a valid string, or "bccbb", or "ccacaa", but not "abccba": strings that contain only one of the three letters are also fine). Give a non-deterministic finite automaton that captures the regular expression from Using the construction described in class, give a deterministic version of the automaton. Repeat the previous...
Can you please thoroughly explain part B?
Let Σ {0,1} be an alphabet. Suppose the language Ly is the set of all strings that start with a 1 and L2 is the set of all strings that end in a 1. Describe Lj U L2 and (L1 UL2)* using English. b) Decide if the given strings belong to the language defined by the given regular expression. If it does not belong, then explain why. 0(1|€)10(e|0)*11 , strings: 0110011, 0100011001111
1. Give a regular expression for the set of strings over {a, b, c} such that the sum of the number of a’s and the number of b’s is equal to 3.
Write a regular expression that matches: a) all strings that end with a dot character ".", without the quotes. b) all strings that begin with a "#" character, without the quotes. c) all floating-point numbers using standard notation (e.g., 12.345 or –12.345). Note that matching numbers may contain any number of digits before or after the decimal point. d) all floating-point numbers using scientific notation (e.g., 1.234e+5 or –1.234E–5). Again, matching numbers may contain any number of digits before or...
1. Generate five strings from each of these regular expressions A. b ( ab ) * B. b (a + b)* C. (aa + b) * b D. a ( a + b)(a + b)b E. ab ( ab)* ab 2. Finite state machines for each of the above regular expression
Find a regular expression for the following language over the alphabet Σ = {a,b}. L = {strings that begin and end with a and contain bb}.