1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sliva [168]
3 years ago
11

Get the algorithm to remove the indirect left recursion from a grammar from Aho et al. (2006). Use this algorithm to remove all

left recursion from the following grammar: S→ Aa | Bb A→ Aa | Abc | c I Sb B → bb
Mathematics
1 answer:
Advocard [28]3 years ago
6 0

Answer:

Step-by-step explanation:

Here is the gramamr

S -> Aa | Bb

A -> Aa | Abc | c | Sb

B -> bb

-----------------------------------------------------------------------------------------------------------------------

Now for first gramamr step introduce new symbol S'

S -> BbS'

S' -> e | S'aA

----------------------------------------------------------------------------------------------------------------------------------------------------

Now for second gramamr statement...

A -> SbA' | cA'

A' -> e | A'a | A'bc

---------------------------------------------------------------------------------------------------------------------------------------------

For third grammar statement it is not required since it doesn't contain any recursion

So final gramamr will be

S -> BbS'

S' -> e | S'aA

A -> SbA' | cA'

A' -> e | A'a | A'bc

B -> bb

You might be interested in
Suppose an airline policy states that all baggage must be box shaped with a sum of​ length, width, and height not exceeding 114
NISA [10]

Answer:

Step-by-step explanation:

Represent the length of one side of the base be s and the height by h.  Then the volume of the box is V = s^2*h; this is to be maximized.

The constraints are as follows:  2s + h = 114 in.  Solving for h, we get 114 - 2s = h.

Substituting 114 - 2s for h in the volume formula, we obtain:

V = s^2*(114 - 2s), or V = 114s^2 - 2s^3, or V = 2*(s^2)(57 - s)

This is to be maximized.  To accomplish this, find the first derivative of this formula for V, set the result equal to 0 and solve for s:

dV

----- = 2[(s^2)(-1) + (57 - s)(2s)] = 0 = 2s^2(-1) + 114s - 2s^2

ds

Simplifying this, we get dV/ds = -4s^2 + 114s = 0.  Then either s = 28.5 or s = 0.

Then the area of the base is 28.5^2 in^2 and the height is 114 - 2(28.5) = 57 in

and the volume is V = s^2(h) = 46,298.25 in^3

7 0
3 years ago
The three sides of a triangle measure 8,10 and 12 units. Is this a right triangle? Prove whether it is or not using the converse
kvasek [131]

Answer:

square of longest side ≠ the sum of the squares of the other two sides

It's not a right triangle

Step-by-step explanation:

The converse of the Pythagorean Theorem is: If the square of the length of the longest side of a triangle is equal to the sum of the squares of the other two sides, then the triangle is a right triangle.

square of longest side: 12       12² = 144

the sum of the squares of the other two sides: 8² + 10² = 164

4 0
4 years ago
Prove that a line parallel to one side of a triangle divides the other two sides proportionally. Be sure to create and name the
ryzh [129]

Answer:

in steps

Step-by-step explanation:

DE // BC

m∠ADE = m∠ABC   and m∠AED = m∠ACB

∴ ΔADE similar to ΔABC

AB/AD = AC/AE

(AD + DB) / AD = (AE + EC) / AE

AD/AD + DB/AD = AE/AE + EC/AE

1 + DB/AD = 1 + EC/AE

DB/AD = EC/AE    (AD/DB = AE/EC)

7 0
3 years ago
Raquel takes her pulse in order to determine her resting heart rate, measured in beats per minute (\text{bpm})(bpm)left parenthe
murzikaleks [220]

Answer:

Raquel's heart rate is slower.

4 0
3 years ago
The area of a square garden is 49 ft^2. How long is each side of the​ garden?
schepotkina [342]

Answer:

7

Step-by-step explanation:

4 0
4 years ago
Read 2 more answers
Other questions:
  • Susanna can work 10 math problems in 15 minutes. How many can she work in an hour and a half?
    12·2 answers
  • Find the solution -x + 2y = 6 and y = 1/2 x + 3
    15·1 answer
  • Identify the range of the graphed function.
    15·1 answer
  • Which Venn diagram correctly describes the relationships between Set R and Set W
    5·1 answer
  • the length of the base of a triangle is twice its height. if the area of the triangle is 4 square kilometers, find the height
    9·2 answers
  • $422.00 per month in a investment plan. It pays 3% APR. HOW MUCH $$ will I have in 25 years.
    5·1 answer
  • Question 4: Please help, I have no idea what the answer is.
    10·1 answer
  • Which statements about a square are always true?
    7·1 answer
  • Joanna received a loan from the bank for $5,000, and she plans on paying the loan back in 3 years. She will have paid $800 in si
    5·1 answer
  • Solve the inequality 4 x - 7 < 5
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!