finite-automata

Pac-Man representation with Finite State Automaton

Hi there, Consider a game similar to pac-mac that we want to represent it with an FSA graph. We have a maze (table) and there are berries into it in random positions. The goal is to eat all the berries in the maze. The commands we have to consider for the control are the following: GOAHEAD, LEFT, RIGHT, CHECKBERRY(that checks if there is...

Lex and Yacc for Finite Automata

I want to develop a tool to construct the transition graph of any finite automata given its transition table, start state and final state using Lex and Yacc. Tool should also provide a facility to check whether a string is accepted by the automata or not. Can anyone tell me how to do it. ...

NFA to DFA question

First, this is not a question asking for the algorithm to convert a NFA to DFA. It's known (and proved) that the equivalent DFA of a NFA has at most 2n states, even though most of the times it will have more or less the same number of states as the NFA. How may I predict an estimate for the number of states the NFA-equivalent DFA will ...

Good resources to learn about models of computation?

Out of curiosity, I am trying to identify what model of computation a system I work with is functionally equivalent to, and prove the equivalence. The longer I spend on this problem the more I suspect the system isn't Turing-equivalent. My understanding of Turing Machines and recursively enumerable languages is good but I don't know mu...

what is mean by contex free not regular

Hi, I am preparing contex free grammar for an exam. I couldn't understand why the language { a^n b^n | n>=0} is context free but not regular. Why is it not regular? When can we say that an expression is not regular? Thanks ...

Testing intersection of two regular languages

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 ** matche...

Automata Design software

I am looking for an open source GUI based application that can draw either FSM or Automata. Anyone knows of anything? ...

Finite State Machine Spellchecker

Possible Duplicate: debugging finite state machine spell checker code I would love to have a debugged copy of the finite state machine code below. I tried debugging but could not, all the machine has to do is to spell check the word "and",an equivalent program using case is welcomed. #include<cstdlib> #include<stdio.h> #inclu...

Why does my finite state machine take so long to execute?

Hello all :) I'm working on a state machine which is supposed to extract function calls of the form /* I am a comment */ //I am a comment pref("this.is.a.string.which\"can have QUOTES\"", 123456); where the extracted data would be pref("this.is.a.string.which\"can have QUOTES\"", 123456); from a file. Currently, to process a 41kb fil...

Theory of Computation - Showing that a language is regular..

I'm reviewing some notes for my course on Theory of Computation and I'm a little bit stuck on showing the following statement and I was hoping somebody could help me out with an explanation :) Let A be a regular language. The language B = {ab | a exists in A and b does not exist in A*} Why is B a regular language? Some points are obvi...

How to perform FST (Finite State Transducer) composition

Consider the following FSTs : T1 0 1 a : b 0 2 b : b 2 3 b : b 0 0 a : a 1 3 b : a T2 0 1 b : a 1 2 b : a 1 1 a : d 1 2 a : c How do I perform the composition operation on these two FSTs (i.e. T1 o T2) I saw some algorithms but couldn't understand much. If anyone could explain it in a easy way it would be a major help. Please not...

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

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 a...

Implementation techniques for FSM states

How do you go about implementing FSM(EDIT:Finite State Machine) states? I usually think about an FSM like a set of functions, a dispatcher, and a thread as to indicate the current running state. Meaning, I do blocking calls to functions/functors representing states. Just now I have implemented one in a different style, where I still rep...

To use goto or not ?

Hello everyone. This question may sound cliched but I am in a situation here. I am trying to implement a finite state automaton to parse a certain string in C. As I started writing the code, I realised the code may be more readable if I used labels to mark the different states and use goto to jump from one state to another as the cas...

vector vs set in java

which one do you prefer? i want to make a finite automata in java,. it's more efficient using vector or set??? ...

What are the theoretical implications of unbounded lookbehind?

Most languages allow fixed-length or finite-length lookbehind. One notable exception is .NET, which allows the use of the * operator. However, .NET regexs can already recognize balanced parentheses using named capture, which is not a regular language. Are regexs still regular with * in lookbehind? Extended answers for subexpressions ...

NFA minimization without determinization

It is well-known how one gets from an NFA for a regular language to a minimal DFA. However, the DFA might have an exponentially larger number of states. What I need is a way to reduce an NFA, giving again an NFA but with a smaller number of states. T.i. I don't need the result to be deterministic, but I'd like it to be as small as possi...

(FInite State Machine) - Implementing a XML schema validator in javascript

Hello, I have been working on a project for a month or so now to develop a XML validator (XSD) in javascript. I have gotten really close but keep running into problems. The only thing I have working well is normalizing schema structures into FSA that I store in the DOM. I have tried several methods to validate my xml structures agains...

Extremely Simple Regex Expression Clarification (10)*

Hey all, I feel bad about asking a question so simple, but I can't figure this out for the life of me. I need to construct a NFA based on some languages, and the only one I can't figure out is this one: L = (10)* Note that I am not asking for any help concerning the FSM, but only some clarification on what the language represents. ...

Determinant Finite Automata (JFLAP)

Hello all, I have a DFA question (Determinant Finite Automata) . We are using JFLAP to construct the automata. I cannot figure this question out to save my life! Here it is "DFA to recognize the language of all strings that have an even number of zeros and an odd number of ones." So the alphabet is {0,1} and only using 0,1. So I ...