Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CS 332 HW 2 - Grammars, Languages, FSM, and PDA Do your work on a separate page. Turn in this page as a cover sheet.

image text in transcribed
CS 332 HW 2 - Grammars, Languages, FSM, and PDA Do your work on a separate page. Turn in this page as a cover sheet. Do not staple, fold, clip, 1, (30 pts) Given alphabet -(a, b }, define Li-(a + b)"(aa)"bb. or otherwise attach your papers together. Write your name on each sheet. (a) Write a regular grammar, Ci, for L1 (b) Draw a deterministic Finite State Machine for L1. (c) Draw the parse tree for the string u baaabb. (d) is your grammar ambiguous? 2" (30 pts) Given alphabet = {a, b }, define L2-any string of length two or more having the same number of a's as b's, though they may appear in any order. (a) Write a Context Free Grammar, G2, for L2. (b) Draw a Push Down Automata for L1. (c) Draw the parse tree for the string u baaabb. (d) Is your grammar ambiguous

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

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions

Question

1. What might have led to the misinformation?

Answered: 1 week ago

Question

2. How will you handle the situation?

Answered: 1 week ago