Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Theory QUESTION 1: [3 POINTS Consider the following grammar then answer the questions below: G=P:ABC({S,A,B},{0,1},S,P)O1AOA1ABC001 A. Is the above grammar linear? Why? B. Is the

Theory
image text in transcribed
image text in transcribed
QUESTION 1: [3 POINTS Consider the following grammar then answer the questions below: G=P:ABC({S,A,B},{0,1},S,P)O1AOA1ABC001 A. Is the above grammar linear? Why? B. Is the above grammar regular? Why? C. What is the language generated by the grammar G? You can use regular expressions. QUESTION 2: [2 POINTS] Convert the following right linear grammar into an equivalent NFA. S01AOA0A1ABB001C110C XYXYY0OY101 A. [ 1 point] Give a right-most derivation for the terminal string: 010101 . B. [ 1 point] Give a left-most derivation for the terminal string: 010101. C. [ 1 point] Show that the grammar is ambiguous by exhibiting two distinct derivation trees for some terminal string (hint: use 00111) Question 4: [2 POINTS] A) I 1 point] Give a context free grammar for the following language: L1={aibi+n+kak:n,k0,i>0} B) [1 point] Give a regular grammar for the following language: L2={02nI3m+1:n,m0}

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

Database And Expert Systems Applications Dexa 2021 Workshops Biokdd Iwcfs Mlkgraphs Al Cares Protime Alsys 2021 Virtual Event September 27 30 2021 Proceedings

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Atif Mashkoor ,Johannes Sametinger ,Anna Fensel ,Jorge Martinez-Gil ,Lukas Fischer

1st Edition

3030871002, 978-3030871000

More Books

Students also viewed these Databases questions