finite-automata

Tool for drawing automata and syntax trees [closed]

风流意气都作罢 提交于 2019-12-03 00:51:24
I am searching for a free tool(s) to create visually appealing diagrams of finite automata and syntax trees. Note: I really just want to draw diagrams. I do not have to create a model or do something fancy with it. Thanks for your time. EDIT : I might add, that I am creating documentation in Latex and therefore I am also open to tex-based diagramming solutions. Does Graphviz meet your needs: creates diagrams from text example: http://www.graphviz.org/Gallery/directed/fsm.html 来源: https://stackoverflow.com/questions/4113867/tool-for-drawing-automata-and-syntax-trees

What is the use of finite automata? [closed]

大兔子大兔子 提交于 2019-12-03 00:08:21
What is the use of finite automata ? And all the concepts that we study in the theory of computation. I've never seen their uses yet. They are the theoretical underpinnings of concepts widely used in computer science and programming, and understanding them helps you better understand how to use them (and what their limits are). The three basic ones you should encounter are, in increasing order of power: Finite automata, which are equivalent to regular expressions. Regular expressions are widely used in programming for matching strings and extracting text. They are a simple method of describing

How useful is Turing completeness? are neural nets turing complete?

时光毁灭记忆、已成空白 提交于 2019-12-02 16:42:55
While reading some papers about the Turing completeness of recurrent neural nets (for example: Turing computability with neural nets, Hava T. Siegelmann and Eduardo D. Sontag, 1991), I got the feeling that the proof which was given there was not really that practical. For example the referenced paper needs a neural network which neuron activity must be of infinity exactness (to reliable represent any rational number). Other proofs need a neural network of infinite size. Clearly, that is not really that practical. But I started to wonder now if it does make sense at all to ask for Turing

What is a finite state transducer?

牧云@^-^@ 提交于 2019-12-02 14:18:07
Can someone please tell me what a finite state transducer is? I have read the Wikipedia article and don't understand a thing. A finite state transducer (FST) is a finite state automaton (FSA, FA) which produces output as well as reading input, which means it is useful for parsing (while a "bare" FSA can only be used for recognizing, i.e. pattern matching). An FST consists of a finite number of states which are linked by transitions labeled with an input/output pair. The FST starts out in a designated start state and jumps to different states depending on the input, while producing output

How to use Finite Automaton to implement a scanner

若如初见. 提交于 2019-12-02 12:18:09
问题 I'm building a simple scanner. Suppose I have the following tokens defined for my language: !, !=, !==, <, <<, { Now I can specify them using regular expressions, so: !=?=? | { | <<? Then I used http://hackingoff.com to build NFA and DFA. Each machine now can determine if the input is in the language of regexp or not. But my program is a sequence of tokens, not one token: !!=!<!==<<!{ My question is how I should use the machines to parse the string into tokens ? I'm interested in the approach

How to use Finite Automaton to implement a scanner

时光怂恿深爱的人放手 提交于 2019-12-02 05:39:17
I'm building a simple scanner. Suppose I have the following tokens defined for my language: !, !=, !==, <, <<, { Now I can specify them using regular expressions, so: !=?=? | { | <<? Then I used http://hackingoff.com to build NFA and DFA. Each machine now can determine if the input is in the language of regexp or not. But my program is a sequence of tokens, not one token: !!=!<!==<<!{ My question is how I should use the machines to parse the string into tokens ? I'm interested in the approach rather then implementation. The most common rule is "maximal munch", which always selects the longest

Testing intersection of two regular languages

自古美人都是妖i 提交于 2019-12-01 18:19:44
问题 I want to test whether two languages have a string in common. Both of these languages are from a subset of regular languages described below and I only need to know whether there exists a string in both languages, not produce an example string. The language is specified by a glob-like string like /foo/**/bar/*.baz where ** matches 0 or more characters, and * matches zero or more characters that are not / , and all other characters are literal. Any ideas? thanks, mike EDIT: I implemented

How to find the intersection of two NFA

删除回忆录丶 提交于 2019-12-01 07:46:13
In DFA we can do the intersection of two automata by doing the cross product of the states of the two automata and accepting those states that are accepting in both the initial automata. Union is performed similarly. How ever although i can do union in NFA easily using epsilon transition how do i do their intersection? You can use the cross-product construction on NFAs just as you would DFAs. The only changes are how you'd handle ε-transitions. Specifically, for each state (q i , r j ) in the cross-product automaton, you add an ε-transition from that state to each pair of states (q k , r j )

How to find the intersection of two NFA

和自甴很熟 提交于 2019-12-01 04:26:24
问题 In DFA we can do the intersection of two automata by doing the cross product of the states of the two automata and accepting those states that are accepting in both the initial automata. Union is performed similarly. How ever although i can do union in NFA easily using epsilon transition how do i do their intersection? 回答1: You can use the cross-product construction on NFAs just as you would DFAs. The only changes are how you'd handle ε-transitions. Specifically, for each state (q i , r j )

How should one proceed to prove (or find) if two regular expressions are same or equivalent?

一曲冷凌霜 提交于 2019-11-30 07:18:05
For example, in an assignment given to me, we were asked to find out if two regular expressions are equal or not. (a+b+c)* and ((ab)**c*)* My question is how is one supposed to do that? If I draw the transition graphs for both and then run a few strings through it and show that both of the TGs are able to accept it, is that a sufficient proof ? If not, how do I do it? Is there a mathematical/axiomatic approach towards this? Thanks in advance. EDIT: There is another thing that I'd like to clear which is kind of related to this question. Are the two FAs depicted in the photo below the same? i.e.