Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. (21 pts) For each of the following languages, write a grammar that describes the language. (a) (7 pts) The set of strings over alphabet

image text in transcribed

3. (21 pts) For each of the following languages, write a grammar that describes the language. (a) (7 pts) The set of strings over alphabet fa, b) that begin with at least two a's, and end with at least two b's (same language as above). (b) (7 pts) The set of strings that consist of an even number of a's, over alphabet fa (c) (7 pts) The set of strings of parentheses (), brackets [], and braces {\ that are properly nested. For instance, ()I)is properly nested, while ([)] is not. 4. (20 pts) Consider the following grammar for Scheme: expr ATOM I list list - (exprs) exprs--> expr exprs l Using this grammar, show a parse tree for the expression (lambda (a) a a)). Does the language described by this grammar contain a finite number of strings? If so, why? If not, why not

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

More Books

Students also viewed these Databases questions

Question

What about leadership lessons from particularly good or bad bosses?

Answered: 1 week ago

Question

When would you use one approach, and when would you use another?

Answered: 1 week ago