Ambiguity, closure properties, Overview of ambiguity, and Chomsky s standard form


 Kelly Reynolds
 1 years ago
 Views:
Transcription
1 Ambiguity, closure properties, and Chomsky s normal form Overview of ambiguity, and Chomsky s standard form
2 The notion of ambiguity Convention: we assume that in every substitution, the leftmost remaining variable is the one that is replaced. When this convention is applied to all substitutions in a derivation, we talk about leftmost derivations Definition: A CGF is said to be ambiguous if a string in its language has two different leftmost derivations. In such a case, the string has necessarily two different parsing trees
3 Equivalence and ambiguity Definition: Two contextfree grammars are declared to be equivalent if and only if they produce the same contextfree language. Remark: An ambiguous contextfree grammar may have an equivalent unambiguous contextfree grammar. Definition: Given an ambiguous grammar, the process of identifying an equivalent grammar that is not ambiguous is called disambiguation. If not such grammar exists, the language is called inherently ambiguous 3
4 Example of an ambiguous contextfree grammar Let G = ({, A}, {,}, R, } R = { A λ, A A A } w = L( G) Then, the string has the following two leftmost derivations:.. A A A A A A 4
5 The grammar is not inherently ambiguous The ambiguity stems from the fact that the rule A A can be use in the first or in the second substitution indistinctively. In either case the same string is derived. w = L( G) L(G) However, is not inherently ambiguous. Following is a context free grammar that eliminates the above ambiguity. 5
6 Disambiguation Let G R = ({, A, B},{,}, R, ) = { A λ, A A B, B B } Claim: L ( G ) = L ( G ) and under G each string is derived by a unique sequence of leftmost substitutions. This is, the new grammar derives the language unambiguously Proof: exercise! 6
7 Closure properties Theorem 9.: Contextfree languages are closed under regular operations L L cketch of the proof: Let and be contextfree languages. Let G = ( V, A, R, and G = ( V, A, R, ) be contextfree grammars such that L = L( G ) and L ( ) = L G respectively. We may assume without loss of generality that V I = φ. V ) 7
8 Proof (cont.) Define the contextfree grammars:. U = ({ } UV UV, A, R U R U{ },. C = ({ } UV UV, A, R U R U{ }, 3. T = ({ } U V, A, R U { λ }, ) Here we assume V UV Claim: L ( U ) = L U L L( C) = L L L( T) = L The rest of the proof (i.e. verification of the claim) is left as an exercise. ) ) * 8
9 Applications n. The language { n n n M = : n, n } is contextfree, since it is the concatenation n n of L = { : n } with itself. The language = i n n nk nk { : k N ( i =,..., k) n is also contextfree, since it is the starclosure of L } 9
10 Chomsky normal form Theorem 9.: (Chomsky normal form) Any contextfree grammar is equivalent to a grammar G = ( V, A, R, ) whose productions are either of the form: Z UT Z a λ where Z, U, T V U T ; or where a A ; or
11 Method 9. Transforming a contextfree grammar into a grammar in Chomsky normal form Given a contextfree grammar G=(V,A,R,). Add a new start variable and add the rule. Remove all rules of the form u λ, u V adding the rules that are necessary to preserve the grammar s productions 3. Eliminate unit rules. These are rules of the form of u v, u, v V and their elimination requires adding the rules u w wherever v w appears, unless was already eliminated 4. Convert rules of the form k to a set of rules of the form u a u, u au,..., uk ak ak where the u i ' s are new variables. 5. Convert rules of the form k to rules of the form of u w u a... a a3 a, k 3 u a... a, k ui ai, wherever ai is a terminal.here, ui is a new variable.
12 Example The context free grammar: G R = ({ },{,}, R, ) = { λ} is not in Chomsky normal form. We will find an equivalent contextfree grammar N, which is in Chomsky normal form, using the previous procedure (Method 9.)
13 Example (cont.). Define a new start variable Old productions λ
14 Example (cont.). Eliminate unitary productions. In our case we have: λ Recall that the removal is performed by eliminating them and adding all rules necessary to preserve the original grammar s derivations
15 Example (cont.) The derivations that involve these unitary productions (and have to be preserved) are: Thus, the new set of rules is: λ
16 Example (cont.) The latter set of rules define an equivalent grammar which is not yet in Chomsky normal form. Indeed no rule, except the one that associate the starting variable with the null string, is in Chomsky normal form. We ll fix this in the next step: 3. Decomposing all remaining productions that are not in Chomsky normal form into sets of productions with two variables or a terminal on the right hand side.
17 Example (cont.) This applies to the current productions:,, We transform each of them into a set of productions in Chomsky normal form as follows
18 Example (cont.) Consider first: This production is clearly equivalent to the combined action of the following productions:
19 Example (cont.) As for we have: ) ( 3 3 ince there are here productions that were already defined, we replace the variables: ) ( ) ( : : = =
20 Example (cont.) After replacing we get: 3 3
21 Example (cont.) And similarly, using the already defined productions, we transform and 3 3
22 Example (cont.) In summary, we get:, { ), },{,},,,,, ({ 3 3 R R N = = λ },,,, { R = λ
23 Does it work? Let s derive a few strings: λ 3 3
24 What s so important about Chomsky s normal form? Theorem 9.3: A contextfree grammar in Chomsky normal form derives a string of length n in exactly n substitutions Proof: Let G w = w of rules of of be a context  free grammar in Chomsky normal form and let w such rules. L ( G ).ince each w n i produced by substituting a the form of v But, the formation of the form u v n. Thus, rule of zv, u, z, v such rules involved in the generation of is a terminal, it could only be the form v the derivation of v v n w involves n applications of can only be done by applying variables.there are exactly n applications v i v w n. i in a string of variables
25 A note on contextsensitive grammars Definition: A contextsensitive grammar is a quadruple G = ( V, A, R, ) wherev, A and are just as in a context  free grammar, but the set of rules R includes rules of the form aub cvd, whereu andv are variables, and a, b, c, and d are strings of variables and literals. 5
26 Example Let G=({,R,T,U,V,W},{a, b, c}, R, ) R= { arc, R art b, btc bbcc, btt bbut, UT UU, UUc VUc Vcc, UV VV, bvc bbcc, bvv bbwv, WV WW, WWc TWc Tcc, WT TT } This grammar generates the canonical noncontextfree n n n language: {a b c : n } 6
27 A derivation The derivation of the string is: aaabbbccc arc aartc aaarttc aaabttc aaabbutc aaabbuuc aaabbvuc aaabbvcc aaabbbccc 7
28 Note on normal forms Principle: Every contextsensitive grammar which does not generate the empty string can be transformed into an equivalent grammar in Kuroda normal form Remark: The normal form will not in general be a contextsensitive grammar, but will be a noncontracting grammar 8
The Halting Problem is Undecidable
185 Corollary G = { M, w w L(M) } is not Turingrecognizable. Proof. = ERR, where ERR is the easy to decide language: ERR = { x { 0, 1 }* x does not have a prefix that is a valid code for a Turing machine
More informationPushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh als@inf.ed.ac.
Pushdown automata Informatics 2A: Lecture 9 Alex Simpson School of Informatics University of Edinburgh als@inf.ed.ac.uk 3 October, 2014 1 / 17 Recap of lecture 8 Contextfree languages are defined by contextfree
More informationCPS 140  Mathematical Foundations of CS Dr. S. Rodger Section: Properties of ContextFree Languages èhandoutè Section 3.5 Which of the following languages are CFL? æ L=fa n b n c j j 0 énçjg æ L=fa n
More informationIntroduction to Automata Theory. Reading: Chapter 1
Introduction to Automata Theory Reading: Chapter 1 1 What is Automata Theory? Study of abstract computing devices, or machines Automaton = an abstract computing device Note: A device need not even be a
More informationOverview of E0222: Automata and Computability
Overview of E0222: Automata and Computability Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. August 3, 2011 What this course is about What we study
More informationTheory of Computation
Theory of Computation For Computer Science & Information Technology By www.thegateacademy.com Syllabus Syllabus for Theory of Computation Regular Expressions and Finite Automata, ContextFree Grammar s
More informationInfinitely Repeated Games with Discounting Ù
Infinitely Repeated Games with Discounting Page 1 Infinitely Repeated Games with Discounting Ù Introduction 1 Discounting the future 2 Interpreting the discount factor 3 The average discounted payoff 4
More informationAutomata and Computability. Solutions to Exercises
Automata and Computability Solutions to Exercises Fall 25 Alexis Maciel Department of Computer Science Clarkson University Copyright c 25 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata
More informationCOMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing
COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing The scanner (or lexical analyzer) of a compiler processes the source program, recognizing
More informationInner Product Spaces and Orthogonality
Inner Product Spaces and Orthogonality week 34 Fall 2006 Dot product of R n The inner product or dot product of R n is a function, defined by u, v a b + a 2 b 2 + + a n b n for u a, a 2,, a n T, v b,
More informationFormal Grammars and Languages
Formal Grammars and Languages Tao Jiang Department of Computer Science McMaster University Hamilton, Ontario L8S 4K1, Canada Bala Ravikumar Department of Computer Science University of Rhode Island Kingston,
More informationDeterministic PushDown Store Automata
Deterministic PushDown tore Automata 1 ContextFree Languages A B C D... A w 0 w 1 D...E The languagea n b n : a b ab 2 Finitetate Automata 3 Pushdown Automata Pushdown automata (pda s) is an fsa with
More informationÖVNINGSUPPGIFTER I SAMMANHANGSFRIA SPRÅK. 15 april 2003. Master Edition
ÖVNINGSUPPGIFTER I SAMMANHANGSFRIA SPRÅK 5 april 23 Master Edition CONTEXT FREE LANGUAGES & PUSHDOWN AUTOMATA CONTEXTFREE GRAMMARS, CFG Problems Sudkamp Problem. (3.2.) Which language generates the grammar
More informationApproximating ContextFree Grammars for Parsing and Verification
Approximating ContextFree Grammars for Parsing and Verification Sylvain Schmitz LORIA, INRIA Nancy  Grand Est October 18, 2007 datatype a option = NONE SOME of a fun filter pred l = let fun filterp (x::r,
More informationFinite Automata and Formal Languages
Finite Automata and Formal Languages TMV026/DIT321 LP4 2011 Lecture 14 May 19th 2011 Overview of today s lecture: Turing Machines Pushdown Automata Overview of the Course Undecidable and Intractable Problems
More informationLearning Analysis by Reduction from Positive Data
Learning Analysis by Reduction from Positive Data František Mráz 1, Friedrich Otto 1, and Martin Plátek 2 1 Fachbereich Mathematik/Informatik, Universität Kassel 34109 Kassel, Germany {mraz,otto}@theory.informatik.unikassel.de
More informationModel 2.4 Faculty member + student
Model 2.4 Faculty member + student Course syllabus for Formal languages and Automata Theory. Faculty member information: Name of faculty member responsible for the course Office Hours Office Number Email
More informationSyntaktická analýza. Ján Šturc. Zima 208
Syntaktická analýza Ján Šturc Zima 208 Position of a Parser in the Compiler Model 2 The parser The task of the parser is to check syntax The syntaxdirected translation stage in the compiler s frontend
More informationLecture 1: Schur s Unitary Triangularization Theorem
Lecture 1: Schur s Unitary Triangularization Theorem This lecture introduces the notion of unitary equivalence and presents Schur s theorem and some of its consequences It roughly corresponds to Sections
More informationCS5236 Advanced Automata Theory
CS5236 Advanced Automata Theory Frank Stephan Semester I, Academic Year 20122013 Advanced Automata Theory is a lecture which will first review the basics of formal languages and automata theory and then
More informationWhat s a parser How to use Bison? Practice References. Introduction to GDB. Gregorio Toscano Pulido
Laboratorio de Tecnologías de Información Centro de Investigación y de Estudios Avanzados del IPN Laboratorio de Tecnologías de Investigación Outline 1 What s a parser 2 How to use Bison? 3 Practice 4
More informationCourse Manual Automata & Complexity 2015
Course Manual Automata & Complexity 2015 Course code: Course homepage: Coordinator: Teachers lectures: Teacher exercise classes: Credits: X_401049 http://www.cs.vu.nl/~tcs/ac prof. dr. W.J. Fokkink home:
More informationOn String Languages Generated by Spiking Neural P Systems
On String Languages Generated by Spiking Neural P Systems Haiming Chen 1, Rudolf Freund 2, Mihai Ionescu 3, Gheorghe Păun 4,5, Mario J. PérezJiménez 5 1 Computer Science Laboratory, Institute of Software
More informationHere we see a case of infinite expansion of instruments.
No. SemesterExamination of CS674 Name: 1. The sentence John drank a glass of milk can be paraphrased as John ingested the milk by getting the milk to his mouth from glass by transferring the glass containing
More informationUsing HandsOn Visualizations to Teach Computer Science from Beginning Courses to Advanced Courses
Using HandsOn Visualizations to Teach Computer Science from Beginning Courses to Advanced Courses Susan H. Rodger Department of Computer Science Duke University Durham, NC 27705 rodger@cs.duke.edu Abstract
More informationTuring Machines: An Introduction
CIT 596 Theory of Computation 1 We have seen several abstract models of computing devices: Deterministic Finite Automata, Nondeterministic Finite Automata, Nondeterministic Finite Automata with ɛtransitions,
More informationChapter 7 Uncomputability
Chapter 7 Uncomputability 190 7.1 Introduction Undecidability of concrete problems. First undecidable problem obtained by diagonalisation. Other undecidable problems obtained by means of the reduction
More informationReading 13 : Finite State Automata and Regular Expressions
CS/Math 24: Introduction to Discrete Mathematics Fall 25 Reading 3 : Finite State Automata and Regular Expressions Instructors: Beck Hasti, Gautam Prakriya In this reading we study a mathematical model
More informationAn Overview of a Compiler
An Overview of a Compiler Department of Computer Science and Automation Indian Institute of Science Bangalore 560 012 NPTEL Course on Principles of Compiler Design Outline of the Lecture About the course
More informationCompiler Construction
Compiler Construction Regular expressions Scanning Görel Hedin Reviderad 2013 01 23.a 2013 Compiler Construction 2013 F021 Compiler overview source code lexical analysis tokens intermediate code generation
More informationU.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009. Notes on Algebra
U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009 Notes on Algebra These notes contain as little theory as possible, and most results are stated without proof. Any introductory
More informationOHJ2306 Fall 2011 Introduction to Theoretical Computer Science
1 OHJ2306 Fall 2011 Introduction to Theoretical Computer Science 2 3 Organization & timetable Lectures: prof. Tapio Elomaa, M.Sc. Timo Aho Tue and Thu 14 16 TB220 Aug. 30 Dec. 8, 2011 Exceptions: Thu
More information3515ICT Theory of Computation Turing Machines
Griffith University 3515ICT Theory of Computation Turing Machines (Based loosely on slides by Harald Søndergaard of The University of Melbourne) 90 Overview Turing machines: a general model of computation
More informationMildly Context Sensitive Grammar Formalisms
Mildly Context Sensitive Grammar Formalisms Petra Schmidt PfarrerLauerStrasse 23 66386 St. Ingbert petra.schmidt@edekasuedwest.de Overview 3 TreedjoiningGrammars 4 Co 7 8 9 CCG 9 LIG 10 TG 13 Linear
More informationLow upper bound of ideals, coding into rich Π 0 1 classes
Low upper bound of ideals, coding into rich Π 0 1 classes Antonín Kučera the main part is a joint project with T. Slaman Charles University, Prague September 2007, Chicago The main result There is a low
More informationQualifying examination in the software area
Qualifying examination in the software area This is a sample examination involving the following 4 areas: Database systems, compiler design, programming languages, and software engineering. Each area is
More informationJOINING UP TO THE GENERALIZED HIGH DEGREES
PROCEEDINGS OF THE AMERICAN MATHEMATICAL SOCIETY Volume 138, Number 8, August 2010, Pages 2949 2960 S 00029939(10)102998 Article electronically published on March 29, 2010 JOINING UP TO THE GENERALIZED
More information5HFDOO &RPSLOHU 6WUXFWXUH
6FDQQLQJ 2XWOLQH 2. Scanning The basics Adhoc scanning FSM based techniques A Lexical Analysis tool  Lex (a scanner generator) 5HFDOO &RPSLOHU 6WUXFWXUH 6RXUFH &RGH /H[LFDO $QDO\VLV6FDQQLQJ 6\QWD[ $QDO\VLV3DUVLQJ
More informationHonors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology
Honors Class (Foundations of) Informatics Tom Verhoeff Department of Mathematics & Computer Science Software Engineering & Technology www.win.tue.nl/~wstomv/edu/hci c 2011, T. Verhoeff @ TUE.NL 1/20 Information
More informationMathematical Induction
Mathematical Induction (Handout March 8, 01) The Principle of Mathematical Induction provides a means to prove infinitely many statements all at once The principle is logical rather than strictly mathematical,
More informationLocal periods and binary partial words: An algorithm
Local periods and binary partial words: An algorithm F. BlanchetSadri and Ajay Chriscoe Department of Mathematical Sciences University of North Carolina P.O. Box 26170 Greensboro, NC 27402 6170, USA Email:
More informationClassification of Cartan matrices
Chapter 7 Classification of Cartan matrices In this chapter we describe a classification of generalised Cartan matrices This classification can be compared as the rough classification of varieties in terms
More informationSRM UNIVERSITY FACULTY OF ENGINEERING & TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF SOFTWARE ENGINEERING COURSE PLAN
Course Code : CS0355 SRM UNIVERSITY FACULTY OF ENGINEERING & TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF SOFTWARE ENGINEERING COURSE PLAN Course Title : THEORY OF COMPUTATION Semester : VI Course : June
More informationScanning and parsing. Topics. Announcements Pick a partner by Monday Makeup lecture will be on Monday August 29th at 3pm
Scanning and Parsing Announcements Pick a partner by Monday Makeup lecture will be on Monday August 29th at 3pm Today Outline of planned topics for course Overall structure of a compiler Lexical analysis
More informationFixedPoint Logics and Computation
1 FixedPoint Logics and Computation Symposium on the Unusual Effectiveness of Logic in Computer Science University of Cambridge 2 Mathematical Logic Mathematical logic seeks to formalise the process of
More informationRegular Expressions with Nested Levels of Back Referencing Form a Hierarchy
Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy Kim S. Larsen Odense University Abstract For many years, regular expressions with back referencing have been used in a variety
More information[Refer Slide Time: 05:10]
Principles of Programming Languages Prof: S. Arun Kumar Department of Computer Science and Engineering Indian Institute of Technology Delhi Lecture no 7 Lecture Title: Syntactic Classes Welcome to lecture
More informationAnalysis of Algorithms I: Binary Search Trees
Analysis of Algorithms I: Binary Search Trees Xi Chen Columbia University Hash table: A data structure that maintains a subset of keys from a universe set U = {0, 1,..., p 1} and supports all three dictionary
More informationLecture 4: Partitioned Matrices and Determinants
Lecture 4: Partitioned Matrices and Determinants 1 Elementary row operations Recall the elementary operations on the rows of a matrix, equivalent to premultiplying by an elementary matrix E: (1) multiplying
More informationKhair Eddin Sabri and Ridha Khedri
Khair Eddin Sabri and Ridha Foundations & Practice of Security Symposium (Oct. 2012) CRYPTO Presentation Outline 1 Introduction 2 3 4 Order Semiring 5 keystructure 6 7 8 Technique 9 Verification of secrecy
More informationUnified Language for Network Security Policy Implementation
Unified Language for Network Security Policy Implementation Dmitry Chernyavskiy Information Security Faculty National Research Nuclear University MEPhI Moscow, Russia milnat2004@yahoo.co.uk Natalia Miloslavskaya
More informationMATH10212 Linear Algebra. Systems of Linear Equations. Definition. An ndimensional vector is a row or a column of n numbers (or letters): a 1.
MATH10212 Linear Algebra Textbook: D. Poole, Linear Algebra: A Modern Introduction. Thompson, 2006. ISBN 0534405967. Systems of Linear Equations Definition. An ndimensional vector is a row or a column
More informationCS 164 Programming Languages and Compilers Handout 8. Midterm I
Mterm I Please read all instructions (including these) carefully. There are six questions on the exam, each worth between 15 and 30 points. You have 3 hours to work on the exam. The exam is closed book,
More informationCompiler I: Syntax Analysis Human Thought
Course map Compiler I: Syntax Analysis Human Thought Abstract design Chapters 9, 12 H.L. Language & Operating Sys. Compiler Chapters 1011 Virtual Machine Software hierarchy Translator Chapters 78 Assembly
More informationSolving Systems of Linear Equations
LECTURE 5 Solving Systems of Linear Equations Recall that we introduced the notion of matrices as a way of standardizing the expression of systems of linear equations In today s lecture I shall show how
More informationComputability Theory
CSC 438F/2404F Notes (S. Cook and T. Pitassi) Fall, 2014 Computability Theory This section is partly inspired by the material in A Course in Mathematical Logic by Bell and Machover, Chap 6, sections 110.
More informationMACM 101 Discrete Mathematics I
MACM 101 Discrete Mathematics I Exercises on Combinatorics, Probability, Languages and Integers. Due: Tuesday, November 2th (at the beginning of the class) Reminder: the work you submit must be your own.
More informationComputer Science Department. Technion  IIT, Haifa, Israel. Itai and Rodeh [IR] have proved that for any 2connected graph G and any vertex s G there
 1  THREE TREEPATHS Avram Zehavi Alon Itai Computer Science Department Technion  IIT, Haifa, Israel Abstract Itai and Rodeh [IR] have proved that for any 2connected graph G and any vertex s G there
More informationGenetic programming with regular expressions
Genetic programming with regular expressions Børge Svingen Chief Technology Officer, Open AdExchange bsvingen@openadex.com 20090323 Pattern discovery Pattern discovery: Recognizing patterns that characterize
More informationGrammars with Regulated Rewriting
Grammars with Regulated Rewriting Jürgen Dassow OttovonGuerickeUniversität Magdeburg Fakultät für Informatik Lecture in the 5 th PhD Program Formal Languages and Applications PhD Program Formal Languages
More informationSHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH
31 Kragujevac J. Math. 25 (2003) 31 49. SHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH Kinkar Ch. Das Department of Mathematics, Indian Institute of Technology, Kharagpur 721302, W.B.,
More informationFormal Languages and Automata Theory  Regular Expressions and Finite Automata 
Formal Languages and Automata Theory  Regular Expressions and Finite Automata  Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March
More information3.2 The Factor Theorem and The Remainder Theorem
3. The Factor Theorem and The Remainder Theorem 57 3. The Factor Theorem and The Remainder Theorem Suppose we wish to find the zeros of f(x) = x 3 + 4x 5x 4. Setting f(x) = 0 results in the polynomial
More informationDynamic Cognitive Modeling IV
Dynamic Cognitive Modeling IV CLS2010  Computational Linguistics Summer Events University of Zadar 23.08.2010 27.08.2010 Department of German Language and Linguistics Humboldt Universität zu Berlin Overview
More informationIntroduction to Scheduling Theory
Introduction to Scheduling Theory Arnaud Legrand Laboratoire Informatique et Distribution IMAG CNRS, France arnaud.legrand@imag.fr November 8, 2004 1/ 26 Outline 1 Task graphs from outer space 2 Scheduling
More informationTHE TURING DEGREES AND THEIR LACK OF LINEAR ORDER
THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER JASPER DEANTONIO Abstract. This paper is a study of the Turing Degrees, which are levels of incomputability naturally arising from sets of natural numbers.
More information1 Approximating Set Cover
CS 05: Algorithms (Grad) Feb 224, 2005 Approximating Set Cover. Definition An Instance (X, F ) of the setcovering problem consists of a finite set X and a family F of subset of X, such that every elemennt
More informationInstant SQL Programming
Instant SQL Programming Joe Celko Wrox Press Ltd. INSTANT Table of Contents Introduction 1 What Can SQL Do for Me? 2 Who Should Use This Book? 2 How To Use This Book 3 What You Should Know 3 Conventions
More informationWe used attributes in Chapter 3 to augment a contextfree grammar
Chapter 4 TWOLEVEL GRAMMARS We used attributes in Chapter 3 to augment a contextfree grammar in order to verify context sensitivity. This chapter will focus on twolevel grammars, another formal technique
More informationThe Goldberg Rao Algorithm for the Maximum Flow Problem
The Goldberg Rao Algorithm for the Maximum Flow Problem COS 528 class notes October 18, 2006 Scribe: Dávid Papp Main idea: use of the blocking flow paradigm to achieve essentially O(min{m 2/3, n 1/2 }
More informationLZ77. Example 2.10: Let T = badadadabaab and assume d max and l max are large. phrase b a d adadab aa b
LZ77 The original LZ77 algorithm works as follows: A phrase T j starting at a position i is encoded as a triple of the form distance, length, symbol. A triple d, l, s means that: T j = T [i...i + l] =
More informationTHE DEGREES OF BIHYPERHYPERIMMUNE SETS
THE DEGREES OF BIHYPERHYPERIMMUNE SETS URI ANDREWS, PETER GERDES, AND JOSEPH S. MILLER Abstract. We study the degrees of bihyperhyperimmune (bihhi) sets. Our main result characterizes these degrees
More information3. Equivalence Relations. Discussion
3. EQUIVALENCE RELATIONS 33 3. Equivalence Relations 3.1. Definition of an Equivalence Relations. Definition 3.1.1. A relation R on a set A is an equivalence relation if and only if R is reflexive, symmetric,
More informationFinite Automata. Reading: Chapter 2
Finite Automata Reading: Chapter 2 1 Finite Automata Informally, a state machine that comprehensively captures all possible states and transitions that a machine can take while responding to a stream (or
More informationTeaching Formal Methods for Computational Linguistics at Uppsala University
Teaching Formal Methods for Computational Linguistics at Uppsala University Roussanka Loukanova Computational Linguistics Dept. of Linguistics and Philology, Uppsala University P.O. Box 635, 751 26 Uppsala,
More informationInterprocedural Analysis. CS252r Spring 2011
Interprocedural Analysis CS252r Spring 2011 Procedures So far looked at intraprocedural analysis: analyzing a single procedure Interprocedural analysis uses calling relationships among procedures Enables
More informationOBTAINING PRACTICAL VARIANTS OF LL (k) AND LR (k) FOR k >1. A Thesis. Submitted to the Faculty. Purdue University.
OBTAINING PRACTICAL VARIANTS OF LL (k) AND LR (k) FOR k >1 BY SPLITTING THE ATOMIC ktuple A Thesis Submitted to the Faculty of Purdue University by Terence John Parr In Partial Fulfillment of the Requirements
More informationOpen and Closed Sets
Open and Closed Sets Definition: A subset S of a metric space (X, d) is open if it contains an open ball about each of its points i.e., if x S : ɛ > 0 : B(x, ɛ) S. (1) Theorem: (O1) and X are open sets.
More informationroot node level: internal node edge leaf node CS@VT Data Structures & Algorithms 20002009 McQuain
inary Trees 1 A binary tree is either empty, or it consists of a node called the root together with two binary trees called the left subtree and the right subtree of the root, which are disjoint from each
More informationSystems of Linear Equations
Systems of Linear Equations Beifang Chen Systems of linear equations Linear systems A linear equation in variables x, x,, x n is an equation of the form a x + a x + + a n x n = b, where a, a,, a n and
More informationFinite Automata. Reading: Chapter 2
Finite Automata Reading: Chapter 2 1 Finite Automaton (FA) Informally, a state diagram that comprehensively captures all possible states and transitions that a machine can take while responding to a stream
More informationThe Inverse of a Square Matrix
These notes closely follow the presentation of the material given in David C Lay s textbook Linear Algebra and its Applications (3rd edition) These notes are intended primarily for inclass presentation
More informationLectures notes on orthogonal matrices (with exercises) 92.222  Linear Algebra II  Spring 2004 by D. Klain
Lectures notes on orthogonal matrices (with exercises) 92.222  Linear Algebra II  Spring 2004 by D. Klain 1. Orthogonal matrices and orthonormal sets An n n realvalued matrix A is said to be an orthogonal
More informationCOMPUTER SCIENCE TRIPOS
CST.2010.4.1 COMPUTER SCIENCE TRIPOS Part IB Tuesday 1 June 2010 1.30 to 4.30 COMPUTER SCIENCE Paper 4 Answer five questions. Submit the answers in five separate bundles, each with its own cover sheet.
More informationAutomata and Formal Languages
Automata and Formal Languages Winter 20092010 Yacov HelOr 1 What this course is all about This course is about mathematical models of computation We ll study different machine models (finite automata,
More informationLecture 9  Message Authentication Codes
Lecture 9  Message Authentication Codes Boaz Barak March 1, 2010 Reading: BonehShoup chapter 6, Sections 9.1 9.3. Data integrity Until now we ve only been interested in protecting secrecy of data. However,
More informationCS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move.
CS54 Turing Machines Turing Machine q 0 AI N P U T IN TAPE read write move read write move Language = {0} q This Turing machine recognizes the language {0} Turing Machines versus DFAs TM can both write
More informationFast nondeterministic recognition of contextfree languages using two queues
Fast nondeterministic recognition of contextfree languages using two queues Burton Rosenberg University of Miami Abstract We show how to accept a contextfree language nondeterministically in O( n log
More informationInteractions between law and computer science: privacy and liability. Daniel Le Métayer
1 Interactions between law and computer science: privacy and liability Daniel Le Métayer 2 Multidisciplinary approach Growing intermingling of legal and technological issues: privacy, DRM, liability, electronic
More informationCalculus with Parametric Curves
Calculus with Parametric Curves Suppose f and g are differentiable functions and we want to find the tangent line at a point on the parametric curve x f(t), y g(t) where y is also a differentiable function
More informationMaster s Thesis. OnePass Strategies for ContextFree Games. Christian Cöster August 2015
Master s Thesis OnePass Strategies for ContextFree Games Christian Cöster August 2015 Examiners: Prof. Dr. Thomas Schwentick Prof. Dr. Christoph Buchheim Technische Universität Dortmund Fakultät für
More informationChapter 7: Products and quotients
Chapter 7: Products and quotients Matthew Macauley Department of Mathematical Sciences Clemson University http://www.math.clemson.edu/~macaule/ Math 42, Spring 24 M. Macauley (Clemson) Chapter 7: Products
More informationData Structures Fibonacci Heaps, Amortized Analysis
Chapter 4 Data Structures Fibonacci Heaps, Amortized Analysis Algorithm Theory WS 2012/13 Fabian Kuhn Fibonacci Heaps Lacy merge variant of binomial heaps: Do not merge trees as long as possible Structure:
More informationFIBRATION SEQUENCES AND PULLBACK SQUARES. Contents. 2. Connectivity and fiber sequences. 3
FIRTION SEQUENES ND PULLK SQURES RY MLKIEWIH bstract. We lay out some foundational facts about fibration sequences and pullback squares of topological spaces. We pay careful attention to connectivity ranges
More information7 Gaussian Elimination and LU Factorization
7 Gaussian Elimination and LU Factorization In this final section on matrix factorization methods for solving Ax = b we want to take a closer look at Gaussian elimination (probably the best known method
More informationCHAPTER 7 GENERAL PROOF SYSTEMS
CHAPTER 7 GENERAL PROOF SYSTEMS 1 Introduction Proof systems are built to prove statements. They can be thought as an inference machine with special statements, called provable statements, or sometimes
More informationDiscrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 13. Random Variables: Distribution and Expectation
CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 3 Random Variables: Distribution and Expectation Random Variables Question: The homeworks of 20 students are collected
More informationLECTURE 1 I. Inverse matrices We return now to the problem of solving linear equations. Recall that we are trying to find x such that IA = A
LECTURE I. Inverse matrices We return now to the problem of solving linear equations. Recall that we are trying to find such that A = y. Recall: there is a matri I such that for all R n. It follows that
More informationDivisor graphs have arbitrary order and size
Divisor graphs have arbitrary order and size arxiv:math/0606483v1 [math.co] 20 Jun 2006 Le Anh Vinh School of Mathematics University of New South Wales Sydney 2052 Australia Abstract A divisor graph G
More information