Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4063194
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:41:41+00:00 2026-05-20T15:41:41+00:00

I was given a regular expression, and I am suppose to covert it to

  • 0

I was given a regular expression, and I am suppose to covert it to NFA and then DFA. Here’s the regular expression:

a ( b | c )* a | a a c* b

Then I coverted this to NFA using Thomson’s algorithm:
NFA

and here’s the DFA:
DFA

Can someone please take a quick look at let me know if I am wrong or right?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T15:41:41+00:00Added an answer on May 20, 2026 at 3:41 pm

    Since this is very likely homework, I’m hesitant to just give you the complete correct solution.

    Your NFA appears correct, but has a lot of superfluous states that aren’t necessary but do not adversely affect its correctness. (At first glance it looks like you could remove 11 states.)

    Your DFA is incorrect, though. This is because when you branch off to begin handling one condition of the string or the other, you later rejoin them together. This allows it to take the path from an accepted string matching a(b|c)*a and take in another b or c by travelling to nodes 15,17 or 11. It then accepts this string even though it doesn’t match your expression.

    What you need to do is basically stop this from happening. If you have additional questions feel free to ask.

    I highly recommend making a list of test strings that you know should be and shouldn’t be accepted, and then trace them through, making sure your automata ends in the correct (accept or reject) state.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When given a full URL I need a regular expression that I can use
I am trying to use a regular expression like this: string Size= 10.5M; Match
I am currently using the following regular expression: ^[a-zA-Z]{0,}(\\*?)?[a-zA-Z0-9]{0,} to check a string to
GetUsage/08-03-2011 to match this url i have used following regular expression in urls.py (
Should I be using RegularExpressions to do this? Possible to structure the results as
Suppose you are given a Class.dll assembly compiled from the following simple code: namespace
I'm trying to write a regular expression that will convert a full path filename
I am having trouble writing a regular expression in C#; its purpose is to
I'm trying to write a regular expression that matches strings like these: title(Hello+World) #=>
I'm parsing a long string and want to use a regular expression for part

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.