home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,885 of 2,753   
   klyjikoo to All   
   Re: NFA and negation/conjunction   
   14 May 10 22:59:02   
   
   From: klyjikoo@gmail.com   
      
   Recently I Built a tool for generating NFA's from simple regexes and   
   then reducing the NFA,i simply used the following rule for conjunction   
   of NFA's during construction:   
   If N1 and N2 are the NFAs  associated with regular expression R1 and   
   R2  respectively, then we construct the N' associated with R1R2 as   
   follows:   
      
   a)  For each final state s of N1, we make any transition that initiate   
   from start state of N2  also to initiate from s.   
      
   b)  Start state of N1 would be start state of N'.   
      
   c)  Final states of N2 would be final states of N'.   
      
   d)  If start state of N2 is a final state then final states of N1 also   
   would be final states of N'.   
      
   e)  We eliminate start state of N2 and all related transition if it is   
   a useless state in N'.   
      
   For negation of NFA you could interchange the start state and final   
   states of Original NFA .   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca