Principles of Programming Languages Topic: Formal Languages II

Size: px
Start display at page:

Download "Principles of Programming Languages Topic: Formal Languages II"

Transcription

1 Principls of Programming Languags Topic: Formal Languags II CS 34,LS, LTM, BR: Formal Languags II

2 Rviw A grammar can b ambiguous i.. mor than on pars tr for sam string of trminals in a PL w want to bas maning on pars so ambiguous pars -> ambiguous maning -> Espcially grammars for xprssions prcdnc associativity x + y * z x + y * z x - y - z x - y - z CS 34,LS, LTM, BR: Formal Languags II 2

3 Rviw Solution: ncod prcdnc & associativity in grammar non-trminal for ach lvl of prcdnc + - <trm> * / <factor> for ach non-trminal: <nt> ::= <nt2> <nt> ::= <nt> + <nt2> (nt2 highr prcdnc) (lft associativ) CS 34,LS, LTM, BR: Formal Languags II 3

4 Rviw Contxt Fr Grammars (CFGs) ar usd to spcify th ovrall structur of a programming languag: if/thn/ls,... brackts: ( ), { }, bgin/nd,... Rgular Grammars (RGs) ar usd to spcify th structur of tokns: idntifirs, numbrs, kywords,... Not: Th rcognition problm for CFGs and RGs rquirs a diffrnt computational modl (mor on this latr). CS 34,LS, LTM, BR: Formal Languags II 4

5 Extndd BNF (EBNF) Writ nontrminals as in BNF. (Variant: Writ thm with initial capital lttrs, or using a diffrnt font.) Us additional mtasymbols, as shortcuts: { } mans rpat th nclosd txt zro or mor tims [ ] mans th nclosd txt is optional ( ) is usd for grouping, usually with th altrnation symbol,.g., (...). If { }, [ ], or ( ) ar usd as trminal symbols in th languag bing dfind, thn thy must b quotd. (Variant: Thy must b undrlind.) CS 34,LS, LTM, BR: Formal Languags II 5

6 Formal Languag Thory Offrs a way to dscrib computation problms formulatd as languag rcognition problms Enabls proofs of rlativ difficulty of crtain computational problms Provids a mchanism to aid dscription of programming languag constructs Rgular xprssions ~ PL tokns (.g., kywords) Finit stat automata (FSAs) Contxt-fr grammars ~ PL statmnts CS 34,LS, LTM, BR: Formal Languags II 6

7 Formal Languag Thory Rcognizrs for languags ar mor complx as th languags thmslvs bcom mor complx Simpl constructs corrspond to FSAs Kywords, numrical constants Mor complxt constructs corrspond to Push-down Automata If statmnts, looping statmnts, dclarations Evn mor complx constructs corrspond to mor complx automata Typ chcking of us with dclard typ CS 34,LS, LTM, BR: Formal Languags II 7

8 Rgular Exprssions Formalism for dscribing simpl PL constructs rsrvd words idntifirs numbrs Simplst sort of structur Rcognizd by a finit stat automaton Dfind rcursivly CS 34,LS, LTM, BR: Formal Languags II 8

9 PL construct Rgular Exprssions RE Notation Languag an mpty RE { } symbol a a {a} null symbol {} R,S rgular xprs R S L R»L S a,b trminals a b (altrnation) {a,b} R,S rgular xprs RS L R L S a,b trminals ab (concatnation) {ab} CS 34,LS, LTM, BR: Formal Languags II 9

10 Rgular Exprssions PL construct RE Notation Languag R,S rgular xprs R * { }» L R» L R L R» L R L R L R a a * {,a,aa,aaa, } R,S rgular xprs R + L R» L R L R» L R L R L R... a a + {a,aa,aaa, } Not: a = a = a Prcdnc is {* +} ----concatnation ---- high to low (all ar lft associativ oprators) CS 34,LS, LTM, BR: Formal Languags II

11 RE Exampls 2 {,2} * 2 {2,,,,, } 2 * {, 2, 22, 222, } 2 * + {,,,,,2,22, } ( 2) * {,,2,2,,2,22, } ( ) * Binary numbrs that nd in CS 34,LS, LTM, BR: Formal Languags II

12 RE s s for PLs Lt lttr stand for a b c z and digit stand for Loudn uss [-9] lttr (lttr digit) * is idntifir [a-z]([a-z] [-9])* digit + is an intgr constant [-9]+ digit *. digit + is ral numbr [-9]* \. [-9]+ Which idntifirs ar dscribd by lttr (lttr digit) *? ABC C B% X CS 34,LS, LTM, BR: Formal Languags II 2

13 Exampls Which of th following ar lgal ral numbrs dscribd by digit *. digit +? Can s that simpl PL constructs can b dfind as rgular xprssions Can you dfin a numbr in scintific notation as an RE? (.g.,.25+2) CS 34,LS, LTM, BR: Formal Languags II 3

14 Finit Stat Automaton (FA) Dscribd by <st of stats, lablld transitions, start stat, final stat(s)> Exampl: <{S,S,S2}, S ---> S, S, {S,S2}> S ---> S2 start S S S2 CS 34,LS, LTM, BR: Formal Languags II 4

15 Finit Stat Automaton (FA) FA accpts or rcognizs an input string iff thr is a path from its start stat to a final stat such that th labls on th path ar th trminals in that string. start S S2 S inputs: stats: S S S2 S S What strings ar rcognizd? transition tabl CS 34,LS, LTM, BR: Formal Languags II 5

16 Finit Stat Automaton (FA) Binary numbrs containing a pair of adjacnt s: start FA S S2 S S3, S S S2 S S S2 S2 S S3 S3 S3 S3 Rcognizs: ( ) * ( ) * CS 34,LS, LTM, BR: Formal Languags II 6

17 Finit Stat Automaton (FA) Binary numbrs containing a pair of adjacnt s: FA2 start, A B C Rcognizs: ( ) * ( ) * FA and FA2 rcogniz th sam st of strings, i.., th sam languag! Thrfor, FAs ar not uniqu. CS 34,LS, LTM, BR: Formal Languags II 7

18 Finit Stat Automaton (FA) Exponnt in scintific notation: start E +,- digit S S S2 digit S3 digit Rcognizs: E (+ -) digit + E digit + CS 34,LS, LTM, BR: Formal Languags II 8

