<<

Relating Chomsky Normal Form and Greibach Normal Form by Exponential Transposition

Jurgen¨ Koslowski

Department of Theoretical Computer Science Technical University Braunschweig

CT 2011, Vancouver, July 22 (last updated 2011-06-18)

http://www.iti.cs.tu-bs.de/˜koslowj/RESEARCH

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 1 / 25 − context-free grammars (CFG’s) initially, − push-down automata (PDA’s) later on from a slightly different angle. . This angle was initially suggested by work of Walters [1988], but can be exploited further. . At issue is the use of node-labeled trees in the theory of formal languages.

. We will look at familiar concepts

Overview Overview

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 2 / 25 . This angle was initially suggested by work of Walters [1988], but can be exploited further. . At issue is the use of node-labeled trees in the theory of formal languages.

− context-free grammars (CFG’s) initially, − push-down automata (PDA’s) later on from a slightly different angle.

Overview Overview

. We will look at familiar concepts

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 2 / 25 . This angle was initially suggested by work of Walters [1988], but can be exploited further. . At issue is the use of node-labeled trees in the theory of formal languages.

− push-down automata (PDA’s) later on from a slightly different angle.

Overview Overview

. We will look at familiar concepts − context-free grammars (CFG’s) initially,

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 2 / 25 . This angle was initially suggested by work of Walters [1988], but can be exploited further. . At issue is the use of node-labeled trees in the theory of formal languages.

from a slightly different angle.

Overview Overview

. We will look at familiar concepts − context-free grammars (CFG’s) initially, − push-down automata (PDA’s) later on

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 2 / 25 . This angle was initially suggested by work of Walters [1988], but can be exploited further. . At issue is the use of node-labeled trees in the theory of formal languages.

Overview Overview

. We will look at familiar concepts − context-free grammars (CFG’s) initially, − push-down automata (PDA’s) later on from a slightly different angle.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 2 / 25 . At issue is the use of node-labeled trees in the theory of formal languages.

Overview Overview

. We will look at familiar concepts − context-free grammars (CFG’s) initially, − push-down automata (PDA’s) later on from a slightly different angle. . This angle was initially suggested by work of Walters [1988], but can be exploited further.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 2 / 25 Overview Overview

. We will look at familiar concepts − context-free grammars (CFG’s) initially, − push-down automata (PDA’s) later on from a slightly different angle. . This angle was initially suggested by work of Walters [1988], but can be exploited further. . At issue is the use of node-labeled trees in the theory of formal languages.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 2 / 25 it shows the equivalence of two grammar- derivations displayed earlier (figure (21)); it conveys the same phrase structure of “the man took the book” as the initially employed block diagram (figure (17)).

In his 1956 article “Three models for the description of language” (IRE Transactions on Information Theory (2): 113–124) published the first derivation tree as figure (22) with labeled nodes Sentence

NP VP

the man Verb NP

took the book Other such trees are used later to show the existence of non-equivalent derivations for certain sentences. However, they are employed just to aid visualization, not as an object of study in their own right. Note the distinction between leaves and (capitalized) inner nodes.

History: the man took the book History: the man took the book

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 3 / 25 it shows the equivalence of two grammar- derivations displayed earlier (figure (21)); it conveys the same phrase structure of “the man took the book” as the initially employed block diagram (figure (17)).

Sentence

NP VP

the man Verb NP

took the book Other such trees are used later to show the existence of non-equivalent derivations for certain sentences. However, they are employed just to aid visualization, not as an object of study in their own right. Note the distinction between leaves and (capitalized) inner nodes.

History: the man took the book History: the man took the book

In his 1956 article “Three models for the description of language” (IRE Transactions on Information Theory (2): 113–124) Noam Chomsky published the first derivation tree as figure (22) with labeled nodes

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 3 / 25 it shows the equivalence of two grammar- derivations displayed earlier (figure (21)); it conveys the same phrase structure of “the man took the book” as the initially employed block diagram (figure (17)).

Other such trees are used later to show the existence of non-equivalent derivations for certain sentences. However, they are employed just to aid visualization, not as an object of study in their own right. Note the distinction between leaves and (capitalized) inner nodes.

History: the man took the book History: the man took the book

In his 1956 article “Three models for the description of language” (IRE Transactions on Information Theory (2): 113–124) Noam Chomsky published the first derivation tree as figure (22) with labeled nodes Sentence

NP VP the man Verb NP

took the book

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 3 / 25 it conveys the same phrase structure of “the man took the book” as the initially employed block diagram (figure (17)). Other such trees are used later to show the existence of non-equivalent derivations for certain sentences. However, they are employed just to aid visualization, not as an object of study in their own right. Note the distinction between leaves and (capitalized) inner nodes.

History: the man took the book History: the man took the book

In his 1956 article “Three models for the description of language” (IRE Transactions on Information Theory (2): 113–124) Noam Chomsky published the first derivation tree as figure (22) with labeled nodes Sentence it shows the equivalence of two grammar- NP VP derivations displayed earlier (figure (21)); the man Verb NP

took the book

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 3 / 25 Other such trees are used later to show the existence of non-equivalent derivations for certain sentences. However, they are employed just to aid visualization, not as an object of study in their own right. Note the distinction between leaves and (capitalized) inner nodes.

History: the man took the book History: the man took the book

In his 1956 article “Three models for the description of language” (IRE Transactions on Information Theory (2): 113–124) Noam Chomsky published the first derivation tree as figure (22) with labeled nodes Sentence it shows the equivalence of two grammar- NP VP derivations displayed earlier (figure (21)); it conveys the same phrase structure of the man Verb NP “the man took the book” as the initially took the book employed block diagram (figure (17)).

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 3 / 25 However, they are employed just to aid visualization, not as an object of study in their own right. Note the distinction between leaves and (capitalized) inner nodes.

History: the man took the book History: the man took the book

In his 1956 article “Three models for the description of language” (IRE Transactions on Information Theory (2): 113–124) Noam Chomsky published the first derivation tree as figure (22) with labeled nodes Sentence it shows the equivalence of two grammar- NP VP derivations displayed earlier (figure (21)); it conveys the same phrase structure of the man Verb NP “the man took the book” as the initially took the book employed block diagram (figure (17)). Other such trees are used later to show the existence of non-equivalent derivations for certain sentences.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 3 / 25 Note the distinction between leaves and (capitalized) inner nodes.

History: the man took the book History: the man took the book

In his 1956 article “Three models for the description of language” (IRE Transactions on Information Theory (2): 113–124) Noam Chomsky published the first derivation tree as figure (22) with labeled nodes Sentence it shows the equivalence of two grammar- NP VP derivations displayed earlier (figure (21)); it conveys the same phrase structure of the man Verb NP “the man took the book” as the initially took the book employed block diagram (figure (17)). Other such trees are used later to show the existence of non-equivalent derivations for certain sentences. However, they are employed just to aid visualization, not as an object of study in their own right.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 3 / 25 History: the man took the book History: the man took the book

In his 1956 article “Three models for the description of language” (IRE Transactions on Information Theory (2): 113–124) Noam Chomsky published the first derivation tree as figure (22) with labeled nodes Sentence it shows the equivalence of two grammar- NP VP derivations displayed earlier (figure (21)); it conveys the same phrase structure of the man Verb NP “the man took the book” as the initially took the book employed block diagram (figure (17)). Other such trees are used later to show the existence of non-equivalent derivations for certain sentences. However, they are employed just to aid visualization, not as an object of study in their own right. Note the distinction between leaves and (capitalized) inner nodes.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 3 / 25 the alphabet is partitioned into “terminals” and “nonterminals”; one nonterminal serves as axiom (rather than a finite set of words).

In every interesting case there will be a terminal vocabulary VT (VT ⊆ VP ) that exactly characterizes the terminal strings, in the sense that every terminal string

is a string in VT and no symbol of VT is rewritten in any of the rules of F . Chomsky’s work inspired John Backus of the Algol 58 project in 1959 to develop most of the prevailing BNF-type presentation of CFG’s:

This was fine-tuned by Peter Naur for the Revised Report on ALGOL 60, who also coined the name “Backus Normal Form”. In 1964 Donald Knuth observed that this was not a normal form in any sense and suggested the term “Backus-Naur Form”, saving the acronym. Node-labeled trees in the 1960’s also formed the basis for the new field of tree grammars/automata/languages, see Thatcher’s survey of 1973.

History: the man took the book

On the finite vocabulary (= alphabet) VP of his phrase-structure grammar (= semi-Thue rewriting system F + axioms), Chomsky remarks

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 4 / 25 the alphabet is partitioned into “terminals” and “nonterminals”; one nonterminal serves as axiom (rather than a finite set of words).

Chomsky’s work inspired John Backus of the Algol 58 project in 1959 to develop most of the prevailing BNF-type presentation of CFG’s:

This was fine-tuned by Peter Naur for the Revised Report on ALGOL 60, who also coined the name “Backus Normal Form”. In 1964 Donald Knuth observed that this was not a normal form in any sense and suggested the term “Backus-Naur Form”, saving the acronym. Node-labeled trees in the 1960’s also formed the basis for the new field of tree grammars/automata/languages, see Thatcher’s survey of 1973.

History: the man took the book

On the finite vocabulary (= alphabet) VP of his phrase-structure grammar (= semi-Thue rewriting system F + axioms), Chomsky remarks

In every interesting case there will be a terminal vocabulary VT (VT ⊆ VP ) that exactly characterizes the terminal strings, in the sense that every terminal string

is a string in VT and no symbol of VT is rewritten in any of the rules of F .

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 4 / 25 the alphabet is partitioned into “terminals” and “nonterminals”; one nonterminal serves as axiom (rather than a finite set of words). This was fine-tuned by Peter Naur for the Revised Report on ALGOL 60, who also coined the name “Backus Normal Form”. In 1964 Donald Knuth observed that this was not a normal form in any sense and suggested the term “Backus-Naur Form”, saving the acronym. Node-labeled trees in the 1960’s also formed the basis for the new field of tree grammars/automata/languages, see Thatcher’s survey of 1973.

History: the man took the book

On the finite vocabulary (= alphabet) VP of his phrase-structure grammar (= semi-Thue rewriting system F + axioms), Chomsky remarks

In every interesting case there will be a terminal vocabulary VT (VT ⊆ VP ) that exactly characterizes the terminal strings, in the sense that every terminal string

is a string in VT and no symbol of VT is rewritten in any of the rules of F . Chomsky’s work inspired John Backus of the Algol 58 project in 1959 to develop most of the prevailing BNF-type presentation of CFG’s:

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 4 / 25 one nonterminal serves as axiom (rather than a finite set of words). This was fine-tuned by Peter Naur for the Revised Report on ALGOL 60, who also coined the name “Backus Normal Form”. In 1964 Donald Knuth observed that this was not a normal form in any sense and suggested the term “Backus-Naur Form”, saving the acronym. Node-labeled trees in the 1960’s also formed the basis for the new field of tree grammars/automata/languages, see Thatcher’s survey of 1973.

History: the man took the book

On the finite vocabulary (= alphabet) VP of his phrase-structure grammar (= semi-Thue rewriting system F + axioms), Chomsky remarks

In every interesting case there will be a terminal vocabulary VT (VT ⊆ VP ) that exactly characterizes the terminal strings, in the sense that every terminal string

is a string in VT and no symbol of VT is rewritten in any of the rules of F . Chomsky’s work inspired John Backus of the Algol 58 project in 1959 to develop most of the prevailing BNF-type presentation of CFG’s: the alphabet is partitioned into “terminals” and “nonterminals”;

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 4 / 25 This was fine-tuned by Peter Naur for the Revised Report on ALGOL 60, who also coined the name “Backus Normal Form”. In 1964 Donald Knuth observed that this was not a normal form in any sense and suggested the term “Backus-Naur Form”, saving the acronym. Node-labeled trees in the 1960’s also formed the basis for the new field of tree grammars/automata/languages, see Thatcher’s survey of 1973.

History: the man took the book

On the finite vocabulary (= alphabet) VP of his phrase-structure grammar (= semi-Thue rewriting system F + axioms), Chomsky remarks

In every interesting case there will be a terminal vocabulary VT (VT ⊆ VP ) that exactly characterizes the terminal strings, in the sense that every terminal string

is a string in VT and no symbol of VT is rewritten in any of the rules of F . Chomsky’s work inspired John Backus of the Algol 58 project in 1959 to develop most of the prevailing BNF-type presentation of CFG’s: the alphabet is partitioned into “terminals” and “nonterminals”; one nonterminal serves as axiom (rather than a finite set of words).

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 4 / 25 In 1964 Donald Knuth observed that this was not a normal form in any sense and suggested the term “Backus-Naur Form”, saving the acronym. Node-labeled trees in the 1960’s also formed the basis for the new field of tree grammars/automata/languages, see Thatcher’s survey of 1973.

History: the man took the book

On the finite vocabulary (= alphabet) VP of his phrase-structure grammar (= semi-Thue rewriting system F + axioms), Chomsky remarks

In every interesting case there will be a terminal vocabulary VT (VT ⊆ VP ) that exactly characterizes the terminal strings, in the sense that every terminal string

is a string in VT and no symbol of VT is rewritten in any of the rules of F . Chomsky’s work inspired John Backus of the Algol 58 project in 1959 to develop most of the prevailing BNF-type presentation of CFG’s: the alphabet is partitioned into “terminals” and “nonterminals”; one nonterminal serves as axiom (rather than a finite set of words). This was fine-tuned by Peter Naur for the Revised Report on ALGOL 60, who also coined the name “Backus Normal Form”.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 4 / 25 Node-labeled trees in the 1960’s also formed the basis for the new field of tree grammars/automata/languages, see Thatcher’s survey of 1973.

History: the man took the book

On the finite vocabulary (= alphabet) VP of his phrase-structure grammar (= semi-Thue rewriting system F + axioms), Chomsky remarks

In every interesting case there will be a terminal vocabulary VT (VT ⊆ VP ) that exactly characterizes the terminal strings, in the sense that every terminal string

is a string in VT and no symbol of VT is rewritten in any of the rules of F . Chomsky’s work inspired John Backus of the Algol 58 project in 1959 to develop most of the prevailing BNF-type presentation of CFG’s: the alphabet is partitioned into “terminals” and “nonterminals”; one nonterminal serves as axiom (rather than a finite set of words). This was fine-tuned by Peter Naur for the Revised Report on ALGOL 60, who also coined the name “Backus Normal Form”. In 1964 Donald Knuth observed that this was not a normal form in any sense and suggested the term “Backus-Naur Form”, saving the acronym.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 4 / 25 History: the man took the book

