automata

Good way to learn Scala?

I've recently become interested in learning Scala, my first thought was a simple compiler, but I don't have very good knowledge of Automata theory. So my question is: what's a good project or tutorial to learn scala with? ...

Is it possible to "learn" a regular expression by user-provided examples?

Is it possible to "learn" a regular expression by user-provided examples? To clarify: I do not want to learn regular expressions. I want to create a program which "learns" a regular expression from examples which are interactively provided by a user, perhaps by selecting parts from a text or selecting begin or end markers. Is it pos...

Can I Determine the Set of First Chars Matched by Regex Pattern?

I would like to be able to compute the set of all characters which may be matched as the first character in a string by a given instance of java.util.regex.Pattern. More formally, given the DFA equivalent to a certain regular expression, I want the set of all outgoing transitions from the start state. An example: Pattern p = Pattern.c...

Code Golf: Automata

I made the ultimate laugh generator using these rules. Can you implement it in your favorite language in a clever manner? Rules: On every iteration, the following transformations occur. H -> AH A -> HA AA -> HA HH -> AH AAH -> HA HAA -> AH n = 0 | H n = 1 | AH n = 2 | HAAH n = 3 | AHAH n = 4 | HAAHHAAH n = 5 | AHAHHA n...

How should Chomsky's Hierarchy and Turing Machines influence language design?

I'm currently studying for a discrete mathematics test in which we are learning Chomsky's hierarchy and the type of automatas that recognize each level of the hierarchy. I'm being taught that most computer languages fall within "level 2 and 1" of the hierarchy, but not precisely how. My questions are: What features belong to each lev...

Advanced Formal logic / Automata Theory textbook

I know this is more a Math/Formal Language/Automata/Computer science question than an a programming one, but I hope I can get some advice on a comprehensible textbook (not an indecipherable monograph) on formal logic beyond Propositional and Predicate Calculus. I’m especially interested in monadic second order logic and Büchi Automata. ...

How can I construct a grammar that generates this language?

I'm studying for a finite automata & grammars test and I'm stuck with this question: Construct a grammar that generates L: L = {a^n b^m c^m+n|n>=0, m>=0} I believe my productions should go along this lines: S->aA | aB B->bB | bC C->cC | c Here's where I have doubts How can my production for C remember the numbers of m a...

Where can I find sample automata and turing machines?

I'm studying for an automata test on a course that's heavily based on jflap. Trouble is we don't have much documentation and the sample automata that I've found on jlap like this and this, are insufficient to prepare for the upcoming test. Where can I find more? Any other resource with sample turing machines shown as graphs with transi...

Making an index for a search by PHP

How can you search only unique words with PHP such that I can learn the basics in making the search? I have had a few problems in making a multidimensional array for questions. My first unsuccessful attempt is the following. #1 $result = pg_query_params ( $dbconn, "SELECT question_id, body FROM questions", array () ); ...

Cellular Automaton on WPF

Hi, currently im taking a Master degree course in Computer Sciences, and i´d like to implement a Cellular Automata in WPF. The rendering performance must be enough to display a lattice (grid) containing 200,000 cells. Since updating visuals is very slow in WPF (due to the visual and logical tree), maybe it's better to use old good Pict...

BNF Grammar Derivation

I want to apply rules of BNF Grammar to produce derivation for : a_Num ...

Using finite automata as keys to a container

I have a problem where I really need to be able to use finite automata as the keys to an associative container. Each key should actually represent an equivalence class of automata, so that when I search, I will find an equivalent automaton (if such a key exists), even if that automaton isn't structurally identical. An obvious last-resor...

Automata Theory books

Please suggest me some good books on "Formal languages and Automata Theory". Thanks! ...

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

Design Pattern problem involving N states and transitions between them

Hi All, I have a problem at hand and I am not getting which design pattern to use. The problem goes as such: I have to build a system which has 'N' states and my system has to do a transition from any state to any other state depending on some conditions. Ex: On condition 1, movement from State 1 to 3 and on condition 2 from state 1 ...

Designing a Turing Machine's state table

Are they any helpful guidelines to describing what a Turing machine does if you already have the pseudo code for the algorithm? I'm taking a course on complexity theory and it takes me a while to describe a Turing machine that decides or accepts some language (states, transitions, etc.) even though I know how I could code it in somethin...

What are the useful limits of Linear Bounded Automata compared to Turing Machines?

There are languages that a Turing machine can handle that an LBA can't, but are there any useful, practical problems that LBAs can't solve but TMs can? An LBA is just a Turing machine with a finite tape, and actual computers have finite storage, so it would seem to me that there's nothing of practical importance that an LBA can't do. E...

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

I need to find an automaton for this language

Please help me find a grammar or automaton to decide the following language: anbncn where n≥1 ...

Is there a good digraph layout library callable from C++?

The digraphs represent finite automata. Up until now my test program has been writing out dot files for testing. This is pretty good both for regression testing (keep the verified output files in subversion, ask it if there has been a change) and for visualisation. However, there are some problems... Basically, I want something callable...