Skip to main content
Advice
0 votes
1 replies
43 views

I've gotten an assignment to proof the Lemma in the title as part of my Formal methods in Software Engineering class, but I do not have anywhere to start in regards to the Proof. All of the literature ...
Nebojša Kaišarević's user avatar
1 vote
0 answers
131 views

Hi I was trying to implement a plot function for a DFA class, using networkx in python. def plot(self): G = nx.MultiDiGraph() nodes = self.collect_nodes() for n in nodes: ...
Jip Helsen's user avatar
  • 1,426
1 vote
1 answer
137 views

such as .*ab For this regex, I can build an NFA using the Thompson algorithm like: When I try to use the subset construction algorithm to change it to a DFA, I find the result is weird. the DFA ...
caterpie's user avatar
0 votes
1 answer
66 views

When building the DFA for the lexer of my programming language, should each character (e.g., n, i, f) appear as a single shared node across all token paths, or should I allow duplicate nodes for the ...
AdirMor's user avatar
  • 35
0 votes
0 answers
52 views

I have two finite sets of strings S_1, S_2 that are described by DFAs (e.g. these sets are regular languages, but I want to emphasize the fact that they are finite of known maximum length). I need to ...
zugzwang's user avatar
3 votes
1 answer
83 views

I'm given this deterministic finite automaton (DFA): I have to construct a regular expression for it. I do not understand one thing in the method described in my handbook. First of all, we have to ...
Douglas Richard Landa's user avatar
0 votes
0 answers
62 views

I’m working on a DFA-based lexer using regex derivatives for tokenizing lexemes. I've built a setup that, theoretically, should handle regex simplification and DFA transitions accurately. For the most ...
Jacques's user avatar
  • 51
1 vote
1 answer
231 views

I've been dealing with problem 10 on Leetcode (Regular expression matching), where you are supposed to write a program that matches strings to a given regex.I wrote a solution in C that had passed 308 ...
madmaddmax's user avatar
-3 votes
1 answer
186 views

For my exercise I'm supposed to create two DFA's. The task specifically is: Construct a DFA over the alphabet Σ={1,0} accepting the following regular languages. a) An arbitrary long sequence of zeros ...
Auxelia's user avatar
  • 11
0 votes
1 answer
523 views

I'm trying to construct a DFA (binary only) that contains "11" or ends with "10". I tried to do the following: $q2$ and $q3$ are accepting states State 0 1 $q0$ $q0$ $q1$ $q1$ $q3$ ...
Salty Champ's user avatar
0 votes
1 answer
64 views

I want to only allow one type of object as function parameter. Object keys must start with $, only contain alphabetical characters, and its values must be of type Test. Under "example 1" ...
msbb's user avatar
  • 53
0 votes
1 answer
518 views

I want to create a regular expression of odd lengths of a and b. I found this solution on Stack Overflow: ((a+aaa)*(b+bbb)*(a+aaa)*(b+bbb)*(a+aaa)*)*(ab+ba)......... I found it to be correct from ...
sachin yadav's user avatar
0 votes
1 answer
69 views

I have been given this theorem and example that goes with it: Theorem 1.49 The class of regular languages is closed under the star operation. PROOF IDEA     We have a regular language 𝐴1 and want to ...
DaneShuler's user avatar
0 votes
1 answer
122 views

I am working on theory of computer science problems but cannot get these to work: a. Give an NFA recognizing the language (01 ∪ 001 ∪ 010)* b. Convert this NFA to an equivalent DFA. Give only the ...
DaneShuler's user avatar
1 vote
1 answer
302 views

I have this finite automata (FA) and want to write its language. I think its L={x E {0,1} | {x with subset of 00 and ends in 1} and it would help to know what the type of FA it is. I think it's a DFA ...
cool cat's user avatar

15 30 50 per page
1
2 3 4 5
39