Homework / Exam Preparation

Homework / Exam Preparation

<p> Concepts of Programming Languages Handout 3 Deadline April 16</p><p>1) What is the shortest string of a’s and b’s not in the language corresponding to the regular expression b*(abb*)*a*?</p><p>2) Consider the two regular expressions R1 = a* | b* R2=ab* | ba* | b*a | (a*b)*</p><p> i) Find a string corresponding to R1 but not to R2. ii) Find a string corresponding to R2 but not to R1. iii) Find a string corresponding to both R1 but not to R2. iv) Find a string corresponding to neither R1 nor R2.</p><p>3) Simplify these regular expressions: i) (01 | 10 | 0110 | 1001)* ii) 01((01)*01 | (01)*) | (01)* iii) (01 | ε )*</p><p>4) Give a regular expression corresponding to the language recognized by the following DFA:</p><p>5) For each of the following regular expressions, draw a DFA recognizing the corresponding language: i) (0 | 1)* 110* ii) (11 | 10)* iii) (1 | 110)* 0 6) Perform the pairwise disjointness test for the following grammar rules:</p><p>Grammar Rule A → aB | b | cBB B → aB | bA | aBb C → aaA | b | caB D → A | d E → D | c F → Bd | Caa G → g | Agg</p><p> non-terminal / grammar rule …passes pairwise disjointness test? A yes  no  B yes  no  C yes  no  D yes  no  E yes  no  F yes  no  G yes  no </p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    2 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us