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

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

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

Transcription

1 Overview H9 Vertlerouw H 9: Prsing: op-down & LL(1) do 3 mei heo Ruys h. 8 - Prsing 8.1 ontext-free Grmmrs 8.2 op-down Prsing 8.3 LL(1) Grmmrs See lso [ho, Sethi & Ullmn 1986] for more thorough discussion. INF tel donderdg 3 mei 2001 (56) Vertlerouw - H9 1 donderdg 3 mei 2001 (56) Vertlerouw - H9 2 Introduction Prser (= syntx nlyser) checks whether the input progrm is syntcticlly correct usully specified y context-free grmmr regulr expressions fi finite-stte utomton context-free grmmr fi stck utomton is usully ugmented with ctions for context constrints code optimistion nd genertion not only for progrmming lnguges, ut for ll progrms tht process structured dt prsing strtegies: top-down prsing ottom-up prsing donderdg 3 mei 2001 (56) Vertlerouw - H9 3 ontext-free Grmmrs (1) ontext-free Grmmr (FG) G is defined y 4-tuple (N,, P, S) S: strt symol S N tokens tht occur P: production rules : finite set of terminls N: finite set of non-terminls define structure xmple: G = ({,B}, {,,c},, P) where P: fi fi B B fi B fi c regexp: ( c) N β (N ) V N Nottionl conveniences: only prove the production rules use choice opertor: fi B donderdg 3 mei 2001 (56) Vertlerouw - H9 4 ontext-free Grmmrs (2) FG is specifiction of rewrite system. FGs re used to derive strings of terminls. Nottion: α, β, γ, δ (N ) = V string of symols u, v, w string of terminls X, Y, Z (N ) single grmmr symol, B,, D N single non-terminl,, c single terminl 1-step derivtion: αγ αβγ using production rule: fi B donderdg 3 mei 2001 (56) Vertlerouw - H9 5 FGs (3) Derivtion αγ αβγ left-most derivtion if α = w, then wγ l αβγ right-most derivtion if γ = w, then αw r αβw zero or more steps α β one or more steps α β Recursion left-recursive derivtion if α then the FG is left-recursive right-recursive derivtion if α then the FG is right-recursive α, β, γ (N ) u, v, w X, Y, Z (N ), B, N,, c donderdg 3 mei 2001 (56) Vertlerouw - H9 6 1

2 FGs (4) erminology (cont.) if S β then β is sententil form if S w then w is sentence xmple: fi D D fi c α, β, γ (N ) u, v, w X, Y, Z (N ), B, N,, c ontext-free Grmmrs (5) ontext-free Lnguge (FL) FL = the set of ll sentences derived from FG FL(G) = { w S w } Previous exmple ( fi D D fi c): FL = {, c,, c,, c,, c,... } Prse tree: nother representtion of derivtion D sententil forms sentence D corresponds with D donderdg 3 mei 2001 (56) Vertlerouw - H9 7 donderdg 3 mei 2001 (56) Vertlerouw - H9 8 xmple: fi fi fi ontext-free Grmmrs (6) wo wys of deriving sentence in the FL corresponding to G: G is miguous! In this cse, G does not define the reltive priorities of nd oth derivtions re left-derivtions donderdg 3 mei 2001 (56) Vertlerouw - H9 9 ontext-free Grmmrs (7) Unmiguous grmmr: fi fi fi fi () hs priority over () n extr nonterminl is used to solve the priority/miguity prolem donderdg 3 mei 2001 (56) Vertlerouw - H9 10 ontext-free Grmmrs (8) Infmous dngling-else prolem: S fi if then S S fi if then S else S if then if then S else S ontext-free Grmmrs (9) Prolem: verifying tht the lnguge L is generted y grmmr G i.e. to prove tht: L(G) = L fi verify: if S w then w L verify: if w L then S w if S then S if then S else S if S then if S else S then S xmple: L is the lnguge consisting of lnced prntheses. G: S fi ( S ) S Proof sketch: use induction on the numer of derivtion steps nd the length of the sentence donderdg 3 mei 2001 (56) Vertlerouw - H9 11 donderdg 3 mei 2001 (56) Vertlerouw - H9 12 2

3 FGs (10) S fi ( S ) S FGs (11) S fi ( S ) S fi verify tht every generted string is lnced n=1 (one step derivtion) e is lnced n>1 ssume tht ll strings re lnced for <n-step derivtions conser n n-step derivtion, which will e of the form: S (S) S (x) S (x) y x nd y must e lnced (oth re cses of <n derivtions), hence (x)y is lnced. verify tht ll lnced-prenthesis strings cn e generted from S n=0 (length of sentence) e is derivle from S n>0 ssume tht every string of length <2n is derivle conser lnced string of length 2n (for n 1) let (x) e the shortest prefix of the lnced string the lnced string cn e written s (x)y where x nd y re oth lnced, nd re oth <2n in length; therefore they re derivle; Hence, we cn find S (S) S (x) S (x) y donderdg 3 mei 2001 (56) Vertlerouw - H9 13 donderdg 3 mei 2001 (56) Vertlerouw - H9 14 ontext-free Grmmrs (12) Rs vs FGs R cn lwys e expressed s FG. lgorithm: 1. " stte s, crete nonterminl s 2. " trnsition lelled, write s t 3. For ccept sttes s, write s e 4. he strt stte is the egin symol. R: { } NF donderdg 3 mei 2001 (56) Vertlerouw - H FG: > e ontext-free Grmmrs (13) So: RL is lwys context-free. FL is usully not regulr. xmples: L 1 = { n n 1} regulr: L 2 = { n n n 1} not regulr context free: S fi S L 3 = { n n c n n 1} not regulr not context free Ide: RL/FL cn lwys e written in form so tht sustring/stte is repeted. he Pumping Lemms for regulr expressions nd grmmrs should e used to prove tht lnguge L is not RL or FL. (see [ Sudkmp 1991]) finite utomton cnnot keep count grmmr cn count two items, ut not three donderdg 3 mei 2001 (56) Vertlerouw - H9 16 op-down Prsing (1) R Use element construction suset construction to generte DF (= scnner) DF = finite-stte utomton FG n we lso generte prser for FG? S = stck utomton S is NF (or DF) with n extr stck. he stck gives the F the extr power. prser is n lgorithm sed on S tht egins with strt symol of FG nd derives sentence. op-down Prsing (2) Recll recursive-descent prsing (h.1) procedure is ssocited with ech nonterminl N in the grmmr. he ody of the procedure my contin sttements tht mtch terminls; sttements tht cll procedures for ech nonterminl in the right-hnd se of the production of N; semntic ctions. Recursive-descent prsers implicitly use stck, i.e. the cll-stck of the procedures. op-down prsing: uilding the prse tree from the root (i.e. the strt symol). donderdg 3 mei 2001 (56) Vertlerouw - H9 17 donderdg 3 mei 2001 (56) Vertlerouw - H9 18 3

