Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Union Language

Options
  • 05-08-2007 6:33pm
    #1
    Closed Accounts Posts: 1,080 ✭✭✭


    Kleene’s Theorem union language FA1+FA2.
    http://img233.imageshack.us/my.php?image=image5cl5.jpg
    http://img233.imageshack.us/my.php?image=image6ai1.jpg

    Ok I am trying to this one from the book but iv gotten lost!

    1st off, If you have an (a) do you read from the last pos of (a) lets say its (a)'s last pos was X2 and (b)'s last pos was X1 do you read from X1 OR X2?

    Now looking at the scans I have above, at Z2 when you read an (a) it will go to X3 or Y1 and you have reached a final state do you start back at X1 the next time?

    I also dont understand how you get Z5 from reading a (b) at Z4.

    Any help would be great.


Comments

  • Closed Accounts Posts: 161 ✭✭nude_hamster


    ahh i did these in first year...great fun ! :)
    I also dont understand how you get Z5 from reading a (b) at Z4.
    well that one is easy , your other two questions, seem to show that your diving into this, without a method of creating this union.
    but you get to Z5 from Z4 by reading a 'b' because Z5 is the equivalent of X3 or Y2 and Z4 is the equivalent of X3 or Y1. on FA2 reading a 'b' at Y1 will bring you to Y2. and on FA1 reading a 'b' at X3 brings you back to X3. so you create the state Z5 which is equivalent to X3 and Y2.

    Do you understand how to create these new states? This book doesnt really explain how to do it step by step, I know the book and you had to have a good understanding of what came previous, but if you dont understand how these new states are being created, i suppose i could draw up the process step by step..


  • Closed Accounts Posts: 1,080 ✭✭✭eamoss


    ahh i did these in first year...great fun ! :)

    Oh yea they are great fun alrite :p
    if you dont understand how these new states are being created, i suppose i could draw up the process step by step..
    Yeah if you could or even if you have a link to one that is done step by step.


  • Closed Accounts Posts: 161 ✭✭nude_hamster


    Ok going from those two FAs , FA1 and FA2, that you have in the book

    you need to start of course with a start state :) , call it Z1 and its going to be equivalent to X1 and Y1. Use - for the start state and + for an end state
    X1, Y1 => -Z1
    
    Now you need to create two new states... what happens from Z1 if an 'a' is read and what happens if a 'b' is read.
    a -> Z1 -> X2, Y1 => Z2
    
    This was my way of writing it, the way i thought through it was, i have Z1 which is equivalent to X1, Y1 so i see what happens when 'a' is read in X1 and Y1 and the result is X2 and Y2 respectively, so the new state is X2,Y1 or Z2. Do the same as this for Z1 with reading in a 'b'
    b -> Z1 -> X1, Y2 => +Z3
    
    reading b into Z1 gives result X1, Y2 , which we can call Z3. Y2 is an end state which will make Z3 and end state.So continue this process for Z2 and any other new states created for another few steps and you will have
    X1, Y1 => -Z1
    a -> Z1 -> X2, Y1 => Z2
    b -> Z1 -> X1, Y2 => +Z3
    a -> Z2 -> X3, Y1 => +Z4
    b -> Z2 -> X1, Y2 => +Z3
    
    You'll notice here that +Z3 is used again when 'b' is read into Z2 because the destinations match X1, Y2 . You will also notice that a state can revisit itself, like a loop. So anyways i will continue with the full list and you will see that eventually new states will stop being created and the list will come to end.
    X1, Y1 => -Z1
    a -> Z1 -> X2, Y1 => Z2
    b -> Z1 -> X1, Y2 => +Z3
    a -> Z2 -> X3, Y1 => +Z4
    b -> Z2 -> X1, Y2 => +Z3
    a -> Z3 -> X2, Y1 => Z2
    b -> Z3 -> X1, Y2 => +Z3
    a -> Z4 -> X3, Y1 => +Z4
    b -> Z4 -> X3, Y2 => +Z5
    a -> Z5 -> X3, Y1 => +Z4
    b -> Z5 -> X3,Y2 => +Z5
    
    when you have the list created you have now a list of every state and where its meant to link if an 'a' or 'b' is read, so now you can draw the new diagram. Hope i didnt make any mistakes in the making of the list, and that its all clear :) Again all that syntax i used , i cant remember if someone showed me it that way , or i came up with it myself, but its not anything official, just something i used to make out the list to draw these..'things'


  • Closed Accounts Posts: 1,080 ✭✭✭eamoss


    Ahhh...im such a rehab. For some odd reason it didnt click with me that once you found the state eg Z2 = X2, Y1 that when you where looking for a, b in Z2 you start at X2, Y1. :o

    Is the only ever one start state?


    Also how would you do a product language of FA1FA2?


    Thanks for your help!


  • Closed Accounts Posts: 161 ✭✭nude_hamster


    em ya there should only be one start state i think...product...dont think i ever got the hang of that one..but then i dont think i tried very hard either


  • Advertisement
  • Closed Accounts Posts: 1,080 ✭✭✭eamoss


    Ah ok thanks.

    Em you see question 4(a) here do you do the same thing to prove it?


  • Closed Accounts Posts: 161 ✭✭nude_hamster


    em again i dont know .. I assume your are studying for the repeat paper this month, why not ask someone from you year who passed about that question.


  • Closed Accounts Posts: 1,080 ✭✭✭eamoss


    em again i dont know .. I assume your are studying for the repeat paper this month, why not ask someone from you year who passed about that question.


    I live in Dundalk. Everyone in my class lives about 20mins away from Maynooth.


Advertisement