python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Determining language from a grammar
I'm trying to solve an exercise on grammars and languages. Here is the exercise:
Let the grammar G be:
G = {V, T, P, S},
V = {S, A, B},
T = {a, b, c},
P = {S → ABA; A → a | bb; B → bS | ε}
What la...
Draconyx
Votes: 0
Answers: 1
Stuck in a loop while trying to get Chomsky normal form
I have the automata
S'-> S
S -> a | XbY
X -> ε | aZ | Y
Y -> b | XX
z -> ab | SS
After doing one round of removing null productions i got:
S'-> S
S -> a | XbY | bY
X -> aZ |...
Teo
Votes: 0
Answers: 1
What is the point of the 4 grammars specified in Chomsky hierarchy?
I'm currently studying compiler's and am on the topic of "Chomsky Hierarchy and the 4 languages." But it beats me as to what the practical purpose of all this is?
It'd be great if I could s...
jeremy
Votes: 0
Answers: 1
Check whether it accepts a finite determinant automaton at least one word of length k, if so - print it, else - print "No"
I wrote data structure and some functions for automata, but I stuck with find_way function that will accept automata object and k.
type FSM q = ([q], Alphabet, [Transition q], q, [q])
type Alphabet = ...
Hedgehog
Votes: 0
Answers: 1