19 Finit Stat Automaton (FA) Binary numbrs which bgin and nd with a : start S S S2 Rcognizs: ( ) * CS 34,LS, LTM, BR: Formal Languags II 9

20 Finit Stat Automaton (FA) Binary numbrs containing at last on digit, in which all th s prcd all th s: start S S S2 Rcognizs: + + * CS 34,LS, LTM, BR: Formal Languags II 2

21 Practical Uss of RE s As grammar for PL tokns (idntifir, float constant, tc) In tools for finding/changing in programs & txt grp sd awk CS 34,LS, LTM, BR: Formal Languags II 2

22 Tasks for REs and FAs Rcognition of a string Is this givn string in th languag dscribd (rcognizd) by this givn RE (FA)? Dscription of a languag Givn an RE (FA), what languag dos it dscrib (rcogniz)? Codification of a languag Givn a languag, find an RE and an FA that corrsponds to it CS 34,LS, LTM, BR: Formal Languags II 22

23 Tasks for REs and FAs Rcognition of a string Givn *, which of ths strings is dscribd by it:,,,, Givn th following FA: S S which of ths strings is rcognizd by it:,,,, CS 34,LS, LTM, BR: Formal Languags II 23

24 Tasks for REs and FAs Dscription of a languag What languag is dscribd by th following RE: () + () + What languag is rcognizd by th following FA: S S S2 S3 S4 CS 34,LS, LTM, BR: Formal Languags II 24

25 Tasks for REs and FAs Dscription of a languag What languag is rcognizd by th following FA: S S S2 S3 S4 CS 34,LS, LTM, BR: Formal Languags II 25

26 Tasks for REs and FAs Codification of a languag Complx constants ar parnthsizd pairs of intgrs Lt digit = Th RE for complx constants is: ( digit +, digit + ) Th FA for complx constants is: digit digit (, ) S S digit S2 S3 digit S4 S5 CS 34,LS, LTM, BR: Formal Languags II 26

27 Nondtrministic FAs Exampls so far hav bn dtrministic finit stat automata (DFAs). To construct nondtrministic finit stat automata (NFAs): Allow mor than on transition with th sam labl. Allow transition. Rcogniz an input string iff thr is som path from th start stat to a final stat such that th labls on th path ar th trminals in th string. CS 34,LS, LTM, BR: Formal Languags II 27

28 DFAs vs. NFAs Rgular Exprssion: DFA: start ( ) * ( ) * C, A B NFA: start X, Y Z, CS 34,LS, LTM, BR: Formal Languags II 28

29 DFAs vs. NFAs Rgular Exprssion: + + DFA: start S2 S S S3 NFA: start S S S2 S3 CS 34,LS, LTM, BR: Formal Languags II 29

30 Constructing FAs from REs Thr is a systmatic translation from a Rgular Exprssion (RE) to a Nondtrministic Finit Stat Automaton (NFA). Thr is a translation from th rsulting NFA into a Dtrministic Finit Stat Automaton (DFA) that rcognizs th sam languag. This procss can b automatd! CS 34,LS, LTM, BR: Formal Languags II 3

31 RE to NFA For a in alphabt, construct: For, construct: start a For s,t REs, construct s t:.g., N(s) N(t) CS 34,LS, LTM, BR: Formal Languags II 3

32 RE to NFA For s,t REs, construct st:.g., N(s) N(t) For s RE, construct s * : N(s).g., * CS 34,LS, LTM, BR: Formal Languags II 32

33 Exampl Build th NFA for complx numbrs using this RE: ( digit +, digit + ). digit digit + digit Not this is sam as Kln * machin xcpt for bottom transition CS 34,LS, LTM, BR: Formal Languags II 33

34 digit +, Exampl digit, digit +, digit + digit, digit CS 34,LS, LTM, BR: Formal Languags II 34

35 Exampl ( digit +, digit + ) ( digit, digit ) Q: Can w mak this NFA mor fficint by convrting it into a DFA? CS 34,LS, LTM, BR: Formal Languags II 35

36 (c d ) * dd c,d d NFA to DFA d S S S2 Ida: look for sts of stats with sam transitions. Lt on stat in th DFA rprsnt st of stats in th NFA S on c to {S} S on d to {S,S} {S,S} on c to {S} {S,S} on d to {S,S,S2} {S,S,S2} on c to {S} {S,S,S2} on d to {S,S,S2} c {S} d c {S,S} c d {S,S,S2} d CS 34,LS, LTM, BR: Formal Languags II 36

37 NFA to DFA ( digit, digit S S S2 S3 S4 S5 S6 S7 S8 S9 Ida: look for sts of stats with sam transitions. Lt on stat in th DFA rprsnt st of stats in th NFA From S with ( to {S}. From S with digit to {S2,S3,S4} From S2,S3 with digit to {S2,S3,S4} From S3,S4 with, to {S5} From S5 with digit to {S6,S7,S8} From S6,S7 with digit to {S6,S7,S8} From S7,S8 with ) to {S9} ) CS 34,LS, LTM, BR: Formal Languags II 37

38 NFA to DFA digit digit ( digit, digit ) S S S234 S5 S678 S9 From S with ( to {S}. From S with digit to {S2,S3,S4} From S2,S3 with digit to {S2,S3,S4} From S3,S4 with, to {S5} From S5 with digit to {S6,S7,S8} From S6,S7 with digit to {S6,S7,S8} From S7,S8 with ) to {S9} CS 34,LS, LTM, BR: Formal Languags II 38

39 Th Chomsky Hirarchy Typ : Arbitrary Languags Rcognizd by: Turing Machins Typ : Contxt Snsitiv Languags Typ 2: Contxt Fr Languags Gnratd by: Contxt Fr Grammars Rcognizd by: Push-Down Automata Typ 3: Rgular Languags Gnratd by: Rgular Grammars Dscribd by: Rgular Exprssions Rcognizd by: Finit Stat Automata CS 34,LS, LTM, BR: Formal Languags II 39

40 Contxt Fr Languags Rcognizd by: Push-down automata (in thory) Parsrs (in practic) Parsing Stratgis: Bottom-up Top-down Parsing Algorithms: Nondtrministic Dtrministic <xpr > <xpr > + <xpr > <trm> <trm> <factor > <var > x <trm > * <trm > <factor > <factor > <num> <var > 3 y CS 34,LS, LTM, BR: Formal Languags II 4

Shift. Reduce. Review: Shift-Reduce Parsing. Bottom-up parsing uses two actions: Bottom-Up Parsing II. ABC xyz ABCx yz. Lecture 8.

Shift. Reduce. Review: Shift-Reduce Parsing. Bottom-up parsing uses two actions: Bottom-Up Parsing II. ABC xyz ABCx yz. Lecture 8. Rviw: Shift-Rduc Parsing Bottom-up parsing uss two actions: Bottom-Up Parsing II Lctur 8 Shift ABC xyz ABCx yz Rduc Cbxy ijk CbA ijk Prof. Aikn CS 13 Lctur 8 1 Prof. Aikn CS 13 Lctur 8 2 Rcall: h Stack

More information

Building a Scanner, Part I

Building a Scanner, Part I COMP 506 Ric Univrsity Spring 2018 Building a Scannr, Part I sourc cod IR Front End Optimizr Back End IR targt cod Copyright 2018, Kith D. Coopr & Linda Torczon, all rights rsrvd. Studnts nrolld in Comp

More information

Summary: Semantic Analysis

Summary: Semantic Analysis Summary: Smantic Analysis Chck rrors not dtctd by lxical or syntax analysis Intrmdiat Cod Scop rrors: Variabls not dfind Multipl dclarations Typ rrors: Assignmnt of valus of diffrnt typs Invocation of

More information

Midterm 2 - Solutions 1

Midterm 2 - Solutions 1 COS 26 Gnral Computr Scinc Spring 999 Midtrm 2 - Solutions. Writ a C function int count(char s[ ]) that taks as input a \ trminatd string and outputs th numbr of charactrs in th string (not including th

More information

Formal Languages. Formal Languages

Formal Languages. Formal Languages Regular expressions Formal Languages Finite state automata Deterministic Non-deterministic Review of BNF Introduction to Grammars Regular grammars Formal Languages, CS34 Fall2 BGRyder Formal Languages

More information

Systems in Three Variables. No solution No point lies in all three planes. One solution The planes intersect at one point.

Systems in Three Variables. No solution No point lies in all three planes. One solution The planes intersect at one point. 3-5 Systms in Thr Variabls TEKS FOCUS VOCABULARY TEKS (3)(B) Solv systms of thr linar quations in thr variabls by using Gaussian limination, tchnology with matrics, and substitution. Rprsntation a way

More information

Presentation for use with the textbook, Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, Directed Graphs BOS SFO

Presentation for use with the textbook, Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, Directed Graphs BOS SFO Prsntation for us with th txtbook, Algorithm Dsign and Applications, by M. T. Goodrich and R. Tamassia, Wily, 2015 Dirctd Graphs BOS ORD JFK SFO LAX DFW MIA 2015 Goodrich and Tamassia Dirctd Graphs 1 Digraphs

More information

MIT Specifying Languages with Regular Expressions and Context-Free Grammars. Martin Rinard Massachusetts Institute of Technology

MIT Specifying Languages with Regular Expressions and Context-Free Grammars. Martin Rinard Massachusetts Institute of Technology MIT 6.035 Specifying Languages with Regular essions and Context-Free Grammars Martin Rinard Massachusetts Institute of Technology Language Definition Problem How to precisely define language Layered structure

More information

MIT Specifying Languages with Regular Expressions and Context-Free Grammars

MIT Specifying Languages with Regular Expressions and Context-Free Grammars MIT 6.035 Specifying Languages with Regular essions and Context-Free Grammars Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology Language Definition Problem How to precisely

More information

Spectral sensitivity and color formats

Spectral sensitivity and color formats FirWir camras Spctral snsitivity and color formats At th "input" of a camra, w hav a CCD chip. It transforms photons into lctrons. Th spctral snsitivity of this transformation is an important charactristic

More information

R10 SET a) Construct a DFA that accepts an identifier of a C programming language. b) Differentiate between NFA and DFA?

R10 SET a) Construct a DFA that accepts an identifier of a C programming language. b) Differentiate between NFA and DFA? R1 SET - 1 1. a) Construct a DFA that accepts an identifier of a C programming language. b) Differentiate between NFA and DFA? 2. a) Design a DFA that accepts the language over = {, 1} of all strings that

More information

1. Trace the array for Bubble sort 34, 8, 64, 51, 32, 21. And fill in the following table

