0
1.9kviews
Write a necessary function for a given automata

enter image description here

1 Answer
0
22views

Problem:

function S {

    if input == a

        call A.next ()

}

function A {

    if input == a

        call A.next ()

    else

        if input == b

        {
            call B.next ()
            print "Accpet".
        }
}

function B {

    if input == a

        call A.next ()

    else

        if input == b

        {
            call B.next ()

            print "Accept"

        }

}
Please log in to add an answer.