On the finite vocabulary (= alphabet) VP of his phrase-structure grammar (= semi-Thue rewriting system F + axioms), Chomsky remarks

In every interesting case there will be a terminal vocabulary VT (VT ⊆ VP ) that exactly characterizes the terminal strings, in the sense that every terminal string

is a string in VT and no symbol of VT is rewritten in any of the rules of F . Chomsky’s work inspired John Backus of the Algol 58 project in 1959 to develop most of the prevailing BNF-type presentation of CFG’s: the alphabet is partitioned into “terminals” and “nonterminals”; one nonterminal serves as axiom (rather than a finite set of words). This was fine-tuned by Peter Naur for the Revised Report on ALGOL 60, who also coined the name “Backus Normal Form”. In 1964 Donald Knuth observed that this was not a normal form in any sense and suggested the term “Backus-Naur Form”, saving the acronym. Node-labeled trees in the 1960’s also formed the basis for the new field of tree grammars/automata/languages, see Thatcher’s survey of 1973.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 4 / 25 . weak Chomsky normal form (wCNF), if N (T + N∗); . Chomsky normal form (CNF), if N T + N2 + {ε}; . Greibach normal form (GNF), if N (T × N∗) + {ε};

G is said to be in

with the technical provision for CNF and GNF that Y ε implies Y = S , and in this case S must not appear on the right side of other productions. The derivation relation( N + T)∗ (N + T)∗ consists of all pairs hαY β, αωβi with Y ω and α, β ∈ (N + T)∗ . The words w ∈ T∗ with S ∗ w constitute the language generated by G , where ∗ is the reflexive transitive hull of .

Background and motivation Grammars and normal forms Background on grammars and normal forms

Definition A context-free grammar G = hN, T, S, i consists of disjoint finite sets N of nonterminals and T of terminals, an axiom S ∈ N , and a finite relation N (T + N)∗ of so-called productions.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 5 / 25 . weak Chomsky normal form (wCNF), if N (T + N∗); . Chomsky normal form (CNF), if N T + N2 + {ε}; . Greibach normal form (GNF), if N (T × N∗) + {ε}; with the technical provision for CNF and GNF that Y ε implies Y = S , and in this case S must not appear on the right side of other productions. The derivation relation( N + T)∗ (N + T)∗ consists of all pairs hαY β, αωβi with Y ω and α, β ∈ (N + T)∗ . The words w ∈ T∗ with S ∗ w constitute the language generated by G , where ∗ is the reflexive transitive hull of .

Background and motivation Grammars and normal forms Background on grammars and normal forms

Definition A context-free grammar G = hN, T, S, i consists of disjoint finite sets N of nonterminals and T of terminals, an axiom S ∈ N , and a finite relation N (T + N)∗ of so-called productions. G is said to be in

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 5 / 25 . Chomsky normal form (CNF), if N T + N2 + {ε}; . Greibach normal form (GNF), if N (T × N∗) + {ε}; with the technical provision for CNF and GNF that Y ε implies Y = S , and in this case S must not appear on the right side of other productions. The derivation relation( N + T)∗ (N + T)∗ consists of all pairs hαY β, αωβi with Y ω and α, β ∈ (N + T)∗ . The words w ∈ T∗ with S ∗ w constitute the language generated by G , where ∗ is the reflexive transitive hull of .

Background and motivation Grammars and normal forms Background on grammars and normal forms

Definition A context-free grammar G = hN, T, S, i consists of disjoint finite sets N of nonterminals and T of terminals, an axiom S ∈ N , and a finite relation N (T + N)∗ of so-called productions. G is said to be in . weak Chomsky normal form (wCNF), if N (T + N∗);

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 5 / 25 . Greibach normal form (GNF), if N (T × N∗) + {ε}; with the technical provision for CNF and GNF that Y ε implies Y = S , and in this case S must not appear on the right side of other productions. The derivation relation( N + T)∗ (N + T)∗ consists of all pairs hαY β, αωβi with Y ω and α, β ∈ (N + T)∗ . The words w ∈ T∗ with S ∗ w constitute the language generated by G , where ∗ is the reflexive transitive hull of .

Background and motivation Grammars and normal forms Background on grammars and normal forms

Definition A context-free grammar G = hN, T, S, i consists of disjoint finite sets N of nonterminals and T of terminals, an axiom S ∈ N , and a finite relation N (T + N)∗ of so-called productions. G is said to be in . weak Chomsky normal form (wCNF), if N (T + N∗); . Chomsky normal form (CNF), if N T + N2 + {ε};

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 5 / 25 with the technical provision for CNF and GNF that Y ε implies Y = S , and in this case S must not appear on the right side of other productions. The derivation relation( N + T)∗ (N + T)∗ consists of all pairs hαY β, αωβi with Y ω and α, β ∈ (N + T)∗ . The words w ∈ T∗ with S ∗ w constitute the language generated by G , where ∗ is the reflexive transitive hull of .

Background and motivation Grammars and normal forms Background on grammars and normal forms

Definition A context-free grammar G = hN, T, S, i consists of disjoint finite sets N of nonterminals and T of terminals, an axiom S ∈ N , and a finite relation N (T + N)∗ of so-called productions. G is said to be in . weak Chomsky normal form (wCNF), if N (T + N∗); . Chomsky normal form (CNF), if N T + N2 + {ε}; . Greibach normal form (GNF), if N (T × N∗) + {ε};

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 5 / 25 The derivation relation( N + T)∗ (N + T)∗ consists of all pairs hαY β, αωβi with Y ω and α, β ∈ (N + T)∗ . The words w ∈ T∗ with S ∗ w constitute the language generated by G , where ∗ is the reflexive transitive hull of .

Background and motivation Grammars and normal forms Background on grammars and normal forms

Definition A context-free grammar G = hN, T, S, i consists of disjoint finite sets N of nonterminals and T of terminals, an axiom S ∈ N , and a finite relation N (T + N)∗ of so-called productions. G is said to be in . weak Chomsky normal form (wCNF), if N (T + N∗); . Chomsky normal form (CNF), if N T + N2 + {ε}; . Greibach normal form (GNF), if N (T × N∗) + {ε}; with the technical provision for CNF and GNF that Y ε implies Y = S , and in this case S must not appear on the right side of other productions.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 5 / 25 The words w ∈ T∗ with S ∗ w constitute the language generated by G , where ∗ is the reflexive transitive hull of .

Background and motivation Grammars and normal forms Background on grammars and normal forms

Definition A context-free grammar G = hN, T, S, i consists of disjoint finite sets N of nonterminals and T of terminals, an axiom S ∈ N , and a finite relation N (T + N)∗ of so-called productions. G is said to be in . weak Chomsky normal form (wCNF), if N (T + N∗); . Chomsky normal form (CNF), if N T + N2 + {ε}; . Greibach normal form (GNF), if N (T × N∗) + {ε}; with the technical provision for CNF and GNF that Y ε implies Y = S , and in this case S must not appear on the right side of other productions. The derivation relation( N + T)∗ (N + T)∗ consists of all pairs hαY β, αωβi with Y ω and α, β ∈ (N + T)∗ .

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 5 / 25 Background and motivation Grammars and normal forms Background on grammars and normal forms

Definition A context-free grammar G = hN, T, S, i consists of disjoint finite sets N of nonterminals and T of terminals, an axiom S ∈ N , and a finite relation N (T + N)∗ of so-called productions. G is said to be in . weak Chomsky normal form (wCNF), if N (T + N∗); . Chomsky normal form (CNF), if N T + N2 + {ε}; . Greibach normal form (GNF), if N (T × N∗) + {ε}; with the technical provision for CNF and GNF that Y ε implies Y = S , and in this case S must not appear on the right side of other productions. The derivation relation( N + T)∗ (N + T)∗ consists of all pairs hαY β, αωβi with Y ω and α, β ∈ (N + T)∗ . The words w ∈ T∗ with S ∗ w constitute the language generated by G , where ∗ is the reflexive transitive hull of .

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 5 / 25 Y S Y resp. resp. (Chomsky)

X 0 X 1 ε a

Y S resp. (Greibach)

a X 0 X 1 ... X n−1 ε

Strictly speaking, the tree for S ε is not correct; it should be just a leaf with nonterminal S . However, this is hard to distinguish from cases, where the derivation is not yet finished.

Background and motivation Grammars and normal forms

Traditional tree descriptions of normal-form productions:

Y Y resp. (weak Chomsky)

X 0 X 1 ... X n−1 a

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 6 / 25 Y S resp. (Greibach)

a X 0 X 1 ... X n−1 ε

Strictly speaking, the tree for S ε is not correct; it should be just a leaf with nonterminal S . However, this is hard to distinguish from cases, where the derivation is not yet finished.

Background and motivation Grammars and normal forms

Traditional tree descriptions of normal-form productions:

Y Y resp. (weak Chomsky)

X 0 X 1 ... X n−1 a

Y S Y resp. resp. (Chomsky)

X 0 X 1 ε a

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 6 / 25 Strictly speaking, the tree for S ε is not correct; it should be just a leaf with nonterminal S . However, this is hard to distinguish from cases, where the derivation is not yet finished.

Background and motivation Grammars and normal forms

Traditional tree descriptions of normal-form productions:

Y Y resp. (weak Chomsky)

X 0 X 1 ... X n−1 a

Y S Y resp. resp. (Chomsky)

X 0 X 1 ε a

Y S resp. (Greibach)

a X 0 X 1 ... X n−1 ε

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 6 / 25 Background and motivation Grammars and normal forms

Traditional tree descriptions of normal-form productions:

Y Y resp. (weak Chomsky)

X 0 X 1 ... X n−1 a

Y S Y resp. resp. (Chomsky)

X 0 X 1 ε a

Y S resp. (Greibach)

a X 0 X 1 ... X n−1 ε

Strictly speaking, the tree for S ε is not correct; it should be just a leaf with nonterminal S . However, this is hard to distinguish from cases, where the derivation is not yet finished.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 6 / 25 Nodes correspond multiarrows; “wires” correspond to objects; the direction is from top to bottom.

No! First recall

Definition (Multigraphs) Let D be the free category on the graph with object set N + {∗} with n + 1 arrows di , i < n , and c from n to ∗ , n ∈ N . The category of multigraphs now is the functor-category mgph := [Dop, set]. op G For D set call the elements of G∗ and of Gn , n ∈ N , objects, resp., multiarrows. If f ∈ Gn satisfies fdi = Xi , i < n , and fc = Y , ϕ besides the notation Y X0X1 ... Xn−1 we also use the circuit diagram Y

ϕ

X0 X1 ... Xn−1

Background and motivation Alternatives? Alternatives?

Is it really necessary to lump terminals and nonterminals together into the set V := T + N on which to form the free monoid?

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 7 / 25 Nodes correspond multiarrows; “wires” correspond to objects; the direction is from top to bottom.

First recall

Definition (Multigraphs) Let D be the free category on the graph with object set N + {∗} with n + 1 arrows di , i < n , and c from n to ∗ , n ∈ N . The category of multigraphs now is the functor-category mgph := [Dop, set]. op G For D set call the elements of G∗ and of Gn , n ∈ N , objects, resp., multiarrows. If f ∈ Gn satisfies fdi = Xi , i < n , and fc = Y , ϕ besides the notation Y X0X1 ... Xn−1 we also use the circuit diagram Y

ϕ

X0 X1 ... Xn−1

Background and motivation Alternatives? Alternatives?

Is it really necessary to lump terminals and nonterminals together into the set V := T + N on which to form the free monoid? No!

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 7 / 25 Nodes correspond multiarrows; “wires” correspond to objects; the direction is from top to bottom.

Definition (Multigraphs) Let D be the free category on the graph with object set N + {∗} with n + 1 arrows di , i < n , and c from n to ∗ , n ∈ N . The category of multigraphs now is the functor-category mgph := [Dop, set]. op G For D set call the elements of G∗ and of Gn , n ∈ N , objects, resp., multiarrows. If f ∈ Gn satisfies fdi = Xi , i < n , and fc = Y , ϕ besides the notation Y X0X1 ... Xn−1 we also use the circuit diagram Y

ϕ

X0 X1 ... Xn−1

Background and motivation Alternatives? Alternatives?

Is it really necessary to lump terminals and nonterminals together into the set V := T + N on which to form the free monoid? No! First recall

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 7 / 25 Nodes correspond multiarrows; “wires” correspond to objects; the direction is from top to bottom.

op G For D set call the elements of G∗ and of Gn , n ∈ N , objects, resp., multiarrows. If f ∈ Gn satisfies fdi = Xi , i < n , and fc = Y , ϕ besides the notation Y X0X1 ... Xn−1 we also use the circuit diagram Y

ϕ

X0 X1 ... Xn−1

Background and motivation Alternatives? Alternatives?

Is it really necessary to lump terminals and nonterminals together into the set V := T + N on which to form the free monoid? No! First recall

Definition (Multigraphs) Let D be the free category on the graph with object set N + {∗} with n + 1 arrows di , i < n , and c from n to ∗ , n ∈ N . The category of multigraphs now is the functor-category mgph := [Dop, set].

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 7 / 25 Nodes correspond multiarrows; “wires” correspond to objects; the direction is from top to bottom.

If f ∈ Gn satisfies fdi = Xi , i < n , and fc = Y , ϕ besides the notation Y X0X1 ... Xn−1 we also use the circuit diagram Y

ϕ

X0 X1 ... Xn−1

Background and motivation Alternatives? Alternatives?

Is it really necessary to lump terminals and nonterminals together into the set V := T + N on which to form the free monoid? No! First recall

Definition (Multigraphs) Let D be the free category on the graph with object set N + {∗} with n + 1 arrows di , i < n , and c from n to ∗ , n ∈ N . The category of multigraphs now is the functor-category mgph := [Dop, set]. op G For D set call the elements of G∗ and of Gn , n ∈ N , objects, resp., multiarrows.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 7 / 25 Nodes correspond multiarrows; “wires” correspond to objects; the direction is from top to bottom.

Y

ϕ

X0 X1 ... Xn−1

Background and motivation Alternatives? Alternatives?

