Sponsored Links


Results 1 to 5 of 5

Thread: CS402 assignment-1 discussion and Solution fall 2014

  1. #1
    Senior Member
    Join Date
    Dec 2013
    Posts
    607

    CS402 assignment-1 discussion and Solution fall 2014

    Sponsored Links1


    Q.1. Write a Regular Expression (RE) for the language of all strings defined over Σ = {x, y, z} which begins with z, x in the middle and ends with y. The minimum length of all strings must be 4.

    [Marks 6]



    Q.2.

    a) Make a transition table for RE in Q.1.

    Sponsored Links

    b) Draw a Finite Automaton (FA) for part(a)

    [Marks 7+7]


    1) You should concern recommended books to clarify your concepts as handouts are not sufficient.

    2) You are supposed to submit your assignment in .doc format. Any other formats like scan images, PDF, zip, rar, bmp etc will not be accepted.



    Note:

    No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or internet malfunctioning etc.). Hence refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file at least two days before its closing date.

  2. #2
    Administrator Vuhelper's Avatar
    Join Date
    Apr 2011
    Posts
    9,578
    As the given condition dictates: "begins with z, x in the middle and ends with y" and the min_length = 4 characters...

    Here is your regex without commas:
    RE = ( z x x y )*

    The language over Σ = {x, y, z} according to this RE will be:
    L = { ^, zxxy, zxxyzxxy, zxxyzxxyzxxy, ... }

    The length of first string is ZERO because null string doesn't have any characters in it i.e. condition violated...

    Second string is okay...
    Third string has y and z along with x's in it...
    Fourth string also has y's and z's along with x's in it...
    And, so on...

    It is quite obvious that the RE: ( z x x y )* cannot generate the required language as described in the problem statement...

    i hav found ds solutn. if there is any mstak plz reply

  3. #3
    Junior Member
    Join Date
    Nov 2014
    Posts
    2
    this expression will generate strings as below
    ^, z x x y, z x x yz x x y, z x x yz x x yz x x y, z x x yz x x yz x x yz x x y, .......and so on that is why seems faulty

  4. #4
    Junior Member
    Join Date
    Nov 2014
    Posts
    2
    because it is not creating all strings defined over x,y,z

  5. #5
    Administrator Xpert's Avatar
    Join Date
    May 2010
    Location
    Jhelum
    Posts
    6,239
    you want discussion i can help..................its not that much hard....simple assignment. But instead of giving solution if u do discussion i will help u.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 12-03-2014, 01:31 PM
  2. Replies: 0
    Last Post: 11-27-2014, 07:23 PM
  3. Replies: 0
    Last Post: 11-20-2014, 07:38 PM
  4. STA 406 Assignment No.1 Solution Ideas and Discussion Fall 2014
    By Vuhelper in forum Assignments & Solutions
    Replies: 0
    Last Post: 11-20-2014, 02:53 PM
  5. Replies: 0
    Last Post: 11-18-2014, 07:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
-: Vuhelp Disclaimer :-
None of the files shown here are hosted or transmitted by this server. The links are provided solely by this site's users. The administrator's or staff of Vuhelp.net cannot be held responsible for what its users post, or any other actions of its users. You may not use this site to distribute or download any material when you do not have the legal rights to do so. It is your own responsibility to adhere to these terms. If you have any doubts about legality of content or you have any suspicions, feel free to contact us.
Online Education | JhelumSoft