(Pre-)Algebras for Linguistics 3. Trees Carl Pollard Linguistics - - PowerPoint PPT Presentation

pre algebras for linguistics
SMART_READER_LITE
LIVE PREVIEW

(Pre-)Algebras for Linguistics 3. Trees Carl Pollard Linguistics - - PowerPoint PPT Presentation

(Pre-)Algebras for Linguistics 3. Trees Carl Pollard Linguistics 680: Formal Foundations Autumn 2010 Carl Pollard (Pre-)Algebras for Linguistics Review of Chains Recall that a chain is an order where any two distinct elements a and b are


slide-1
SLIDE 1

(Pre-)Algebras for Linguistics

  • 3. Trees

Carl Pollard

Linguistics 680: Formal Foundations

Autumn 2010

Carl Pollard (Pre-)Algebras for Linguistics

slide-2
SLIDE 2

Review of Chains

Recall that a chain is an order where any two distinct elements a and b are comparable (i.e. either a ⊑ b or b ⊑ a).

Carl Pollard (Pre-)Algebras for Linguistics

slide-3
SLIDE 3

Review of Chains

Recall that a chain is an order where any two distinct elements a and b are comparable (i.e. either a ⊑ b or b ⊑ a). Recall also that in a chain, a is minimal (maximal) in a subset S iff it is least (greatest) in S.

Carl Pollard (Pre-)Algebras for Linguistics

slide-4
SLIDE 4

Theorem 1

Any nonempty finite order has a minimal (and so, by duality, a maximal) member.

Carl Pollard (Pre-)Algebras for Linguistics

slide-5
SLIDE 5

Theorem 1

Any nonempty finite order has a minimal (and so, by duality, a maximal) member. Proof sketch: Let T be the set of natural numbers n such that every ordered set of cardinality n + 1 has a minimal member, and show that T is inductive.

Carl Pollard (Pre-)Algebras for Linguistics

slide-6
SLIDE 6

Corollary

Any nonempty finite chain has a least (and so, by duality, a greatest) member.

Carl Pollard (Pre-)Algebras for Linguistics

slide-7
SLIDE 7

Corollary

Any nonempty finite chain has a least (and so, by duality, a greatest) member. Proof sketch: This follows from Theorem 1 together with the fact (just reviewed) that in a chain, a member is least (greatest) iff it is minimal (maximal).

Carl Pollard (Pre-)Algebras for Linguistics

slide-8
SLIDE 8

Theorem 2

For any natural number n, any chain of cardinality n is

  • rder-isomorphic to the usual order on n (i.e. the restriction to

n of the usual ≤ order on ω).

Carl Pollard (Pre-)Algebras for Linguistics

slide-9
SLIDE 9

Theorem 2

For any natural number n, any chain of cardinality n is

  • rder-isomorphic to the usual order on n (i.e. the restriction to

n of the usual ≤ order on ω). Proof sketch: By induction on n. The case n = 0 is trivial.

Carl Pollard (Pre-)Algebras for Linguistics

slide-10
SLIDE 10

Theorem 2

For any natural number n, any chain of cardinality n is

  • rder-isomorphic to the usual order on n (i.e. the restriction to

n of the usual ≤ order on ω). Proof sketch: By induction on n. The case n = 0 is trivial. By inductive hypothesis, assume the statement of the theorem holds for the case n = k.

Carl Pollard (Pre-)Algebras for Linguistics

slide-11
SLIDE 11

Theorem 2

For any natural number n, any chain of cardinality n is

  • rder-isomorphic to the usual order on n (i.e. the restriction to

n of the usual ≤ order on ω). Proof sketch: By induction on n. The case n = 0 is trivial. By inductive hypothesis, assume the statement of the theorem holds for the case n = k. Let A of cardinality k + 1 be a chain with order ⊑.

Carl Pollard (Pre-)Algebras for Linguistics

slide-12
SLIDE 12

Theorem 2

For any natural number n, any chain of cardinality n is

  • rder-isomorphic to the usual order on n (i.e. the restriction to

n of the usual ≤ order on ω). Proof sketch: By induction on n. The case n = 0 is trivial. By inductive hypothesis, assume the statement of the theorem holds for the case n = k. Let A of cardinality k + 1 be a chain with order ⊑. By the Corollary, A has a greatest member a, so there is an order isomorphism f from k to A \ {a}.

Carl Pollard (Pre-)Algebras for Linguistics

slide-13
SLIDE 13

Theorem 2

For any natural number n, any chain of cardinality n is

  • rder-isomorphic to the usual order on n (i.e. the restriction to

n of the usual ≤ order on ω). Proof sketch: By induction on n. The case n = 0 is trivial. By inductive hypothesis, assume the statement of the theorem holds for the case n = k. Let A of cardinality k + 1 be a chain with order ⊑. By the Corollary, A has a greatest member a, so there is an order isomorphism f from k to A \ {a}. The rest of the proof consists of showing that the function f ∪ {< k + 1, a >} is an order isomorphism.

Carl Pollard (Pre-)Algebras for Linguistics

slide-14
SLIDE 14

Theorem 3

If ⊑ is an order on a finite set A, then ⊑= ∗. (I.e. a finite order is the reflexive transitive closure of its own covering relation.)

Carl Pollard (Pre-)Algebras for Linguistics

slide-15
SLIDE 15

Theorem 3

If ⊑ is an order on a finite set A, then ⊑= ∗. (I.e. a finite order is the reflexive transitive closure of its own covering relation.) Proof sketch: That ∗ ⊆ ⊑ follows easily from the definition

  • f reflexive transitive closure and the the transitivity of ⊑.

Carl Pollard (Pre-)Algebras for Linguistics

slide-16
SLIDE 16

Theorem 3

If ⊑ is an order on a finite set A, then ⊑= ∗. (I.e. a finite order is the reflexive transitive closure of its own covering relation.) Proof sketch: That ∗ ⊆ ⊑ follows easily from the definition

  • f reflexive transitive closure and the the transitivity of ⊑.

To prove the reverse inclusion, suppose a = b, a ⊑ b and let X be the (nonempty, finite) set of all subsets of A which, when

  • rdered by ⊑, are chains with b as greatest member and a as

least member.

Carl Pollard (Pre-)Algebras for Linguistics

slide-17
SLIDE 17

Theorem 3

If ⊑ is an order on a finite set A, then ⊑= ∗. (I.e. a finite order is the reflexive transitive closure of its own covering relation.) Proof sketch: That ∗ ⊆ ⊑ follows easily from the definition

  • f reflexive transitive closure and the the transitivity of ⊑.

To prove the reverse inclusion, suppose a = b, a ⊑ b and let X be the (nonempty, finite) set of all subsets of A which, when

  • rdered by ⊑, are chains with b as greatest member and a as

least member. X is nonempty since one of its members is {a, b}.

Carl Pollard (Pre-)Algebras for Linguistics

slide-18
SLIDE 18

Theorem 3

If ⊑ is an order on a finite set A, then ⊑= ∗. (I.e. a finite order is the reflexive transitive closure of its own covering relation.) Proof sketch: That ∗ ⊆ ⊑ follows easily from the definition

  • f reflexive transitive closure and the the transitivity of ⊑.

To prove the reverse inclusion, suppose a = b, a ⊑ b and let X be the (nonempty, finite) set of all subsets of A which, when

  • rdered by ⊑, are chains with b as greatest member and a as

least member. X is nonempty since one of its members is {a, b}. Then X itself is ordered by ⊆X, and so by Theorem 1 has a maximal member C.

Carl Pollard (Pre-)Algebras for Linguistics

slide-19
SLIDE 19

Theorem 3

If ⊑ is an order on a finite set A, then ⊑= ∗. (I.e. a finite order is the reflexive transitive closure of its own covering relation.) Proof sketch: That ∗ ⊆ ⊑ follows easily from the definition

  • f reflexive transitive closure and the the transitivity of ⊑.

To prove the reverse inclusion, suppose a = b, a ⊑ b and let X be the (nonempty, finite) set of all subsets of A which, when

  • rdered by ⊑, are chains with b as greatest member and a as

least member. X is nonempty since one of its members is {a, b}. Then X itself is ordered by ⊆X, and so by Theorem 1 has a maximal member C. Let n + 1 be |C|; by Theorem 2, there is an order-isomorphism f : n + 1 → C.

Carl Pollard (Pre-)Algebras for Linguistics

slide-20
SLIDE 20

Theorem 3

If ⊑ is an order on a finite set A, then ⊑= ∗. (I.e. a finite order is the reflexive transitive closure of its own covering relation.) Proof sketch: That ∗ ⊆ ⊑ follows easily from the definition

  • f reflexive transitive closure and the the transitivity of ⊑.

To prove the reverse inclusion, suppose a = b, a ⊑ b and let X be the (nonempty, finite) set of all subsets of A which, when

  • rdered by ⊑, are chains with b as greatest member and a as

least member. X is nonempty since one of its members is {a, b}. Then X itself is ordered by ⊆X, and so by Theorem 1 has a maximal member C. Let n + 1 be |C|; by Theorem 2, there is an order-isomorphism f : n + 1 → C. Clearly n > 0, f(0) = a, and f(n) = b.

Carl Pollard (Pre-)Algebras for Linguistics

slide-21
SLIDE 21

Theorem 3

If ⊑ is an order on a finite set A, then ⊑= ∗. (I.e. a finite order is the reflexive transitive closure of its own covering relation.) Proof sketch: That ∗ ⊆ ⊑ follows easily from the definition

  • f reflexive transitive closure and the the transitivity of ⊑.

To prove the reverse inclusion, suppose a = b, a ⊑ b and let X be the (nonempty, finite) set of all subsets of A which, when

  • rdered by ⊑, are chains with b as greatest member and a as

least member. X is nonempty since one of its members is {a, b}. Then X itself is ordered by ⊆X, and so by Theorem 1 has a maximal member C. Let n + 1 be |C|; by Theorem 2, there is an order-isomorphism f : n + 1 → C. Clearly n > 0, f(0) = a, and f(n) = b. Also, for each m < n, f(m) f(m + 1), because

  • therwise, there would be a c properly between f(m) and

f(m + 1), contradicting the maximality of C.

Carl Pollard (Pre-)Algebras for Linguistics

slide-22
SLIDE 22

Trees

A tree is a finite set A with an order ⊑ and a top ⊤, such that the covering relation is a function with domain A \ {⊤}.

Carl Pollard (Pre-)Algebras for Linguistics

slide-23
SLIDE 23

Tree Terminology

Carl Pollard (Pre-)Algebras for Linguistics

slide-24
SLIDE 24

Tree Terminology

The members of A are called the nodes of the tree.

Carl Pollard (Pre-)Algebras for Linguistics

slide-25
SLIDE 25

Tree Terminology

The members of A are called the nodes of the tree. ⊤ is called the root.

Carl Pollard (Pre-)Algebras for Linguistics

slide-26
SLIDE 26

Tree Terminology

The members of A are called the nodes of the tree. ⊤ is called the root. If x ⊑ y, y is said to dominate x; and if additionally x = y, then y is said to properly dominate x.

Carl Pollard (Pre-)Algebras for Linguistics

slide-27
SLIDE 27

Tree Terminology

The members of A are called the nodes of the tree. ⊤ is called the root. If x ⊑ y, y is said to dominate x; and if additionally x = y, then y is said to properly dominate x. If x y, then y is said to immediately dominate x; y = (x) is called the mother of x; and x is said to be a daughter of y.

Carl Pollard (Pre-)Algebras for Linguistics

slide-28
SLIDE 28

