1. Consider a language of strings that contains only X ’s, Y ’s and Z ’s. A string in this language must begin with an X . If a Y is present in a string, it must be the final character of the string....


1. Consider a language of strings that contains only X ’s, Y ’s and Z ’s. A string in this language must begin with an X . If a Y is present in a string, it must be the final character of the string.


a. Write a recursive grammar for this language.


b. Write all the possible two-character strings of this language.


2. Consider the following grammar:


Write pseudocode for a recursive function that returns true if a string is in this language and returns false otherwise.



May 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here