Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started