Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged regular-expression
1
votes
1
answer
121
NIELIT 2017 DEC Scientist B - Section B: 45
The string $1101$ does not belong to the set represented by $(00+(11)^*0)$ $1(0+1)^*101$ $(10)^*(01)^*(00+11)^*$ $110^*(0+1)$
The string $1101$ does not belong to the set represented by$(00+(11)^*0)$$1(0+1)^*101$$(10)^*(01)^*(00+11)^*$$110^*(0+1)$
admin
1.6k
views
admin
asked
Mar 30, 2020
Theory of Computation
nielit2017dec-scientistb
theory-of-computation
regular-expression
+
–
0
votes
2
answers
122
UGC NET CSE | December 2005 | Part 2 | Question: 5
Regular expression $a+b$ denotes the set : {$a$} {$\in, a, b$} {$a, b$} None of these
Regular expression $a+b$ denotes the set :{$a$}{$\in, a, b$}{$a, b$}None of these
go_editor
317
views
go_editor
asked
Mar 27, 2020
Theory of Computation
ugcnetcse-dec2005-paper2
theory-of-computation
regular-expression
+
–
1
votes
3
answers
123
UGC NET CSE | January 2017 | Part 2 | Question: 31
Which of the following strings would match the regular expression : $p+ [3-5] * [xyz]$? $p443y$ $p6y$ $3xyz$ $p35z$ $p353535x$ $ppp5$ I, IlI and VI only IV, V and VI only II, IV and V only I, IV and V only
Which of the following strings would match the regular expression : $p+ [3-5] * [xyz]$?$p443y$$p6y$$3xyz$$p35z$$p353535x$$ppp5$I, IlI and VI onlyIV, V and VI onlyII, IV ...
go_editor
1.6k
views
go_editor
asked
Mar 24, 2020
Theory of Computation
ugcnetjan2017ii
regular-expression
theory-of-computation
+
–
24
votes
3
answers
124
GATE CSE 2020 | Question: 7
Which one of the following regular expressions represents the set of all binary strings with an odd number of $1’$s? $((0+1)^*1(0+1)^*1)^*10^*$ $(0^*10^*10^*)^*0^*1$ $10^*(0^*10^*10^*)^*$ $(0^*10^*10^*)^*10^*$
Which one of the following regular expressions represents the set of all binary strings with an odd number of $1’$s?$((0+1)^*1(0+1)^*1)^*10^*$$(0^*10^*10^*)^*0^*1$$10^*...
Arjun
23.7k
views
Arjun
asked
Feb 12, 2020
Theory of Computation
gatecse-2020
regular-expression
normal
theory-of-computation
1-mark
+
–
0
votes
0
answers
125
Michael Sipser Edition 3 Exercise 4 Question 22 (Page No. 212)
Let $PREFIX-FREE_{REX} = \{\langle R \rangle \mid \text{R is a regular expression and L(R) is prefix-free}\}$. Show that $PREFIX FREE_{REX}$ is decidable. Why does a similar approach fail to show that $PREFIX-FREE_{CFG}$ is decidable?
Let $PREFIX-FREE_{REX} = \{\langle R \rangle \mid \text{R is a regular expression and L(R) is prefix-free}\}$. Show that $PREFIX FREE_{REX}$ is decidable. Why does a simi...
admin
400
views
admin
asked
Oct 17, 2019
Theory of Computation
michael-sipser
theory-of-computation
regular-expression
decidability
proof
+
–
0
votes
0
answers
126
Michael Sipser Edition 3 Exercise 4 Question 2 (Page No. 211)
Consider the problem of determining whether a DFA and a regular expression are equivalent. Express this problem as a language and show that it is decidable.
Consider the problem of determining whether a DFA and a regular expression are equivalent. Express this problem as a language and show that it is decidable.
admin
518
views
admin
asked
Oct 15, 2019
Theory of Computation
michael-sipser
theory-of-computation
finite-automata
regular-expression
decidability
proof
+
–
3
votes
3
answers
127
CMI2019-B-1
Consider an alphabet $\Sigma=\{a,b\}.$ Let $L_{1}$ be the language given by the regular expression $(a+b)^{\ast}bb(a+b)^{\ast}$ and let $L_{2}$ be the language $baa^{\ast}b.$ Define $L:=\{u\in\Sigma^{\ast}\mid \exists w\in L_{2}\: s.t.\: uw\in L_{1}\}.$ Give an example of a word in $L.$ Give an example of a word not in $L.$ Construct an NFA for $L.$
Consider an alphabet $\Sigma=\{a,b\}.$Let $L_{1}$ be the language given by the regular expression $(a+b)^{\ast}bb(a+b)^{\ast}$ and let $L_{2}$ be the language $baa^{\ast}...
gatecse
1.6k
views
gatecse
asked
Sep 13, 2019
Theory of Computation
cmi2019
regular-expression
regular-language
finite-automata
+
–
4
votes
4
answers
128
CMI2018-A-1
Which of the words below matches the regular expression $a(a+b)^{\ast}b+b(a+b)^{\ast}a$? $aba$ $bab$ $abba$ $aabb$
Which of the words below matches the regular expression $a(a+b)^{\ast}b+b(a+b)^{\ast}a$?$aba$$bab$$abba$$aabb$
gatecse
1.1k
views
gatecse
asked
Sep 13, 2019
Theory of Computation
cmi2018
regular-language
regular-expression
easy
+
–
0
votes
0
answers
129
Ullman (Compiler Design) Edition 2 Exercise 5.2 Question 6 (Page No. 317)
Implement Algorithm $3.23$, which converts a regular expression into a nondeterministic finite automaton, by an L-attributed SDD on a top-down parsable grammar. Assume that there is a token char representing any ... never before returned by this function. Use any convenient notation to specify the transitions of the $NFA$.
Implement Algorithm $3.23$, which converts a regular expression into a nondeterministic finite automaton, by an L-attributed SDD on a top-down parsable grammar. Assume th...
admin
841
views
admin
asked
Sep 6, 2019
Compiler Design
ullman
compiler-design
syntax-directed-translation
regular-expression
finite-automata
parsing
+
–
0
votes
0
answers
130
Ullman (Compiler Design) Edition 2 Exercise 4.3 Question 2 (Page No. 216 - 217)
Repeat Exercise 4.3.1 on the following grammars: $S\rightarrow SS+\mid SS\: \ast\mid a$ $S\rightarrow 0S1\mid 01$ $S\rightarrow S ( S ) S\mid \epsilon$ $S\rightarrow (L)\mid a$ ... $bterm\rightarrow bterm\:and\:bfactor\mid bfactor$ $bfactor\rightarrow not\: bfactor\mid ( bexpr )\mid true \mid false $
Repeat Exercise 4.3.1 on the following grammars:$S\rightarrow SS+\mid SS\: \ast\mid a$$S\rightarrow 0S1\mid 01$$S\rightarrow S ( S ) S\mid \epsilon$$S\rightarrow (L)\mid ...
admin
676
views
admin
asked
Aug 20, 2019
Compiler Design
ullman
compiler-design
regular-expression
left-recursion
descriptive
+
–
0
votes
0
answers
131
Ullman (Compiler Design) Edition 2 Exercise 4.3 Question 1 (Page No. 216)
The following is a grammar for regular expressions over symbols $a$ and $b$ only, using $+$ in place of $\mid$ for union, to avoid conflict with the use of vertical bar as a metasymbol in ... to left factoring, eliminate left recursion from the original grammar. Is the resulting grammar suitable for top-down parsing?
The following is a grammar for regular expressions over symbols $a$ and $b$ only, using $+$ in place of $\mid$ for union, to avoid conflict with the use of vertical bar a...
admin
1.6k
views
admin
asked
Aug 20, 2019
Compiler Design
ullman
compiler-design
regular-expression
left-recursion
descriptive
+
–
0
votes
0
answers
132
Ullman (Compiler Design) Edition 2 Exercise 3.3 Question 12 (Page No. 128)
SQL allows a rudimentary form of patterns in which two characters have special meaning: underscore (_) stands for any one character and percent-sign (%) stands for any string of $0$ or more characters. In ... to express any SQL pattern as a regular expression, given that we know which character is the escape character.
SQL allows a rudimentary form of patterns in which two characters have special meaning: underscore (_) stands for any one character and percent-sign (%) stands for any st...
admin
345
views
admin
asked
Aug 5, 2019
Compiler Design
ullman
compiler-design
regular-expression
descriptive
+
–
0
votes
0
answers
133
Ullman (Compiler Design) Edition 2 Exercise 3.3 Question 11 (Page No. 127 - 128)
The UNIX shell command sh uses the operators in Fig. $3.9$ in filename expressions to describe sets of file names. For example, the filename expression *.o matches all filenames ending in. ... expressions can be replaced by equivalent regular expressions using only the basic union, concatenation, and closure operators.
The UNIX shell command sh uses the operators in Fig. $3.9$ in filename expressions to describe sets of file names. For example, the filename expression *.o matches all fi...
admin
524
views
admin
asked
Aug 5, 2019
Compiler Design
ullman
compiler-design
regular-expression
descriptive
+
–
0
votes
0
answers
134
Ullman (Compiler Design) Edition 2 Exercise 3.3 Question 10 (Page No. 127)
The operator ^ matches the left end of a line, and \ ... operators by an equivalent expression that does not use either of these operators?
The operator ^ matches the left end of a line, and \$ matches the right end of a line. The operator ^ is also used to introduce complemented character classes, but the co...
admin
308
views
admin
asked
Aug 5, 2019
Compiler Design
ullman
compiler-design
regular-expression
descriptive
+
–
0
votes
0
answers
135
Ullman (Compiler Design) Edition 2 Exercise 3.3 Question 9 (Page No. 127)
The regular expression $r\{m, n\}$ matches from $m$ to $n$ occurrences of the pattern $r$. For example, $a [1, 5]$ matches a string of one to five a's. Show that for every regular expression containing repetition operators of this form, there is an equivalent regular expression without repetition operators.
The regular expression $r\{m, n\}$ matches from $m$ to $n$ occurrences of the pattern $r$. For example, $a [1, 5]$ matches a string of one to five a's. Show that for ever...
admin
254
views
admin
asked
Aug 5, 2019
Compiler Design
ullman
compiler-design
regular-expression
descriptive
+
–
0
votes
0
answers
136
Ullman (Compiler Design) Edition 2 Exercise 3.3 Question 8 (Page No. 126 - 127)
In Lex, a complemented character class represents any character except the ones listed in the character class. We denote a complemented class by using ^ as the first character; this ... expression with complemented character classes, there is an equivalent regular expression without complemented character classes.
In Lex, a complemented character class represents any character except the ones listed in the character class. We denote a complemented class by using ^ as the first char...
admin
821
views
admin
asked
Aug 5, 2019
Compiler Design
ullman
compiler-design
regular-expression
descriptive
+
–
0
votes
0
answers
137
Ullman (Compiler Design) Edition 2 Exercise 3.3 Question 7 (Page No. 126)
Note that these regular expressions give all of the following symbols (operator characters) a special meaning: \ " . ^ ... the regular expression \*\* also matches the string **. Write a regular expression that matches the string "\.
Note that these regular expressions give all of the followingsymbols (operator characters) a special meaning:\ " . ^ $ [] * + ? {} | /Their special meaning must be turned...
admin
294
views
admin
asked
Aug 5, 2019
Compiler Design
ullman
compiler-design
regular-expression
descriptive
+
–
0
votes
0
answers
138
Ullman (Compiler Design) Edition 2 Exercise 3.3 Question 6 (Page No. 126)
Write character classes for the following sets of characters: The first ten letters (up to "j" ) in either upper or lower case. The lowercase consonants. The "digits" in a hexadecimal number (choose either ... we shall discuss extensively in Section $3.5)$. The extended notation is listed in Fig.$3.8$.
Write character classes for the following sets of characters:The first ten letters (up to "j" ) in either upper or lower case.The lowercase consonants.The "digits" in a h...
admin
1.2k
views
admin
asked
Aug 5, 2019
Compiler Design
ullman
compiler-design
regular-expression
descriptive
+
–
3
votes
0
answers
139
Ullman (Compiler Design) Edition 2 Exercise 3.3 Question 5 (Page No. 125 - 126)
Write regular definitions for the following languages: All strings of lowercase letters that contain the five vowels in order. All strings of lowercase letters in which the letters are in ascending lexicographic order. ... substring abb. All strings of a's and b's that do not contain the subsequence abb.
Write regular definitions for the following languages:All strings of lowercase letters that contain the five vowels in order.All strings of lowercase letters in which the...
admin
2.5k
views
admin
asked
Aug 5, 2019
Compiler Design
ullman
compiler-design
descriptive
regular-expression
+
–
1
votes
0
answers
140
Ullman (Compiler Design) Edition 2 Exercise 3.3 Question 4 (Page No. 125)
Most languages are case sensitive, so keywords can be written only one way, and the regular expressions describing their lexeme is very simple. However, some languages, like SQL, are case insensitive, so a keyword ... in a case-insensitive language. Illustrate the idea by writing the expression for "select" in SQL.
Most languages are case sensitive, so keywords can be written only one way, and the regular expressions describing their lexeme is very simple. However, some languages, l...
admin
1.1k
views
admin
asked
Aug 5, 2019
Compiler Design
ullman
compiler-design
regular-expression
compiler-tokenization
descriptive
+
–
2
votes
1
answer
141
Ullman (Compiler Design) Edition 2 Exercise 3.3 Question 2 (Page No. 125)
Describe the languages denoted by the following regular expressions: $a(a\mid b)^{\ast}a.$ $((\epsilon\mid a)b^{\ast})^{\ast}.$ $(a\mid b)^{\ast}a(a\mid b)(a\mid b).$ $a^{\ast}ba^{\ast}ba^{\ast}ba^{\ast}.$ $(aa\mid bb)^{\ast}((ab\mid ba)(aa\mid bb)^{\ast}(ab\mid ba)(aa\mid bb)^{\ast})^{\ast}.$
Describe the languages denoted by the following regular expressions:$a(a\mid b)^{\ast}a.$$((\epsilon\mid a)b^{\ast})^{\ast}.$$(a\mid b)^{\ast}a(a\mid b)(a\mid b).$$a^{\as...
admin
2.3k
views
admin
asked
Aug 5, 2019
Compiler Design
ullman
compiler-design
regular-expression
descriptive
+
–
2
votes
1
answer
142
Michael Sipser Edition 3 Exercise 1 Question 22 (Page No. 87)
In certain programming languages, comments appear between delimiters such as $\text{/#}$ and $\text{#/}.$ Let $C$ be the language of all valid delimited comment strings. A member of $C$ must begin with $\text{/#}$ ... $DFA$ that recognizes $C.$ b. Give a regular expression that generates $C.$
In certain programming languages, comments appear between delimiters such as $\text{/#}$ and $\text{#/}.$ Let $C$ be the language of all valid delimited comment strings. ...
admin
4.3k
views
admin
asked
Apr 21, 2019
Theory of Computation
michael-sipser
theory-of-computation
regular-expression
finite-automata
+
–
2
votes
1
answer
143
Michael Sipser Edition 3 Exercise 1 Question 21 (Page No. 86)
Use the procedure described in $\text{Lemma 1.60}$ to convert the following finite automata to regular expressions.
Use the procedure described in $\text{Lemma 1.60}$ to convert the following finite automata to regular expressions.
admin
8.2k
views
admin
asked
Apr 21, 2019
Theory of Computation
michael-sipser
theory-of-computation
finite-automata
regular-expression
+
–
1
votes
1
answer
144
Michael Sipser Edition 3 Exercise 1 Question 20 (Page No. 86)
For each of the following languages, give two strings that are members and two strings that are not members-a total of four strings for each part. Assume the alphabet $Σ = \{a,b\}$ in all parts. $a^{*}b^{*}$ $a(ba)^{*}b$ ... $aba\cup bab$ $(\epsilon\cup a)b$ $(a\cup ba\cup bb)\Sigma^{*}$
For each of the following languages, give two strings that are members and two strings that are not members—a total of four strings for each part. Assume the alphabet $...
admin
2.2k
views
admin
asked
Apr 21, 2019
Theory of Computation
michael-sipser
theory-of-computation
regular-language
regular-expression
+
–
0
votes
1
answer
145
Michael Sipser Edition 3 Exercise 1 Question 19 (Page No. 86)
Use the procedure described in $\text{Lemma 1.55}$ to convert the following regular expressions to non-deterministic finite automata. $(0\cup 1)^{*}000(0\cup 1)^{*}$ $(((00)^{*}(11))\cup 01)^{*}$ $\phi^{*}$
Use the procedure described in $\text{Lemma 1.55}$ to convert the following regular expressions to non-deterministic finite automata.$(0\cup 1)^{*}000(0\cup 1)^{*}$$(((0...
admin
6.3k
views
admin
asked
Apr 21, 2019
Theory of Computation
michael-sipser
theory-of-computation
regular-expression
finite-automata
+
–
1
votes
1
answer
146
Michael Sipser Edition 3 Exercise 1 Question 18 (Page No. 86)
Give regular expressions generating the languages of the alphabet is $\{0,1\}.$ $\text{\{w| w begins with a 1 and ends with a 0\}}$ $\text{\{w| w contains at least three 1s\}}$ ... $\text{The empty set}$ $\text{All strings except the empty string}$
Give regular expressions generating the languages of the alphabet is $\{0,1\}.$$\text{\{w| w begins with a 1 and ends with a 0\}}$$\text{\{w| w contains at least three 1s...
admin
7.5k
views
admin
asked
Apr 21, 2019
Theory of Computation
michael-sipser
theory-of-computation
regular-expression
+
–
0
votes
0
answers
147
Peter Linz Edition 4 Exercise 5.2 Question 10 (Page No. 145)
Give an unambiguous grammar that generates the set of all regular expressions on $Σ =$ {$a,b$}.
Give an unambiguous grammar that generates the set of all regular expressions on $Σ =$ {$a,b$}.
Naveen Kumar 3
408
views
Naveen Kumar 3
asked
Apr 14, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
grammar
regular-expression
+
–
0
votes
0
answers
148
Ullman (TOC) Edition 3 Exercise 5.1 Question 5 (Page No. 182)
Let $T=\{0,1(,),+,*,\phi,e\}.$ We may think of $T$ as the set of symbols used by regular expressions over alphabet $\{0,1\};$ the only difference is that we use $e$ for symbol $\in,$ to avoid potential ... Your task is to design a CFG with set of terminals $T$ that generates exactly the regular expressions with alphabet $\{0,1\}.$
Let $T=\{0,1(,),+,*,\phi,e\}.$ We may think of $T$ as the set of symbols used by regular expressions over alphabet $\{0,1\};$ the only difference is that we use $e$ for s...
admin
263
views
admin
asked
Apr 6, 2019
Theory of Computation
ullman
theory-of-computation
regular-expression
context-free-grammar
+
–
0
votes
0
answers
149
Ullman (TOC) Edition 3 Exercise 5.1 Question 2 (Page No. 182)
The following grammar generates the language of regular expression $0^{*}1(0+1)^{*}:$ $S\rightarrow A1B$ $A\rightarrow 0A|\in$ $B\rightarrow B|1B|\in$ Give leftmost and rightmost derivations of the following strings$:$ $00101$ $1001$ $00011$
The following grammar generates the language of regular expression $0^{*}1(0+1)^{*}:$$S\rightarrow A1B$$A\rightarrow 0A|\in$$B\rightarrow B|1B|\in$Give leftmost and right...
admin
238
views
admin
asked
Apr 6, 2019
Theory of Computation
ullman
theory-of-computation
context-free-grammar
regular-expression
+
–
0
votes
0
answers
150
Ullman (TOC) Edition 3 Exercise 4.2 Question 14 (Page No. 149 - 150)
We described the $"$product construction$"$ that took two DFA's and constructed one DFA whose language is intersection of the languages of the first two. Show how to perform the product construction on ... the product construction so the resulting DFA accepts the union of the languages of the two given DFA's.
We described the $"$product construction$"$ that took two DFA's and constructed one DFA whose language is intersection of the languages of the first two.Show how to perfo...
admin
224
views
admin
asked
Apr 6, 2019
Theory of Computation
ullman
theory-of-computation
regular-language
regular-expression
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
10
...
21
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register