Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For k > 2, a k-ary grammar has transitions of the form: A AjA2... Ak A a where A, A1, ...,Ak V are variables, and

image text in transcribed

image text in transcribed

For k > 2, a k-ary grammar has transitions of the form: A AjA2... Ak A a where A, A1, ...,Ak V are variables, and a E is a terminal. That is, each production rule has either a single terminal or k variables on the right-hand side (A1,...,Ak need not be distinct). For example, the following is a ternary grammar (note that there can be multiple productions of both kinds): S ABC S a A a B SAD Dd C For a given k-ary grammar G, suppose w e L(G) and [w] = n, where n > 1. Prove that for every derivation of w, the grammar derives w in exactly 1=1 +n steps. Note: The number of steps is considered to be the number times a transition is applied. For example, the derivation A1 A1A2 21A2 2122 consists of three steps. For k > 2, a k-ary grammar has transitions of the form: A AjA2... Ak A a where A, A1, ...,Ak V are variables, and a E is a terminal. That is, each production rule has either a single terminal or k variables on the right-hand side (A1,...,Ak need not be distinct). For example, the following is a ternary grammar (note that there can be multiple productions of both kinds): S ABC S a A a B SAD Dd C For a given k-ary grammar G, suppose w e L(G) and [w] = n, where n > 1. Prove that for every derivation of w, the grammar derives w in exactly 1=1 +n steps. Note: The number of steps is considered to be the number times a transition is applied. For example, the derivation A1 A1A2 21A2 2122 consists of three steps

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago