toc problem solving
toc problem solving
Sol: Step 1: Note the different values of n, and m, and list the corresponding
words for the different values.
Step 2: We make the last state the final state to signify acceptance of the string.
Finally, we add a reject state to send input sequences that are not in the
language.
Sol: Step 1:The first step is to figure out what the start state of the equivalent DFA is
Step 2:The next step would be to see what subset of states this state would transition
to upon a 0.
Step 3: In JFLAP click the state expander button, then click the state that you
want to expand.
Step 4: Repeat the process of clicking the state expander button and then clicking
the states.
Final state:
3.Write a context-free grammar for L = {a^n b^m c^k : n+2m=k, n≥0, m≥0}.
Sol: Step 1: Note the different values of n, m, and k and list the corresponding words for
the different values.
L = { λ, bcc, ac, abccc, abbccccc ..}
Step 2:Using S as the start symbol, fill the first row with S -> aSc like so:
Step 2. Check the type of grammar using Test > Test for Grammar Type.
Verify known strings using Input > Multiple Brute Force Parse.