Is it really necessary to lump terminals and nonterminals together into the set V := T + N on which to form the free monoid? No! First recall

Definition (Multigraphs) Let D be the free category on the graph with object set N + {∗} with n + 1 arrows di , i < n , and c from n to ∗ , n ∈ N . The category of multigraphs now is the functor-category mgph := [Dop, set]. op G For D set call the elements of G∗ and of Gn , n ∈ N , objects, resp., multiarrows. If f ∈ Gn satisfies fdi = Xi , i < n , and fc = Y , ϕ besides the notation Y X0X1 ... Xn−1 we also use the circuit diagram

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 7 / 25 Nodes correspond multiarrows; “wires” correspond to objects; the direction is from top to bottom.

Background and motivation Alternatives? Alternatives?

Is it really necessary to lump terminals and nonterminals together into the set V := T + N on which to form the free monoid? No! First recall

Definition (Multigraphs) Let D be the free category on the graph with object set N + {∗} with n + 1 arrows di , i < n , and c from n to ∗ , n ∈ N . The category of multigraphs now is the functor-category mgph := [Dop, set]. op G For D set call the elements of G∗ and of Gn , n ∈ N , objects, resp., multiarrows. If f ∈ Gn satisfies fdi = Xi , i < n , and fc = Y , ϕ besides the notation Y X0X1 ... Xn−1 we also use the circuit diagram Y

ϕ

X0 X1 ... Xn−1

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 7 / 25 “wires” correspond to objects; the direction is from top to bottom.

Background and motivation Alternatives? Alternatives?

Is it really necessary to lump terminals and nonterminals together into the set V := T + N on which to form the free monoid? No! First recall

Definition (Multigraphs) Let D be the free category on the graph with object set N + {∗} with n + 1 arrows di , i < n , and c from n to ∗ , n ∈ N . The category of multigraphs now is the functor-category mgph := [Dop, set]. op G For D set call the elements of G∗ and of Gn , n ∈ N , objects, resp., multiarrows. If f ∈ Gn satisfies fdi = Xi , i < n , and fc = Y , ϕ besides the notation Y X0X1 ... Xn−1 we also use the circuit diagram Y Nodes correspond multiarrows; ϕ

X0 X1 ... Xn−1

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 7 / 25 the direction is from top to bottom.

Background and motivation Alternatives? Alternatives?

Is it really necessary to lump terminals and nonterminals together into the set V := T + N on which to form the free monoid? No! First recall

Definition (Multigraphs) Let D be the free category on the graph with object set N + {∗} with n + 1 arrows di , i < n , and c from n to ∗ , n ∈ N . The category of multigraphs now is the functor-category mgph := [Dop, set]. op G For D set call the elements of G∗ and of Gn , n ∈ N , objects, resp., multiarrows. If f ∈ Gn satisfies fdi = Xi , i < n , and fc = Y , ϕ besides the notation Y X0X1 ... Xn−1 we also use the circuit diagram Y Nodes correspond multiarrows; ϕ “wires” correspond to objects;

X0 X1 ... Xn−1

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 7 / 25 Background and motivation Alternatives? Alternatives?

Is it really necessary to lump terminals and nonterminals together into the set V := T + N on which to form the free monoid? No! First recall

Definition (Multigraphs) Let D be the free category on the graph with object set N + {∗} with n + 1 arrows di , i < n , and c from n to ∗ , n ∈ N . The category of multigraphs now is the functor-category mgph := [Dop, set]. op G For D set call the elements of G∗ and of Gn , n ∈ N , objects, resp., multiarrows. If f ∈ Gn satisfies fdi = Xi , i < n , and fc = Y , ϕ besides the notation Y X0X1 ... Xn−1 we also use the circuit diagram Y Nodes correspond multiarrows; ϕ “wires” correspond to objects;

X0 X1 ... Xn−1 the direction is from top to bottom.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 7 / 25 objects of G correspond to nonterminals; the 0-ary multiarrows M a M0 correspond to terminals, while M µ0 M0 corresponds to the empty word ε ;

the γ -assignments of Th0i -multiarrows to G -multiarrows correspond to productions.

γ A CFG `ala Walters over T is a faithful multigraph morphism G Th0i with G finite, together with a distinguished object G -object S .

Comparison with a traditional CFG in wCNF shows that

Faithfulness prevents multiple copies of productions from occurring. To describe the language generated by γ as directly as possible, we take a different approach from that of Walters.

Background and motivation Alternatives?

Definition (Bob Walters, 1988)

For a set T consider the multigraph Th0i with one object M , default µn n a 0 multiarrows M M , n ∈ N , and multiarrows M M , a ∈ T .

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 8 / 25 objects of G correspond to nonterminals; the 0-ary multiarrows M a M0 correspond to terminals, while M µ0 M0 corresponds to the empty word ε ;

the γ -assignments of Th0i -multiarrows to G -multiarrows correspond to productions.

together with a distinguished object G -object S .

Comparison with a traditional CFG in wCNF shows that

Faithfulness prevents multiple copies of productions from occurring. To describe the language generated by γ as directly as possible, we take a different approach from that of Walters.

Background and motivation Alternatives?

Definition (Bob Walters, 1988)

For a set T consider the multigraph Th0i with one object M , default µn n a 0 multiarrows M M , n ∈ N , and multiarrows M M , a ∈ T . γ A CFG `ala Walters over T is a faithful multigraph morphism G Th0i with G finite,

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 8 / 25 objects of G correspond to nonterminals; the 0-ary multiarrows M a M0 correspond to terminals, while M µ0 M0 corresponds to the empty word ε ;

the γ -assignments of Th0i -multiarrows to G -multiarrows correspond to productions.

Comparison with a traditional CFG in wCNF shows that

Faithfulness prevents multiple copies of productions from occurring. To describe the language generated by γ as directly as possible, we take a different approach from that of Walters.

Background and motivation Alternatives?

Definition (Bob Walters, 1988)

For a set T consider the multigraph Th0i with one object M , default µn n a 0 multiarrows M M , n ∈ N , and multiarrows M M , a ∈ T . γ A CFG `ala Walters over T is a faithful multigraph morphism G Th0i with G finite, together with a distinguished object G -object S .

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 8 / 25 the 0-ary multiarrows M a M0 correspond to terminals, while M µ0 M0 corresponds to the empty word ε ;

the γ -assignments of Th0i -multiarrows to G -multiarrows correspond to productions. Faithfulness prevents multiple copies of productions from occurring. To describe the language generated by γ as directly as possible, we take a different approach from that of Walters.

Background and motivation Alternatives?

Definition (Bob Walters, 1988)

For a set T consider the multigraph Th0i with one object M , default µn n a 0 multiarrows M M , n ∈ N , and multiarrows M M , a ∈ T . γ A CFG `ala Walters over T is a faithful multigraph morphism G Th0i with G finite, together with a distinguished object G -object S .

Comparison with a traditional CFG in wCNF shows that objects of G correspond to nonterminals;

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 8 / 25 the γ -assignments of Th0i -multiarrows to G -multiarrows correspond to productions. Faithfulness prevents multiple copies of productions from occurring. To describe the language generated by γ as directly as possible, we take a different approach from that of Walters.

Background and motivation Alternatives?

Definition (Bob Walters, 1988)

For a set T consider the multigraph Th0i with one object M , default µn n a 0 multiarrows M M , n ∈ N , and multiarrows M M , a ∈ T . γ A CFG `ala Walters over T is a faithful multigraph morphism G Th0i with G finite, together with a distinguished object G -object S .

Comparison with a traditional CFG in wCNF shows that objects of G correspond to nonterminals; the 0-ary multiarrows M a M0 correspond to terminals, while M µ0 M0 corresponds to the empty word ε ;

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 8 / 25 Faithfulness prevents multiple copies of productions from occurring. To describe the language generated by γ as directly as possible, we take a different approach from that of Walters.

Background and motivation Alternatives?

Definition (Bob Walters, 1988)

For a set T consider the multigraph Th0i with one object M , default µn n a 0 multiarrows M M , n ∈ N , and multiarrows M M , a ∈ T . γ A CFG `ala Walters over T is a faithful multigraph morphism G Th0i with G finite, together with a distinguished object G -object S .

Comparison with a traditional CFG in wCNF shows that objects of G correspond to nonterminals; the 0-ary multiarrows M a M0 correspond to terminals, while M µ0 M0 corresponds to the empty word ε ;

the γ -assignments of Th0i -multiarrows to G -multiarrows correspond to productions.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 8 / 25 To describe the language generated by γ as directly as possible, we take a different approach from that of Walters.

Background and motivation Alternatives?

Definition (Bob Walters, 1988)

For a set T consider the multigraph Th0i with one object M , default µn n a 0 multiarrows M M , n ∈ N , and multiarrows M M , a ∈ T . γ A CFG `ala Walters over T is a faithful multigraph morphism G Th0i with G finite, together with a distinguished object G -object S .

Comparison with a traditional CFG in wCNF shows that objects of G correspond to nonterminals; the 0-ary multiarrows M a M0 correspond to terminals, while M µ0 M0 corresponds to the empty word ε ;

the γ -assignments of Th0i -multiarrows to G -multiarrows correspond to productions. Faithfulness prevents multiple copies of productions from occurring.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 8 / 25 Background and motivation Alternatives?

Definition (Bob Walters, 1988)

For a set T consider the multigraph Th0i with one object M , default µn n a 0 multiarrows M M , n ∈ N , and multiarrows M M , a ∈ T . γ A CFG `ala Walters over T is a faithful multigraph morphism G Th0i with G finite, together with a distinguished object G -object S .

Comparison with a traditional CFG in wCNF shows that objects of G correspond to nonterminals; the 0-ary multiarrows M a M0 correspond to terminals, while M µ0 M0 corresponds to the empty word ε ;

the γ -assignments of Th0i -multiarrows to G -multiarrows correspond to productions. Faithfulness prevents multiple copies of productions from occurring. To describe the language generated by γ as directly as possible, we take a different approach from that of Walters.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 8 / 25 ∗ γ∗ ∗ . Freely extend γ to a multifunctor G Th0i (in analogy to forming the free category over a graph). ∗ ∗ 0 ∗ . The γ -image of the hom-set hS, εiG in hM, M iTh0i consists of certain tree-like composite diagrams with some leaves in T . . The yields of these diagrams, i.e., the words formed by their leaves, constitute the language generated by γ . We would like to identify words generated in this fashion with their 1 diagrams. Hence we consider Th0i as a “reflexive multigraph ” with the default multiarrows being distinguished. The intention is to have the default multiarrows obey certain identifications ∗ in the free multicategory Th0i ; hence its construction needs to be revised:

Background and motivation The generated language The generated language

1not to be confused with the graph-theoretic notion of this name Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 9 / 25 ∗ ∗ 0 ∗ . The γ -image of the hom-set hS, εiG in hM, M iTh0i consists of certain tree-like composite diagrams with some leaves in T . . The yields of these diagrams, i.e., the words formed by their leaves, constitute the language generated by γ . We would like to identify words generated in this fashion with their 1 diagrams. Hence we consider Th0i as a “reflexive multigraph ” with the default multiarrows being distinguished. The intention is to have the default multiarrows obey certain identifications ∗ in the free multicategory Th0i ; hence its construction needs to be revised:

Background and motivation The generated language The generated language

∗ γ∗ ∗ . Freely extend γ to a multifunctor G Th0i (in analogy to forming the free category over a graph).

1not to be confused with the graph-theoretic notion of this name Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 9 / 25 . The yields of these diagrams, i.e., the words formed by their leaves, constitute the language generated by γ . We would like to identify words generated in this fashion with their 1 diagrams. Hence we consider Th0i as a “reflexive multigraph ” with the default multiarrows being distinguished. The intention is to have the default multiarrows obey certain identifications ∗ in the free multicategory Th0i ; hence its construction needs to be revised:

Background and motivation The generated language The generated language

∗ γ∗ ∗ . Freely extend γ to a multifunctor G Th0i (in analogy to forming the free category over a graph). ∗ ∗ 0 ∗ . The γ -image of the hom-set hS, εiG in hM, M iTh0i consists of certain tree-like composite diagrams with some leaves in T .

1not to be confused with the graph-theoretic notion of this name Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 9 / 25 We would like to identify words generated in this fashion with their 1 diagrams. Hence we consider Th0i as a “reflexive multigraph ” with the default multiarrows being distinguished. The intention is to have the default multiarrows obey certain identifications ∗ in the free multicategory Th0i ; hence its construction needs to be revised:

Background and motivation The generated language The generated language

∗ γ∗ ∗ . Freely extend γ to a multifunctor G Th0i (in analogy to forming the free category over a graph). ∗ ∗ 0 ∗ . The γ -image of the hom-set hS, εiG in hM, M iTh0i consists of certain tree-like composite diagrams with some leaves in T . . The yields of these diagrams, i.e., the words formed by their leaves, constitute the language generated by γ .

1not to be confused with the graph-theoretic notion of this name Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 9 / 25 1 Hence we consider Th0i as a “reflexive multigraph ” with the default multiarrows being distinguished. The intention is to have the default multiarrows obey certain identifications ∗ in the free multicategory Th0i ; hence its construction needs to be revised:

Background and motivation The generated language The generated language

∗ γ∗ ∗ . Freely extend γ to a multifunctor G Th0i (in analogy to forming the free category over a graph). ∗ ∗ 0 ∗ . The γ -image of the hom-set hS, εiG in hM, M iTh0i consists of certain tree-like composite diagrams with some leaves in T . . The yields of these diagrams, i.e., the words formed by their leaves, constitute the language generated by γ . We would like to identify words generated in this fashion with their diagrams.

1not to be confused with the graph-theoretic notion of this name Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 9 / 25 The intention is to have the default multiarrows obey certain identifications ∗ in the free multicategory Th0i ; hence its construction needs to be revised:

Background and motivation The generated language The generated language

∗ γ∗ ∗ . Freely extend γ to a multifunctor G Th0i (in analogy to forming the free category over a graph). ∗ ∗ 0 ∗ . The γ -image of the hom-set hS, εiG in hM, M iTh0i consists of certain tree-like composite diagrams with some leaves in T . . The yields of these diagrams, i.e., the words formed by their leaves, constitute the language generated by γ . We would like to identify words generated in this fashion with their 1 diagrams. Hence we consider Th0i as a “reflexive multigraph ” with the default multiarrows being distinguished.

