Cyclic Inputs. Surface Generation (Part II) Ambiguity-preserving Generation. Ambiguity-preserving Generation. Ambiguity-preserving Generation

Similar documents
Closure Properties of Regular Languages

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER MACHINES AND THEIR LANGUAGES ANSWERS

Petri Nets. Rebecca Albrecht. Seminar: Automata Theory Chair of Software Engeneering

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

CS 275 Automata and Formal Language Theory

Parse trees, ambiguity, and Chomsky normal form

CS241 Week 6 Tutorial Solutions

Overview HC9. Parsing: Top-Down & LL(1) Context-Free Grammars (1) Introduction. CFGs (3) Context-Free Grammars (2) Vertalerbouw HC 9: Ch.

CS 275 Automata and Formal Language Theory

I. Theory of Automata II. Theory of Formal Languages III. Theory of Turing Machines

Lecture 6 Regular Grammars

Parsing and Pattern Recognition

Formal Languages Simplifications of CFGs

SEMANTIC ANALYSIS PRINCIPLES OF PROGRAMMING LANGUAGES. Norbert Zeh Winter Dalhousie University 1/28

Automata and Languages

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages

Normal Forms for Context-free Grammars

Chapter 4 Regular Grammar and Regular Sets. (Solutions / Hints)

Formal Languages and Automata Theory. D. Goswami and K. V. Krishna

1.4 Nonregular Languages

Exercises Chapter 1. Exercise 1.1. Let Σ be an alphabet. Prove wv = w + v for all strings w and v.

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

Revision Sheet. (a) Give a regular expression for each of the following languages:

Semantic Analysis. CSCI 3136 Principles of Programming Languages. Faculty of Computer Science Dalhousie University. Winter Reading: Chapter 4

I. Theory of Automata II. Theory of Formal Languages III. Theory of Turing Machines

CS 275 Automata and Formal Language Theory

CS 314 Principles of Programming Languages

More on automata. Michael George. March 24 April 7, 2014

Foundation of Diagnosis and Predictability in Probabilistic Systems

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Nondeterministic Automata vs Deterministic Automata

For convenience, we rewrite m2 s m2 = m m m ; where m is repeted m times. Since xyz = m m m nd jxyj»m, we hve tht the string y is substring of the fir

FABER Formal Languages, Automata and Models of Computation

CSC 311 Theory of Computation

CSC 473 Automata, Grammars & Languages 11/9/10

Problem Session 5 (CFGs) Talk about the building blocks of CFGs: S 0S 1S ε - everything. S 0S0 1S1 A - waw R. S 0S0 0S1 1S0 1S1 A - xay, where x = y.

Mildly Context-Sensitive Grammar Formalisms: Introduction

Finite State Automata and Determinisation

CSE : Exam 3-ANSWERS, Spring 2011 Time: 50 minutes

Formal languages, automata, and theory of computation

First Midterm Examination

The Renormalization Scale Problem

Inductive and statistical learning of formal grammars

NFA and regex. the Boolean algebra of languages. non-deterministic machines. regular expressions

Prefix-Free Regular-Expression Matching

Agenda. Agenda. Regular Expressions. Examples of Regular Expressions. Regular Expressions (crash course) Computational Linguistics 1

Streamed Validation of XML Documents

Graph States EPIT Mehdi Mhalla (Calgary, Canada) Simon Perdrix (Grenoble, France)

KENDRIYA VIDYALAYA IIT KANPUR HOME ASSIGNMENTS FOR SUMMER VACATIONS CLASS - XII MATHEMATICS (Relations and Functions & Binary Operations)

1.3 Regular Expressions

Compact Representation of Ambiguities. Generating Sentences by Grammar Specialization. Compact Representation of Ambiguities

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

Harvard University Computer Science 121 Midterm October 23, 2012

First Midterm Examination

Pre-Lie algebras, rooted trees and related algebraic structures

TIME AND STATE IN DISTRIBUTED SYSTEMS

Thoery of Automata CS402

Context-Free Grammars and Languages

Logic Synthesis and Verification

Table of contents: Lecture N Summary... 3 What does automata mean?... 3 Introduction to languages... 3 Alphabets... 3 Strings...

The transformation to right derivation is called the canonical reduction sequence. Bottom-up analysis

Tutorial Automata and formal Languages

Finite-State Automata: Recap

CS 330 Formal Methods and Models

Pure 2D Context-free Puzzle P system with Conditional Communication

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS

Bottom-Up Parsing. Canonical Collection of LR(0) items. Part II

Convert the NFA into DFA

s the set of onsequenes. Skeptil onsequenes re more roust in the sense tht they hold in ll possile relities desried y defult theory. All its desirle p

ON ALTERNATING POWER SUMS OF ARITHMETIC PROGRESSIONS

CS 330 Formal Methods and Models Dana Richards, George Mason University, Spring 2016 Quiz Solutions

On the Maximally-Permissive Range Control Problem in Partially-Observed Discrete Event Systems

Chapter 2 Finite Automata

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

Data Structures LECTURE 10. Huffman coding. Example. Coding: problem definition

Regular Languages and Applications

where the box contains a finite number of gates from the given collection. Examples of gates that are commonly used are the following: a b

University of Sioux Falls. MAT204/205 Calculus I/II

Designing finite automata II

CS 330 Formal Methods and Models

Homework Solution - Set 5 Due: Friday 10/03/08

5. Every rational number have either terminating or repeating (recurring) decimal representation.

CSCI565 - Compiler Design

CISC 4090 Theory of Computation

MULTIPLE CHOICE QUESTIONS

CIT 596 Theory of Computation 1. Graphs and Digraphs

a b b a pop push read unread

I 3 2 = I I 4 = 2A

Outline. Theory-based Bayesian framework for property induction Causal structure induction

y1 y2 DEMUX a b x1 x2 x3 x4 NETWORK s1 s2 z1 z2

(a) A partition P of [a, b] is a finite subset of [a, b] containing a and b. If Q is another partition and P Q, then Q is a refinement of P.

SWEN 224 Formal Foundations of Programming WITH ANSWERS

Differential Equations 2 Homework 5 Solutions to the Assigned Exercises

Regular Language. Nonregular Languages The Pumping Lemma. The pumping lemma. Regular Language. The pumping lemma. Infinitely long words 3/17/15

Hybrid Systems Modeling, Analysis and Control

Random subgroups of a free group

Unification. Two Routes to Deep Structure. Unification. Unification Grammar. Martin Kay. Stanford University University of the Saarland

DATABASE DESIGN I - 1DL300

11.1 Finite Automata. CS125 Lecture 11 Fall Motivation: TMs without a tape: maybe we can at least fully understand such a simple model?

Transcription:

Cyli Inputs The set of strings tht grmmr reltes to yli input struture might e non-ontext-free Surfe Genertion (Prt II) Amiguity-preserving Genertion Amiguity-preserving Genertion Motivtion Motivtion () John sw the mn with the telesope (). with_the_telesope(see(john, mn)). see(john, with_the_telesope(mn)) (3) John sh den Mnn mit dem Fernrohr (4) The duk is redy to et (5). redy(duk, et(someone, duk)). redy(duk, et(duk, something)) (6). Die Ente knn jetzt gegessen werden. Die Ente ist zum Fressen ereit 3 4 Amiguity-preserving Genertion Amiguity-preserving Genertion Motivtion Motivtion (7) John sw her duk with the telesope (8). with_the_telesope(see(john, her_duk)). see(john, with_the_telesope(her_duk)). with_the_telesope(see(john, duk(her))) () John sw the mn with the telesope (3) John sh den Mnn mit dem Fernrohr (0) John sh den Mnn, der ds Fernrohr htte d. see(john, with_the_telesope(duk(her))) (9). John sh ihre Ente mit dem Fernrohr. Mit dem Fernrohr sh John sie sih duken 5 6

F-Strutures nd Semnti Representtions Forml Chrteriztion of the Prolem The derivtion reltion for G Δ G { (s,f ) G ssigns to string s the f-struture f } SUBJ TENSE PRED SEM PRED John PRES rrive<subj> REL rrive ARG john f f Deidility prolems Prsing: { f Δ G (s,f ) } for eh terminl string s Genertion: { s Δ G (s,f ) } for eh f-struture f f f f susumes f 7 8 Forml Chrteriztion of the Prolem Amiguity-preserving genertion: { s f..f n ( f f &.. & f n f n & Δ G (s,f ) &.. & Δ G (s,f n )) } for eh set of semnti representtions { f,..,f n } Genertion from Sets of f-strutures For set of f-strutures { f,..,f n } it is in generl not deidle whether { s Δ G (s,f ) &.. & Δ G (s,f n ) } Genertion from semnti representtions: { s f ( f f & Δ G (s,f)) } for eh semnti representtion f n Genertion from sets of f-strutures: { s Δ G (s,f ) &.. & Δ G (s,f n ) } for eh set of f-strutures { f,..,f n } f i f i 9 0 Genertion from Sets of f-strutures Genertion from Sets of f-strutures Given: two ritrry ontext-free grmmrs G (N,T,S,R ) nd G (N,T,S,R ) with N N R R R S S, ( A) S S ( A) Construt: LFG G (N,T,S,R) with N N N { S } nd S N N T T T R R R S S, S S ( A) ( A) S ( A) ( A) s s { s Δ G (s, [A ]) } L(G ) { s Δ G (s, [A ]) } L(G ) S { s Δ G (s, [A ]) & Δ G (s, [A ]) } L(G ) L(G ) iff

For semnti representtion f it is in generl not deidle whether { s f ( f f & Δ G (s,f)) } String grmmrs Given: n ritrry CFG grmmr G (N,T,S,R) in CNF (possily with empty produtions) Construt: String(G) (N,T,S,R S ) (PATR) with R S { (r, D r ) r R } 3 4 String grmmrs R S { (r, D r ) r R } String grmmrs R S { (r, D r ) r R } If r A then D r { ( ), ( ) ( ) } If r A ε then D r { ( ) ( ) } A ε A 5 6 String grmmrs R S { (r, D r ) r R } String grmmrs If r A BC then D r { ( ) ( ), ( ) (x ), ( ) (x ) } S A A Dx B C x x B x 3 C x 4 d x 3 x 4 x d 7 8 3

The proof Given: two ritrry string grmmrs S x ( SEM), X 0, X 0 x, ( ) # String(G ) (N,T,S,R S ) nd String(G ) (N,T,S,R S ) with N N s L(G ) s L(G ) Construt: G (N,T,S,R) (PATR) with N N N { S } nd S N N T T T R R S R S (S, ( SEM), X 0, X 0 x, ( ) # ) e x one string hs to e prefix of the other 9 0 S ( SEM), S ( SEM), x X 0, X 0 x, ( ) # x X 0, X 0 x, ( ) # s L(G ) s L(G ) s L(G ) s L(G ) x x S ( SEM), S x X 0, X 0 x, ( ) # x s L(G ) s L(G ) s L(G ) s L(G ) G derives [SEM ] iff s s # { s f ([SEM ] f & Δ G (s, f)) } { ww w L(G ) L(G ) } iff L(G ) L(G ) oth strings hve to e identil 3 4 4

Summry - The prolem of miguity-preserving genertion is not deidle for the existing unifition-sed grmmr formlisms. + Nturl lnguge grmmrs seem to elong to restrited sulss of grmmrs whose properties ensure the deidility of the prolem. - Whih properties will permit the omputtion of miguity-preserving genertion is fr from eing evident yet. 5 5