1. Trace the array for Bubble sort 34, 8, 64, 51, 32, 21. And fill in the following table 1. Trac th array for Bubbl sort 34, 8, 64, 51, 3, 1. And fill in th following tabl bubbl(intgr Array x, Intgr n) Stp 1: Intgr hold, j, pass; Stp : Boolan switchd = TRUE; Stp 3: for pass = 0 to (n - 1 &&

More information

Formal Languages and Compilers Lecture IV: Regular Languages and Finite. Finite Automata

Formal Languages and Compilers Lecture IV: Regular Languages and Finite. Finite Automata Formal Languages and Compilers Lecture IV: Regular Languages and Finite Automata Free University of Bozen-Bolzano Faculty of Computer Science POS Building, Room: 2.03 artale@inf.unibz.it http://www.inf.unibz.it/

More information

" dx v(x) $ % You may also have seen this written in shorthand form as. & ' v(x) + u(x) '# % ! d

 dx v(x) $ % You may also have seen this written in shorthand form as. & ' v(x) + u(x) '# % ! d Calculus II MAT 146 Mthods of Intgration: Intgration by Parts Just as th mthod of substitution is an intgration tchniqu that rvrss th drivativ procss calld th chain rul, Intgration by parts is a mthod

More information

About Notes And Symbols

About Notes And Symbols About Nots And Symbols by Batric Wildr Contnts Sht 1 Sht 2 Sht 3 Sht 4 Sht 5 Sht 6 Sht 7 Sht 8 Sht 9 Sht 10 Sht 11 Sht 12 Sht 13 Sht 14 Sht 15 Sht 16 Sht 17 Sht 18 Sht 19 Sht 20 Sht 21 Sht 22 Sht 23 Sht

More information

The Network Layer: Routing Algorithms. The Network Layer: Routing & Addressing Outline

The Network Layer: Routing Algorithms. The Network Layer: Routing & Addressing Outline PS 6 Ntwork Programming Th Ntwork Layr: Routing lgorithms Michl Wigl partmnt of omputr Scinc lmson Univrsity mwigl@cs.clmson.du http://www.cs.clmson.du/~mwigl/courss/cpsc6 Th Ntwork Layr: Routing & ddrssing

More information

CPSC 826 Internetworking. The Network Layer: Routing & Addressing Outline. The Network Layer: Routing Algorithms. Routing Algorithms Taxonomy

CPSC 826 Internetworking. The Network Layer: Routing & Addressing Outline. The Network Layer: Routing Algorithms. Routing Algorithms Taxonomy PS Intrntworking Th Ntwork Layr: Routing & ddrssing Outlin Th Ntwork Layr: Routing lgorithms Michl Wigl partmnt of omputr Scinc lmson Univrsity mwigl@cs.clmson.du Novmbr, Ntwork layr functions Routr architctur

More information

Recorder Variables. Defining Variables

Recorder Variables. Defining Variables Rcordr Variabls Dfining Variabls Simpl Typs Complx Typs List of Rsrvd Words Using Variabls Stting Action Paramtrs Parsing Lists and Tabls Gtting Valu from Lists and Tabls Using Indxs with Lists Using Indxs

More information

Register Allocation. Register Allocation

Register Allocation. Register Allocation Rgistr Allocation Jingk Li Portlan Stat Univrsity Jingk Li (Portlan Stat Univrsity) CS322 Rgistr Allocation 1 / 28 Rgistr Allocation Assign an unboun numbr of tmporaris to a fix numbr of rgistrs. Exampl:

More information

Interfacing the DP8420A 21A 22A to the AN-538

Interfacing the DP8420A 21A 22A to the AN-538 Intrfacing th DP8420A 21A 22A to th 68000 008 010 INTRODUCTION This application not xplains intrfacing th DP8420A 21A 22A DRAM controllr to th 68000 Thr diffrnt dsigns ar shown and xplaind It is assumd

More information

CS 314 Principles of Programming Languages. Lecture 3

CS 314 Principles of Programming Languages. Lecture 3 CS 314 Principles of Programming Languages Lecture 3 Zheng Zhang Department of Computer Science Rutgers University Wednesday 14 th September, 2016 Zheng Zhang 1 CS@Rutgers University Class Information

More information

The Size of the 3D Visibility Skeleton: Analysis and Application

The Size of the 3D Visibility Skeleton: Analysis and Application Th Siz of th 3D Visibility Sklton: Analysis and Application Ph.D. thsis proposal Linqiao Zhang lzhang15@cs.mcgill.ca School of Computr Scinc, McGill Univrsity March 20, 2008 thsis proposal: Th Siz of th

More information

Comment (justification for change) by the MB

Comment (justification for change) by the MB Editor's disposition s CD2 19763-12 as at 2013-11-03 Srial Annx (.g. 3.1) Figur/ Tabl/t (.g. Tabl 1) 001 CA 00 All All - G Canada disapprovs th draft for th rasons blow. 002 GB 01 Gnral d numbring has

More information

Problem Set 1 (Due: Friday, Sept. 29, 2017)

Problem Set 1 (Due: Friday, Sept. 29, 2017) Elctrical and Computr Enginring Mmorial Univrsity of Nwfoundland ENGI 9876 - Advancd Data Ntworks Fall 2017 Problm St 1 (Du: Friday, Spt. 29, 2017) Qustion 1 Considr a communications path through a packt

More information

Introduction to Data Mining

Introduction to Data Mining Introduction to Data Mining Lctur #15: Clustring-2 Soul National Univrsity 1 In Tis Lctur Larn t motivation and advantag of BFR, an xtnsion of K-mans to vry larg data Larn t motivation and advantag of

More information

Greedy Algorithms. Interval Scheduling. Greedy Algorithm. Optimality. Greedy Algorithm (cntd) Greed is good. Greed is right. Greed works.

Greedy Algorithms. Interval Scheduling. Greedy Algorithm. Optimality. Greedy Algorithm (cntd) Greed is good. Greed is right. Greed works. Algorithm Grdy Algorithm 5- Grdy Algorithm Grd i good. Grd i right. Grd work. Wall Strt Data Structur and Algorithm Andri Bulatov Algorithm Grdy Algorithm 5- Algorithm Grdy Algorithm 5- Intrval Schduling

More information

2018 How to Apply. Application Guide. BrandAdvantage

2018 How to Apply. Application Guide. BrandAdvantage 2018 How to Apply Application Guid BrandAdvantag Contnts Accssing th Grant Sit... 3 Wlcom pag... 3 Logging in To Pub Charity... 4 Rgistration for Nw Applicants ( rgistr now )... 5 Organisation Rgistration...

More information

Type & Media Page 1. January 2014 Libby Clarke

Type & Media Page 1. January 2014 Libby Clarke Nam: 1 In ordr to hlp you s your progrss at th nd of this ntir xrcis, you nd to provid som vidnc of your starting point. To start, draw th a on th lft into th box to th right, dpicting th sam siz and placmnt.

More information

CS5371 Theory of Computation. Lecture 8: Automata Theory VI (PDA, PDA = CFG)

CS5371 Theory of Computation. Lecture 8: Automata Theory VI (PDA, PDA = CFG) CS5371 Theory of Computation Lecture 8: Automata Theory VI (PDA, PDA = CFG) Objectives Introduce Pushdown Automaton (PDA) Show that PDA = CFG In terms of descriptive power Pushdown Automaton (PDA) Roughly

More information

Lesson Focus: Finding Equivalent Fractions

Lesson Focus: Finding Equivalent Fractions Lsson Plans: Wk of 1-26-15 M o n Bindrs: /Math;; complt on own, thn chck togthr Basic Fact Practic Topic #10 Lsson #5 Lsson Focus: Finding Equivalnt Fractions *Intractiv Larning/Guidd Practic-togthr in

More information

Context-Free Grammars

Context-Free Grammars Context-Free Grammars 1 Informal Comments A context-free grammar is a notation for describing languages. It is more powerful than finite automata or RE s, but still cannot define all possible languages.

More information

Objectives. Two Ways to Implement Lists. Lists. Chapter 24 Implementing Lists, Stacks, Queues, and Priority Queues

Objectives. Two Ways to Implement Lists. Lists. Chapter 24 Implementing Lists, Stacks, Queues, and Priority Queues Chaptr 24 Implmnting Lists, Stacks, Quus, and Priority Quus CS2: Data Structurs and Algorithms Colorado Stat Univrsity Original slids by Danil Liang Modifid slids by Chris Wilcox Objctivs q To dsign common

More information

TCP Congestion Control. Congestion Avoidance

TCP Congestion Control. Congestion Avoidance TCP Congstion Control TCP sourcs chang th snding rat by modifying th window siz: Window = min {Advrtisd window, Congstion Window} Rcivr Transmittr ( cwnd ) In othr words, snd at th rat of th slowst componnt:

More information

CS 314 Principles of Programming Languages

CS 314 Principles of Programming Languages CS 314 Principles of Programming Languages Lecture 2: Syntax Analysis Zheng (Eddy) Zhang Rutgers University January 22, 2018 Announcement First recitation starts this Wednesday Homework 1 will be release

More information

Languages and Compilers

Languages and Compilers Principles of Software Engineering and Operational Systems Languages and Compilers SDAGE: Level I 2012-13 3. Formal Languages, Grammars and Automata Dr Valery Adzhiev vadzhiev@bournemouth.ac.uk Office:

More information

Introduction to Parsing. Lecture 5

Introduction to Parsing. Lecture 5 Introduction to Parsing Lecture 5 1 Outline Regular languages revisited Parser overview Context-free grammars (CFG s) Derivations Ambiguity 2 Languages and Automata Formal languages are very important

More information

8.3 INTEGRATION BY PARTS

8.3 INTEGRATION BY PARTS 8.3 Intgration By Parts Contmporary Calculus 8.3 INTEGRATION BY PARTS Intgration by parts is an intgration mthod which nabls us to find antidrivativs of som nw functions such as ln(x) and arctan(x) as

More information

Introduction to Parsing. Lecture 5

Introduction to Parsing. Lecture 5 Introduction to Parsing Lecture 5 1 Outline Regular languages revisited Parser overview Context-free grammars (CFG s) Derivations Ambiguity 2 Languages and Automata Formal languages are very important

More information

Gernot Hoffmann Sphere Tessellation by Icosahedron Subdivision. Contents

Gernot Hoffmann Sphere Tessellation by Icosahedron Subdivision. Contents Grnot Hoffmann Sphr Tssllation by Icosahdron Subdivision Contnts 1. Vrtx Coordinats. Edg Subdivision 3 3. Triangl Subdivision 4 4. Edg lngths 5 5. Normal Vctors 6 6. Subdividd Icosahdrons 7 7. Txtur Mapping

More information

Vignette to package samplingdatacrt

Vignette to package samplingdatacrt Vigntt to packag samplingdatacrt Diana Trutschl Contnts 1 Introduction 1 11 Objctiv 1 1 Diffrnt study typs 1 Multivariat normal distributd data for multilvl data 1 Fixd ffcts part Random part 9 3 Manual

More information

Intersection-free Dual Contouring on Uniform Grids: An Approach Based on Convex/Concave Analysis

Intersection-free Dual Contouring on Uniform Grids: An Approach Based on Convex/Concave Analysis Intrsction-fr Dual Contouring on Uniform Grids: An Approach Basd on Convx/Concav Analysis Charli C. L. Wang Dpartmnt of Mchanical and Automation Enginring, Th Chins Univrsity of Hong Kong E-mail: cwang@ma.cuhk.du.hk

More information

Skyup's Media. PART-B 2) Construct a Mealy machine which is equivalent to the Moore machine given in table.

Skyup's Media. PART-B 2) Construct a Mealy machine which is equivalent to the Moore machine given in table. Code No: XXXXX JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY, HYDERABAD B.Tech II Year I Semester Examinations (Common to CSE and IT) Note: This question paper contains two parts A and B. Part A is compulsory

More information

Multiple Choice Questions

Multiple Choice Questions Techno India Batanagar Computer Science and Engineering Model Questions Subject Name: Formal Language and Automata Theory Subject Code: CS 402 Multiple Choice Questions 1. The basic limitation of an FSM

More information

JNTUWORLD. Code No: R

JNTUWORLD. Code No: R Code No: R09220504 R09 SET-1 B.Tech II Year - II Semester Examinations, April-May, 2012 FORMAL LANGUAGES AND AUTOMATA THEORY (Computer Science and Engineering) Time: 3 hours Max. Marks: 75 Answer any five

More information

Formal Languages and Compilers Lecture VI: Lexical Analysis

Formal Languages and Compilers Lecture VI: Lexical Analysis Formal Languages and Compilers Lecture VI: Lexical Analysis Free University of Bozen-Bolzano Faculty of Computer Science POS Building, Room: 2.03 artale@inf.unibz.it http://www.inf.unibz.it/ artale/ Formal

More information

FSP Synthesis of an off-set five bar-slider mechanism with variable topology

FSP Synthesis of an off-set five bar-slider mechanism with variable topology FSP Synthsis of an off-st fiv bar-slidr mchanism with variabl topology Umsh. M. Daivagna 1*, Shrinivas. S. Balli 2 1 Dpartmnt of Mchanical Enginring, S.T.J.Institut of Tchnology, Ranbnnur, India 2 Dpt.

More information

Tillförlitlig dimensionering mot utmattning UTMIS Vårmöte 2018 på Högskolan i Skövde

Tillförlitlig dimensionering mot utmattning UTMIS Vårmöte 2018 på Högskolan i Skövde Tillförlitlig dimnsionring mot utmattning UTMIS Vårmöt 2018 på Högskolan i Skövd Rami Mansour & Mårtn Olsson KTH Hållfasthtslära mart@kth.s ramimans@kth.s Introduction Ovrviw of rliabl dsign Traditional

More information

A New Algorithm for Solving Shortest Path Problem on a Network with Imprecise Edge Weight

A New Algorithm for Solving Shortest Path Problem on a Network with Imprecise Edge Weight Availabl at http://pvamudu/aam Appl Appl Math ISSN: 193-9466 Vol 6, Issu (Dcmbr 011), pp 60 619 Applications and Applid Mathmatics: An Intrnational Journal (AAM) A Nw Algorithm for Solving Shortst Path

More information

EE 231 Fall EE 231 Homework 10 Due November 5, 2010

EE 231 Fall EE 231 Homework 10 Due November 5, 2010 EE 23 Fall 2 EE 23 Homwork Du Novmbr 5, 2. Dsign a synhronous squntial iruit whih gnrats th following squn. (Th squn should rpat itslf.) (a) Draw a stat transition diagram for th iruit. This is a systm

More information

The semantic WEB Roles of XML & RDF

The semantic WEB Roles of XML & RDF Th smantic WEB Rols of XML & RDF STEFAN DECKER AND SERGEY MELNIK FRANK VAN HARMELEN, DIETER FENSEL, AND MICHEL KLEIN JEEN BROEKSTRA MICHAEL ERDMANN IAN HORROCKS Prsntd by: Iniyai Thiruvalluvan CSCI586

More information

DO NOW Geometry Regents Lomac Date. due. Similar by Transformation 6.1 J'' J''' J'''

DO NOW Geometry Regents Lomac Date. due. Similar by Transformation 6.1 J'' J''' J''' DO NOW Gomtry Rgnts Lomac 2014-2015 Dat. du. Similar by Transformation 6.1 (DN) Nam th thr rigid transformations and sktch an xampl that illustrats ach on. Nam Pr LO: I can dscrib a similarity transformation,

More information

CMSC 330: Organization of Programming Languages. Architecture of Compilers, Interpreters

CMSC 330: Organization of Programming Languages. Architecture of Compilers, Interpreters : Organization of Programming Languages Context Free Grammars 1 Architecture of Compilers, Interpreters Source Scanner Parser Static Analyzer Intermediate Representation Front End Back End Compiler / Interpreter

More information

Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and

Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and Computer Language Theory Chapter 4: Decidability 1 Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and

More information

Motivation. Synthetic OOD concepts and reuse Lecture 4: Separation of concerns. Problem. Solution. Deleting composites that share parts. Or is it?

Motivation. Synthetic OOD concepts and reuse Lecture 4: Separation of concerns. Problem. Solution. Deleting composites that share parts. Or is it? Synthtic OOD concpts and rus Lctur 4: Sparation of concrns Topics: Complx concrn: Mmory managmnt Exampl: Complx oprations on composit structurs Problm: Mmory laks Solution: Rfrnc counting Motivation Suppos

More information

Formal Languages and Grammars. Chapter 2: Sections 2.1 and 2.2

Formal Languages and Grammars. Chapter 2: Sections 2.1 and 2.2 Formal Languages and Grammars Chapter 2: Sections 2.1 and 2.2 Formal Languages Basis for the design and implementation of programming languages Alphabet: finite set Σ of symbols String: finite sequence

More information

(a) R=01[((10)*+111)*+0]*1 (b) ((01+10)*00)*. [8+8] 4. (a) Find the left most and right most derivations for the word abba in the grammar

(a) R=01[((10)*+111)*+0]*1 (b) ((01+10)*00)*. [8+8] 4. (a) Find the left most and right most derivations for the word abba in the grammar Code No: R05310501 Set No. 1 III B.Tech I Semester Regular Examinations, November 2008 FORMAL LANGUAGES AND AUTOMATA THEORY (Computer Science & Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE

More information

Derivations of a CFG. MACM 300 Formal Languages and Automata. Context-free Grammars. Derivations and parse trees

Derivations of a CFG. MACM 300 Formal Languages and Automata. Context-free Grammars. Derivations and parse trees Derivations of a CFG MACM 300 Formal Languages and Automata Anoop Sarkar http://www.cs.sfu.ca/~anoop strings grow on trees strings grow on Noun strings grow Object strings Verb Object Noun Verb Object

More information

CSE 272 Assignment 1

CSE 272 Assignment 1 CSE 7 Assignmnt 1 Kui-Chun Hsu Task 1: Comput th irradianc at A analytically (point light) For point light, first th nrgy rachd A was calculatd, thn th nrgy was rducd by a factor according to th angl btwn

More information

I have read and understand all of the instructions below, and I will obey the Academic Honor Code.

I have read and understand all of the instructions below, and I will obey the Academic Honor Code. Midterm Exam CS 341-451: Foundations of Computer Science II Fall 2014, elearning section Prof. Marvin K. Nakayama Print family (or last) name: Print given (or first) name: I have read and understand all

More information

FLASHING CHRISTMAS TREE KIT

FLASHING CHRISTMAS TREE KIT R4 FLASHING CHRISTMAS TREE KIT 9 10 8 7 11 6 R3 12 T4 C4 5 T3 R5 R7 13 C3 C2 4 14 R1 T2 R6 3 OWNER S MANUAL T1 R8 15 2 C1 R2 1 16 Cat. No. 277-8001 CUSTOM MANUFACTURED FOR TANDY CORPORATION LTD ASSEMBLY

More information

Regular Languages and Regular Expressions

Regular Languages and Regular Expressions Regular Languages and Regular Expressions According to our definition, a language is regular if there exists a finite state automaton that accepts it. Therefore every regular language can be described

More information

QUESTION BANK. Formal Languages and Automata Theory(10CS56)

QUESTION BANK. Formal Languages and Automata Theory(10CS56) QUESTION BANK Formal Languages and Automata Theory(10CS56) Chapter 1 1. Define the following terms & explain with examples. i) Grammar ii) Language 2. Mention the difference between DFA, NFA and εnfa.

