What is the best data structure to implement NFA and DFA, or these two needs to be represented in diffrent data structure for efficiency? I am actually trying to convert NFA to DFA, then check weather a particular string is accepted by DFA OR NOT.
What is the best data structure to implement NFA and DFA, or these two needs to be represented in diffrent data structure for efficiency? I am actually trying to convert NFA to DFA, then check weather a particular string is accepted by DFA OR NOT.
First of all, please post some code to show where you're having trouble. second, explain what DFA and NFA are.
NFA= Non-deterministic Finite Automata
DFA= Deterministic Finite Automata
without knowing what kind of datasructure is good for such things, I can't proceed, I must get a good idea of what can be use to make it an efficient progrmming.
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }