Skip to content

arpit7714/DFA-to-NFA-Without-Epsilon-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

DFA-to-NFA-Without-Epsilon-

This program is taking input from the file nfa.txt and pritinf the output into the file dfa.txt
Input Format
N M // N- number of states , M- Number of Symbol Used
C 1--C //C - Numbe of final states ,1--c - to declare which states are the final states
K //Number of transition function
a s b 1---b // a is the previous state , s is the input symbol (Symbol starts from 1 --- n and states always starts from 0--n), b is the number of states is goes to after taking that particular symbol , 1--b is the states that which it goes.
-----------
-----------
-----------


----------k times

Input


5 2
1 4
9
0 1 2 0 1
0 2 1 3
1 1 1 2
1 2 1 2
2 1 1 4
3 1 1 3
3 2 1 2
4 1 1 4
4 2 1 3



Output

DFA for the corresponding NFA
0 0,1 3
0,1 0,1,2 2,3
3 3 2
0,1,2 0,1,2,4f 2,3

2,3 3,4f 2
2 4f -1
0,1,2,4f 0,1,2,4f 2,3

3,4f 3,4f 2,3
4f 4f 3
-1 -1 -1



where f means the final states and -1 means phi

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages