Results 1 to 5 of 5
  1. #1
    Mmmph!!! doomgiver's Avatar
    Join Date
    Nov 2010
    Location
    Mmmphhmph Mmphph
    Posts
    1,972

    Default some homework help (automata/regular expressions)



    this is the non finite automata

    the one state at the top with triangle is the start state
    the one on the right bottom is the end state.

    i want to describe it with a regular expression.


    solutions i thought of :

    abc((dbc)*+(febc)*)fg

    it will go from a-b-c, then it can branch as many times as it wants in d-b-c, or it can branch f-e-b-c, then it ends as f-g

    other two possible :

    abc((dbc)+(febc))*fg
    abc((d+fe)*bc)fg


    ()* shows that it is repeated many times , + means OR.

    any help?
    Mmmphh-mphhhh-mmphh mhh!!!

  2. #2
    Right Off the Assembly Line
    Join Date
    Oct 2011
    Posts
    20

    Default Re: some homework help (automata/regular expressions)

    solution: a(bcd+bcef)*bcfg

    why your 1st solution is wrong: only dbc loop or febc loop, not both.

    why your 2nd solution is wrong: messed up ordering in the loop. even if you correct the order, it wont end with bcfg. add bc before the end, not at start.

    why your 3rd solution is wrong: loops of only d or fe are also possible in that solution.
    Last edited by rhlravi; 22-11-2011 at 02:44 PM.

  3. #3
    Scene Addict mitraark's Avatar
    Join Date
    Nov 2010
    Location
    Kolkata / Durgapur
    Posts
    1,064

    Default Re: some homework help (automata/regular expressions)

    a(bcd+bcfe)*bcfg , very well done rhlravi !

    WHen I looked at the program the first solution that came to my mind was

    a (bcd)*+(bcf(e+g))* --> WRONG

    Automata is an AWESOME Subject , 1st three months of the semester , i didn;t understand anything , and when i finally began to get it , i liked it more
    i5 760 || Gigabyte H55 || Corsair 4GB 1333MHz || XFX ATI HD5670 1GB
    WD 2TB + Seagate 2 TB x2 + Seagate 1 TB + Seagate Freeagent 1 TB + Buffalo USB3.0 1 TB
    Corsair CX400 || Zebronics Bijli || Samsung P2350 || Altec Lansing VS2621
    My Speedtest :D || LG Optimus L9 P765

  4. #4
    Neo
    Neo is offline
    Bird of Hermes Neo's Avatar
    Join Date
    Jun 2011
    Location
    Near my Computer.
    Posts
    935

    Default Re: some homework help (automata/regular expressions)

    what the hell is this??

  5. #5
    Mmmph!!! doomgiver's Avatar
    Join Date
    Nov 2010
    Location
    Mmmphhmph Mmphph
    Posts
    1,972

    Default Re: some homework help (automata/regular expressions)

    ok, thanks
    Mmmphh-mphhhh-mmphh mhh!!!

Similar Threads

  1. Regular expressions in python
    By abhijangda in forum Programming
    Replies: 2
    Last Post: 27-03-2011, 08:29 PM
  2. Homework Help For Math
    By athometuition in forum Education
    Replies: 0
    Last Post: 02-09-2010, 05:00 PM
  3. The Homework Thread
    By alexanderthegreat in forum Chit-Chat
    Replies: 10
    Last Post: 19-03-2009, 07:45 PM
  4. Little Homework Help
    By hitman050 in forum QnA (read only)
    Replies: 5
    Last Post: 14-06-2007, 04:13 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Close