1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to convert NFA to DFA in c

Discussion in 'C' started by ashokkumarrsp, Sep 12, 2006.

  1. ashokkumarrsp

    ashokkumarrsp New Member

    Joined:
    Sep 12, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    kindly give me the source code for NFA to DFA conversion.
     
  2. Bill Pursell

    Bill Pursell New Member

    Joined:
    Nov 29, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    kindly give me the source code for NFA to DFA conversion.

    Kindly describe what an NFA and a DFA are.:)
     
  3. bluedragon

    bluedragon New Member

    Joined:
    Sep 17, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    NFA - Non Deterministic Finite Automata
    DFA - Deterministic Finite Automata

    Write down the Steps that U know for the conversion

    I'll try creating the source

    There are i guess 3 different ways for the conversion
     
  4. imported_xpi0t0s

    imported_xpi0t0s New Member

    Joined:
    Jul 18, 2008
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    0
    Here you go. I don't know anything about NFAs and DFAs or how to convert between them, but if you know then just fill in the details and this will do the trick:
    Code:
    struct tagNFA
    {
    /* you need to fill this in */
    };
    
    struct tagDFA
    {
    /* you need to fill this in */
    };
    
    void initNFA(struct tagNFA *obj)
    {
    /* you need to fill this in */
    }
    
    void convertNFA2DFA(struct tagNFA *theNFA,struct tagDFA *theDFA)
    {
    /* you need to fill this in */
    }
    
    int main()
    {
      struct tagNFA myNFA;
      struct tagDFA myDFA;
      initNFA(&myNFA);
      convertNFA2DFA(&myNFA, &myDFA);
    }
    
     

Share This Page