CS 475 Midterm: CS 475 Alabama Fall2017 Exam2 2Solutions

14 views4 pages
31 Jan 2019
Department
Course
Professor

Document Summary

You may choose any set of problems that adds up to 100 or more points: write all the strings of length 6 that are generated by this context-free grammar. Solution a parse tree for each such string. [30 points for cs 475] [20 points for cs 575] T v d t f v c d t f. V c: write all the strings of lengths 3 and 6 that are accepted by this pushdown automaton. Hint: first get the strings of length 3, then use these to get the strings of length 6. [30 points for cs 475] [20 points for cs 575] a, /vw b, /t c, /u f, x/ g, v/ h, w/ . , z0/ e, / j, t/ k, / . Alternatively, write an ambiguous cfg for this language. Hint: the number of a"s must be either more or less than the number of b"s. S atbs | bvas | ax | by.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents