Skip to main content

Questions tagged [regular-expressions]

Regular expressions or Regex is a search pattern for strings defined by a sequence of characters.

Filter by
Sorted by
Tagged with
3 votes
1 answer
93 views

Suppose that First-order logic sentence is a string described by the following rules : $[a-z]$ - is a First-order logic sentence if $\phi, \psi$ are First-order logic sentences, then $$(\neg \phi) \...
famesyasd's user avatar
  • 513
1 vote
0 answers
269 views

Im currently studying for an exam in theoretical computer science. Since I feel that it more belongs to mathematics than to practical computer science, I decided to ask here and not on stackoverflow. ...
JustMe's user avatar
  • 19
1 vote
1 answer
98 views

Is the class of regular languages closed under the following operations? (a) $A(L) = \{ w \mid \forall i ≥ 0 : w^i ∈ L \} = \{ w \mid w^* ⊆ L \}$ (b) $E(L) = \{ w \mid \exists i ≥ 2 : w^i ∈ L \}$ Can ...
bob's user avatar
  • 61
3 votes
0 answers
102 views

I am looking for the regular expression for binary strings consisting of $1$ and $0$ and containing $111$ exactly once to find their generating functions. For example, $101100001110,000111000,01010111,...
user avatar
1 vote
0 answers
56 views

Let $L:=\{ \omega \in \{0, 1\}^* : |\omega|_0 \in 3\Bbb{Z}\}$ where $|\omega|_0$ denote the number of $0$'s appearing in $\omega$ . Find a regular expression for $L$ . I am studying Automaton Theory ...
Superdivinidad's user avatar
2 votes
1 answer
79 views

I have an arithmetic expression and I want to find the minimum time to compute this expression knowing the delay of each operator. The operators are addition, subtraction, multiplication, and ...
Robert's user avatar
  • 61
4 votes
1 answer
306 views

Find the generating function for the binary strings that do not contain $0110$ or $11010$ as a substring. I am familiar with proofs similar to this post, where the 'symbolic method' is used for ...
JLGL's user avatar
  • 1,055
0 votes
1 answer
160 views

Is the language regular? My application of the pumping lemma suggests: splitting it in $xyz$: $$ x = \emptyset \mid y= (ab)^{j} \mid z=(ab)^{3n-j} $$ Pumping up $y$: $$ xyyz = (ab)^{3n+j} \mid (ab)^{...
Robert's user avatar
  • 21
2 votes
2 answers
203 views

Consider the equation $x=v\cdot x + w$ where $x$ is a variable regular expression, $v, w$ are fixed regular expressions, $v$ has no variables inside it, and $w$ has no $x$ inside it. It is easy to ...
user avatar
0 votes
1 answer
102 views

In the alphabet {a, b} for both automata and regular expressions, what would be four words that belong to the language of this regular expression and four which do not, regular expression = ((a|baa)∗(...
user avatar
1 vote
1 answer
412 views

I'm currently working on solving a question that requires determining which of the given regular expressions is equivalent to the language of the DFA provided. However, I'm encountering two primary ...
Ariana's user avatar
  • 375
0 votes
1 answer
54 views

I want to know if it is possible to represent the count of an element in a set, having different elements collected over a given period of time. Let's say $A$ is the set with varying elements at a ...
Ahed's user avatar
  • 13
0 votes
0 answers
84 views

I do my homework My regular expression is $b^m\,(ab)^na | m,n >= 0$ After several attempts I have this: The vertex q1 is the entry and q2 is the exit. Do you think it corresponds to the given ...
mhaddad's user avatar
  • 11
0 votes
0 answers
70 views

Construct a regular expression that defines the language of all words that contain either the aa-substring or the bb-substring but NOT BOTH the aa-substring and the bb-substring in the same word....
Veekash Singh's user avatar
0 votes
1 answer
79 views

I want to ask a short question. Can a regular expression expresses a context-free language that is not a regular language?
MNSAR's user avatar
  • 5
1 vote
1 answer
60 views

Took a Theory of Computation exam where one of the questions was : Is there an infinite amount of regular expressions for the language $L=\{aa,bb\}$ ? The proof requested was just an informal one. My ...
PatelisGM's user avatar
0 votes
1 answer
3k views

I need to write a regex that matches strings containing an even number of 0’s or even number of 1’s. (Alphabet Σ= 0,1) I have already tried ...
Mr User's user avatar
1 vote
2 answers
1k views

I need to write a regular expression that identifies the set of all possible strings over Σ={𝑎,𝑏} that end with an odd number of "a"s. I'm getting better with regular expressions, but ...
CurlyError's user avatar
0 votes
1 answer
36 views

I have this Alphabet Σ = {k,l} so I do not understand how I can find the words equal bigger than 3 ≤3 in L ((k|l)l*), should I use the words with 3 letters always starting with k or somthing else?
davis29's user avatar
3 votes
0 answers
103 views

Question Background A finite-state machine can be defined as a 5-tuple as follows (Sipser, pg. 35): The image below (taken from the Wikipedia article on autamata theory) seems to suggest that ...
Shadow43375's user avatar
0 votes
1 answer
267 views

I have a question about creating regular expression out of the given language. The language is : 𝐿3 = {𝑤∈{𝑎,𝑏,𝑐}∗|𝑤 𝑑𝑜𝑒𝑠 𝑛𝑜𝑡 𝑐𝑜𝑛𝑡𝑎𝑖𝑛 𝑎𝑎𝑎} I'...
dy 1995's user avatar
  • 25
0 votes
1 answer
83 views

Question. Determine if the languages are regular: $L_{1}=\{(ab)^{k}a(ba)^{k}\,|\,k\geq0\}$ $L_{2}=\{(ab)^{k}b(ba)^{k}\,|\,k\geq0\}$ I think both are not regular, I used the Pumping Lemma to prove, ...
DanielG's user avatar
  • 395
0 votes
0 answers
224 views

Question. Write a regular expression for the language: $L=\{0^{n}1^{m}\,\,\,|\,\,\,n+m(mod3)\neq0\}$ Attempt. $r=(000)^* (0(ε+0+1+011)+1(ε+1)) (111)^*$ Is my regular expression correct? If so, is ...
DanielG's user avatar
  • 395
-1 votes
1 answer
44 views

To describe the regex (a*+b+a)* in plain English you would simplify it to (a*)* + (b)* + (a)* . How would you describe (a*)* in English as the rest is just any number of bs or any number of as?
Jeff's user avatar
  • 101
0 votes
0 answers
67 views

So two regular expressions are equivalent if they are associated, i.e., produce the same regular language, I am curious about this because it is clear that the language produced by $b*a(a+b)*$ is ...
Jocsan's user avatar
  • 51

1
2 3 4 5
14