More information

Compiling: Examples and Sample Problems

Compiling: Examples and Sample Problems REs for Kywors Compiling: Exmpls n mpl Prolms IC312 Mchin-Lvl n ystms Progrmming Hnri Csnov (hnric@hwii.u) It is sy to fin RE tht scris ll kywors Ky = if ls for whil int.. Ths cn split in groups if n Kywor

More information

Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 10.

Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 10. Code No: 134BD Set No. 1 JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech. II Year II Sem., I Mid-Term Examinations, February - 2018 FORMAL LANGUAGES AND AUTOMATA THEORY Objective Exam Name:

More information

QUESTION BANK. Unit 1. Introduction to Finite Automata

QUESTION BANK. Unit 1. Introduction to Finite Automata QUESTION BANK Unit 1 Introduction to Finite Automata 1. Obtain DFAs to accept strings of a s and b s having exactly one a.(5m )(Jun-Jul 10) 2. Obtain a DFA to accept strings of a s and b s having even

More information

HEAD DETECTION AND TRACKING SYSTEM

HEAD DETECTION AND TRACKING SYSTEM HEAD DETECTION AND TRACKING SYSTEM Akshay Prabhu 1, Nagacharan G Tamhankar 2,Ashutosh Tiwari 3, Rajsh N(Assistant Profssor) 4 1,2,3,4 Dpartmnt of Information Scinc and Enginring,Th National Institut of