Tree Terminology

The members of A are called the nodes of the tree. ⊤ is called the root. If x ⊑ y, y is said to dominate x; and if additionally x = y, then y is said to properly dominate x. If x y, then y is said to immediately dominate x; y = (x) is called the mother of x; and x is said to be a daughter of y. Distinct nodes with the same mother are called sisters.

Carl Pollard (Pre-)Algebras for Linguistics

slide-29
SLIDE 29

Tree Terminology

The members of A are called the nodes of the tree. ⊤ is called the root. If x ⊑ y, y is said to dominate x; and if additionally x = y, then y is said to properly dominate x. If x y, then y is said to immediately dominate x; y = (x) is called the mother of x; and x is said to be a daughter of y. Distinct nodes with the same mother are called sisters. A minimal node (i.e. one with no daughters) is called a terminal node.

Carl Pollard (Pre-)Algebras for Linguistics

slide-30
SLIDE 30

Tree Terminology

The members of A are called the nodes of the tree. ⊤ is called the root. If x ⊑ y, y is said to dominate x; and if additionally x = y, then y is said to properly dominate x. If x y, then y is said to immediately dominate x; y = (x) is called the mother of x; and x is said to be a daughter of y. Distinct nodes with the same mother are called sisters. A minimal node (i.e. one with no daughters) is called a terminal node. A node which is the mother of a terminal node is called a preterminal node.

Carl Pollard (Pre-)Algebras for Linguistics

slide-31
SLIDE 31

Theorem 4

In a tree, no node can dominate one of its sisters.

Carl Pollard (Pre-)Algebras for Linguistics

slide-32
SLIDE 32

Theorem 4

In a tree, no node can dominate one of its sisters. Proof: Exercise.

Carl Pollard (Pre-)Algebras for Linguistics

slide-33
SLIDE 33

Theorem 5 (1/2)

For any node a in a tree, ↑ a is a chain.

Carl Pollard (Pre-)Algebras for Linguistics

slide-34
SLIDE 34

Theorem 5 (1/2)

For any node a in a tree, ↑ a is a chain. Proof sketch: Use the RT to define a function h: ω → A, with X = A, x = a, and F the function which maps non-root nodes to their mothers and the root to itself.

Carl Pollard (Pre-)Algebras for Linguistics

slide-35
SLIDE 35

Theorem 5 (1/2)

For any node a in a tree, ↑ a is a chain. Proof sketch: Use the RT to define a function h: ω → A, with X = A, x = a, and F the function which maps non-root nodes to their mothers and the root to itself. Now let Y = ran(h); it is easy to see that Y is a chain, and that Y ⊆ ↑ a.

Carl Pollard (Pre-)Algebras for Linguistics

slide-36
SLIDE 36

Theorem 5 (2/2)

It remains to show that ↑ a ⊆ Y .

Carl Pollard (Pre-)Algebras for Linguistics

slide-37
SLIDE 37

Theorem 5 (2/2)

It remains to show that ↑ a ⊆ Y . So assume b ∈ ↑ a; we have to show b ∈ Y .

Carl Pollard (Pre-)Algebras for Linguistics

slide-38
SLIDE 38

Theorem 5 (2/2)

It remains to show that ↑ a ⊆ Y . So assume b ∈ ↑ a; we have to show b ∈ Y . By definition of ↑ a, a ⊑ b, and so by Theorem 3, a ∗ b.

Carl Pollard (Pre-)Algebras for Linguistics

slide-39
SLIDE 39

Theorem 5 (2/2)

It remains to show that ↑ a ⊆ Y . So assume b ∈ ↑ a; we have to show b ∈ Y . By definition of ↑ a, a ⊑ b, and so by Theorem 3, a ∗ b. From this and the definition of reflexive transitive closure, it follows that there is a natural number n such that a n b, where n is the n-fold composition of with itself.

Carl Pollard (Pre-)Algebras for Linguistics

slide-40
SLIDE 40

