(10) Given the definition of functions in the downloadable file beside this home- work document), write the following fu
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
(10) Given the definition of functions in the downloadable file beside this home- work document), write the following fu
(10) Given the definition of functions in the downloadable file beside this home- work document), write the following functions: isFinal(X) outputs true if X is a final state and false (nil) otherwise. getNextState(s, c) outputs the next state given a state s and a symbol c. scan(s, input) where s is a state and input is a list of sym- bols. It outputs, to the console, all states, which the automata has gone through in terms of input. It further outputs to console ACCEPT if input is accepted by the automata and REJECT Otherwise. For example, scan(q0, (0, 1)) will output QO Q2 Q3 REJECT.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!