100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Samenvatting Hoofdstuk 6: Simplification of Context-free Grammars and Normal Forms $3.77   Add to cart

Summary

Samenvatting Hoofdstuk 6: Simplification of Context-free Grammars and Normal Forms

 8 views  0 purchase
  • Course
  • Institution
  • Book

Dit is de samenvatting van het zesde hoofdstuk van het vak Automaten en Berekenbaarheid. In deze samenvatting werd alle relevante informatie uit de slides alsook uit eigen notities opgenomen. Eindresultaat: 16/20

Preview 2 out of 7  pages

  • No
  • Chapter 6
  • July 29, 2022
  • 7
  • 2020/2021
  • Summary
avatar-seller
Hoofdstuk 6: Simplification of context-free
grammars and normal forms
1 Het idee
• Parsing and membership checking of CFL very inefficient.
• Can we restrict the form of a CFG without reducing the expressive power?
• E.g., we easily get rid of lambda productions

Oplossing: normaalvormen

2 Transformeren van grammatica’s
2.1 Substitution theorem
Stelling:
Stel G = (V,T,S,P) een CV grammatica. Stel dat er een productieregel van de vorm 𝐴 → 𝑥1 𝐵𝑥2 met
𝐴 ≠ 𝐵 en 𝐵 → 𝑦1 |𝑦2 | … |𝑦𝑛 is de verzameling van productieregels met B aan de linker kant. Stel G’ =
(V,T,S,P’) de grammatica in welk de verzameling productieregels werd geconstrueerd door 𝐴 →
𝑥1 𝐵𝑥2 te vervangen door 𝐴 → 𝑥1 𝑦1 𝑥2 |𝑥1 𝑦2 𝑥2 | … |𝑥1 𝑦𝑛 𝑥2. Dan geldt 𝐿(𝐺 ′ ) = 𝐿(𝐺).

Bewijs:




Voorbeeld:




1

, 3 Useful productions
Definitie nuttige variabele:
Stel G = (V,T,S,P) is een CV grammatica. Een variabele A wordt nuttig genoemd indien er ten minste
een 𝑤 ∈ 𝐿(𝐺) bestaat waarvoor geldt dat
∗ ∗
𝑆 ⇒ 𝑥𝐴𝑦⇒ 𝑤
Met 𝑥, 𝑦 ∈ (𝑉 ∪ 𝑇)∗ .

Met andere woorden de variabele komt voor in een derivation van w.

• A variable that is not useful is called useless.
• A production is useless if it involves a useless variable.

Voorbeeld:




3.1 Verwijderen van nutteloze productieregels




Stelling:
Stel G = (V,T,S,P) is een CV grammatica. Dan bestaat er een equivalente grammatica G’ = (V’,T’,S,P’)
die geen nutteloze variabelen of productieregels bevat.

Bewijs:




2

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller lennyS. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $3.77. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

79373 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling

Recently viewed by you


$3.77
  • (0)
  Add to cart