New answers tagged

3 votes
Accepted

DFA and NFA with 2 Substrings

Find an automaton for $L_1= \{uopv\mid u,v\in \Sigma^*\}$ and an automaton for $L_2 = \{upqv\mid u,v\in\Sigma^*\}$ (this should be easy enough). Then, you can compute the product automaton of the two ...
user avatar
  • 7,107
0 votes

regex find substring matches in text

One approach is to match against the regexp .* E .*, then figure out how it matches. Whether you can figure out how that matched depends on the algorithm you are ...
user avatar
  • 141k
0 votes

Showing that $(b^*a)^+.(b^*a) = (b^*a)^*$

let A=(b* a)+ ,B=(b* a) and C=(b* a)* we have to show that whether A.B=C here . indicates the concatenation of strings '+' is known as Kleene plus which means all kinds of non empty strings are ...
user avatar
-1 votes

Construct a regular expression for the set of strings over {a, b} that contain an odd number of a's and at most four b's

It says the constraints are Odd number of A's and At most 4 B's let's start the expression ->string may start with both A & B ======>(A+B) ->say the first letter of the string be A =====...
user avatar
1 vote
Accepted

Why is $L'=\{u\#v^R ~|~ u,v \in L\}$ and $L\in RL$ a regular language?

Regular languages are closed under reversal, therefore $L^R = \{v^R \mid v \in L\}$ is regular. Moreover, regular languages are closed under concatenation, therefore $L' = L \circ \{\#\} \circ L^R$ is ...
user avatar
  • 23.4k
0 votes

Regular Expressions with at least 3 b's and at most 2 a's

A regular expression can be developed from the following finite state machine for at most 2 As and at least 3 Bs by using all possible paths separate by |, and using * where their is a loop edge. ...
user avatar
  • 217
3 votes
Accepted

Are the set of all Bitcoin addresses a context-sensitive language?

Any answer I give you is likely to be unsatisfying and a little silly, both because we're squarely in theory-land here (and not the useful kind of theory, but theory that is irrelevant in practice), ...
user avatar
  • 141k
0 votes

Regular Expressions with at least 3 b's and at most 2 a's

I don't think there is any simple solution. There are 15 ways to write a word with 3 $b$'s and at most 2 $a$'s: $bbb$, $abbb$, $babb$, $bbab$, $bbba$, $aabbb$, $ababb$, $abbab$, $abbba$, $baabb$, $...
user avatar
  • 7,107
1 vote

How would I design a State Diagram (FSM) for a AC unit?

Your question's answer could be solved by Finite Automata with output that is Moore Machine or Mealy Machine. You have three cases: $Case:1$ When temperature is equal or more than $80°$ then output is ...
user avatar

Top 50 recent answers are included