1not to be confused with the graph-theoretic notion of this name Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 9 / 25 Background and motivation The generated language The generated language

∗ γ∗ ∗ . Freely extend γ to a multifunctor G Th0i (in analogy to forming the free category over a graph). ∗ ∗ 0 ∗ . The γ -image of the hom-set hS, εiG in hM, M iTh0i consists of certain tree-like composite diagrams with some leaves in T . . The yields of these diagrams, i.e., the words formed by their leaves, constitute the language generated by γ . We would like to identify words generated in this fashion with their 1 diagrams. Hence we consider Th0i as a “reflexive multigraph ” with the default multiarrows being distinguished. The intention is to have the default multiarrows obey certain identifications ∗ in the free multicategory Th0i ; hence its construction needs to be revised:

1not to be confused with the graph-theoretic notion of this name Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 9 / 25 This allows the elimination of µ0 -leaves, e.g., M M

µ4 = µ3

a b µ0 c a b c

∗ Any generated w ∈ T appears as yield directly underneath µ|w| .

This motivates us to write ε not only for µ0 , but also for µn , n ∈ N .

∗ Background and motivation Identifications in Th0i ∗ Identifications in Th0i

M M M M µm

= µm+n−1 and µ1 =

µn M M M M M M M M M M M M M M for m, n ∈ N , m > 0 .

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 10 / 25 ∗ Any generated w ∈ T appears as yield directly underneath µ|w| .

This motivates us to write ε not only for µ0 , but also for µn , n ∈ N .

∗ Background and motivation Identifications in Th0i ∗ Identifications in Th0i

M M M M µm

= µm+n−1 and µ1 =

µn M M M M M M M M M M M M M M

for m, n ∈ N , m > 0 . This allows the elimination of µ0 -leaves, e.g., M M

µ4 = µ3

a b µ0 c a b c

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 10 / 25 This motivates us to write ε not only for µ0 , but also for µn , n ∈ N .

∗ Background and motivation Identifications in Th0i ∗ Identifications in Th0i

M M M M µm

= µm+n−1 and µ1 =

µn M M M M M M M M M M M M M M

for m, n ∈ N , m > 0 . This allows the elimination of µ0 -leaves, e.g., M M

µ4 = µ3

a b µ0 c a b c

∗ Any generated w ∈ T appears as yield directly underneath µ|w| .

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 10 / 25 ∗ Background and motivation Identifications in Th0i ∗ Identifications in Th0i

M M M M µm

= µm+n−1 and µ1 =

µn M M M M M M M M M M M M M M

for m, n ∈ N , m > 0 . This allows the elimination of µ0 -leaves, e.g., M M

µ4 = µ3

a b µ0 c a b c

∗ Any generated w ∈ T appears as yield directly underneath µ|w| .

This motivates us to write ε not only for µ0 , but also for µn , n ∈ N .

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 10 / 25 Y Y Y Y resp. corresponds to a resp. ε

a X0 X1 ... Xn−1 X0 X1 ... Xn−1

where a ∈ Tε := T + {ε} . The nonterminals are labeling nodes on the left, but wires on the right! Besides a certain elegance of the new approach and the better handling of ε-productions (“peanuts”), how do we “sell” this to computer scientists or the tree-people (Ents?), who seem to be perfectly happy with the traditional approach?

Background and motivation Where’s the beef? Where’s the beef?

There is an obvious translation between the traditional tree-view and the multiarrow view of productions, and hence of derivation diagrams:

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 11 / 25 The nonterminals are labeling nodes on the left, but wires on the right! Besides a certain elegance of the new approach and the better handling of ε-productions (“peanuts”), how do we “sell” this to computer scientists or the tree-people (Ents?), who seem to be perfectly happy with the traditional approach?

Background and motivation Where’s the beef? Where’s the beef?

There is an obvious translation between the traditional tree-view and the multiarrow view of productions, and hence of derivation diagrams:

Y Y Y Y resp. corresponds to a resp. ε

a X0 X1 ... Xn−1 X0 X1 ... Xn−1

where a ∈ Tε := T + {ε} .

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 11 / 25 Besides a certain elegance of the new approach and the better handling of ε-productions (“peanuts”), how do we “sell” this to computer scientists or the tree-people (Ents?), who seem to be perfectly happy with the traditional approach?

Background and motivation Where’s the beef? Where’s the beef?

There is an obvious translation between the traditional tree-view and the multiarrow view of productions, and hence of derivation diagrams:

Y Y Y Y resp. corresponds to a resp. ε

a X0 X1 ... Xn−1 X0 X1 ... Xn−1

where a ∈ Tε := T + {ε} . The nonterminals are labeling nodes on the left, but wires on the right!

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 11 / 25 how do we “sell” this to computer scientists or the tree-people (Ents?), who seem to be perfectly happy with the traditional approach?

Background and motivation Where’s the beef? Where’s the beef?

There is an obvious translation between the traditional tree-view and the multiarrow view of productions, and hence of derivation diagrams:

Y Y Y Y resp. corresponds to a resp. ε

a X0 X1 ... Xn−1 X0 X1 ... Xn−1

where a ∈ Tε := T + {ε} . The nonterminals are labeling nodes on the left, but wires on the right! Besides a certain elegance of the new approach and the better handling of ε-productions (“peanuts”),

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 11 / 25 Background and motivation Where’s the beef? Where’s the beef?

There is an obvious translation between the traditional tree-view and the multiarrow view of productions, and hence of derivation diagrams:

Y Y Y Y resp. corresponds to a resp. ε

a X0 X1 ... Xn−1 X0 X1 ... Xn−1

where a ∈ Tε := T + {ε} . The nonterminals are labeling nodes on the left, but wires on the right! Besides a certain elegance of the new approach and the better handling of ε-productions (“peanuts”), how do we “sell” this to computer scientists or the tree-people (Ents?), who seem to be perfectly happy with the traditional approach?

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 11 / 25 S

U V

W X

Y U

(We will not present this algorithm.) Consider derivation diagrams for a CFG `ala ∗ ε Walters in CNF, i.e., elements of hS, εiG with multiarrows labeled by elements of Tε ε d and wires labeled by G -objects.

a ε Disregarding for the moment the wire-labels, these are instances of the inductive datatype b c of binary trees with leaves in T :

btree T = tip T | bin(btree T, btree T) = T + btree T × btree T Some programmers [cf., Bird, deMoor, Ex. 1.13, 1.14] know this to be isomorphic to the inductive datatype of general trees with all nodes in T : gtree T = node(T, listl(gtree T)) = T × listl(gtree T)

Normal forms in the multi-setting Inductive datatypes Normal forms in the multi-setting

It makes sense to adapt the algorithm for transforming a wCNF grammar into CNF to the multigraph setting.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 12 / 25 S

U V

W X

Y U

Consider derivation diagrams for a CFG `ala ∗ ε Walters in CNF, i.e., elements of hS, εiG with multiarrows labeled by elements of Tε ε d and wires labeled by G -objects.

a ε Disregarding for the moment the wire-labels, these are instances of the inductive datatype b c of binary trees with leaves in T :

btree T = tip T | bin(btree T, btree T) = T + btree T × btree T Some programmers [cf., Bird, deMoor, Ex. 1.13, 1.14] know this to be isomorphic to the inductive datatype of general trees with all nodes in T : gtree T = node(T, listl(gtree T)) = T × listl(gtree T)

Normal forms in the multi-setting Inductive datatypes Normal forms in the multi-setting

It makes sense to adapt the algorithm for transforming a wCNF grammar into CNF to the multigraph setting. (We will not present this algorithm.)

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 12 / 25 S

U V

W X Disregarding for the moment the wire-labels, Y U these are instances of the inductive datatype of binary trees with leaves in T :

btree T = tip T | bin(btree T, btree T) = T + btree T × btree T Some programmers [cf., Bird, deMoor, Ex. 1.13, 1.14] know this to be isomorphic to the inductive datatype of general trees with all nodes in T : gtree T = node(T, listl(gtree T)) = T × listl(gtree T)

Normal forms in the multi-setting Inductive datatypes Normal forms in the multi-setting

It makes sense to adapt the algorithm for transforming a wCNF grammar into CNF to the multigraph setting. (We will not present this algorithm.) S Consider derivation diagrams for a CFG `ala ∗ ε Walters in CNF, i.e., elements of hS, εiG U V with multiarrows labeled by elements of Tε ε d and wires labeled by G -objects. W X a ε Y U b c

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 12 / 25 S

U V

W X

Y U these are instances of the inductive datatype of binary trees with leaves in T :

btree T = tip T | bin(btree T, btree T) = T + btree T × btree T Some programmers [cf., Bird, deMoor, Ex. 1.13, 1.14] know this to be isomorphic to the inductive datatype of general trees with all nodes in T : gtree T = node(T, listl(gtree T)) = T × listl(gtree T)

Normal forms in the multi-setting Inductive datatypes Normal forms in the multi-setting

It makes sense to adapt the algorithm for transforming a wCNF grammar into CNF to the multigraph setting. (We will not present this algorithm.) S Consider derivation diagrams for a CFG `ala ∗ ε Walters in CNF, i.e., elements of hS, εiG U V with multiarrows labeled by elements of Tε ε d and wires labeled by G -objects. W X a ε Disregarding for the moment the wire-labels, Y U b c

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 12 / 25 S

U V

W X

Y U these are instances of the inductive datatype of binary trees with leaves in T :

btree T = tip T | bin(btree T, btree T) = T + btree T × btree T Some programmers [cf., Bird, deMoor, Ex. 1.13, 1.14] know this to be isomorphic to the inductive datatype of general trees with all nodes in T : gtree T = node(T, listl(gtree T)) = T × listl(gtree T)

Normal forms in the multi-setting Inductive datatypes Normal forms in the multi-setting

It makes sense to adapt the algorithm for transforming a wCNF grammar into CNF to the multigraph setting. (We will not present this algorithm.) S Consider derivation diagrams for a CFG `ala ∗ ε Walters in CNF, i.e., elements of hS, εiG U V with multiarrows labeled by elements of Tε ε d and wires labeled by G -objects. W X a ε Disregarding for the moment the wire-labels, Y U b c

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 12 / 25 S

U V

W X

Y U

btree T = tip T | bin(btree T, btree T) = T + btree T × btree T Some programmers [cf., Bird, deMoor, Ex. 1.13, 1.14] know this to be isomorphic to the inductive datatype of general trees with all nodes in T : gtree T = node(T, listl(gtree T)) = T × listl(gtree T)

Normal forms in the multi-setting Inductive datatypes Normal forms in the multi-setting

It makes sense to adapt the algorithm for transforming a wCNF grammar into CNF to the multigraph setting. (We will not present this algorithm.) S Consider derivation diagrams for a CFG `ala ∗ ε Walters in CNF, i.e., elements of hS, εiG U V with multiarrows labeled by elements of Tε ε d and wires labeled by G -objects. W X a ε Disregarding for the moment the wire-labels, Y U these are instances of the inductive datatype b c of binary trees with leaves in T :

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 12 / 25 S

U V

W X

Y U

Some programmers [cf., Bird, deMoor, Ex. 1.13, 1.14] know this to be isomorphic to the inductive datatype of general trees with all nodes in T : gtree T = node(T, listl(gtree T)) = T × listl(gtree T)

Normal forms in the multi-setting Inductive datatypes Normal forms in the multi-setting

It makes sense to adapt the algorithm for transforming a wCNF grammar into CNF to the multigraph setting. (We will not present this algorithm.) S Consider derivation diagrams for a CFG `ala ∗ ε Walters in CNF, i.e., elements of hS, εiG U V with multiarrows labeled by elements of Tε ε d and wires labeled by G -objects. W X a ε Disregarding for the moment the wire-labels, Y U these are instances of the inductive datatype b c of binary trees with leaves in T :

btree T = tip T | bin(btree T, btree T) = T + btree T × btree T

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 12 / 25 S

U V

W X

Y U

gtree T = node(T, listl(gtree T)) = T × listl(gtree T)

Normal forms in the multi-setting Inductive datatypes Normal forms in the multi-setting

It makes sense to adapt the algorithm for transforming a wCNF grammar into CNF to the multigraph setting. (We will not present this algorithm.) S Consider derivation diagrams for a CFG `ala ∗ ε Walters in CNF, i.e., elements of hS, εiG U V with multiarrows labeled by elements of Tε ε d and wires labeled by G -objects. W X a ε Disregarding for the moment the wire-labels, Y U these are instances of the inductive datatype b c of binary trees with leaves in T :

btree T = tip T | bin(btree T, btree T) = T + btree T × btree T Some programmers [cf., Bird, deMoor, Ex. 1.13, 1.14] know this to be isomorphic to the inductive datatype of general trees with all nodes in T :

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 12 / 25 S

U V

W X

Y U

Normal forms in the multi-setting Inductive datatypes Normal forms in the multi-setting

