NFA simulation in Java

I have been given an assignment to simulate an NFA in Java. Now the following regular expression that I have to simulate an NFA for is

ab*((b|d)|c*)

I think I have too many e-symbols. I was just wondering if the following image below is correct.

Answers


Your NFA graph is correct. It will match the regex ab*((b|d)|c*) and nothing else. However, it could be much simpler, e.g. like this:


Need Your Help

VC++ decoding diacritics characters from stream

c# visual-c++ character-encoding socket.io

I have a small application client/server app. Client app(C#), server side(VC++). My application will send any character to server side using streams; english characters works fine except non-english.

C# WPF - TransitioningContentControl with App.content

c# wpf animation user-controls mahapps.metro

I Work with the theme of MahApps (Metro Dark) I looked the animations of this theme.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.