Given the regular expression: ^[ABC][^AB]$ find all the matching patterns (could be more than one):
a) A
b) AB
c) ADBC
d) D
e) None
^ : Starting position in a string.
[] : Matches a single character that is contained within the brackets
^[ABC] : Starting position should contain 'A' or 'B' or 'C'
[^ ] : Matches a single character that is not within the characters contained in brackets
$: Matches ending position of string
[^AB]$ : Ending position of character should not be in 'A' or 'B'
Hence
A is not a match because reg exp requires 2 characters
D is also eliminated
ADBC is also because required length is 2
AB is not a valid match because last character hould not be in A or B
Hence the answer is None
Given the regular expression: ^[ABC][^AB]$ find all the matching patterns (could be more than one): a)...
UNIX and Shell Programming. Given the regular expression, circle all the matching patterns. Problem 1. \..\{3\}$ a. rs.ef$tt b. abc.ab c. abc.$$$$ d. abc e. none Problem 2: :?.? a. :a????????? b. eeeeeefffff?hhhh c. aaa::?????? d. :?.\? e. none Problem 3. Write a regular expression that matches a nonblank line.
Select all of the strings below that will be matched by the following String Matching Regular Expression (SMRE): a*[abc]*. Don't guess. Try each one. Question 52 options: aaaa adabc abcd dcba abab cbaq c abcabc ada bbbb
Part II: Regular Expression 1. Chose match(es) for each given basic/extended regular expression (maybe multiple correct matches) and describe the pattern of matched string for 3), 4), 5),6), 11) e.g. (ab+a, (extended regex ) a) ababa b) aba c)abba d)aabba e)aa Answer: b,c; Pattern : The matched string should begin and end with 'a and ‘b' occurs at least once between leading and ending ‘a') ote: 1) to 5)are basic regexes 1) 'a[ab]*a' (a)ababa (b) aaba (c) aabab (d) aabbaa...
1. Use a Regular Expression to define the set of all bit strings
of one or more 0's followed by only a 1.
2. Use a Regular Expression to define the set of all bit string
of two or more symbols followed by three or more 0's.
3. Are these two grammars the same?
a. S-> aSb|ab|λ
b. S-> aAb|ab A->aAb|λ
4. Use the process of elimination to find the language of the
following FA: (see picture for diagram)
5....
help!!!
Given the following expression: F1 (A,B,C,D) -A'BC+ABC+CD+ACD Select the correct K-map: a. AB CD 01 10 10 ○b. AB CD 0111 10 10 1 01
1. Construct a DFA for each of the following regular expressions: a) ab + c b) a*b + c c) ab*c*+ ac 2. Construct an NFA for the following regular expression: a) (a + b)*ab b) a*b* c) a*b* + c d) a* + b* e) a* + b* + ac*
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
Construct context-free grammars that generate the given set of
strings. If the grammar has more than one variable, we will ask to
write a sentence describing what sets of strings expect each
variable in the grammar to generate. For example, if the grammar
was:
I could say "C generates binary strings of length one, E
generates (non-empty) even length binary strings, and O generates
odd length binary strings." It is also fine to use a regular
expression, rather than English,...
The expression for Absorption law is given by _________ a) A + AB = A b) A + AB = B c) AB + AA’ = A d) A + B = B + A
Could I get these answered and explained to me? I'm new to
system level programming and rather lost on how to answer or think
through these. I'll definitely provide a thumbs up to those who can
give an explanation along with their answer. Thanks a bunch!
match(es) for expression (maybe each given basic/extended multiple Choose 1. regular no correct match, if no correct option is given then write none as your anser 3), matches or correct and describe the of...