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?
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...
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...
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...
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...
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.
...
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...
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...
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 ()
);
...
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...
I want to apply rules of BNF Grammar to produce derivation for : a_Num
...
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...
Please suggest me some good books on "Formal languages and Automata Theory".
Thanks!
...
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...
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 ...
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...
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...
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...
Please help me find a grammar or automaton to decide the following language:
anbncn where n≥1
...
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...