It makes sense to adapt the algorithm for transforming a wCNF grammar into CNF to the multigraph setting. (We will not present this algorithm.) S Consider derivation diagrams for a CFG `ala ∗ ε Walters in CNF, i.e., elements of hS, εiG U V with multiarrows labeled by elements of Tε ε d and wires labeled by G -objects. W X a ε Disregarding for the moment the wire-labels, Y U these are instances of the inductive datatype b c of binary trees with leaves in T :

btree T = tip T | bin(btree T, btree T) = T + btree T × btree T Some programmers [cf., Bird, deMoor, Ex. 1.13, 1.14] know this to be isomorphic to the inductive datatype of general trees with all nodes in T : gtree T = node(T, listl(gtree T)) = T × listl(gtree T)

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 12 / 25 . obtain “composite nodes” by collapsing the green wires; . revert to ordinary nodes by concatenation of labels.

ε ε a | ε | aε a ε d a | aε d 7→ 7→ 7→ b | bε d b d a ε b | bε c c b c c

Flattening these diagrams to strings requires parentheses; on the left the ε-nodes then serve as implicit left application operators.

(a(bc))d 7→ a(b(c), d)

(There is a second (better?) isomorphism utilizing reverse Polish notation.)

Normal forms in the multi-setting Uncurrying The isomorphism from btree to gtree is just uncurrying:

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 13 / 25 . obtain “composite nodes” by collapsing the green wires; . revert to ordinary nodes by concatenation of labels.

ε a | ε | aε a a | aε d 7→ 7→ 7→ b | bε d b d b | bε c c c

Flattening these diagrams to strings requires parentheses; on the left the ε-nodes then serve as implicit left application operators.

(a(bc))d 7→ a(b(c), d)

(There is a second (better?) isomorphism utilizing reverse Polish notation.)

Normal forms in the multi-setting Uncurrying The isomorphism from btree to gtree is just uncurrying:

ε

ε d

a ε

b c

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 13 / 25 . obtain “composite nodes” by collapsing the green wires; . revert to ordinary nodes by concatenation of labels.

a | ε | aε a

7→ 7→ b | bε d b d

c c

Flattening these diagrams to strings requires parentheses; on the left the ε-nodes then serve as implicit left application operators.

(a(bc))d 7→ a(b(c), d)

(There is a second (better?) isomorphism utilizing reverse Polish notation.)

Normal forms in the multi-setting Uncurrying The isomorphism from btree to gtree is just uncurrying:

ε ε

ε d a | aε d 7→

a ε b | bε

b c c

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 13 / 25 . obtain “composite nodes” by collapsing the green wires; . revert to ordinary nodes by concatenation of labels.

a

7→ b d

c

Flattening these diagrams to strings requires parentheses; on the left the ε-nodes then serve as implicit left application operators.

(a(bc))d 7→ a(b(c), d)

(There is a second (better?) isomorphism utilizing reverse Polish notation.)

Normal forms in the multi-setting Uncurrying The isomorphism from btree to gtree is just uncurrying:

ε ε a | ε | aε ε d a | aε d 7→ 7→ b | bε d a ε b | bε c b c c

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 13 / 25 . obtain “composite nodes” by collapsing the green wires; . revert to ordinary nodes by concatenation of labels. Flattening these diagrams to strings requires parentheses; on the left the ε-nodes then serve as implicit left application operators.

(a(bc))d 7→ a(b(c), d)

(There is a second (better?) isomorphism utilizing reverse Polish notation.)

Normal forms in the multi-setting Uncurrying The isomorphism from btree to gtree is just uncurrying:

ε ε a | ε | aε a ε d a | aε d 7→ 7→ 7→ b | bε d b d a ε b | bε c c b c c

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 13 / 25 . revert to ordinary nodes by concatenation of labels. Flattening these diagrams to strings requires parentheses; on the left the ε-nodes then serve as implicit left application operators.

(a(bc))d 7→ a(b(c), d)

(There is a second (better?) isomorphism utilizing reverse Polish notation.)

Normal forms in the multi-setting Uncurrying The isomorphism from btree to gtree is just uncurrying:

ε ε a | ε | aε a ε d a | aε d 7→ 7→ 7→ b | bε d b d a ε b | bε c c b c c

. obtain “composite nodes” by collapsing the green wires;

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 13 / 25 Flattening these diagrams to strings requires parentheses; on the left the ε-nodes then serve as implicit left application operators.

(a(bc))d 7→ a(b(c), d)

(There is a second (better?) isomorphism utilizing reverse Polish notation.)

Normal forms in the multi-setting Uncurrying The isomorphism from btree to gtree is just uncurrying:

ε ε a | ε | aε a ε d a | aε d 7→ 7→ 7→ b | bε d b d a ε b | bε c c b c c

. obtain “composite nodes” by collapsing the green wires; . revert to ordinary nodes by concatenation of labels.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 13 / 25 (There is a second (better?) isomorphism utilizing reverse Polish notation.)

Normal forms in the multi-setting Uncurrying The isomorphism from btree to gtree is just uncurrying:

ε ε a | ε | aε a ε d a | aε d 7→ 7→ 7→ b | bε d b d a ε b | bε c c b c c

. obtain “composite nodes” by collapsing the green wires; . revert to ordinary nodes by concatenation of labels. Flattening these diagrams to strings requires parentheses; on the left the ε-nodes then serve as implicit left application operators.

(a(bc))d 7→ a(b(c), d)

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 13 / 25 Normal forms in the multi-setting Uncurrying The isomorphism from btree to gtree is just uncurrying:

ε ε a | ε | aε a ε d a | aε d 7→ 7→ 7→ b | bε d b d a ε b | bε c c b c c

. obtain “composite nodes” by collapsing the green wires; . revert to ordinary nodes by concatenation of labels. Flattening these diagrams to strings requires parentheses; on the left the ε-nodes then serve as implicit left application operators.

(a(bc))d 7→ a(b(c), d)

(There is a second (better?) isomorphism utilizing reverse Polish notation.)

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 13 / 25 Not being able to recover previously collapsed green wires creates no problems. The new objects can be mapped on the old ones.

S the resulting diagram ought to be interpreted as derivation in a GNF grammar with X V conventional productions

U S aXV , X bU , U c , V d

Of course, this diagram no longer lives in the reflexive multigraph Th0i , but rather in ThNi , where all hom-sets coincide with T + {ε} . Currying the non-nullary Y productions of a GNF and ε splitting the results clearly ϕn−1 Xn−1 yields an equivalent CNF: · Y ·· ϕ2 a 7→ ε ϕ1 X1 X0 X1 ... Xn−1 ε ϕ0 X0 a

Normal forms in the multi-setting GNF and currying S Recovering the wire-labels, a X V b d U c

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 14 / 25 Not being able to recover previously collapsed green wires creates no problems. The new objects can be mapped on the old ones.

S the resulting diagram ought to be interpreted as derivation in a GNF grammar with X V conventional productions

U S aXV , X bU , U c , V d

Of course, this diagram no longer lives in the reflexive multigraph Th0i , but rather in ThNi , where all hom-sets coincide with T + {ε} . Currying the non-nullary Y productions of a GNF and ε splitting the results clearly ϕn−1 Xn−1 yields an equivalent CNF: · Y ·· ϕ2 a 7→ ε ϕ1 X1 X0 X1 ... Xn−1 ε ϕ0 X0 a

Normal forms in the multi-setting GNF and currying S Recovering the wire-labels, a X V b d U c

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 14 / 25 Not being able to recover previously collapsed green wires creates no problems. The new objects can be mapped on the old ones.

S

X V

U

Of course, this diagram no longer lives in the reflexive multigraph Th0i , but rather in ThNi , where all hom-sets coincide with T + {ε} . Currying the non-nullary Y productions of a GNF and ε splitting the results clearly ϕn−1 Xn−1 yields an equivalent CNF: · Y ·· ϕ2 a 7→ ε ϕ1 X1 X0 X1 ... Xn−1 ε ϕ0 X0 a

Normal forms in the multi-setting GNF and currying S Recovering the wire-labels, the resulting diagram ought a to be interpreted as derivation in a GNF grammar with X V conventional productions b d U S aXV , X bU , U c , V d c

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 14 / 25 Not being able to recover previously collapsed green wires creates no problems. The new objects can be mapped on the old ones.

S

X V

U

where all hom-sets coincide with T + {ε} . Currying the non-nullary Y productions of a GNF and ε splitting the results clearly ϕn−1 Xn−1 yields an equivalent CNF: · Y ·· ϕ2 a 7→ ε ϕ1 X1 X0 X1 ... Xn−1 ε ϕ0 X0 a

Normal forms in the multi-setting GNF and currying S Recovering the wire-labels, the resulting diagram ought a to be interpreted as derivation in a GNF grammar with X V conventional productions b d U S aXV , X bU , U c , V d c

Of course, this diagram no longer lives in the reflexive multigraph Th0i , but rather in ThNi ,

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 14 / 25 Not being able to recover previously collapsed green wires creates no problems. The new objects can be mapped on the old ones.

S

X V

U

Currying the non-nullary Y productions of a GNF and ε splitting the results clearly ϕn−1 Xn−1 yields an equivalent CNF: · Y ·· ϕ2 a 7→ ε ϕ1 X1 X0 X1 ... Xn−1 ε ϕ0 X0 a

Normal forms in the multi-setting GNF and currying S Recovering the wire-labels, the resulting diagram ought a to be interpreted as derivation in a GNF grammar with X V conventional productions b d U S aXV , X bU , U c , V d c

Of course, this diagram no longer lives in the reflexive multigraph Th0i , but rather in ThNi , where all hom-sets coincide with T + {ε} .

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 14 / 25 Not being able to recover previously collapsed green wires creates no problems. The new objects can be mapped on the old ones.

S

X V

U

Y

ε ϕn−1 Xn−1 · Y ·· ϕ2 a 7→ ε ϕ1 X1 X0 X1 ... Xn−1 ε ϕ0 X0 a

Normal forms in the multi-setting GNF and currying S Recovering the wire-labels, the resulting diagram ought a to be interpreted as derivation in a GNF grammar with X V conventional productions b d U S aXV , X bU , U c , V d c

Of course, this diagram no longer lives in the reflexive multigraph Th0i , but rather in ThNi , where all hom-sets coincide with T + {ε} . Currying the non-nullary productions of a GNF and splitting the results clearly yields an equivalent CNF:

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 14 / 25 S

X V

U

Not being able to recover previously collapsed green wires creates no problems. The new objects can be mapped on the old ones.

Normal forms in the multi-setting GNF and currying S Recovering the wire-labels, the resulting diagram ought a to be interpreted as derivation in a GNF grammar with X V conventional productions b d U S aXV , X bU , U c , V d c

Of course, this diagram no longer lives in the reflexive multigraph Th0i , but rather in ThNi , where all hom-sets coincide with T + {ε} . Currying the non-nullary Y productions of a GNF and ε splitting the results clearly ϕn−1 Xn−1 yields an equivalent CNF: · Y ·· ϕ2 a 7→ ε ϕ1 X1 X0 X1 ... Xn−1 ε ϕ0 X0 a

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 14 / 25 S

X V

U

The new objects can be mapped on the old ones.

Normal forms in the multi-setting GNF and currying S Recovering the wire-labels, the resulting diagram ought a to be interpreted as derivation in a GNF grammar with X V conventional productions b d U S aXV , X bU , U c , V d c

Of course, this diagram no longer lives in the reflexive multigraph Th0i , but rather in ThNi , where all hom-sets coincide with T + {ε} . Currying the non-nullary Y productions of a GNF and ε splitting the results clearly ϕn−1 Xn−1 yields an equivalent CNF: · Y ·· ϕ2 Not being able to recover a 7→ ε previously collapsed green ϕ1 X1 wires creates no problems. X0 X1 ... Xn−1 ε ϕ0 X0 a

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 14 / 25 S

X V

U

Normal forms in the multi-setting GNF and currying S Recovering the wire-labels, the resulting diagram ought a to be interpreted as derivation in a GNF grammar with X V conventional productions b d U S aXV , X bU , U c , V d c

Of course, this diagram no longer lives in the reflexive multigraph Th0i , but rather in ThNi , where all hom-sets coincide with T + {ε} . Currying the non-nullary Y productions of a GNF and ε splitting the results clearly ϕn−1 Xn−1 yields an equivalent CNF: · Y ·· ϕ2 Not being able to recover a 7→ ε previously collapsed green ϕ1 X1 wires creates no problems. X0 X1 ... Xn−1 ε ϕ0 The new objects can be X0 mapped on the old ones. a

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 14 / 25 X

ϕi , 7→,

X Yi i < n

For only finitely many such combinations to exist, the CNF-multigraph G must not admit left feedback (or not be left-recursive). Adapting classical grammar techniques, eliminating direct feedback at X can be achieved by new nonterminals X¯ and X 0 and new productions:

X X 0

0 X ϕ¯i X ϕi X¯ X 0 ψ [X ] j ¯ , , ψj Yi Yi ϕk,l

0 Uj Vj X¯ X Uj Vj Yk Yl j < m i < n , j < m i, k, l < n

The issue of recursiveness The issue of recursiveness

Conversely, constructing a GNF from a CNF requires uncurrying certain left-combinations of CNF productions to obtain single GNF productions.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 15 / 25 X

ϕi , 7→,

X Yi i < n

Adapting classical grammar techniques, eliminating direct feedback at X can be achieved by new nonterminals X¯ and X 0 and new productions:

X X 0

0 X ϕ¯i X ϕi X¯ X 0 ψ [X ] j ¯ , , ψj Yi Yi ϕk,l

0 Uj Vj X¯ X Uj Vj Yk Yl j < m i < n , j < m i, k, l < n

The issue of recursiveness The issue of recursiveness

Conversely, constructing a GNF from a CNF requires uncurrying certain left-combinations of CNF productions to obtain single GNF productions. For only finitely many such combinations to exist, the CNF-multigraph G must not admit left feedback (or not be left-recursive).

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 15 / 25 X

ϕi , 7→,

X Yi i < n

X X 0

0 X ϕ¯i X ϕi X¯ X 0 ψ [X ] j ¯ , , ψj Yi Yi ϕk,l

0 Uj Vj X¯ X Uj Vj Yk Yl j < m i < n , j < m i, k, l < n

The issue of recursiveness The issue of recursiveness

Conversely, constructing a GNF from a CNF requires uncurrying certain left-combinations of CNF productions to obtain single GNF productions. For only finitely many such combinations to exist, the CNF-multigraph G must not admit left feedback (or not be left-recursive). Adapting classical grammar techniques, eliminating direct feedback at X can be achieved by new nonterminals X¯ and X 0 and new productions:

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 15 / 25 7→,

X X 0

0 ϕ¯i X ϕi X¯ X 0 [X ] ¯ , , ψj Yi Yi ϕk,l

X¯ X 0 Uj Vj Yk Yl i < n , j < m i, k, l < n

The issue of recursiveness The issue of recursiveness

Conversely, constructing a GNF from a CNF requires uncurrying certain left-combinations of CNF productions to obtain single GNF productions. For only finitely many such combinations to exist, the CNF-multigraph G must not admit left feedback (or not be left-recursive). Adapting classical grammar techniques, eliminating direct feedback at X can be achieved by new nonterminals X¯ and X 0 and new productions:

X X

ϕi , ψj

X Yi Uj Vj i < n j < m

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 15 / 25 ,

The issue of recursiveness The issue of recursiveness

Conversely, constructing a GNF from a CNF requires uncurrying certain left-combinations of CNF productions to obtain single GNF productions. For only finitely many such combinations to exist, the CNF-multigraph G must not admit left feedback (or not be left-recursive). Adapting classical grammar techniques, eliminating direct feedback at X can be achieved by new nonterminals X¯ and X 0 and new productions:

X X 0

0 X X ϕ¯i X ϕi X¯ X 0 ϕ ψ [X ] i , j 7→ ¯ , , ψj Yi Yi ϕk,l

0 X Yi Uj Vj X¯ X Uj Vj Yk Yl i < n j < m i < n , j < m i, k, l < n

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 15 / 25 X

ϕi , 7→

X Yi i < n

The issue of recursiveness The issue of recursiveness

Conversely, constructing a GNF from a CNF requires uncurrying certain left-combinations of CNF productions to obtain single GNF productions. For only finitely many such combinations to exist, the CNF-multigraph G must not admit left feedback (or not be left-recursive). Adapting classical grammar techniques, eliminating direct feedback at X can be achieved by new nonterminals X¯ and X 0 and new productions:

X X 0

0 X ϕ¯i X ϕi X¯ X 0 ψ [X ] j , ¯ , , ψj Yi Yi ϕk,l

0 Uj Vj X¯ X Uj Vj Yk Yl j < m i < n , j < m i, k, l < n

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 15 / 25 This requires a recursive procedure with some arbitrary ordering on the G -objects:

Once the objects Xi , i < n , have been treated, perform “re-associations”

Xn Xn

ϕ ϕ0 0 Xi 7→ Xi ψ Z U ψ0

U V V Z ϕ until no multiarrows of the form Xn Xi Z with i < n are left. Then eliminate direct feedback at Xn as described above. This is an expensive operation as it can square the size of the grammar, i.e., the sum over the symbols in all productions. Uncurrying, like all classical algorithms, can lead to another squaring in size.

The issue of recursiveness

Of course, delayed feedback has to be eliminated as well.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 16 / 25 Once the objects Xi , i < n , have been treated, perform “re-associations”

Xn Xn

ϕ ϕ0 0 Xi 7→ Xi ψ Z U ψ0

U V V Z ϕ until no multiarrows of the form Xn Xi Z with i < n are left. Then eliminate direct feedback at Xn as described above. This is an expensive operation as it can square the size of the grammar, i.e., the sum over the symbols in all productions. Uncurrying, like all classical algorithms, can lead to another squaring in size.

The issue of recursiveness

Of course, delayed feedback has to be eliminated as well. This requires a recursive procedure with some arbitrary ordering on the G -objects:

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 16 / 25 Xn Xn

ϕ ϕ0 0 Xi 7→ Xi ψ Z U ψ0

U V V Z ϕ until no multiarrows of the form Xn Xi Z with i < n are left. Then eliminate direct feedback at Xn as described above. This is an expensive operation as it can square the size of the grammar, i.e., the sum over the symbols in all productions. Uncurrying, like all classical algorithms, can lead to another squaring in size.

The issue of recursiveness

Of course, delayed feedback has to be eliminated as well. This requires a recursive procedure with some arbitrary ordering on the G -objects:

Once the objects Xi , i < n , have been treated, perform “re-associations”

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 16 / 25 Then eliminate direct feedback at Xn as described above. This is an expensive operation as it can square the size of the grammar, i.e., the sum over the symbols in all productions. Uncurrying, like all classical algorithms, can lead to another squaring in size.

The issue of recursiveness

Of course, delayed feedback has to be eliminated as well. This requires a recursive procedure with some arbitrary ordering on the G -objects:

Once the objects Xi , i < n , have been treated, perform “re-associations”

Xn Xn

ϕ ϕ0 0 Xi 7→ Xi ψ Z U ψ0

U V V Z ϕ until no multiarrows of the form Xn Xi Z with i < n are left.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 16 / 25 This is an expensive operation as it can square the size of the grammar, i.e., the sum over the symbols in all productions. Uncurrying, like all classical algorithms, can lead to another squaring in size.

The issue of recursiveness

Of course, delayed feedback has to be eliminated as well. This requires a recursive procedure with some arbitrary ordering on the G -objects:

Once the objects Xi , i < n , have been treated, perform “re-associations”

Xn Xn

ϕ ϕ0 0 Xi 7→ Xi ψ Z U ψ0

U V V Z ϕ until no multiarrows of the form Xn Xi Z with i < n are left. Then eliminate direct feedback at Xn as described above.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 16 / 25 Uncurrying, like all classical algorithms, can lead to another squaring in size.

The issue of recursiveness

Of course, delayed feedback has to be eliminated as well. This requires a recursive procedure with some arbitrary ordering on the G -objects:

Once the objects Xi , i < n , have been treated, perform “re-associations”

Xn Xn

ϕ ϕ0 0 Xi 7→ Xi ψ Z U ψ0

U V V Z ϕ until no multiarrows of the form Xn Xi Z with i < n are left. Then eliminate direct feedback at Xn as described above. This is an expensive operation as it can square the size of the grammar, i.e., the sum over the symbols in all productions.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 16 / 25 The issue of recursiveness

Of course, delayed feedback has to be eliminated as well. This requires a recursive procedure with some arbitrary ordering on the G -objects:

Once the objects Xi , i < n , have been treated, perform “re-associations”

Xn Xn

ϕ ϕ0 0 Xi 7→ Xi ψ Z U ψ0

U V V Z ϕ until no multiarrows of the form Xn Xi Z with i < n are left. Then eliminate direct feedback at Xn as described above. This is an expensive operation as it can square the size of the grammar, i.e., the sum over the symbols in all productions. Uncurrying, like all classical algorithms, can lead to another squaring in size.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 16 / 25 Thinking of such graph morphisms instead as labeled transition systems, possibly with ε-transitions, nonterminals turn into states. Specifying initial and final states results in the notion of finite state automaton(FSA). Now we can apply currying to the transitions of such an automaton: S S This essentially results in a right-linear a ε and hence regular grammar that is in X Da X CNF iff the automaton does not have b 7→ a ε D ε-transitions. Y b Y c b ε Final states provide an externally Dc imposed mechanism for termination, T final c T final as Th1i has no default for this.

The regular case and automata The regular case and automata

γ Interpreting (faithful) morphisms of reflexive(!) graphs, G Th1i with G finite, as regular T -grammars provided Walters’ motivation.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 17 / 25 Specifying initial and final states results in the notion of finite state automaton(FSA). Now we can apply currying to the transitions of such an automaton: S S This essentially results in a right-linear a ε and hence regular grammar that is in X Da X CNF iff the automaton does not have b 7→ a ε D ε-transitions. Y b Y c b ε Final states provide an externally Dc imposed mechanism for termination, T final c T final as Th1i has no default for this.

The regular case and automata The regular case and automata

γ Interpreting (faithful) morphisms of reflexive(!) graphs, G Th1i with G finite, as regular T -grammars provided Walters’ motivation. Thinking of such graph morphisms instead as labeled transition systems, possibly with ε-transitions, nonterminals turn into states.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 17 / 25 Now we can apply currying to the transitions of such an automaton: S S This essentially results in a right-linear a ε and hence regular grammar that is in X Da X CNF iff the automaton does not have b 7→ a ε D ε-transitions. Y b Y c b ε Final states provide an externally Dc imposed mechanism for termination, T final c T final as Th1i has no default for this.

The regular case and automata The regular case and automata

γ Interpreting (faithful) morphisms of reflexive(!) graphs, G Th1i with G finite, as regular T -grammars provided Walters’ motivation. Thinking of such graph morphisms instead as labeled transition systems, possibly with ε-transitions, nonterminals turn into states. Specifying initial and final states results in the notion of finite state automaton(FSA).

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 17 / 25 S S This essentially results in a right-linear a ε and hence regular grammar that is in X Da X CNF iff the automaton does not have b 7→ a ε D ε-transitions. Y b Y c b ε Final states provide an externally Dc imposed mechanism for termination, T final c T final as Th1i has no default for this.

The regular case and automata The regular case and automata

γ Interpreting (faithful) morphisms of reflexive(!) graphs, G Th1i with G finite, as regular T -grammars provided Walters’ motivation. Thinking of such graph morphisms instead as labeled transition systems, possibly with ε-transitions, nonterminals turn into states. Specifying initial and final states results in the notion of finite state automaton(FSA). Now we can apply currying to the transitions of such an automaton:

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 17 / 25 This essentially results in a right-linear and hence regular grammar that is in CNF iff the automaton does not have ε-transitions. Final states provide an externally imposed mechanism for termination, as Th1i has no default for this.

The regular case and automata The regular case and automata

γ Interpreting (faithful) morphisms of reflexive(!) graphs, G Th1i with G finite, as regular T -grammars provided Walters’ motivation. Thinking of such graph morphisms instead as labeled transition systems, possibly with ε-transitions, nonterminals turn into states. Specifying initial and final states results in the notion of finite state automaton(FSA). Now we can apply currying to the transitions of such an automaton:

S S

a ε X Da X b 7→ a ε D Y b Y c b ε Dc T final c T final

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 17 / 25 Final states provide an externally imposed mechanism for termination, as Th1i has no default for this.

The regular case and automata The regular case and automata

γ Interpreting (faithful) morphisms of reflexive(!) graphs, G Th1i with G finite, as regular T -grammars provided Walters’ motivation. Thinking of such graph morphisms instead as labeled transition systems, possibly with ε-transitions, nonterminals turn into states. Specifying initial and final states results in the notion of finite state automaton(FSA). Now we can apply currying to the transitions of such an automaton: S S This essentially results in a right-linear a ε and hence regular grammar that is in X Da X CNF iff the automaton does not have b 7→ a ε D ε-transitions. Y b Y c b ε Dc T final c T final

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 17 / 25 The regular case and automata The regular case and automata

γ Interpreting (faithful) morphisms of reflexive(!) graphs, G Th1i with G finite, as regular T -grammars provided Walters’ motivation. Thinking of such graph morphisms instead as labeled transition systems, possibly with ε-transitions, nonterminals turn into states. Specifying initial and final states results in the notion of finite state automaton(FSA). Now we can apply currying to the transitions of such an automaton: S S This essentially results in a right-linear a ε and hence regular grammar that is in X Da X CNF iff the automaton does not have b 7→ a ε D ε-transitions. Y b Y c b ε Final states provide an externally Dc imposed mechanism for termination, T final c T final as Th1i has no default for this.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 17 / 25 . strings(!) of nonterminals are interpreted as (internal) states; . only left-derivations are considered, which corresponds to the constrained access to the stack via its top.

These can be turned into push-down automata(PDA), provided that

The initial state is S , while the canonical final state is ε . In particular, CFG’s in GNF correspond to push-down automata without ε-transitions, and the transformation into GNF can be viewed as the elimination of ε-transitions from a general PDA. Also note that CFG-induced PDA’s are pure in the sense of having only one external state. Still they can accept any context-free language. Conventionally, PDA’s are defined with external states. Eliminating the stack then leads to FSA’s, also called 0-PDA’s. As seen above, FSA’s can also be realized by pure PDA’s, where the stack is limited to depth 1.

The regular case and automata PDA’s

γ Extend the notion of CFG to faithful multigraph morphisms G ThNi.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 18 / 25 . strings(!) of nonterminals are interpreted as (internal) states; . only left-derivations are considered, which corresponds to the constrained access to the stack via its top.

The initial state is S , while the canonical final state is ε . In particular, CFG’s in GNF correspond to push-down automata without ε-transitions, and the transformation into GNF can be viewed as the elimination of ε-transitions from a general PDA. Also note that CFG-induced PDA’s are pure in the sense of having only one external state. Still they can accept any context-free language. Conventionally, PDA’s are defined with external states. Eliminating the stack then leads to FSA’s, also called 0-PDA’s. As seen above, FSA’s can also be realized by pure PDA’s, where the stack is limited to depth 1.

The regular case and automata PDA’s

γ Extend the notion of CFG to faithful multigraph morphisms G ThNi. These can be turned into push-down automata(PDA), provided that

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 18 / 25 . only left-derivations are considered, which corresponds to the constrained access to the stack via its top. The initial state is S , while the canonical final state is ε . In particular, CFG’s in GNF correspond to push-down automata without ε-transitions, and the transformation into GNF can be viewed as the elimination of ε-transitions from a general PDA. Also note that CFG-induced PDA’s are pure in the sense of having only one external state. Still they can accept any context-free language. Conventionally, PDA’s are defined with external states. Eliminating the stack then leads to FSA’s, also called 0-PDA’s. As seen above, FSA’s can also be realized by pure PDA’s, where the stack is limited to depth 1.

The regular case and automata PDA’s

γ Extend the notion of CFG to faithful multigraph morphisms G ThNi. These can be turned into push-down automata(PDA), provided that . strings(!) of nonterminals are interpreted as (internal) states;

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 18 / 25 The initial state is S , while the canonical final state is ε . In particular, CFG’s in GNF correspond to push-down automata without ε-transitions, and the transformation into GNF can be viewed as the elimination of ε-transitions from a general PDA. Also note that CFG-induced PDA’s are pure in the sense of having only one external state. Still they can accept any context-free language. Conventionally, PDA’s are defined with external states. Eliminating the stack then leads to FSA’s, also called 0-PDA’s. As seen above, FSA’s can also be realized by pure PDA’s, where the stack is limited to depth 1.

The regular case and automata PDA’s

γ Extend the notion of CFG to faithful multigraph morphisms G ThNi. These can be turned into push-down automata(PDA), provided that . strings(!) of nonterminals are interpreted as (internal) states; . only left-derivations are considered, which corresponds to the constrained access to the stack via its top.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 18 / 25 In particular, CFG’s in GNF correspond to push-down automata without ε-transitions, and the transformation into GNF can be viewed as the elimination of ε-transitions from a general PDA. Also note that CFG-induced PDA’s are pure in the sense of having only one external state. Still they can accept any context-free language. Conventionally, PDA’s are defined with external states. Eliminating the stack then leads to FSA’s, also called 0-PDA’s. As seen above, FSA’s can also be realized by pure PDA’s, where the stack is limited to depth 1.

The regular case and automata PDA’s

γ Extend the notion of CFG to faithful multigraph morphisms G ThNi. These can be turned into push-down automata(PDA), provided that . strings(!) of nonterminals are interpreted as (internal) states; . only left-derivations are considered, which corresponds to the constrained access to the stack via its top. The initial state is S , while the canonical final state is ε .

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 18 / 25 and the transformation into GNF can be viewed as the elimination of ε-transitions from a general PDA. Also note that CFG-induced PDA’s are pure in the sense of having only one external state. Still they can accept any context-free language. Conventionally, PDA’s are defined with external states. Eliminating the stack then leads to FSA’s, also called 0-PDA’s. As seen above, FSA’s can also be realized by pure PDA’s, where the stack is limited to depth 1.

The regular case and automata PDA’s

γ Extend the notion of CFG to faithful multigraph morphisms G ThNi. These can be turned into push-down automata(PDA), provided that . strings(!) of nonterminals are interpreted as (internal) states; . only left-derivations are considered, which corresponds to the constrained access to the stack via its top. The initial state is S , while the canonical final state is ε . In particular, CFG’s in GNF correspond to push-down automata without ε-transitions,

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 18 / 25 Also note that CFG-induced PDA’s are pure in the sense of having only one external state. Still they can accept any context-free language. Conventionally, PDA’s are defined with external states. Eliminating the stack then leads to FSA’s, also called 0-PDA’s. As seen above, FSA’s can also be realized by pure PDA’s, where the stack is limited to depth 1.

The regular case and automata PDA’s

γ Extend the notion of CFG to faithful multigraph morphisms G ThNi. These can be turned into push-down automata(PDA), provided that . strings(!) of nonterminals are interpreted as (internal) states; . only left-derivations are considered, which corresponds to the constrained access to the stack via its top. The initial state is S , while the canonical final state is ε . In particular, CFG’s in GNF correspond to push-down automata without ε-transitions, and the transformation into GNF can be viewed as the elimination of ε-transitions from a general PDA.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 18 / 25 Still they can accept any context-free language. Conventionally, PDA’s are defined with external states. Eliminating the stack then leads to FSA’s, also called 0-PDA’s. As seen above, FSA’s can also be realized by pure PDA’s, where the stack is limited to depth 1.

The regular case and automata PDA’s

γ Extend the notion of CFG to faithful multigraph morphisms G ThNi. These can be turned into push-down automata(PDA), provided that . strings(!) of nonterminals are interpreted as (internal) states; . only left-derivations are considered, which corresponds to the constrained access to the stack via its top. The initial state is S , while the canonical final state is ε . In particular, CFG’s in GNF correspond to push-down automata without ε-transitions, and the transformation into GNF can be viewed as the elimination of ε-transitions from a general PDA. Also note that CFG-induced PDA’s are pure in the sense of having only one external state.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 18 / 25 Conventionally, PDA’s are defined with external states. Eliminating the stack then leads to FSA’s, also called 0-PDA’s. As seen above, FSA’s can also be realized by pure PDA’s, where the stack is limited to depth 1.

The regular case and automata PDA’s

γ Extend the notion of CFG to faithful multigraph morphisms G ThNi. These can be turned into push-down automata(PDA), provided that . strings(!) of nonterminals are interpreted as (internal) states; . only left-derivations are considered, which corresponds to the constrained access to the stack via its top. The initial state is S , while the canonical final state is ε . In particular, CFG’s in GNF correspond to push-down automata without ε-transitions, and the transformation into GNF can be viewed as the elimination of ε-transitions from a general PDA. Also note that CFG-induced PDA’s are pure in the sense of having only one external state. Still they can accept any context-free language.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 18 / 25 As seen above, FSA’s can also be realized by pure PDA’s, where the stack is limited to depth 1.

The regular case and automata PDA’s

γ Extend the notion of CFG to faithful multigraph morphisms G ThNi. These can be turned into push-down automata(PDA), provided that . strings(!) of nonterminals are interpreted as (internal) states; . only left-derivations are considered, which corresponds to the constrained access to the stack via its top. The initial state is S , while the canonical final state is ε . In particular, CFG’s in GNF correspond to push-down automata without ε-transitions, and the transformation into GNF can be viewed as the elimination of ε-transitions from a general PDA. Also note that CFG-induced PDA’s are pure in the sense of having only one external state. Still they can accept any context-free language. Conventionally, PDA’s are defined with external states. Eliminating the stack then leads to FSA’s, also called 0-PDA’s.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 18 / 25 The regular case and automata PDA’s

γ Extend the notion of CFG to faithful multigraph morphisms G ThNi. These can be turned into push-down automata(PDA), provided that . strings(!) of nonterminals are interpreted as (internal) states; . only left-derivations are considered, which corresponds to the constrained access to the stack via its top. The initial state is S , while the canonical final state is ε . In particular, CFG’s in GNF correspond to push-down automata without ε-transitions, and the transformation into GNF can be viewed as the elimination of ε-transitions from a general PDA. Also note that CFG-induced PDA’s are pure in the sense of having only one external state. Still they can accept any context-free language. Conventionally, PDA’s are defined with external states. Eliminating the stack then leads to FSA’s, also called 0-PDA’s. As seen above, FSA’s can also be realized by pure PDA’s, where the stack is limited to depth 1.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 18 / 25 where the multigraph structure of rel is given by × .

Both bijections remain valid, if Th1i and ThNi are replaced by an arbitrary graph, resp., multigraph as control. Restricting to finite G imposes appropriate finiteness conditions on the “denominators”.

(Multi-)Graph Comprehension (Multi-)Graph Comprehension

The familiar bijection for labeled transition systems

γ G Th1i (faithful graph morphism) Γ Th1i rel (graph morphism)

readily carries over to the multi-setting:

γ G ThNi (faithful multigraph morphism) Γ ThNi rel (multigraph morphism)

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 19 / 25 Both bijections remain valid, if Th1i and ThNi are replaced by an arbitrary graph, resp., multigraph as control. Restricting to finite G imposes appropriate finiteness conditions on the “denominators”.

(Multi-)Graph Comprehension (Multi-)Graph Comprehension

The familiar bijection for labeled transition systems

γ G Th1i (faithful graph morphism) Γ Th1i rel (graph morphism)

readily carries over to the multi-setting:

γ G ThNi (faithful multigraph morphism) Γ ThNi rel (multigraph morphism) where the multigraph structure of rel is given by × .

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 19 / 25 Restricting to finite G imposes appropriate finiteness conditions on the “denominators”.

(Multi-)Graph Comprehension (Multi-)Graph Comprehension

The familiar bijection for labeled transition systems

γ G Th1i (faithful graph morphism) Γ Th1i rel (graph morphism)

readily carries over to the multi-setting:

γ G ThNi (faithful multigraph morphism) Γ ThNi rel (multigraph morphism) where the multigraph structure of rel is given by × .

Both bijections remain valid, if Th1i and ThNi are replaced by an arbitrary graph, resp., multigraph as control.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 19 / 25 (Multi-)Graph Comprehension (Multi-)Graph Comprehension

The familiar bijection for labeled transition systems

γ G Th1i (faithful graph morphism) Γ Th1i rel (graph morphism)

readily carries over to the multi-setting:

γ G ThNi (faithful multigraph morphism) Γ ThNi rel (multigraph morphism) where the multigraph structure of rel is given by × .

Both bijections remain valid, if Th1i and ThNi are replaced by an arbitrary graph, resp., multigraph as control. Restricting to finite G imposes appropriate finiteness conditions on the “denominators”.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 19 / 25 where G now is a (strict monoidal) category. Again, general (strict monoidal) categories can serve as controls instead of T∗ , resp., T? . h1i hNi Oplax (monoidal) natural transformations turn out to be the appropriate type of morphism in the “denominators” to encode simulations. Instead of rel , matrix categories over other rigs yield further instances of this phenomenon, like probabilistic or weighted transition systems.

(Multi-)Graph Comprehension Closing up under “vertical” composition, we obtain bijections

γ ∗ G Th1i (faithful functor) ∗ Γ Th1i rel (lax functor)

Moving to the free monoidal category in the multi-setting yields

G γ T? (faithful strict monoidal functor) hNi T? Γ rel (strict monoidal lax functor) hNi

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 20 / 25 Again, general (strict monoidal) categories can serve as controls instead of T∗ , resp., T? . h1i hNi Oplax (monoidal) natural transformations turn out to be the appropriate type of morphism in the “denominators” to encode simulations. Instead of rel , matrix categories over other rigs yield further instances of this phenomenon, like probabilistic or weighted transition systems.

(Multi-)Graph Comprehension Closing up under “vertical” composition, we obtain bijections

γ ∗ G Th1i (faithful functor) ∗ Γ Th1i rel (lax functor)

Moving to the free monoidal category in the multi-setting yields

G γ T? (faithful strict monoidal functor) hNi T? Γ rel (strict monoidal lax functor) hNi where G now is a (strict monoidal) category.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 20 / 25 Oplax (monoidal) natural transformations turn out to be the appropriate type of morphism in the “denominators” to encode simulations. Instead of rel , matrix categories over other rigs yield further instances of this phenomenon, like probabilistic or weighted transition systems.

(Multi-)Graph Comprehension Closing up under “vertical” composition, we obtain bijections

γ ∗ G Th1i (faithful functor) ∗ Γ Th1i rel (lax functor)

Moving to the free monoidal category in the multi-setting yields

G γ T? (faithful strict monoidal functor) hNi T? Γ rel (strict monoidal lax functor) hNi where G now is a (strict monoidal) category. Again, general (strict monoidal) categories can serve as controls instead of T∗ , resp., T? . h1i hNi

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 20 / 25 Instead of rel , matrix categories over other rigs yield further instances of this phenomenon, like probabilistic or weighted transition systems.

(Multi-)Graph Comprehension Closing up under “vertical” composition, we obtain bijections

γ ∗ G Th1i (faithful functor) ∗ Γ Th1i rel (lax functor)

Moving to the free monoidal category in the multi-setting yields

G γ T? (faithful strict monoidal functor) hNi T? Γ rel (strict monoidal lax functor) hNi where G now is a (strict monoidal) category. Again, general (strict monoidal) categories can serve as controls instead of T∗ , resp., T? . h1i hNi Oplax (monoidal) natural transformations turn out to be the appropriate type of morphism in the “denominators” to encode simulations.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 20 / 25 (Multi-)Graph Comprehension Closing up under “vertical” composition, we obtain bijections

γ ∗ G Th1i (faithful functor) ∗ Γ Th1i rel (lax functor)

Moving to the free monoidal category in the multi-setting yields

G γ T? (faithful strict monoidal functor) hNi T? Γ rel (strict monoidal lax functor) hNi where G now is a (strict monoidal) category. Again, general (strict monoidal) categories can serve as controls instead of T∗ , resp., T? . h1i hNi Oplax (monoidal) natural transformations turn out to be the appropriate type of morphism in the “denominators” to encode simulations. Instead of rel , matrix categories over other rigs yield further instances of this phenomenon, like probabilistic or weighted transition systems.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 20 / 25 V∗ × N × V∗ V∗ where V := T + N

(the left side has to contain at least one nonterminal)? These generate all semidecidable languages, which are precisely those recognizable by Turing machines. . What about “polygraphs” and consequently “polycategories”? The well-developed theory of “planar” polycategories and poly-bicategories, where the poly-2-cells can have finitely many inputs and outputs, cf., [Cockett, Koslowski, Seely: TAC 11(2)] and [Koslowski: TAC 14(7)], is based on logical considerations (calculus of 2-sided sequents) and uses cut along single wires as “vertical” composition. It would seem to be incomatible with the replacement process of general grammars.

. What about general grammars with unrestricted productions

Obvious questions Obvious questions

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 21 / 25 . What about “polygraphs” and consequently “polycategories”? The well-developed theory of “planar” polycategories and poly-bicategories, where the poly-2-cells can have finitely many inputs and outputs, cf., [Cockett, Koslowski, Seely: TAC 11(2)] and [Koslowski: TAC 14(7)], is based on logical considerations (calculus of 2-sided sequents) and uses cut along single wires as “vertical” composition. It would seem to be incomatible with the replacement process of general grammars.

These generate all semidecidable languages, which are precisely those recognizable by Turing machines.

Obvious questions Obvious questions

. What about general grammars with unrestricted productions

V∗ × N × V∗ V∗ where V := T + N

(the left side has to contain at least one nonterminal)?

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 21 / 25 The well-developed theory of “planar” polycategories and poly-bicategories, where the poly-2-cells can have finitely many inputs and outputs, cf., [Cockett, Koslowski, Seely: TAC 11(2)] and [Koslowski: TAC 14(7)], is based on logical considerations (calculus of 2-sided sequents) and uses cut along single wires as “vertical” composition. It would seem to be incomatible with the replacement process of general grammars.

. What about “polygraphs” and consequently “polycategories”?

Obvious questions Obvious questions

. What about general grammars with unrestricted productions

V∗ × N × V∗ V∗ where V := T + N

(the left side has to contain at least one nonterminal)? These generate all semidecidable languages, which are precisely those recognizable by Turing machines.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 21 / 25 The well-developed theory of “planar” polycategories and poly-bicategories, where the poly-2-cells can have finitely many inputs and outputs, cf., [Cockett, Koslowski, Seely: TAC 11(2)] and [Koslowski: TAC 14(7)], is based on logical considerations (calculus of 2-sided sequents) and uses cut along single wires as “vertical” composition. It would seem to be incomatible with the replacement process of general grammars.

Obvious questions Obvious questions

. What about general grammars with unrestricted productions

V∗ × N × V∗ V∗ where V := T + N

(the left side has to contain at least one nonterminal)? These generate all semidecidable languages, which are precisely those recognizable by Turing machines. . What about “polygraphs” and consequently “polycategories”?

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 21 / 25 is based on logical considerations (calculus of 2-sided sequents) and uses cut along single wires as “vertical” composition. It would seem to be incomatible with the replacement process of general grammars.

Obvious questions Obvious questions

. What about general grammars with unrestricted productions

V∗ × N × V∗ V∗ where V := T + N

(the left side has to contain at least one nonterminal)? These generate all semidecidable languages, which are precisely those recognizable by Turing machines. . What about “polygraphs” and consequently “polycategories”? The well-developed theory of “planar” polycategories and poly-bicategories, where the poly-2-cells can have finitely many inputs and outputs, cf., [Cockett, Koslowski, Seely: TAC 11(2)] and [Koslowski: TAC 14(7)],

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 21 / 25 It would seem to be incomatible with the replacement process of general grammars.

Obvious questions Obvious questions

. What about general grammars with unrestricted productions

V∗ × N × V∗ V∗ where V := T + N

(the left side has to contain at least one nonterminal)? These generate all semidecidable languages, which are precisely those recognizable by Turing machines. . What about “polygraphs” and consequently “polycategories”? The well-developed theory of “planar” polycategories and poly-bicategories, where the poly-2-cells can have finitely many inputs and outputs, cf., [Cockett, Koslowski, Seely: TAC 11(2)] and [Koslowski: TAC 14(7)], is based on logical considerations (calculus of 2-sided sequents) and uses cut along single wires as “vertical” composition.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 21 / 25 Obvious questions Obvious questions

. What about general grammars with unrestricted productions

V∗ × N × V∗ V∗ where V := T + N

(the left side has to contain at least one nonterminal)? These generate all semidecidable languages, which are precisely those recognizable by Turing machines. . What about “polygraphs” and consequently “polycategories”? The well-developed theory of “planar” polycategories and poly-bicategories, where the poly-2-cells can have finitely many inputs and outputs, cf., [Cockett, Koslowski, Seely: TAC 11(2)] and [Koslowski: TAC 14(7)], is based on logical considerations (calculus of 2-sided sequents) and uses cut along single wires as “vertical” composition. It would seem to be incomatible with the replacement process of general grammars.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 21 / 25 We can allow to look deeper into the stack, beyond the top element. As long as the depth is bounded, this does not help. We can add finitely many external states to examine subwords on the stack for being left sides of productions. However, his does not help in remembering the prefix before the first such subword. We can add the ability to “bend wires out of the way” until we find a first left hand side of a production, and “bend the wires back” later. Recall that we only have to deal with finitely many nonterminals.

Even for left derivations, the first subword to which a production can be applied need not be a prefix of the current stack; in fact the depth of its occurrence is unbounded. E.g., consider productions AB EF and CD B, and a current stack of the form AnCD ... .

A combination of the last two ideas indeed will do the trick.

Obvious questions A thought experiment

How can we extend pure PDA’s as above in a finite fashion in order to handle general grammars?

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 22 / 25 We can allow to look deeper into the stack, beyond the top element. As long as the depth is bounded, this does not help. We can add finitely many external states to examine subwords on the stack for being left sides of productions. However, his does not help in remembering the prefix before the first such subword. We can add the ability to “bend wires out of the way” until we find a first left hand side of a production, and “bend the wires back” later. Recall that we only have to deal with finitely many nonterminals.

E.g., consider productions AB EF and CD B, and a current stack of the form AnCD ... .

A combination of the last two ideas indeed will do the trick.

Obvious questions A thought experiment

How can we extend pure PDA’s as above in a finite fashion in order to handle general grammars? Even for left derivations, the first subword to which a production can be applied need not be a prefix of the current stack; in fact the depth of its occurrence is unbounded.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 22 / 25 As long as the depth is bounded, this does not help. We can add finitely many external states to examine subwords on the stack for being left sides of productions. However, his does not help in remembering the prefix before the first such subword. We can add the ability to “bend wires out of the way” until we find a first left hand side of a production, and “bend the wires back” later. Recall that we only have to deal with finitely many nonterminals.

We can allow to look deeper into the stack, beyond the top element.

A combination of the last two ideas indeed will do the trick.

Obvious questions A thought experiment

How can we extend pure PDA’s as above in a finite fashion in order to handle general grammars? Even for left derivations, the first subword to which a production can be applied need not be a prefix of the current stack; in fact the depth of its occurrence is unbounded. E.g., consider productions AB EF and CD B, and a current stack of the form AnCD ... .

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 22 / 25 We can add finitely many external states to examine subwords on the stack for being left sides of productions. However, his does not help in remembering the prefix before the first such subword. We can add the ability to “bend wires out of the way” until we find a first left hand side of a production, and “bend the wires back” later. Recall that we only have to deal with finitely many nonterminals.

As long as the depth is bounded, this does not help.

A combination of the last two ideas indeed will do the trick.

Obvious questions A thought experiment

How can we extend pure PDA’s as above in a finite fashion in order to handle general grammars? Even for left derivations, the first subword to which a production can be applied need not be a prefix of the current stack; in fact the depth of its occurrence is unbounded. E.g., consider productions AB EF and CD B, and a current stack of the form AnCD ... . We can allow to look deeper into the stack, beyond the top element.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 22 / 25 However, his does not help in remembering the prefix before the first such subword. We can add the ability to “bend wires out of the way” until we find a first left hand side of a production, and “bend the wires back” later. Recall that we only have to deal with finitely many nonterminals.

We can add finitely many external states to examine subwords on the stack for being left sides of productions.

A combination of the last two ideas indeed will do the trick.

Obvious questions A thought experiment

How can we extend pure PDA’s as above in a finite fashion in order to handle general grammars? Even for left derivations, the first subword to which a production can be applied need not be a prefix of the current stack; in fact the depth of its occurrence is unbounded. E.g., consider productions AB EF and CD B, and a current stack of the form AnCD ... . We can allow to look deeper into the stack, beyond the top element. As long as the depth is bounded, this does not help.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 22 / 25 We can add the ability to “bend wires out of the way” until we find a first left hand side of a production, and “bend the wires back” later. Recall that we only have to deal with finitely many nonterminals.

However, his does not help in remembering the prefix before the first such subword.

A combination of the last two ideas indeed will do the trick.

Obvious questions A thought experiment

How can we extend pure PDA’s as above in a finite fashion in order to handle general grammars? Even for left derivations, the first subword to which a production can be applied need not be a prefix of the current stack; in fact the depth of its occurrence is unbounded. E.g., consider productions AB EF and CD B, and a current stack of the form AnCD ... . We can allow to look deeper into the stack, beyond the top element. As long as the depth is bounded, this does not help. We can add finitely many external states to examine subwords on the stack for being left sides of productions.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 22 / 25 Recall that we only have to deal with finitely many nonterminals.

We can add the ability to “bend wires out of the way” until we find a first left hand side of a production, and “bend the wires back” later.

A combination of the last two ideas indeed will do the trick.

Obvious questions A thought experiment

How can we extend pure PDA’s as above in a finite fashion in order to handle general grammars? Even for left derivations, the first subword to which a production can be applied need not be a prefix of the current stack; in fact the depth of its occurrence is unbounded. E.g., consider productions AB EF and CD B, and a current stack of the form AnCD ... . We can allow to look deeper into the stack, beyond the top element. As long as the depth is bounded, this does not help. We can add finitely many external states to examine subwords on the stack for being left sides of productions. However, his does not help in remembering the prefix before the first such subword.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 22 / 25 Recall that we only have to deal with finitely many nonterminals. A combination of the last two ideas indeed will do the trick.

Obvious questions A thought experiment

How can we extend pure PDA’s as above in a finite fashion in order to handle general grammars? Even for left derivations, the first subword to which a production can be applied need not be a prefix of the current stack; in fact the depth of its occurrence is unbounded. E.g., consider productions AB EF and CD B, and a current stack of the form AnCD ... . We can allow to look deeper into the stack, beyond the top element. As long as the depth is bounded, this does not help. We can add finitely many external states to examine subwords on the stack for being left sides of productions. However, his does not help in remembering the prefix before the first such subword. We can add the ability to “bend wires out of the way” until we find a first left hand side of a production, and “bend the wires back” later.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 22 / 25 A combination of the last two ideas indeed will do the trick.

Obvious questions A thought experiment

How can we extend pure PDA’s as above in a finite fashion in order to handle general grammars? Even for left derivations, the first subword to which a production can be applied need not be a prefix of the current stack; in fact the depth of its occurrence is unbounded. E.g., consider productions AB EF and CD B, and a current stack of the form AnCD ... . We can allow to look deeper into the stack, beyond the top element. As long as the depth is bounded, this does not help. We can add finitely many external states to examine subwords on the stack for being left sides of productions. However, his does not help in remembering the prefix before the first such subword. We can add the ability to “bend wires out of the way” until we find a first left hand side of a production, and “bend the wires back” later. Recall that we only have to deal with finitely many nonterminals.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 22 / 25 Obvious questions A thought experiment

How can we extend pure PDA’s as above in a finite fashion in order to handle general grammars? Even for left derivations, the first subword to which a production can be applied need not be a prefix of the current stack; in fact the depth of its occurrence is unbounded. E.g., consider productions AB EF and CD B, and a current stack of the form AnCD ... . We can allow to look deeper into the stack, beyond the top element. As long as the depth is bounded, this does not help. We can add finitely many external states to examine subwords on the stack for being left sides of productions. However, his does not help in remembering the prefix before the first such subword. We can add the ability to “bend wires out of the way” until we find a first left hand side of a production, and “bend the wires back” later. Recall that we only have to deal with finitely many nonterminals. A combination of the last two ideas indeed will do the trick.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 22 / 25 In analogy with the notion of reflexive (multi-)graph, where implicitly a set of equations is specified by which to factor the absolutely free (multi-)category, we consider adjoint polygraphs, which are supposed to already contain the units and counits of the “free polycategory with linear adjunctions” over it as distinguished poly-2-cells. Of course, T needs to be replaced by an obvious polygraph ThNi , hNi hNi where again all hom-sets coincide with T + {ε} . In machine terms we obtain pure 2-PDA’s, which are more powerful than pure PDA’s, as they can recognize shuffles of context-free languages (which need not be context-free anymore). 2-PDA’s with external states are well-known to be equivalent to Turing machines.

Obvious questions Polygraphs with linear adjoints Polygraphs with linear adjoints

Recall that planar poly-bicategories as well as polycategories admit a very nice notion of so-called linear adjoints, together with a mate calculus.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 23 / 25 Of course, T needs to be replaced by an obvious polygraph ThNi , hNi hNi where again all hom-sets coincide with T + {ε} . In machine terms we obtain pure 2-PDA’s, which are more powerful than pure PDA’s, as they can recognize shuffles of context-free languages (which need not be context-free anymore). 2-PDA’s with external states are well-known to be equivalent to Turing machines.

Obvious questions Polygraphs with linear adjoints Polygraphs with linear adjoints

Recall that planar poly-bicategories as well as polycategories admit a very nice notion of so-called linear adjoints, together with a mate calculus. In analogy with the notion of reflexive (multi-)graph, where implicitly a set of equations is specified by which to factor the absolutely free (multi-)category, we consider adjoint polygraphs, which are supposed to already contain the units and counits of the “free polycategory with linear adjunctions” over it as distinguished poly-2-cells.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 23 / 25 In machine terms we obtain pure 2-PDA’s, which are more powerful than pure PDA’s, as they can recognize shuffles of context-free languages (which need not be context-free anymore). 2-PDA’s with external states are well-known to be equivalent to Turing machines.

Obvious questions Polygraphs with linear adjoints Polygraphs with linear adjoints

Recall that planar poly-bicategories as well as polycategories admit a very nice notion of so-called linear adjoints, together with a mate calculus. In analogy with the notion of reflexive (multi-)graph, where implicitly a set of equations is specified by which to factor the absolutely free (multi-)category, we consider adjoint polygraphs, which are supposed to already contain the units and counits of the “free polycategory with linear adjunctions” over it as distinguished poly-2-cells. Of course, T needs to be replaced by an obvious polygraph ThNi , hNi hNi where again all hom-sets coincide with T + {ε} .

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 23 / 25 2-PDA’s with external states are well-known to be equivalent to Turing machines.

Obvious questions Polygraphs with linear adjoints Polygraphs with linear adjoints

Recall that planar poly-bicategories as well as polycategories admit a very nice notion of so-called linear adjoints, together with a mate calculus. In analogy with the notion of reflexive (multi-)graph, where implicitly a set of equations is specified by which to factor the absolutely free (multi-)category, we consider adjoint polygraphs, which are supposed to already contain the units and counits of the “free polycategory with linear adjunctions” over it as distinguished poly-2-cells. Of course, T needs to be replaced by an obvious polygraph ThNi , hNi hNi where again all hom-sets coincide with T + {ε} . In machine terms we obtain pure 2-PDA’s, which are more powerful than pure PDA’s, as they can recognize shuffles of context-free languages (which need not be context-free anymore).

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 23 / 25 Obvious questions Polygraphs with linear adjoints Polygraphs with linear adjoints

Recall that planar poly-bicategories as well as polycategories admit a very nice notion of so-called linear adjoints, together with a mate calculus. In analogy with the notion of reflexive (multi-)graph, where implicitly a set of equations is specified by which to factor the absolutely free (multi-)category, we consider adjoint polygraphs, which are supposed to already contain the units and counits of the “free polycategory with linear adjunctions” over it as distinguished poly-2-cells. Of course, T needs to be replaced by an obvious polygraph ThNi , hNi hNi where again all hom-sets coincide with T + {ε} . In machine terms we obtain pure 2-PDA’s, which are more powerful than pure PDA’s, as they can recognize shuffles of context-free languages (which need not be context-free anymore). 2-PDA’s with external states are well-known to be equivalent to Turing machines. Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 23 / 25 What is the “right” way of adding external states, short of grafting them on? . What about transducers, i.e., how should output be handled? . Work out the details for polygraph comprehension.

. Even if they do, external states may still be useful for computational problems (even for 1-PDA’s).

To do To do

. Do pure 2-PDA’s suffice to simulate Turing machines for decision problems?

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 24 / 25 . What about transducers, i.e., how should output be handled? . Work out the details for polygraph comprehension.

What is the “right” way of adding external states, short of grafting them on?

To do To do

. Do pure 2-PDA’s suffice to simulate Turing machines for decision problems? . Even if they do, external states may still be useful for computational problems (even for 1-PDA’s).

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 24 / 25 . What about transducers, i.e., how should output be handled? . Work out the details for polygraph comprehension.

To do To do

. Do pure 2-PDA’s suffice to simulate Turing machines for decision problems? . Even if they do, external states may still be useful for computational problems (even for 1-PDA’s). What is the “right” way of adding external states, short of grafting them on?

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 24 / 25 . Work out the details for polygraph comprehension.

To do To do

. Do pure 2-PDA’s suffice to simulate Turing machines for decision problems? . Even if they do, external states may still be useful for computational problems (even for 1-PDA’s). What is the “right” way of adding external states, short of grafting them on? . What about transducers, i.e., how should output be handled?

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 24 / 25 To do To do

. Do pure 2-PDA’s suffice to simulate Turing machines for decision problems? . Even if they do, external states may still be useful for computational problems (even for 1-PDA’s). What is the “right” way of adding external states, short of grafting them on? . What about transducers, i.e., how should output be handled? . Work out the details for polygraph comprehension.

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 24 / 25 To do

Thank you!

Jurgen¨ Koslowski (TU-BS) Chomsky and Greibach normal form CT 2011, Vancouver, July 22 25 / 25