More information

CSCE 314 Programming Languages

CSCE 314 Programming Languages CSCE 314 Programming Languages Syntactic Analysis Dr. Hyunyoung Lee 1 What Is a Programming Language? Language = syntax + semantics The syntax of a language is concerned with the form of a program: how

More information

CT32 COMPUTER NETWORKS DEC 2015

CT32 COMPUTER NETWORKS DEC 2015 Q.2 a. Using the principle of mathematical induction, prove that (10 (2n-1) +1) is divisible by 11 for all n N (8) Let P(n): (10 (2n-1) +1) is divisible by 11 For n = 1, the given expression becomes (10

More information

Midterm I (Solutions) CS164, Spring 2002

Midterm I (Solutions) CS164, Spring 2002 Midterm I (Solutions) CS164, Spring 2002 February 28, 2002 Please read all instructions (including these) carefully. There are 9 pages in this exam and 5 questions, each with multiple parts. Some questions

More information

Context-Free Languages & Grammars (CFLs & CFGs) Reading: Chapter 5

Context-Free Languages & Grammars (CFLs & CFGs) Reading: Chapter 5 Context-Free Languages & Grammars (CFLs & CFGs) Reading: Chapter 5 1 Not all languages are regular So what happens to the languages which are not regular? Can we still come up with a language recognizer?

More information

Theory Bridge Exam Example Questions Version of June 6, 2008

Theory Bridge Exam Example Questions Version of June 6, 2008 Theory Bridge Exam Example Questions Version of June 6, 2008 This is a collection of sample theory bridge exam questions. This is just to get some idea of the format of the bridge exam and the level of

More information

CMSC 330: Organization of Programming Languages. Context Free Grammars

CMSC 330: Organization of Programming Languages. Context Free Grammars CMSC 330: Organization of Programming Languages Context Free Grammars 1 Architecture of Compilers, Interpreters Source Analyzer Optimizer Code Generator Abstract Syntax Tree Front End Back End Compiler

More information

2 Mega Pixel. HD-SDI Bullet Camera. User Manual

2 Mega Pixel. HD-SDI Bullet Camera. User Manual 2 Mga Pixl HD-SDI Bullt Camra Usr Manual Thank you for purchasing our product. This manual is only applicabl to SDI bullt camras. Thr may b svral tchnically incorrct placs or printing rrors in this manual.

More information

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur 603203. DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Year & Semester : III Year, V Semester Section : CSE - 1 & 2 Subject Code : CS6503 Subject

More information

Concepts Introduced in Chapter 3. Lexical Analysis. Lexical Analysis Terms. Attributes for Tokens

Concepts Introduced in Chapter 3. Lexical Analysis. Lexical Analysis Terms. Attributes for Tokens Concepts Introduced in Chapter 3 Lexical Analysis Regular Expressions (REs) Nondeterministic Finite Automata (NFA) Converting an RE to an NFA Deterministic Finite Automatic (DFA) Lexical Analysis Why separate

More information

Maxwell s unification: From Last Time. Energy of light. Modern Physics. Unusual experimental results. The photoelectric effect

Maxwell s unification: From Last Time. Energy of light. Modern Physics. Unusual experimental results. The photoelectric effect From Last Tim Enrgy and powr in an EM wav Maxwll s unification: 1873 Intimat connction btwn lctricity and magntism Exprimntally vrifid by Hlmholtz and othrs, 1888 Polarization of an EM wav: oscillation

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Lecture 11 Ana Bove April 26th 2018 Recap: Regular Languages Decision properties of RL: Is it empty? Does it contain this word? Contains

More information

Introduction to Parsing. Lecture 8

Introduction to Parsing. Lecture 8 Introduction to Parsing Lecture 8 Adapted from slides by G. Necula Outline Limitations of regular languages Parser overview Context-free grammars (CFG s) Derivations Languages and Automata Formal languages

More information

SPECIFIC CRITERIA FOR THE GENERAL MOTORS GLOBAL TRADING PARTNER LABEL TEMPLATE:

SPECIFIC CRITERIA FOR THE GENERAL MOTORS GLOBAL TRADING PARTNER LABEL TEMPLATE: SPCIFIC CRITRIA FOR TH GNRAL MOTORS GLOBAL TRADING PARTNR LABL TMPLAT: TH TMPLAT IDNTIFIS HOW AND WHR DATA IS TO B PLACD ON TH LABL WHN IT IS RQUIRD AS PART OF A GM BUSINSS RQUIRMNT FONT SIZS AR SPCIFID

More information

Where We Are. CMSC 330: Organization of Programming Languages. This Lecture. Programming Languages. Motivation for Grammars

Where We Are. CMSC 330: Organization of Programming Languages. This Lecture. Programming Languages. Motivation for Grammars CMSC 330: Organization of Programming Languages Context Free Grammars Where We Are Programming languages Ruby OCaml Implementing programming languages Scanner Uses regular expressions Finite automata Parser

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016 Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016 Lecture 15 Ana Bove May 23rd 2016 More on Turing machines; Summary of the course. Overview of today s lecture: Recap: PDA, TM Push-down

More information

Part 5 Program Analysis Principles and Techniques

Part 5 Program Analysis Principles and Techniques 1 Part 5 Program Analysis Principles and Techniques Front end 2 source code scanner tokens parser il errors Responsibilities: Recognize legal programs Report errors Produce il Preliminary storage map Shape

More information

Mesh Data Structures. Geometry processing. In this course. Mesh gallery. Mesh data

Mesh Data Structures. Geometry processing. In this course. Mesh gallery. Mesh data Gomtry procssing Msh Data Structurs Msh data Gomtry Connctivity Data structur slction dpnds on Msh typ Algorithm rquirmnts 2 Msh gallry In this cours Only orintabl, triangular, manifold mshs Singl componnt,

More information

CS 315 Programming Languages Syntax. Parser. (Alternatively hand-built) (Alternatively hand-built)

CS 315 Programming Languages Syntax. Parser. (Alternatively hand-built) (Alternatively hand-built) Programming languages must be precise Remember instructions This is unlike natural languages CS 315 Programming Languages Syntax Precision is required for syntax think of this as the format of the language

More information

Formal Languages and Automata

Formal Languages and Automata Mobile Computing and Software Engineering p. 1/3 Formal Languages and Automata Chapter 3 Regular languages and Regular Grammars Chuan-Ming Liu cmliu@csie.ntut.edu.tw Department of Computer Science and

More information

Last lecture CMSC330. This lecture. Finite Automata: States. Finite Automata. Implementing Regular Expressions. Languages. Regular expressions

Last lecture CMSC330. This lecture. Finite Automata: States. Finite Automata. Implementing Regular Expressions. Languages. Regular expressions Last lecture CMSC330 Finite Automata Languages Sets of strings Operations on languages Regular expressions Constants Operators Precedence 1 2 Finite automata States Transitions Examples Types This lecture

More information

Ontology and Context. Isabel Cafezeiro Departamento de Ciência da Computação Universidade Federal Fluminense Niterói - RJ, Brazil

Ontology and Context. Isabel Cafezeiro Departamento de Ciência da Computação Universidade Federal Fluminense Niterói - RJ, Brazil Ontology and Contxt Isabl Cafziro Dpartamnto d Ciência da Computação Univrsidad Fdral Fluminns Nitrói - RJ, Brazil isabl@dcc.ic.uff.br dward Hrmann Hauslr, Alxandr Radmakr Dpartamnto d Informática Pontifícia

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Organization of Programming Languages Context Free Grammars 1 Architecture of Compilers, Interpreters Source Analyzer Optimizer Code Generator Abstract Syntax Tree Front End Back End Compiler

More information

CMSC 330: Organization of Programming Languages. Context Free Grammars

CMSC 330: Organization of Programming Languages. Context Free Grammars CMSC 330: Organization of Programming Languages Context Free Grammars 1 Architecture of Compilers, Interpreters Source Analyzer Optimizer Code Generator Abstract Syntax Tree Front End Back End Compiler

More information

Managing Trust Relationships in Peer 2 Peer Systems

Managing Trust Relationships in Peer 2 Peer Systems Managing Trust Rlationships in Pr 2 Pr Systms R.S.SINJU PG STUDENT, DEPARTMENT OF COMPUTER SCIENCE, PONJESLY COLLEGE OF ENGINEERING NAGERCOIL, TAMILNADU, INDIA C.FELSY ASST.PROF, DEPARTMENT OF COMPUTER

More information

Clustering Algorithms

Clustering Algorithms Clustring Algoritms Hirarcical Clustring k -Mans Algoritms CURE Algoritm 1 Mtods of Clustring Hirarcical (Agglomrativ): Initially, ac point in clustr by itslf. Rpatdly combin t two narst clustrs into on.

More information

Outline. Limitations of regular languages. Introduction to Parsing. Parser overview. Context-free grammars (CFG s)

Outline. Limitations of regular languages. Introduction to Parsing. Parser overview. Context-free grammars (CFG s) Outline Limitations of regular languages Introduction to Parsing Parser overview Lecture 8 Adapted from slides by G. Necula Context-free grammars (CFG s) Derivations Languages and Automata Formal languages

More information

Space Subdivision Algorithms for Ray Tracing

Space Subdivision Algorithms for Ray Tracing Spac Subdivision Algorithms for Ray Tracing by David MacDonald A thsis prsntd to th Univrsity of Watrloo in fulfillmnt of th thsis rquirmnt for th dgr of Mastr of Mathmatics in Computr Scinc Watrloo, Ontario,

More information

To Do. Mesh Data Structures. Mesh Data Structures. Motivation. Outline. Advanced Computer Graphics (Fall 2010) Desirable Characteristics 1

To Do. Mesh Data Structures. Mesh Data Structures. Motivation. Outline. Advanced Computer Graphics (Fall 2010) Desirable Characteristics 1 Advancd Computr Graphics (Fall 200) CS 283, Lctur 5: Msh Data Structurs Ravi Ramamoorthi http://inst.cs.brkly.du/~cs283/fa0 To Do Assignmnt, Du Oct 7. Start rading and working on it now. Som parts you

More information

CSEP 501 Compilers. Languages, Automata, Regular Expressions & Scanners Hal Perkins Winter /8/ Hal Perkins & UW CSE B-1

CSEP 501 Compilers. Languages, Automata, Regular Expressions & Scanners Hal Perkins Winter /8/ Hal Perkins & UW CSE B-1 CSEP 501 Compilers Languages, Automata, Regular Expressions & Scanners Hal Perkins Winter 2008 1/8/2008 2002-08 Hal Perkins & UW CSE B-1 Agenda Basic concepts of formal grammars (review) Regular expressions

More information

Reliability Coordinator Base Schedule Aggregation Portal (RC BSAP) Interface Specification for RC BSAP Services

Reliability Coordinator Base Schedule Aggregation Portal (RC BSAP) Interface Specification for RC BSAP Services Rliability Coordinator Bas Schdul Aggrgation Portal (RC BSAP) Intrfac Spcification for RC BSAP Srvics (Businss Ruls v 10.x(Spring 2019) or latr) Vrsion: 1.1 vmbr 6, 2018 Rvision History Dat Vrsion By Dscription

More information

Lexical Analysis. Implementation: Finite Automata

Lexical Analysis. Implementation: Finite Automata Lexical Analysis Implementation: Finite Automata Outline Specifying lexical structure using regular expressions Finite automata Deterministic Finite Automata (DFAs) Non-deterministic Finite Automata (NFAs)

More information

14.1 Encoding for different models of computation

14.1 Encoding for different models of computation Lecture 14 Decidable languages In the previous lecture we discussed some examples of encoding schemes, through which various objects can be represented by strings over a given alphabet. We will begin this

More information

BSCS Fall Mid Term Examination December 2012

BSCS Fall Mid Term Examination December 2012 PUNJAB UNIVERSITY COLLEGE OF INFORMATION TECHNOLOGY University of the Punjab Sheet No.: Invigilator Sign: BSCS Fall 2009 Date: 14-12-2012 Mid Term Examination December 2012 Student ID: Section: Morning

More information

DHANALAKSHMI SRINIVASAN INSTITUTE OF RESEARCH AND TECHNOLOGY SIRUVACHUR, PERAMBALUR DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

DHANALAKSHMI SRINIVASAN INSTITUTE OF RESEARCH AND TECHNOLOGY SIRUVACHUR, PERAMBALUR DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING DHANALAKSHMI SRINIVASAN INSTITUTE OF RESEARCH AND TECHNOLOGY SIRUVACHUR, PERAMBALUR-621113 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Third Year CSE( Sem:V) CS2303- THEORY OF COMPUTATION PART B-16

More information