4 op-down Prsing (3) xmple (using n explicit stck): fi B fi e string = B fi stck input $ B $ BB $ BB $ B $ B $ $ - $ donderdg 3 mei 2001 (56) Vertlerouw - H9 19 B B For the nonterminl on top of production rule is executed. erminls on top of the stck get popped, while dvncing the look-hed pointer in the input. e B B BB B ll left-derivtions op-down le-driven D-D lgorithm: ool DD() { Stck s; ool ccept=true; s.init(); s.push(s); D Prsing (4) Note tht in ech itertion symol is popped from the stck while (ccept && (look_hed!=$!s.empty())) { top = s.pop(); if (top ) { if (top!= look_hed) ccept=flse; else look_hed=red_input(); } else if (top N) { // ssume top == Select some production fi X 1... X n s.push(x 1,...,X n); } else ccept=flse; might e nondeterministic... } In the D-D lgorithm, the selection return ccept; of production rule is driven y tle. } donderdg 3 mei 2001 (56) Vertlerouw - H9 20 LL(1) (1) So we my hve choice of production rules fi α hoosing production rule non-predictive: rndomly (requires cktrcking!) predictive: using the look-hed symols in the input LL(k) If y looking hed k symols in the input strem, we cn lwys choose the right production rule, the given grmmr is (strong) LL(k). L: left-to-right scnning through the input strem L: left-derivtion donderdg 3 mei 2001 (56) Vertlerouw - H9 21 LL(1) (2) strong LL(k) vs. (norml) LL(k) strong LL(k): we only conser the look-hed tokens in the input strem when choosing production rule. LL(k): prt from the look-hed symols in the input, we my lso use the input tokens tht hve lredy een red to choose production rule. clss of strong LL(k) grmmrs clss of LL(k) grmmrs xmple: p 1 : fi p 2 : fi LL(1) LL(2) LL(3)... If k=1, we cnnot tell if p 1 or p 2 should e pplied. herefore, the grmmr is not LL(1); it is LL(2). donderdg 3 mei 2001 (56) Vertlerouw - H9 22 LL(1) (3) onser k=1 LL(1) = strong LL(1) LL(1) grmmrs re sufficient to descrie most progrmming constructs Define: prefix(w) = first terminl of w FIRS(α) New definition of LL(1): Given G nd productions fi α nd, then if FIRS(α.FOLLOW()) FIRS(β.FOLLOW()) = then G is LL(1). α nd β might e e = { terminls tht re first in sentence w derived from α } = { α w nd =prefix(w), for some w } FOLLOW() = { terminls tht re in FIRS(γ) in some sententil form βγ } = { S βγ nd FIRS(γ), for some β,γ V } donderdg 3 mei 2001 (56) Vertlerouw - H9 23 xmple: G 1 is defined y p 1 : fi B p 2 : fi e p 3 : B fi p 4 : B fi c LL(1) (4) L(G) = {, c,, c, c, cc,... } donderdg 3 mei 2001 (56) Vertlerouw - H9 24 B LL(1)-test for G 1: p 1 nd p 2 FIRS(B.FOLLOW()) FIRS(e.FOLLOW()) = {} {$} = p 3 nd p 4 FIRS(.FOLLOW(B)) FIRS(c.FOLLOW(B)) = {} {c} = B c B e Hence, G1 is LL(1) 4

5 LL(1) (5) xmple: G 2 is defined y p 1 : fi B L(G) = {, c,, c, p 2 : fi e c, cc,... } p 3 : B fi p 4 : B fi c LL(1)-test for G 2: p 1 nd p 2 FIRS(B.FOLLOW()) FIRS(e.FOLLOW()) = {} {FOLLOW()} = {} {} = {} G2 is not LL(1) LL(1) (6) Nottionl convenience: Insted of using the expression FIRS(α.FOLLOW()) for production rule fi α, we define DIRS( fi α) = FIRS(α), if MPY(α) = FIRS(α) FOLLOW(), otherwise he DIRS set cn e used to compute the prse tle DIRS( fi α) = { 1, 2,... } DIRS() = { 1, 2,... } Now: M(, i) = fi α M(, i) = B fi β In generl: M(,) = fi α, if DIRS( fi α) donderdg 3 mei 2001 (56) Vertlerouw - H9 25 donderdg 3 mei 2001 (56) Vertlerouw - H9 26 LL(1) (7)... we know how to check whether G is LL(1)... Left fctoristion fi αβ fi αγ cnnot e LL(1) ecomes liminte left recursion fi α cnnot e LL(1)... It is not decle, though ecomes When G is not LL(1), cn it e mde LL(1)? fi αb B fi β B fi γ which is LL(1) if FIRS(β) FIRS(γ) = fi B B fi β fi α fi e which is LL(1) if FIRS(α.FOLLOW()) FIRS(e.FOLLOW()) = nswer: sometimes donderdg 3 mei 2001 (56) Vertlerouw - H9 27 LL(1) (8)... it does not lwys work (e.g. left fctoristion) D is not importnt fi B fi It my not directly cler why this G is not LL(1). fi DB fi D fi α fi D fi B fi fi α he nonterminl now ssumes the role of the originl : this method will not terminte! donderdg 3 mei 2001 (56) Vertlerouw - H9 28 oncluding remrks: LL(1) (9) Section of the ook/reder contins n extensive nd forml discussion on the LL(1)-test using the function MPY nd the sets LDING (generlistion of FIRS), RILING, FOLLOW nd DIRS. lgorithms re presented to utomticlly clculte these sets to perform the LL(1)-test; nd if the grmmr is LL(1), the DIRS cn directly e used to construct the prse tle. We will riefly discuss these sets (nd lgorithms) in H10 when presenting FGs. donderdg 3 mei 2001 (56) Vertlerouw - H9 29 5

Formal languages, automata, and theory of computation

Formal languages, automata, and theory of computation Mälrdlen University TEN1 DVA337 2015 School of Innovtion, Design nd Engineering Forml lnguges, utomt, nd theory of computtion Thursdy, Novemer 5, 14:10-18:30 Techer: Dniel Hedin, phone 021-107052 The exm

More information

1.3 Regular Expressions

1.3 Regular Expressions 56 1.3 Regulr xpressions These hve n importnt role in describing ptterns in serching for strings in mny pplictions (e.g. wk, grep, Perl,...) All regulr expressions of lphbet re 1.Ønd re regulr expressions,

More information

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

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS CS 310 (sec 20) - Winter 2003 - Finl Exm (solutions) SOLUTIONS 1. (Logic) Use truth tles to prove the following logicl equivlences: () p q (p p) (q q) () p q (p q) (p q) () p q p q p p q q (q q) (p p)

More information

Context-Free Grammars and Languages

Context-Free Grammars and Languages Context-Free Grmmrs nd Lnguges (Bsed on Hopcroft, Motwni nd Ullmn (2007) & Cohen (1997)) Introduction Consider n exmple sentence: A smll ct ets the fish English grmmr hs rules for constructing sentences;

More information

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010 CS 311 Homework 3 due 16:30, Thursdy, 14 th Octoer 2010 Homework must e sumitted on pper, in clss. Question 1. [15 pts.; 5 pts. ech] Drw stte digrms for NFAs recognizing the following lnguges:. L = {w

More information

Harvard University Computer Science 121 Midterm October 23, 2012

Harvard University Computer Science 121 Midterm October 23, 2012 Hrvrd University Computer Science 121 Midterm Octoer 23, 2012 This is closed-ook exmintion. You my use ny result from lecture, Sipser, prolem sets, or section, s long s you quote it clerly. The lphet is

More information

Chapter 2 Finite Automata

Chapter 2 Finite Automata Chpter 2 Finite Automt 28 2.1 Introduction Finite utomt: first model of the notion of effective procedure. (They lso hve mny other pplictions). The concept of finite utomton cn e derived y exmining wht

More information

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

Chapter 4 Regular Grammar and Regular Sets. (Solutions / Hints) C K Ngpl Forml Lnguges nd utomt Theory Chpter 4 Regulr Grmmr nd Regulr ets (olutions / Hints) ol. (),,,,,,,,,,,,,,,,,,,,,,,,,, (),, (c) c c, c c, c, c, c c, c, c, c, c, c, c, c c,c, c, c, c, c, c, c, c,

More information

Homework 4. 0 ε 0. (00) ε 0 ε 0 (00) (11) CS 341: Foundations of Computer Science II Prof. Marvin Nakayama

Homework 4. 0 ε 0. (00) ε 0 ε 0 (00) (11) CS 341: Foundations of Computer Science II Prof. Marvin Nakayama CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 4 1. UsetheproceduredescriedinLemm1.55toconverttheregulrexpression(((00) (11)) 01) into n NFA. Answer: 0 0 1 1 00 0 0 11 1 1 01 0 1 (00)

More information

CHAPTER 1 Regular Languages. Contents

CHAPTER 1 Regular Languages. Contents Finite Automt (FA or DFA) CHAPTE 1 egulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, euivlence of NFAs nd DFAs, closure under regulr

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automt Theory nd Forml Lnguges TMV027/DIT321 LP4 2018 Lecture 10 An Bove April 23rd 2018 Recp: Regulr Lnguges We cn convert between FA nd RE; Hence both FA nd RE ccept/generte regulr lnguges; More

More information

Normal Forms for Context-free Grammars

Normal Forms for Context-free Grammars Norml Forms for Context-free Grmmrs 1 Linz 6th, Section 6.2 wo Importnt Norml Forms, pges 171--178 2 Chomsky Norml Form All productions hve form: A BC nd A vrile vrile terminl 3 Exmples: S AS S AS S S

More information

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

Formal Languages and Automata Theory. D. Goswami and K. V. Krishna Forml Lnguges nd Automt Theory D. Goswmi nd K. V. Krishn Novemer 5, 2010 Contents 1 Mthemticl Preliminries 3 2 Forml Lnguges 4 2.1 Strings............................... 5 2.2 Lnguges.............................

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb. CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.) CS 373, Spring 29. Solutions to Mock midterm (sed on first midterm in CS 273, Fll 28.) Prolem : Short nswer (8 points) The nswers to these prolems should e short nd not complicted. () If n NF M ccepts

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2 CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck. Outline Automt Theory 101 Rlf Huuck Introduction Finite Automt Regulr Expressions ω-automt Session 1 2006 Rlf Huuck 1 Session 1 2006 Rlf Huuck 2 Acknowledgement Some slides re sed on Wolfgng Thoms excellent

More information

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

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages 5//6 Grmmr Automt nd Lnguges Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Prof. Mohmed Hmd Softwre Engineering L. The University of Aizu Jpn Regulr Lnguges Context Free Lnguges Context Sensitive

More information

Lexical Analysis Finite Automate

Lexical Analysis Finite Automate Lexicl Anlysis Finite Automte CMPSC 470 Lecture 04 Topics: Deterministic Finite Automt (DFA) Nondeterministic Finite Automt (NFA) Regulr Expression NFA DFA A. Finite Automt (FA) FA re grph, like trnsition

More information

CS375: Logic and Theory of Computing

CS375: Logic and Theory of Computing CS375: Logic nd Theory of Computing Fuhu (Frnk) Cheng Deprtment of Computer Science University of Kentucky 1 Tle of Contents: Week 1: Preliminries (set lger, reltions, functions) (red Chpters 1-4) Weeks

More information

Homework 3 Solutions

Homework 3 Solutions CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 3 Solutions 1. Give NFAs with the specified numer of sttes recognizing ech of the following lnguges. In ll cses, the lphet is Σ = {,1}.

More information

Name Ima Sample ASU ID

Name Ima Sample ASU ID Nme Im Smple ASU ID 2468024680 CSE 355 Test 1, Fll 2016 30 Septemer 2016, 8:35-9:25.m., LSA 191 Regrding of Midterms If you elieve tht your grde hs not een dded up correctly, return the entire pper to

More information

3 Regular expressions

3 Regular expressions 3 Regulr expressions Given n lphet Σ lnguge is set of words L Σ. So fr we were le to descrie lnguges either y using set theory (i.e. enumertion or comprehension) or y n utomton. In this section we shll

More information

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

Regular Language. Nonregular Languages The Pumping Lemma. The pumping lemma. Regular Language. The pumping lemma. Infinitely long words 3/17/15 Regulr Lnguge Nonregulr Lnguges The Pumping Lemm Models of Comput=on Chpter 10 Recll, tht ny lnguge tht cn e descried y regulr expression is clled regulr lnguge In this lecture we will prove tht not ll

More information

Automata and Languages

Automata and Languages Automt nd Lnguges Prof. Mohmed Hmd Softwre Engineering Lb. The University of Aizu Jpn Grmmr Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Regulr Lnguges Context Free Lnguges Context Sensitive

More information

General idea LR(0) SLR LR(1) LALR To best exploit JavaCUP, should understand the theoretical basis (LR parsing);

General idea LR(0) SLR LR(1) LALR To best exploit JavaCUP, should understand the theoretical basis (LR parsing); Bottom up prsing Generl ide LR(0) SLR LR(1) LLR To best exploit JvCUP, should understnd the theoreticl bsis (LR prsing); 1 Top-down vs Bottom-up Bottom-up more powerful thn top-down; Cn process more powerful

More information

The University of Nottingham

The University of Nottingham The University of Nottinghm SCHOOL OF COMPUTR SCINC AND INFORMATION TCHNOLOGY A LVL 1 MODUL, SPRING SMSTR 2004-2005 MACHINS AND THIR LANGUAGS Time llowed TWO hours Cndidtes must NOT strt writing their

More information

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

Bottom-Up Parsing. Canonical Collection of LR(0) items. Part II 2 ottom-up Prsing Prt II 1 Cnonil Colletion of LR(0) items CC_LR(0)_I items(g :ugmented_grmmr){ C = {CLOURE({ })} ; repet{ foreh(i C) foreh(grmmr symol X) if(goto(i,x) && GOTO(I,X) C) C = C {GOTO(I,X)};

More information

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018 CS 301 Lecture 04 Regulr Expressions Stephen Checkowy Jnury 29, 2018 1 / 35 Review from lst time NFA N = (Q, Σ, δ, q 0, F ) where δ Q Σ P (Q) mps stte nd n lphet symol (or ) to set of sttes We run n NFA

More information

1 From NFA to regular expression

1 From NFA to regular expression Note 1: How to convert DFA/NFA to regulr expression Version: 1.0 S/EE 374, Fll 2017 Septemer 11, 2017 In this note, we show tht ny DFA cn e converted into regulr expression. Our construction would work

More information

State Minimization for DFAs

State Minimization for DFAs Stte Minimiztion for DFAs Red K & S 2.7 Do Homework 10. Consider: Stte Minimiztion 4 5 Is this miniml mchine? Step (1): Get rid of unrechle sttes. Stte Minimiztion 6, Stte is unrechle. Step (2): Get rid

More information

CS 330 Formal Methods and Models

CS 330 Formal Methods and Models CS 0 Forml Methods nd Models Dn Richrds, George Mson University, Fll 2016 Quiz Solutions Quiz 1, Propositionl Logic Dte: Septemer 8 1. Prove q (q p) p q p () (4pts) with truth tle. p q p q p (q p) p q

More information

Recursively Enumerable and Recursive. Languages

Recursively Enumerable and Recursive. Languages Recursively Enumerble nd Recursive nguges 1 Recll Definition (clss 19.pdf) Definition 10.4, inz, 6 th, pge 279 et S be set of strings. An enumertion procedure for Turing Mchine tht genertes ll strings

More information

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

Homework Solution - Set 5 Due: Friday 10/03/08 CE 96 Introduction to the Theory of Computtion ll 2008 Homework olution - et 5 Due: ridy 10/0/08 1. Textook, Pge 86, Exercise 1.21. () 1 2 Add new strt stte nd finl stte. Mke originl finl stte non-finl.

More information

1 Nondeterministic Finite Automata

1 Nondeterministic Finite Automata 1 Nondeterministic Finite Automt Suppose in life, whenever you hd choice, you could try oth possiilities nd live your life. At the end, you would go ck nd choose the one tht worked out the est. Then you

More information

CS 330 Formal Methods and Models

CS 330 Formal Methods and Models CS 330 Forml Methods nd Models Dn Richrds, section 003, George Mson University, Fll 2017 Quiz Solutions Quiz 1, Propositionl Logic Dte: Septemer 7 1. Prove (p q) (p q), () (5pts) using truth tles. p q

More information

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-*

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-* Regulr Expressions (RE) Regulr Expressions (RE) Empty set F A RE denotes the empty set Opertion Nottion Lnguge UNIX Empty string A RE denotes the set {} Alterntion R +r L(r ) L(r ) r r Symol Alterntion

More information

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1 CS4 45- Determinisitic Finite Automt -: Genertors vs. Checkers Regulr expressions re one wy to specify forml lnguge String Genertor Genertes strings in the lnguge Deterministic Finite Automt (DFA) re nother

More information

Section: Other Models of Turing Machines. Definition: Two automata are equivalent if they accept the same language.

Section: Other Models of Turing Machines. Definition: Two automata are equivalent if they accept the same language. Section: Other Models of Turing Mchines Definition: Two utomt re equivlent if they ccept the sme lnguge. Turing Mchines with Sty Option Modify δ, Theorem Clss of stndrd TM s is equivlent to clss of TM

More information

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016 CS125 Lecture 12 Fll 2016 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple

More information

CS241 Week 6 Tutorial Solutions

CS241 Week 6 Tutorial Solutions 241 Week 6 Tutoril olutions Lnguges: nning & ontext-free Grmmrs Winter 2018 1 nning Exerises 1. 0x0x0xd HEXINT 0x0 I x0xd 2. 0xend--- HEXINT 0xe I nd ER -- MINU - 3. 1234-120x INT 1234 INT -120 I x 4.

More information

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute Victor Admchik Dnny Sletor Gret Theoreticl Ides In Computer Science CS 5-25 Spring 2 Lecture 2 Mr 3, 2 Crnegie Mellon University Deterministic Finite Automt Finite Automt A mchine so simple tht you cn

More information

Formal Methods in Software Engineering

Formal Methods in Software Engineering Forml Methods in Softwre Engineering Lecture 09 orgniztionl issues Prof. Dr. Joel Greenyer Decemer 9, 2014 Written Exm The written exm will tke plce on Mrch 4 th, 2015 The exm will tke 60 minutes nd strt

More information

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

Semantic Analysis. CSCI 3136 Principles of Programming Languages. Faculty of Computer Science Dalhousie University. Winter Reading: Chapter 4 Semnti nlysis SI 16 Priniples of Progrmming Lnguges Fulty of omputer Siene Dlhousie University Winter 2012 Reding: hpter 4 Motivtion Soure progrm (hrter strem) Snner (lexil nlysis) Front end Prse tree

More information

8 Automata and formal languages. 8.1 Formal languages

8 Automata and formal languages. 8.1 Formal languages 8 Automt nd forml lnguges This exposition ws developed y Clemens Gröpl nd Knut Reinert. It is sed on the following references, ll of which re recommended reding: 1. Uwe Schöning: Theoretische Informtik

More information

Non-deterministic Finite Automata

Non-deterministic Finite Automata Non-deterministic Finite Automt From Regulr Expressions to NFA- Eliminting non-determinism Rdoud University Nijmegen Non-deterministic Finite Automt H. Geuvers nd J. Rot Institute for Computing nd Informtion

More information

5.1 Definitions and Examples 5.2 Deterministic Pushdown Automata

5.1 Definitions and Examples 5.2 Deterministic Pushdown Automata CSC4510 AUTOMATA 5.1 Definitions nd Exmples 5.2 Deterministic Pushdown Automt Definitions nd Exmples A lnguge cn be generted by CFG if nd only if it cn be ccepted by pushdown utomton. A pushdown utomton

More information

7 Automata and formal languages. 7.1 Formal languages

7 Automata and formal languages. 7.1 Formal languages 7 Automt nd forml lnguges This exposition ws developed by Clemens Gröpl nd Knut Reinert. It is bsed on the following references, ll of which re recommended reding: 1. Uwe Schöning: Theoretische Informtik

More information

CS S-12 Turing Machine Modifications 1. When we added a stack to NFA to get a PDA, we increased computational power

CS S-12 Turing Machine Modifications 1. When we added a stack to NFA to get a PDA, we increased computational power CS411-2015S-12 Turing Mchine Modifictions 1 12-0: Extending Turing Mchines When we dded stck to NFA to get PDA, we incresed computtionl power Cn we do the sme thing for Turing Mchines? Tht is, cn we dd

More information

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics SCHOOL OF ENGINEERING & BUIL ENVIRONMEN Mthemtics An Introduction to Mtrices Definition of Mtri Size of Mtri Rows nd Columns of Mtri Mtri Addition Sclr Multipliction of Mtri Mtri Multipliction 7 rnspose

More information

Chapter 1, Part 1. Regular Languages. CSC527, Chapter 1, Part 1 c 2012 Mitsunori Ogihara 1

Chapter 1, Part 1. Regular Languages. CSC527, Chapter 1, Part 1 c 2012 Mitsunori Ogihara 1 Chpter 1, Prt 1 Regulr Lnguges CSC527, Chpter 1, Prt 1 c 2012 Mitsunori Ogihr 1 Finite Automt A finite utomton is system for processing ny finite sequence of symols, where the symols re chosen from finite

More information

NON-DETERMINISTIC FSA

NON-DETERMINISTIC FSA Tw o types of non-determinism: NON-DETERMINISTIC FS () Multiple strt-sttes; strt-sttes S Q. The lnguge L(M) ={x:x tkes M from some strt-stte to some finl-stte nd ll of x is proessed}. The string x = is

More information

Handout: Natural deduction for first order logic

Handout: Natural deduction for first order logic MATH 457 Introduction to Mthemticl Logic Spring 2016 Dr Json Rute Hndout: Nturl deduction for first order logic We will extend our nturl deduction rules for sententil logic to first order logic These notes

More information

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers Speech Recognition Lecture 2: Finite Automt nd Finite-Stte Trnsducers Eugene Weinstein Google, NYU Cournt Institute eugenew@cs.nyu.edu Slide Credit: Mehryr Mohri Preliminries Finite lphet, empty string.

More information

Where did dynamic programming come from?

Where did dynamic programming come from? Where did dynmic progrmming come from? String lgorithms Dvid Kuchk cs302 Spring 2012 Richrd ellmn On the irth of Dynmic Progrmming Sturt Dreyfus http://www.eng.tu.c.il/~mi/cd/ or50/1526-5463-2002-50-01-0048.pdf

More information

On Determinisation of History-Deterministic Automata.

On Determinisation of History-Deterministic Automata. On Deterministion of History-Deterministic Automt. Denis Kupererg Mich l Skrzypczk University of Wrsw YR-ICALP 2014 Copenhgen Introduction Deterministic utomt re centrl tool in utomt theory: Polynomil

More information

Nondeterministic Biautomata and Their Descriptional Complexity

Nondeterministic Biautomata and Their Descriptional Complexity Nondeterministic Biutomt nd Their Descriptionl Complexity Mrkus Holzer nd Sestin Jkoi Institut für Informtik Justus-Lieig-Universität Arndtstr. 2, 35392 Gießen, Germny 23. Theorietg Automten und Formle

More information

set is not closed under matrix [ multiplication, ] and does not form a group.

set is not closed under matrix [ multiplication, ] and does not form a group. Prolem 2.3: Which of the following collections of 2 2 mtrices with rel entries form groups under [ mtrix ] multipliction? i) Those of the form for which c d 2 Answer: The set of such mtrices is not closed

More information

Preview 11/1/2017. Greedy Algorithms. Coin Change. Coin Change. Coin Change. Coin Change. Greedy algorithms. Greedy Algorithms

Preview 11/1/2017. Greedy Algorithms. Coin Change. Coin Change. Coin Change. Coin Change. Greedy algorithms. Greedy Algorithms Preview Greed Algorithms Greed Algorithms Coin Chnge Huffmn Code Greed lgorithms end to e simple nd strightforwrd. Are often used to solve optimiztion prolems. Alws mke the choice tht looks est t the moment,

More information

Software Engineering using Formal Methods

Software Engineering using Formal Methods Softwre Engineering using Forml Methods Propositionl nd (Liner) Temporl Logic Wolfgng Ahrendt 13th Septemer 2016 SEFM: Liner Temporl Logic /GU 160913 1 / 60 Recpitultion: FormlistionFormlistion: Syntx,

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministi Finite utomt The Power of Guessing Tuesdy, Otoer 4, 2 Reding: Sipser.2 (first prt); Stoughton 3.3 3.5 S235 Lnguges nd utomt eprtment of omputer Siene Wellesley ollege Finite utomton (F)

More information

Noncanonical LALR(1) Parsing

Noncanonical LALR(1) Parsing Noncnonicl LALR(1) Prsing Sylvin Schmitz Lbortoire I3S, Université de Nice - Sophi Antipolis & CNRS, Frnce schmitz@i3s.unice.fr Abstrct This pper ddresses the longstnding problem of the recognition limittions

More information

This lecture covers Chapter 8 of HMU: Properties of CFLs

This lecture covers Chapter 8 of HMU: Properties of CFLs This lecture covers Chpter 8 of HMU: Properties of CFLs Turing Mchine Extensions of Turing Mchines Restrictions of Turing Mchines Additionl Reding: Chpter 8 of HMU. Turing Mchine: Informl Definition B

More information

SOLUTIONS FOR ADMISSIONS TEST IN MATHEMATICS, COMPUTER SCIENCE AND JOINT SCHOOLS WEDNESDAY 5 NOVEMBER 2014

SOLUTIONS FOR ADMISSIONS TEST IN MATHEMATICS, COMPUTER SCIENCE AND JOINT SCHOOLS WEDNESDAY 5 NOVEMBER 2014 SOLUTIONS FOR ADMISSIONS TEST IN MATHEMATICS, COMPUTER SCIENCE AND JOINT SCHOOLS WEDNESDAY 5 NOVEMBER 014 Mrk Scheme: Ech prt of Question 1 is worth four mrks which re wrded solely for the correct nswer.

More information

Nondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA

Nondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA Nondeterminism Nondeterministic Finite Automt Nondeterminism Subset Construction A nondeterministic finite utomton hs the bility to be in severl sttes t once. Trnsitions from stte on n input symbol cn

More information

CSCI FOUNDATIONS OF COMPUTER SCIENCE

CSCI FOUNDATIONS OF COMPUTER SCIENCE 1 CSCI- 2200 FOUNDATIONS OF COMPUTER SCIENCE Spring 2015 My 7, 2015 2 Announcements Homework 9 is due now. Some finl exm review problems will be posted on the web site tody. These re prcqce problems not

More information

MATH 573 FINAL EXAM. May 30, 2007

MATH 573 FINAL EXAM. May 30, 2007 MATH 573 FINAL EXAM My 30, 007 NAME: Solutions 1. This exm is due Wednesdy, June 6 efore the 1:30 pm. After 1:30 pm I will NOT ccept the exm.. This exm hs 1 pges including this cover. There re 10 prolems.

More information

input tape head moves current state

input tape head moves current state CPS 140 - Mthemticl Foundtions of CS Dr. Susn Rodger Section: Finite Automt (Ch. 2) (lecture notes) Things to do in clss tody (Jn. 13, 2004): ffl questions on homework 1 ffl finish chpter 1 ffl Red Chpter

More information

Lecture 2 : Propositions DRAFT

Lecture 2 : Propositions DRAFT CS/Mth 240: Introduction to Discrete Mthemtics 1/20/2010 Lecture 2 : Propositions Instructor: Dieter vn Melkeeek Scrie: Dlior Zelený DRAFT Lst time we nlyzed vrious mze solving lgorithms in order to illustrte

More information

Lecture 9: LTL and Büchi Automata

Lecture 9: LTL and Büchi Automata Lecture 9: LTL nd Büchi Automt 1 LTL Property Ptterns Quite often the requirements of system follow some simple ptterns. Sometimes we wnt to specify tht property should only hold in certin context, clled

More information

Section 4: Integration ECO4112F 2011

Section 4: Integration ECO4112F 2011 Reding: Ching Chpter Section : Integrtion ECOF Note: These notes do not fully cover the mteril in Ching, ut re ment to supplement your reding in Ching. Thus fr the optimistion you hve covered hs een sttic

More information

References. Theory of Computation. Theory of Computation. Introduction. Alexandre Duret-Lutz

References. Theory of Computation. Theory of Computation. Introduction. Alexandre Duret-Lutz References Theory of Computtion Alexndre Duret-Lutz dl@lrde.epit.fr Septemer 10, 2010 Introduction to the Theory of Computtion (Michel Sipser, 2005). Lecture notes from Pierre Wolper's course t http://www.montefiore.ulg.c.e/~pw/cours/clc.html

More information

CS 267: Automated Verification. Lecture 8: Automata Theoretic Model Checking. Instructor: Tevfik Bultan

CS 267: Automated Verification. Lecture 8: Automata Theoretic Model Checking. Instructor: Tevfik Bultan CS 267: Automted Verifiction Lecture 8: Automt Theoretic Model Checking Instructor: Tevfik Bultn LTL Properties Büchi utomt [Vrdi nd Wolper LICS 86] Büchi utomt: Finite stte utomt tht ccept infinite strings

More information

Previously on GLT. Basic technologies. Lexical analysis. Basic technologies ASF+SDF. Concepts of programming languages

Previously on GLT. Basic technologies. Lexical analysis. Basic technologies ASF+SDF. Concepts of programming languages Prevously on GLT Generc Lnguge Technology: Bsc technologes Pro.dr. Mrk vn den Brnd ASF+SDF syntx descrptons semntc descrptons: type checkng nlyss trnsormtons t so to s Concepts o progrmmng lnguges syntctc

More information

Chapter 7. Kleene s Theorem. 7.1 Kleene s Theorem. The following theorem is the most important and fundamental result in the theory of FA s:

Chapter 7. Kleene s Theorem. 7.1 Kleene s Theorem. The following theorem is the most important and fundamental result in the theory of FA s: Chpte 7 Kleene s Theoem 7.1 Kleene s Theoem The following theoem is the most impotnt nd fundmentl esult in the theoy of FA s: Theoem 6 Any lnguge tht cn e defined y eithe egul expession, o finite utomt,

More information

Complementing Büchi Automata with a Subset-tuple Construction

Complementing Büchi Automata with a Subset-tuple Construction DEPARTEMENT D INFORMATIQUE DEPARTEMENT FÜR INFORMATIK Bd de Pérolles 90 CH-1700 Friourg www.unifr.ch/informtics WORKING PAPER Complementing Büchi Automt with Suset-tuple Construction J. Allred & U. Ultes-Nitsche

More information

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique? XII. LINEAR ALGEBRA: SOLVING SYSTEMS OF EQUATIONS Tody we re going to tlk out solving systems of liner equtions. These re prolems tht give couple of equtions with couple of unknowns, like: 6= x + x 7=

More information

Design and Analysis of Distributed Interacting Systems

Design and Analysis of Distributed Interacting Systems Design nd Anlysis of Distriuted Intercting Systems Lecture 6 LTL Model Checking Prof. Dr. Joel Greenyer My 16, 2013 Some Book References (1) C. Bier, J.-P. Ktoen: Principles of Model Checking. The MIT

More information

Lecture V. Introduction to Space Groups Charles H. Lake

Lecture V. Introduction to Space Groups Charles H. Lake Lecture V. Introduction to Spce Groups 2003. Chrles H. Lke Outline:. Introduction B. Trnsltionl symmetry C. Nomenclture nd symols used with spce groups D. The spce groups E. Derivtion nd discussion of

More information

Section 6.1 Definite Integral

Section 6.1 Definite Integral Section 6.1 Definite Integrl Suppose we wnt to find the re of region tht is not so nicely shped. For exmple, consider the function shown elow. The re elow the curve nd ove the x xis cnnot e determined

More information

Discrete Time Process Algebra with Relative Timing

Discrete Time Process Algebra with Relative Timing Discrete Time Process Alger with Reltive Timing J.C.M. Beten nd M.A. Reniers Deprtment of Mthemtics nd Computing Science, Eindhoven University of Technology, P.O. Box 513, NL-5600 MB Eindhoven, The Netherlnds

More information

What else can you do?

What else can you do? Wht else cn you do? ngle sums The size of specil ngle types lernt erlier cn e used to find unknown ngles. tht form stright line dd to 180c. lculte the size of + M, if L is stright line M + L = 180c( stright

More information

Model Checking and Functional Program Transformations

Model Checking and Functional Program Transformations Model Checking nd Functionl Progrm Trnsformtions Axel Hddd LIAFA (Université Pris Diderot / CNRS) LIGM (Université Pris Est / CNRS) Astrct We study model for recursive functionl progrms clled higher order

More information

Models of Computation: Automata and Processes. J.C.M. Baeten

Models of Computation: Automata and Processes. J.C.M. Baeten Models of Computtion: Automt nd Processes J.C.M. Beten Jnury 4, 2010 ii Prefce Computer science is the study of discrete ehviour of intercting informtion processing gents. Here, ehviour is the centrl notion.

More information

20 MATHEMATICS POLYNOMIALS

20 MATHEMATICS POLYNOMIALS 0 MATHEMATICS POLYNOMIALS.1 Introduction In Clss IX, you hve studied polynomils in one vrible nd their degrees. Recll tht if p(x) is polynomil in x, the highest power of x in p(x) is clled the degree of

More information

i 1 i 2 i 3... i p o 1 o 2 AUTOMATON q 1, q 2,,q n ... o q Model of a automaton Characteristics of automaton:

i 1 i 2 i 3... i p o 1 o 2 AUTOMATON q 1, q 2,,q n ... o q Model of a automaton Characteristics of automaton: Definition of n Automton:-An Automton is defined s system tht preforms certin functions without humn intervention. it ccepts rw mteril nd energy s input nd converts them into the finl product under the

More information

STRUCTURE OF CONCURRENCY Ryszard Janicki. Department of Computing and Software McMaster University Hamilton, ON, L8S 4K1 Canada

STRUCTURE OF CONCURRENCY Ryszard Janicki. Department of Computing and Software McMaster University Hamilton, ON, L8S 4K1 Canada STRUCTURE OF CONCURRENCY Ryszrd Jnicki Deprtment of Computing nd Softwre McMster University Hmilton, ON, L8S 4K1 Cnd jnicki@mcmster.c 1 Introduction Wht is concurrency? How it cn e modelled? Wht re the

More information

Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University

Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University U.U.D.M. Project Report 07:4 Frey Frctions Rickrd Fernström Exmensrete i mtemtik, 5 hp Hledre: Andres Strömergsson Exmintor: Jörgen Östensson Juni 07 Deprtment of Mthemtics Uppsl University Frey Frctions

More information

Review of CFGs and Parsing I Context-free Languages and Grammars. Winter 2014 Costas Busch - RPI 1

Review of CFGs and Parsing I Context-free Languages and Grammars. Winter 2014 Costas Busch - RPI 1 Review of CFGs d Prsig I Cotext-free Lguges d Grmmrs Witer 2014 Costs Busch - RPI 1 Cotext-Free Lguges { b : { ww } 0} R Regulr Lguges *b* ( b) * Witer 2014 Costs Busch - RPI 2 Cotext-Free Lguges Cotext-Free

More information

Learning Goals. Relational Query Languages. Formal Relational Query Languages. Formal Query Languages: Relational Algebra and Relational Calculus

Learning Goals. Relational Query Languages. Formal Relational Query Languages. Formal Query Languages: Relational Algebra and Relational Calculus Forml Query Lnguges: Reltionl Alger nd Reltionl Clculus Chpter 4 Lerning Gols Given dtse ( set of tles ) you will e le to express dtse query in Reltionl Alger (RA), involving the sic opertors (selection,

More information

Improper Integrals. The First Fundamental Theorem of Calculus, as we ve discussed in class, goes as follows:

Improper Integrals. The First Fundamental Theorem of Calculus, as we ve discussed in class, goes as follows: Improper Integrls The First Fundmentl Theorem of Clculus, s we ve discussed in clss, goes s follows: If f is continuous on the intervl [, ] nd F is function for which F t = ft, then ftdt = F F. An integrl

More information

Global Types for Dynamic Checking of Protocol Conformance of Multi-Agent Systems

Global Types for Dynamic Checking of Protocol Conformance of Multi-Agent Systems Globl Types for Dynmic Checking of Protocol Conformnce of Multi-Agent Systems (Extended Abstrct) Dvide Ancon, Mtteo Brbieri, nd Vivin Mscrdi DIBRIS, University of Genov, Itly emil: dvide@disi.unige.it,

More information

Calculus Module C21. Areas by Integration. Copyright This publication The Northern Alberta Institute of Technology All Rights Reserved.

Calculus Module C21. Areas by Integration. Copyright This publication The Northern Alberta Institute of Technology All Rights Reserved. Clculus Module C Ares Integrtion Copright This puliction The Northern Alert Institute of Technolog 7. All Rights Reserved. LAST REVISED Mrch, 9 Introduction to Ares Integrtion Sttement of Prerequisite

More information

Postprint.

Postprint. http://www.div-portl.org Postprint This is the ccepted version of pper presented t Eighth Workshop on Non-Clssicl Models of utomt nd pplictions(ncm 2016). Cittion for the originl pulished pper: ensch,

More information

UniversitaireWiskundeCompetitie. Problem 2005/4-A We have k=1. Show that for every q Q satisfying 0 < q < 1, there exists a finite subset K N so that

UniversitaireWiskundeCompetitie. Problem 2005/4-A We have k=1. Show that for every q Q satisfying 0 < q < 1, there exists a finite subset K N so that Problemen/UWC NAW 5/7 nr juni 006 47 Problemen/UWC UniversitireWiskundeCompetitie Edition 005/4 For Session 005/4 we received submissions from Peter Vndendriessche, Vldislv Frnk, Arne Smeets, Jn vn de

More information

Prefix-Free Regular-Expression Matching

Prefix-Free Regular-Expression Matching Prefix-Free Regulr-Expression Mthing Yo-Su Hn, Yjun Wng nd Derik Wood Deprtment of Computer Siene HKUST Prefix-Free Regulr-Expression Mthing p.1/15 Pttern Mthing Given pttern P nd text T, find ll sustrings

More information

MTH 505: Number Theory Spring 2017

MTH 505: Number Theory Spring 2017 MTH 505: Numer Theory Spring 207 Homework 2 Drew Armstrong The Froenius Coin Prolem. Consider the eqution x ` y c where,, c, x, y re nturl numers. We cn think of $ nd $ s two denomintions of coins nd $c

More information

Separating Regular Languages with First-Order Logic

Separating Regular Languages with First-Order Logic Seprting Regulr Lnguges with First-Order Logic Thoms Plce Mrc Zeitoun LBRI, Bordeux University, Frnce firstnme.lstnme@lri.fr Astrct Given two lnguges, seprtor is third lnguge tht contins the first one

More information

LECTURE NOTE #12 PROF. ALAN YUILLE

LECTURE NOTE #12 PROF. ALAN YUILLE LECTURE NOTE #12 PROF. ALAN YUILLE 1. Clustering, K-mens, nd EM Tsk: set of unlbeled dt D = {x 1,..., x n } Decompose into clsses w 1,..., w M where M is unknown. Lern clss models p(x w)) Discovery of

More information

Looking for All Palindromes in a String

Looking for All Palindromes in a String Looking or All Plindromes in String Shih Jng Pn nd R C T Lee Deprtment o Computer Science nd Inormtion Engineering, Ntionl Chi-Nn University, Puli, Nntou Hsien,, Tiwn, ROC sjpn@lgdoccsiencnuedutw, rctlee@ncnuedutw

More information