Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 4 - Constructing Context-Free Grammars (40 points) (a) (10 points] Design a CFG that accepts the same language as the RE a' +(ab) (b)

image text in transcribed

Question 4 - Constructing Context-Free Grammars (40 points) (a) (10 points] Design a CFG that accepts the same language as the RE a' +(ab) (b) [10 points) Design a CFG for language L-{(01)21 0.1.2}*.j >0} (c) (10 points) Construct a context-free grammar that generates all even length strings of character a (e.g. a, cas, etc) (d) (10 points) Construct a context-free grammar that could parse student records of the following format: loanna, 99-123456, UNIC111) Mark, 91-222222, UNIC9992323243] Note that: The first name is any sequence of characters, at least one character, no length restriction. The cell phone mmber starts with 9 and has 8 digits total. A hyphen is present. The ID number starts with UNIC, followed by a sequence of numbers, at least one number, no length restriction. Each student record is enclosed in square brackets. There is at east one student record in the file. You may use terminal character in your grammar to specify a single character. You may also use terminal digit to specify a single digit

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_2

Step: 3

blur-text-image_3

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

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions