Technopedia Center
PMB University Brochure
Faculty of Engineering and Computer Science
S1 Informatics S1 Information Systems S1 Information Technology S1 Computer Engineering S1 Electrical Engineering S1 Civil Engineering

faculty of Economics and Business
S1 Management S1 Accountancy

Faculty of Letters and Educational Sciences
S1 English literature S1 English language education S1 Mathematics education S1 Sports Education
  • Registerasi
  • Brosur UTI
  • Kip Scholarship Information
  • Performance
  1. Weltenzyklopädie
  2. Kuroda-Normalform – Wikipedia
Kuroda-Normalform – Wikipedia 👆 Click Here!
aus Wikipedia, der freien Enzyklopädie

Die Kuroda-Normalform ist ein Begriff der Theoretischen Informatik, der im Zusammenhang mit kontextsensitiven Sprachen von Interesse ist. Sie ist nach dem Linguisten Sige-Yuki Kuroda benannt und beschreibt eine Normalform der monotonen Grammatiken, also eine Teilmenge der monotonen Grammatiken, die gegenüber der Menge aller monotonen Grammatiken nichts an Ausdrucksstärke einbüßt. Die Bedeutung der Kuroda-Normalform liegt in der sehr einfachen Struktur der Produktionen. Weil monotone Grammatiken und kontextsensitive Grammatiken gelegentlich nicht unterschieden werden, wird die Kuroda-Normalform auch als Normalform der kontextsensitiven Grammatiken bezeichnet.

Die Kuroda-Normalform ist eine Verallgemeinerung der Chomsky-Normalform, die eine Normalform für kontextfreie Grammatiken ist.

Definition

[Bearbeiten | Quelltext bearbeiten]

Eine formale Grammatik ist in Kuroda-Normalform (kurz KNF, nicht zu verwechseln mit „KNF“ – Konjunktive Normalform), wenn alle Produktionen die folgende Form haben:

  • A → a {\displaystyle A\rightarrow a} {\displaystyle A\rightarrow a}
  • A → B {\displaystyle A\rightarrow B} {\displaystyle A\rightarrow B}
  • A → B C {\displaystyle A\rightarrow BC} {\displaystyle A\rightarrow BC}
  • A B → C D {\displaystyle AB\rightarrow CD} {\displaystyle AB\rightarrow CD}

wobei A {\displaystyle A} {\displaystyle A}, B {\displaystyle B} {\displaystyle B}, C {\displaystyle C} {\displaystyle C} und D {\displaystyle D} {\displaystyle D} Variablen sind und a {\displaystyle a} {\displaystyle a} ein Terminalsymbol ist.

Falls die zweite und die vierte Regelform nicht vorkommen, liegt die Grammatik in der Chomsky-Normalform vor.

Eigenschaften

[Bearbeiten | Quelltext bearbeiten]
  • Jede Grammatik in Kuroda-Normalform ist eine monotone Grammatik.
  • Zu jeder monotonen Grammatik G 1 {\displaystyle G_{1}} {\displaystyle G_{1}} mit ε ∉ L ( G 1 ) {\displaystyle \varepsilon \notin L(G_{1})} {\displaystyle \varepsilon \notin L(G_{1})} existiert eine monotone Grammatik G 2 {\displaystyle G_{2}} {\displaystyle G_{2}} in Kuroda-Normalform, die die gleiche Sprache erzeugt, das heißt, L ( G 1 ) = L ( G 2 ) {\displaystyle L(G_{1})=L(G_{2})} {\displaystyle L(G_{1})=L(G_{2})}. G 2 {\displaystyle G_{2}} {\displaystyle G_{2}} wird dann auch eine Kuroda-Normalform der monotonen Grammatik G 1 {\displaystyle G_{1}} {\displaystyle G_{1}} genannt.

Umwandlung einer Grammatik in Kuroda-Normalform

[Bearbeiten | Quelltext bearbeiten]

Sei G 1 = ( V 1 , Σ , P 1 , S ) {\displaystyle G_{1}=(V_{1},\Sigma ,P_{1},S)} {\displaystyle G_{1}=(V_{1},\Sigma ,P_{1},S)} eine monotone Grammatik mit ϵ ∉ L ( G 1 ) {\displaystyle \epsilon \notin L(G_{1})} {\displaystyle \epsilon \notin L(G_{1})}. Eine Kuroda-Normalform G 2 = ( V 2 , Σ , P 2 , S ) {\displaystyle G_{2}=(V_{2},\Sigma ,P_{2},S)} {\displaystyle G_{2}=(V_{2},\Sigma ,P_{2},S)} von G 1 {\displaystyle G_{1}} {\displaystyle G_{1}} kann so konstruiert werden:

  • Alle in P 1 {\displaystyle P_{1}} {\displaystyle P_{1}} auftretenden Terminalsymbole a {\displaystyle a} {\displaystyle a}, welche nicht alleine auftreten, werden jeweils durch eine neue Variable A a {\displaystyle A_{a}} {\displaystyle A_{a}} ersetzt, und für jedes Terminalsymbol a {\displaystyle a} {\displaystyle a} wird die neue Produktionen A a → a {\displaystyle A_{a}\rightarrow a} {\displaystyle A_{a}\rightarrow a} eingeführt.
  • Jede Produktion der Form A → A 1 A 2 … A k {\displaystyle A\rightarrow A_{1}A_{2}\dotso A_{k}} {\displaystyle A\rightarrow A_{1}A_{2}\dotso A_{k}} ersetzt man durch folgende neuen Produktionen: A → A 1 B 1 {\displaystyle A\rightarrow A_{1}B_{1}} {\displaystyle A\rightarrow A_{1}B_{1}}, B i → A i + 1 B i + 1 {\displaystyle B_{i}\rightarrow A_{i+1}B_{i+1}} {\displaystyle B_{i}\rightarrow A_{i+1}B_{i+1}} für alle i ∈ { 1 , … , k − 3 } {\displaystyle i\in \{1,\dotsc ,k-3\}} {\displaystyle i\in \{1,\dotsc ,k-3\}} und B k − 2 → A k − 1 A k {\displaystyle B_{k-2}\rightarrow A_{k-1}A_{k}} {\displaystyle B_{k-2}\rightarrow A_{k-1}A_{k}}. Dabei seien B 1 , … , B k − 2 {\displaystyle B_{1},\dotsc ,B_{k-2}} {\displaystyle B_{1},\dotsc ,B_{k-2}} neue Variablen.
  • Jede Produktion der Form A 1 A 2 … A l → B 1 B 2 … B k {\displaystyle A_{1}A_{2}\dotso A_{l}\rightarrow B_{1}B_{2}\dotso B_{k}} {\displaystyle A_{1}A_{2}\dotso A_{l}\rightarrow B_{1}B_{2}\dotso B_{k}}, 2 ≤ l ≤ k {\displaystyle 2\leq l\leq k} {\displaystyle 2\leq l\leq k} mit 3 ≤ k {\displaystyle 3\leq k} {\displaystyle 3\leq k} ersetzt man durch folgende neuen Produktionen: A 1 A 2 → B 1 C 1 {\displaystyle A_{1}A_{2}\rightarrow B_{1}C_{1}} {\displaystyle A_{1}A_{2}\rightarrow B_{1}C_{1}}, für alle i ∈ { 1 , … , l − 2 } {\displaystyle i\in \{1,\dotsc ,l-2\}} {\displaystyle i\in \{1,\dotsc ,l-2\}}: C i A i + 2 → B i + 1 C i + 1 {\displaystyle C_{i}A_{i+2}\rightarrow B_{i+1}C_{i+1}} {\displaystyle C_{i}A_{i+2}\rightarrow B_{i+1}C_{i+1}}, für alle i ∈ { l − 1 , … , k − 3 } {\displaystyle i\in \{l-1,\dotsc ,k-3\}} {\displaystyle i\in \{l-1,\dotsc ,k-3\}}: C i → B i + 1 C i + 1 {\displaystyle C_{i}\rightarrow B_{i+1}C_{i+1}} {\displaystyle C_{i}\rightarrow B_{i+1}C_{i+1}} und C k − 2 → B k − 1 B k {\displaystyle C_{k-2}\rightarrow B_{k-1}B_{k}} {\displaystyle C_{k-2}\rightarrow B_{k-1}B_{k}}. Dabei seien C 1 , … , C k − 2 {\displaystyle C_{1},\dotsc ,C_{k-2}} {\displaystyle C_{1},\dotsc ,C_{k-2}} neue Variablen.

Die so erzeugte Grammatik ist in Kuroda-Normalform und produziert dieselbe Sprache wie die Grammatik zuvor.

Révész-Normalform

[Bearbeiten | Quelltext bearbeiten]

Jede monotone Grammatik G 1 = ( V 1 , Σ , P 1 , S ) {\displaystyle G_{1}=(V_{1},\Sigma ,P_{1},S)} {\displaystyle G_{1}=(V_{1},\Sigma ,P_{1},S)} in Kuroda-Normalform kann in eine kontextsensitive Grammatik G 2 = ( V 2 , Σ , P 2 , S ) {\displaystyle G_{2}=(V_{2},\Sigma ,P_{2},S)} {\displaystyle G_{2}=(V_{2},\Sigma ,P_{2},S)} in Révész-Normalform überführt werden. Dazu werden für jede Produktionsregel der Form A B → C D ∈ P 1 {\displaystyle AB\rightarrow CD\in P_{1}} {\displaystyle AB\rightarrow CD\in P_{1}} zwei neue Nichtterminale W , Z ∈ V 2 {\displaystyle W,Z\in V_{2}} {\displaystyle W,Z\in V_{2}} eingeführt und die Regel durch vier Regeln ersetzt:

  • A B → A Z {\displaystyle AB\rightarrow AZ} {\displaystyle AB\rightarrow AZ}
  • A Z → W Z {\displaystyle AZ\rightarrow WZ} {\displaystyle AZ\rightarrow WZ}
  • W Z → W D {\displaystyle WZ\rightarrow WD} {\displaystyle WZ\rightarrow WD}
  • W D → C D {\displaystyle WD\rightarrow CD} {\displaystyle WD\rightarrow CD}

Eine kontextsensitive Grammatik ist in Révész-Normalform, wenn alle Produktionen die folgende Form haben:

  • A B → A C {\displaystyle AB\rightarrow AC} {\displaystyle AB\rightarrow AC}
  • A B → C B {\displaystyle AB\rightarrow CB} {\displaystyle AB\rightarrow CB}
  • A → B C {\displaystyle A\rightarrow BC} {\displaystyle A\rightarrow BC}
  • A → B {\displaystyle A\rightarrow B} {\displaystyle A\rightarrow B}
  • A → a {\displaystyle A\rightarrow a} {\displaystyle A\rightarrow a}

Dabei sind A {\displaystyle A} {\displaystyle A}, B {\displaystyle B} {\displaystyle B} und C {\displaystyle C} {\displaystyle C} Variablen und a {\displaystyle a} {\displaystyle a} ist ein Terminalsymbol.

Zu jeder kontextsensitiven Grammatik G 1 {\displaystyle G_{1}} {\displaystyle G_{1}} mit ε ∉ L ( G 1 ) {\displaystyle \varepsilon \notin L(G_{1})} {\displaystyle \varepsilon \notin L(G_{1})} existiert eine kontextsensitive Grammatik G 2 {\displaystyle G_{2}} {\displaystyle G_{2}} in Révész-Normalform, die die gleiche Sprache erzeugt, das heißt, L ( G 1 ) = L ( G 2 ) {\displaystyle L(G_{1})=L(G_{2})} {\displaystyle L(G_{1})=L(G_{2})}.

Literatur

[Bearbeiten | Quelltext bearbeiten]
  • Benedek Nagy: Derivation Trees for Context-Sensitive Grammars. In: Automata, Formal Languages and Algebraic Systems: Proceedings of AFLAS 2008. World Scientific Pub Co, 2008, ISBN 981-4317-60-8, S. 182 (eingeschränkte Vorschau in der Google-Buchsuche). 
Abgerufen von „https://de.teknopedia.teknokrat.ac.id/w/index.php?title=Kuroda-Normalform&oldid=238519751“
Kategorien:
  • Theorie formaler Sprachen
  • Normalform

  • indonesia
  • Polski
  • العربية
  • Deutsch
  • English
  • Español
  • Français
  • Italiano
  • مصرى
  • Nederlands
  • 日本語
  • Português
  • Sinugboanong Binisaya
  • Svenska
  • Українська
  • Tiếng Việt
  • Winaray
  • 中文
  • Русский
Sunting pranala
Pusat Layanan

UNIVERSITAS TEKNOKRAT INDONESIA | ASEAN's Best Private University
Jl. ZA. Pagar Alam No.9 -11, Labuhan Ratu, Kec. Kedaton, Kota Bandar Lampung, Lampung 35132
Phone: (0721) 702022
Email: pmb@teknokrat.ac.id