The assignment shows the Implementation of the DFA Question :
Construct DFA for the the language of strings over Σ ={ a, b } of the
form a^(n) b^m | n,m>=1.
This project is done using Javascript (Node Js specifically)
Working of the program:
• NodeJS will run the JavaScript file at a particular port (which is most commonly port: 3000)
• After starting the server at a specified port, I have defined all required responses that it should give out to based on various requests which will be given by the user.
• There are 2 Main type of HTTP protocols through which information is communicated in this program
o GET
o POST
Also, I have displayed the Transition Function for the required DFA to give user a better understanding of the DFA problem that is implemented here.
Users can check for multiple strings one after the other. That is users are redirected back to the home page after checking a particular string.
Different Webpages have been created to handle both the acceptance as well as the non-acceptance of the string that will be entered by the user.
The Following shows the Interfaces of this program:
After Clicking on CLICK ME option we have the below interface:
If the Entered String is accepted then :
User will be re-directed back to HOME PAGE if he/she wants to check another string from both the above pages!!!