Question: here is what I have been working on for a week but everything I try is not working if some one could work it out




here is what I have been working on for a week but everything I try is not working if some one could work it out and explain it to me how the program runs I would appreciate it
COSC 3302 Programming Assignment 1 (Lectures 1, 2, and 3) 1. (Membership problem for a DFA). Input: A (deterministic) finite automaton is a 5-tuple M (a, y, qo, A, 60, where a is a finite set of states, y is a finite input alphabet, go E a is the initial state, Aga is the set of accepting states, and 6 Qx Q is the transition function Note: From state q the machine will move to state 6(q, a) if it receives input symbol o. In other words, the destination state is unique hence FA is deterministic (DFA). Example Graph of a DFA Accepts all strings without two consecutive 1's. 0,1 Start Previous Previous Consecutive OK, is have does not ends in a been seen end in 1 single 1. Alternative Representation: Transition Table Final states Columns starred input symbols A A B Arrow for B A C Start state C C C Rows states The notation 5 (q, x) describes the state the FA is in after starting in state q and receiving input string x. The extended transition function 6*: axy a is defined recursively as follows: For every q E a, (q, A) J q For every q E a, every y E y, and every GEy, (q, yo)-8 (q, y), o). This just says that if you already know how to process the string y, then to process one additional symbol o, you use the ordinary transition function 8 starting from the state 6 (q, y)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