Theorem 5 (2/2)

It remains to show that ↑ a ⊆ Y . So assume b ∈ ↑ a; we have to show b ∈ Y . By definition of ↑ a, a ⊑ b, and so by Theorem 3, a ∗ b. From this and the definition of reflexive transitive closure, it follows that there is a natural number n such that a n b, where n is the n-fold composition of with itself. In other words, there is an A-string a0 . . . an such that a0 = a, an = b, and for each k < n, ak ak+1.

Carl Pollard (Pre-)Algebras for Linguistics

slide-41
SLIDE 41

Theorem 5 (2/2)

It remains to show that ↑ a ⊆ Y . So assume b ∈ ↑ a; we have to show b ∈ Y . By definition of ↑ a, a ⊑ b, and so by Theorem 3, a ∗ b. From this and the definition of reflexive transitive closure, it follows that there is a natural number n such that a n b, where n is the n-fold composition of with itself. In other words, there is an A-string a0 . . . an such that a0 = a, an = b, and for each k < n, ak ak+1. But then b = h(n), so b ∈ Y .

Carl Pollard (Pre-)Algebras for Linguistics

slide-42
SLIDE 42

Corollary

Two distinct nodes in a tree have a glb iff they are comparable.

Carl Pollard (Pre-)Algebras for Linguistics

slide-43
SLIDE 43

Corollary

Two distinct nodes in a tree have a glb iff they are comparable. Proof: Exercise.

Carl Pollard (Pre-)Algebras for Linguistics

slide-44
SLIDE 44

Theorem 6

Any two nodes have a lub (and so a tree is a join semilattice).

Carl Pollard (Pre-)Algebras for Linguistics

slide-45
SLIDE 45

Theorem 6

Any two nodes have a lub (and so a tree is a join semilattice). Proof: Exercise.

Carl Pollard (Pre-)Algebras for Linguistics

slide-46
SLIDE 46

Ordered Trees

An ordered tree is a set A with two orders ⊑ and ≤, such that the following three conditions are satisfied:

A is a tree with respect to ⊑.

Carl Pollard (Pre-)Algebras for Linguistics

slide-47
SLIDE 47

Ordered Trees

An ordered tree is a set A with two orders ⊑ and ≤, such that the following three conditions are satisfied:

A is a tree with respect to ⊑. Two distinct nodes are ≤-comparable iff they are not ⊑ comparable.

Carl Pollard (Pre-)Algebras for Linguistics

slide-48
SLIDE 48

Ordered Trees

An ordered tree is a set A with two orders ⊑ and ≤, such that the following three conditions are satisfied:

A is a tree with respect to ⊑. Two distinct nodes are ≤-comparable iff they are not ⊑ comparable. (No-tangling condition) If a, b, c, d are nodes such that a < b, c a, and d b, then c < d.

Carl Pollard (Pre-)Algebras for Linguistics

slide-49
SLIDE 49

Ordered Trees

An ordered tree is a set A with two orders ⊑ and ≤, such that the following three conditions are satisfied:

A is a tree with respect to ⊑. Two distinct nodes are ≤-comparable iff they are not ⊑ comparable. (No-tangling condition) If a, b, c, d are nodes such that a < b, c a, and d b, then c < d.

In an ordered tree, if a < b, then a is said to linearly precede b.

Carl Pollard (Pre-)Algebras for Linguistics

slide-50
SLIDE 50

Theorem 7

If a is a node in an ordered tree, then the set of daughters of a

  • rdered by ≤ is a chain.

Carl Pollard (Pre-)Algebras for Linguistics

slide-51
SLIDE 51

Theorem 7

If a is a node in an ordered tree, then the set of daughters of a

  • rdered by ≤ is a chain.

Proof: Exercise.

Carl Pollard (Pre-)Algebras for Linguistics

slide-52
SLIDE 52

Theorem 8

In an ordered tree, the set of terminal nodes ordered by ≤ is a chain.

Carl Pollard (Pre-)Algebras for Linguistics

slide-53
SLIDE 53

Theorem 8

In an ordered tree, the set of terminal nodes ordered by ≤ is a chain. Proof: Exercise.

Carl Pollard (Pre-)Algebras for Linguistics

slide-54
SLIDE 54

CFG Review

Recall that a CFG is an ordered quadruple T, N, D, P where

T is a finite set called the terminals; N is a finite set called nonterminals D is a finite subset of N × T called the lexical entries; P is a finite subset of N × N + called the phrase structure rules (PSRs).

Carl Pollard (Pre-)Algebras for Linguistics

slide-55
SLIDE 55

CFG Review

Recall that a CFG is an ordered quadruple T, N, D, P where

T is a finite set called the terminals; N is a finite set called nonterminals D is a finite subset of N × T called the lexical entries; P is a finite subset of N × N + called the phrase structure rules (PSRs).

Recall also these notational conventions:

‘A → t ’ means A, t ∈ D. ‘A → A0 . . . An−1’ means A, A0 . . . An−1 ∈ P. ‘A → {s0, . . . sn−1}’ abbreviates A → si (i < n).

Carl Pollard (Pre-)Algebras for Linguistics

slide-56
SLIDE 56

Phrase Structures for a CFG

A phrase structure for a CFG G = T, N, D, P is an

  • rdered tree together with a labelling function l from the

nodes to T ∪ N such that, for each node a,

l(a) ∈ T if a is a terminal node, and l(a) ∈ N otherwise.

Carl Pollard (Pre-)Algebras for Linguistics

slide-57
SLIDE 57

Phrase Structures for a CFG

A phrase structure for a CFG G = T, N, D, P is an

  • rdered tree together with a labelling function l from the

nodes to T ∪ N such that, for each node a,

l(a) ∈ T if a is a terminal node, and l(a) ∈ N otherwise.

Given a phrase structure with linearly ordered (as per Theorem 8) set of terminal nodes a0, . . . , an−1 with labels t0, . . . , tn−1 respectively, the string t0 . . . tn−1 is called the terminal yield of the phrase structure.

Carl Pollard (Pre-)Algebras for Linguistics

slide-58
SLIDE 58

Weak and Strong Generative Capacity

A phrase structure tree is generated by the CFG G = T, N, D, P iff

for each preterminal node with label A and (terminal) daughter with label t, A → t ∈ D; and for each nonterminal nonpreterminal node with label A and linearly ordered (as per Theorem 7) daughters with labels A0, . . . , An−1 respectively, (n > 0), A → A0 . . . An−1 ∈ P.

Carl Pollard (Pre-)Algebras for Linguistics

slide-59
SLIDE 59

Weak and Strong Generative Capacity

A phrase structure tree is generated by the CFG G = T, N, D, P iff

for each preterminal node with label A and (terminal) daughter with label t, A → t ∈ D; and for each nonterminal nonpreterminal node with label A and linearly ordered (as per Theorem 7) daughters with labels A0, . . . , An−1 respectively, (n > 0), A → A0 . . . An−1 ∈ P.

The strong generative capacity of G is the set of phrase structures that it generates.

Carl Pollard (Pre-)Algebras for Linguistics

slide-60
SLIDE 60

Weak and Strong Generative Capacity

A phrase structure tree is generated by the CFG G = T, N, D, P iff

for each preterminal node with label A and (terminal) daughter with label t, A → t ∈ D; and for each nonterminal nonpreterminal node with label A and linearly ordered (as per Theorem 7) daughters with labels A0, . . . , An−1 respectively, (n > 0), A → A0 . . . An−1 ∈ P.

The strong generative capacity of G is the set of phrase structures that it generates. The weak generative capacity of G is the function wgc : N → T ∗ that maps each nonterminal symbol A to the set of T-strings which are terminal yields of phrase structures generated by G with root label A.

Carl Pollard (Pre-)Algebras for Linguistics