Compiler construction in4303 lecture 4. Overview. Bottom-up (LR) parsing. LR(0) parsing. LR(0) parsing. LR(0) parsing. Compiler construction lecture 4

Size: px
Start display at page:

Download "Compiler construction in4303 lecture 4. Overview. Bottom-up (LR) parsing. LR(0) parsing. LR(0) parsing. LR(0) parsing. Compiler construction lecture 4"

Transcription

1 Compler constructon lecture Compler constructon n lecture Bottom-up prsng Chpter.. Overvew synt nlyss: tokens S lnguge grmmr prser genertor ottom-up prsng push-down utomton CION/GOO tles LR(), SLR(), LR(), LLR() progrm tet lecl nlyss tokens synt nlyss S contet hndlng nnotted S Bottom-up (LR) prsng LR() prsng Left-to-rght prse, Rghtmost-dervton crete node when ll chldren re present hndle: nodes representng the rght-hnd sde of producton term IDN term IDN rest_epresson term IDN epresson rest_epr p ( noot mes ε ) runnng emple: epresson grmmr nput epresson OF epresson epresson term term term IDNIFIR ( epresson ) short-hnd notton LR() prsng LR() prsng keep trck of progress nsde potentl hndles when consumng nput tokens LR tems: N α β ntl set Z ( ) stck nput nput token () onto the stck compute new stte ε-closure: epnd dots n front of non-termnls

2 Compler constructon lecture LR() prsng LR() prsng stck S nput stck S nput reduce hndle on top of the stck compute new stte reduce hndle on top of the stck compute new stte LR() prsng LR() prsng stck S nput stck S S nput nput token on top of the stck compute new stte nput token on top of the stck compute new stte LR() prsng LR() prsng stck S S S nput stck S S S nput reduce hndle on top of the stck compute new stte reduce hndle on top of the stck compute new stte

3 Compler constructon lecture LR() prsng LR() prsng stck S nput stck S S nput nput token on top of the stck compute new stte reduce hndle on top of the stck compute new stte LR() prsng rnston dgrm stck Z ccept! nput S S Z ( ) Z S S S S ( ) ercse ( mn.) nswers complete the trnston dgrm for the LR() utomton cn you thnk of sngle nput epresson tht cuses ll sttes to e used? If yes, gve n emple. If no, epln.

4 Compler constructon lecture he LR tles LR() prsng concse notton stte GOO tle ( ) stte CION tle ( ) stck S S S S S S S S S S S S S S Z nput cton reduce y reduce y reduce y reduce y reduce y ccept he LR push-down utomton LR() conflcts SWICH cton_tle[top of stck]: CS : see ook; CS ( reduce, N α): POP the symols of α FROM the stck; S stte O top of stck; PUSH N ON the stck; S new stte O goto_tle[stte,n]; PUSH new stte ON the stck; CS empty: RROR; Shft-reduce conflct rry ndeng: [ ] [ ] () (reduce) ε-rule: Restpr ε pr erm Restpr () Restpr (reduce) LR() conflcts Hndlng LR() conflcts Reduce-reduce conflct ssgnment sttement: Z V := V (reduce) (reduce) typcl LR() tle contns mny conflcts soluton: use one-token look-hed two-dmensonl CION tle [stte,token] dfferent constructon of CION tle SLR() Smple LR LR() LLR() Look-hed LR

5 Compler constructon lecture SLR() prsng SLR() CION tle solves (some) -reduce conflcts stte look-hed token ( ) reduce N α ff token FOLLOW(N) FOLLOW() = {, ), } FOLLOW() = {, ), } FOLLOW(Z) = { } ( ) ( ) ( ) SLR() CION/GOO tle Unfortuntely... stte stck stck symol symol / look-hed / look-hed token token ( ) [ ] s s s s r r s r r r r r r r r r r r s s s s s : : : : : : [ ] SLR() leves mny -reduce conflcts unsolved prolem: FOLLOW(N) set s unon of ll contets n whch N my occur s s r r s s s r r s r r r s s r r r s s s s sn to stte n rn reduce rule n emple S r r r r r LR() utomton ercse ( mn.) S S S S S S S S S S S S : S : S : : derve the SLR() CION/GOO tle (wth -reduce conflct) for the grmmr: S

6 Compler constructon lecture nswers LR() prsng mntn follow set per tem LR() tem: N α β {σ} ε - closure for LR() tem sets: f set S contns n tem P α N β {σ} then forech producton rule N γ S must contn the tem N γ {τ} where τ = FIRS( β {σ} ) LR() utomton LR() utomton S S S S S S S {} S {} {} {} S S {} S {} {} {} S {} S {} {} {} S S S FOLLOW(S) = {} FOLLOW() = {,} S S {} {} S {} S {} S S S S S {} S {} S {} LLR() prsng LLR() utomton LR tles re g comne equl sets y mergng lookhed sets S {} S {} {} {} S S {} S {} {} {} S {} S {} {} {} S S {} {} S {} S {} S S {} S {} S {}

7 Compler constructon lecture LLR() utomton LLR() CION/GOO tle S S S {} {} S {} S S {} {,} {,} {} {} {,} {,} {} {} {,} S S S {} {,} {} {,} S S S {} {,} stte stck symol / look-hed token s s s s r r r s s s r s r r : S : S : : Mkng grmmrs LR() or not? Summry grmmrs re often mguous * hndle -reduce conflcts (defult) longest mtch: precedence drectves nput: * * * reduce * synt nlyss: tokens S ottom-up prsng push-down utomton CION/GOO tles LR() NO look-hed SLR() LR() LLR() one-token look-hed, FOLLOW sets to solve -reduce conflcts SLR(), ut FOLLOW set per tem LR(), ut equl sttes re merged

Pushdown Automata. Courtesy: Costas Busch RPI

Pushdown Automata. Courtesy: Costas Busch RPI Pushdown Automt Courtesy: Costs Busch RPI Pushdown Automt Pushdown Automt Pushdown Automt Pushdown Automt Pushdown Automt Pushdown Automt Non-Determinism:NPDA PDAs re non-deterministic: non-deterministic

More information

9.3. Regular Languages

9.3. Regular Languages 9.3. REGULAR LANGUAGES 139 9.3. Regulr Lnguges 9.3.1. Properties of Regulr Lnguges. Recll tht regulr lnguge is the lnguge ssocited to regulr grmmr, i.e., grmmr G = (N, T, P, σ) in which every production

More information

What is Monte Carlo Simulation? Monte Carlo Simulation

What is Monte Carlo Simulation? Monte Carlo Simulation Wht is Monte Crlo Simultion? Monte Crlo methods re widely used clss of computtionl lgorithms for simulting the ehvior of vrious physicl nd mthemticl systems, nd for other computtions. Monte Crlo lgorithm

More information

INF 4130 Exercise set 4

INF 4130 Exercise set 4 INF 4130 Exercise set 4 Exercise 1 List the order in which we extrct the nodes from the Live Set queue when we do redth first serch of the following grph (tree) with the Live Set implemented s LIFO queue.

More information

Parsing beyond context-free grammar: Tree Adjoining Grammar Parsing I

Parsing beyond context-free grammar: Tree Adjoining Grammar Parsing I Parsng beyond context-free grammar: Tree donng Grammar Parsng I Laura Kallmeyer, Wolfgang Maer ommersemester 2009 duncton and substtuton (1) Tree donng Grammars (TG) Josh et al. (1975), Josh & chabes (1997):

More information

Static Fully Observable Stochastic What action next? Instantaneous Perfect

Static Fully Observable Stochastic What action next?  Instantaneous Perfect CS 188: Ar)ficil Intelligence Mrkov Deciion Procee K+1 Intructor: Dn Klein nd Pieter Abbeel - - - Univerity of Cliforni, Berkeley [Thee lide were creted by Dn Klein nd Pieter Abbeel for CS188 Intro to

More information

Pyramid algorithms for barycentric rational interpolation

Pyramid algorithms for barycentric rational interpolation Pyrmd lgorthms for rycentrc rtonl nterpolton K Hormnn Scott Schefer Astrct We present new perspectve on the Floter Hormnn nterpolnt Ths nterpolnt s rtonl of degree (n, d ), reproduces polynomls of degree

More information

Drawing Finite State Machines in L A TEX and TikZ A Tutorial

Drawing Finite State Machines in L A TEX and TikZ A Tutorial Drwing Finite Stte Mchines in L A TEX nd TikZ A Tutoril Styki Sikdr nd Dvid Ching ssikdr@nd.edu Version 3 Jnury 7, 208 Introduction L A TEX (pronounced ly-tek) is n open-source, multipltform document preprtion

More information

Cache CPI and DFAs and NFAs. CS230 Tutorial 10

Cache CPI and DFAs and NFAs. CS230 Tutorial 10 Cche CPI nd DFAs nd NFAs CS230 Tutoril 10 Multi-Level Cche: Clculting CPI When memory ccess is ttempted, wht re the possible results? ccess miss miss CPU L1 Cche L2 Cche Memory L1 cche hit L2 cche hit

More information

CH 71 COMPLETING THE SQUARE INTRODUCTION FACTORING PERFECT SQUARE TRINOMIALS

CH 71 COMPLETING THE SQUARE INTRODUCTION FACTORING PERFECT SQUARE TRINOMIALS CH 7 COMPLETING THE SQUARE INTRODUCTION I t s now time to py our dues regrding the Qudrtic Formul. Wht, you my sk, does this men? It mens tht the formul ws merely given to you once or twice in this course,

More information

Problem Set 6 Finance 1,

Problem Set 6 Finance 1, Carnege Mellon Unversty Graduate School of Industral Admnstraton Chrs Telmer Wnter 2006 Problem Set 6 Fnance, 47-720. (representatve agent constructon) Consder the followng two-perod, two-agent economy.

More information

The phases of a simple compiler: Compiler Construction SMD163. From Intermediate To Target: An Optimizing Compiler: Lecture 13: Instruction selection

The phases of a simple compiler: Compiler Construction SMD163. From Intermediate To Target: An Optimizing Compiler: Lecture 13: Instruction selection Compiler Constrution SMD163 The phses of simple ompiler: Lexer Prser Stti Anlysis IA32 Code Genertor Leture 13: Instrution seletion Viktor Leijon & Peter Jonsson with slides y John Nordlnder Contins mteril

More information

Elton, Gruber, Brown, and Goetzmann. Modern Portfolio Theory and Investment Analysis, 7th Edition. Solutions to Text Problems: Chapter 14

Elton, Gruber, Brown, and Goetzmann. Modern Portfolio Theory and Investment Analysis, 7th Edition. Solutions to Text Problems: Chapter 14 Elton, Gruer, Brown, nd Goetznn odern Portfolo Theory nd Investent Anlyss, 7th Edton Solutons to Text Proles: hpter 14 hpter 14: Prole 1 Gven the zero-et securty rket lne n ths prole, the return on the

More information

Elton, Gruber, Brown, and Goetzmann. Modern Portfolio Theory and Investment Analysis, 7th Edition. Solutions to Text Problems: Chapter 16

Elton, Gruber, Brown, and Goetzmann. Modern Portfolio Theory and Investment Analysis, 7th Edition. Solutions to Text Problems: Chapter 16 lton, Gruer, rown, and Goetzmann Modern Portfolo Theory and Investment nalyss, 7th dton Solutons to Text Prolems: hapter 6 hapter 6: Prolem From the text we know that three ponts determne a plane. The

More information

FORM LM-2 LABOR ORGANIZATION ANNUAL REPORT

FORM LM-2 LABOR ORGANIZATION ANNUAL REPORT Return U.S. Department of Labor Office of Labor-Management Standards Washington, D 20210 FORM LM-2 LOR ORGNZTON NNUL REPORT MUST E USED Y LOR ORGNZTONS WTH $250,000 OR MORE N TOTL NNUL REEPTS ND LOR ORGNZTONS

More information

Elton, Gruber, Brown, and Goetzmann. Modern Portfolio Theory and Investment Analysis, 7th Edition. Solutions to Text Problems: Chapter 9

Elton, Gruber, Brown, and Goetzmann. Modern Portfolio Theory and Investment Analysis, 7th Edition. Solutions to Text Problems: Chapter 9 Elton, Gruber, Brown, and Goetzmann Modern Portfolo Theory and Investment Analyss, 7th Edton Solutons to Text Problems: Chapter 9 Chapter 9: Problem In the table below, gven that the rskless rate equals

More information

MEG 741 Energy and Variational Methods in Mechanics I

MEG 741 Energy and Variational Methods in Mechanics I MEG 74 Energ n Vrtonl Methos n Mechncs I Brenn J. O Toole, Ph.D. Assocte Professor of Mechncl Engneerng Howr R. Hghes College of Engneerng Unverst of ev Ls Vegs TBE B- (7) 895-3885 j@me.nlv.e Chpter :

More information

Controlling a population of identical MDP

Controlling a population of identical MDP Controlling popultion of identicl MDP Nthlie Bertrnd Inri Rennes ongoing work with Miheer Dewskr (CMI), Blise Genest (IRISA) nd Hugo Gimert (LBRI) Trends nd Chllenges in Quntittive Verifiction Mysore,

More information

Solutions to Exercises, Set 3

Solutions to Exercises, Set 3 Shool of Computer Siene, University of Nottinghm G5MAL Mhines nd their Lnguges, Spring 1 Thorsten Altenkirh Solutions to Exerises, Set 3 Fridy 3rd Mrh 1 1. () () L(+ +ǫ) = {L(E +F) = L(E) L(F)} L() L(

More information

ECE 410 Homework 1 -Solutions Spring 2008

ECE 410 Homework 1 -Solutions Spring 2008 ECE 410 Homework 1 -Solution Spring 2008 Prolem 1 For prolem 2-4 elow, ind the voltge required to keep the trnitor on ppling the rule dicued in cl. Aume VDD = 2.2V FET tpe Vt (V) Vg (V) Vi (V) n-tpe 0.5

More information

Suffix Trees. Outline. Introduction Suffix Trees (ST) Building STs in linear time: Ukkonen s algorithm Applications of ST.

Suffix Trees. Outline. Introduction Suffix Trees (ST) Building STs in linear time: Ukkonen s algorithm Applications of ST. Suffi Trees Outline Introduction Suffi Trees (ST) Building STs in liner time: Ukkonen s lgorithm Applictions of ST 2 Introduction 3 Sustrings String is ny sequence of chrcters. Sustring of string S is

More information

Long-term Memory Review PROFICIENCY PRACTICE: MONDAY REVIEW

Long-term Memory Review PROFICIENCY PRACTICE: MONDAY REVIEW PROFICINCY PRACTIC: MONDAY RVIW : A D 14 cm B 21 cm C 2) Use : The tringles in the figure ove re similr. ) nd re mesures of corresponding sides. ) nd re mesures of nother pir of corresponding sides. 3)

More information

Gridworld Values V* Gridworld: Q*

Gridworld Values V* Gridworld: Q* CS 188: Artificil Intelligence Mrkov Deciion Procee II Intructor: Dn Klein nd Pieter Abbeel --- Univerity of Cliforni, Berkeley [Thee lide were creted by Dn Klein nd Pieter Abbeel for CS188 Intro to AI

More information

Fresh-Register Automata

Fresh-Register Automata Fresh-Regster Automt Nkos Tzevelekos Oxford Unversty Computng Lbortory nkt@comlb.ox.c.uk Abstrct Wht s bsc utomt-theoretc model of computton wth nmes nd fresh-nme generton? We ntroduce Fresh-Regster Automt

More information

Chapter 3: The Reinforcement Learning Problem. The Agent'Environment Interface. Getting the Degree of Abstraction Right. The Agent Learns a Policy

Chapter 3: The Reinforcement Learning Problem. The Agent'Environment Interface. Getting the Degree of Abstraction Right. The Agent Learns a Policy Chpter 3: The Reinforcement Lerning Problem The Agent'Environment Interfce Objectives of this chpter: describe the RL problem we will be studying for the reminder of the course present idelized form of

More information

Abstract stack machines for LL and LR parsing

Abstract stack machines for LL and LR parsing Abstract stack machines for LL and LR parsing Hayo Thielecke August 13, 2015 Contents Introduction Background and preliminaries Parsing machines LL machine LL(1) machine LR machine Parsing and (non-)deterministic

More information

7. Loss systems. Contents

7. Loss systems. Contents lect7.ppt S-38.45 - Itroducto to Teletrffc Theory - Fll 999 Cotets Refresher: Smple teletrffc system Posso model customers, servers Erlg model customers, < servers Boml model < customers, servers Egset

More information

Ratio and Proportion Long-Term Memory Review Day 1 - Review

Ratio and Proportion Long-Term Memory Review Day 1 - Review Rtio nd Proportion Dy 1 - Review 1. Provide omplete response to eh of the following: ) A rtio ompres two. ) A proportion sets two rtios to eh other. ) Wht re similr figures? 2. Drw two similr figures.

More information

JOURNAL THE ERGODIC TM CANDLESTICK OSCILLATOR ROBERT KRAUSZ'S. Volume 1, Issue 7

JOURNAL THE ERGODIC TM CANDLESTICK OSCILLATOR ROBERT KRAUSZ'S. Volume 1, Issue 7 ROBERT KRUSZ'S JOURNL Volume 1, Issue 7 THE ERGODIC TM CNDLESTICK OSCILLTOR S ometimes we re lucky (due to our diligence) nd we find tool tht is useful nd does the jo etter thn previous tools, or nswers

More information

CS 541 Algorithms and Programs. Exam 1 Solutions

CS 541 Algorithms and Programs. Exam 1 Solutions CS 5 Algortms and Programs Exam Solutons Jonatan Turner 9/5/0 Be neat and concse, ut complete.. (5 ponts) An ncomplete nstance of te wgrap data structure s sown elow. Fll n te mssng felds for te adjacency

More information

Economics Department Fall 2013 Student Learning Outcomes (SLOs) Assessment Economics 4 (Principles of Microeconomics)

Economics Department Fall 2013 Student Learning Outcomes (SLOs) Assessment Economics 4 (Principles of Microeconomics) Jnury 2014 Economics Deprtment Fll 2013 Stuent Lerning Outcomes (SLOs) Assessment Economics 4 (Principles of Microeconomics) Lerning Outcome Sttement: In the Fll 2013 semester the Economics Deprtment engge

More information

Macroeconomic equilibrium in the short run: the Money market

Macroeconomic equilibrium in the short run: the Money market Macroeconomc equlbrum n the short run: the Money market 2013 1. The bg pcture Overvew Prevous lecture How can we explan short run fluctuatons n GDP? Key assumpton: stcky prces Equlbrum of the goods market

More information

A Closer Look at Bond Risk: Duration

A Closer Look at Bond Risk: Duration W E B E X T E S I O 4C A Closer Look t Bond Risk: Durtion This Extension explins how to mnge the risk of bond portfolio using the concept of durtion. BOD RISK In our discussion of bond vlution in Chpter

More information

TCOM501 Networking: Theory & Fundamentals Final Examination Professor Yannis A. Korilis April 26, 2002

TCOM501 Networking: Theory & Fundamentals Final Examination Professor Yannis A. Korilis April 26, 2002 TO5 Networng: Theory & undamentals nal xamnaton Professor Yanns. orls prl, Problem [ ponts]: onsder a rng networ wth nodes,,,. In ths networ, a customer that completes servce at node exts the networ wth

More information

1. Determine the consequences of distributing a fixed total amount of income (Y) to maximize the following SWF:

1. Determine the consequences of distributing a fixed total amount of income (Y) to maximize the following SWF: ECO 755, Prolem Set Len Crer. Determne the consequences of dstrutng fed totl mount of ncome Y to mmze the followng SF: Consder cses: α < 0 α 0 c 0 < α < d α α α where Y nd > 0, Setup optmzton prolem: α

More information

Fully Observable. Perfect

Fully Observable. Perfect CS 188: Ar)ficil Intelligence Mrkov Deciion Procee II Stoch)c Plnning: MDP Sttic Environment Fully Obervble Perfect Wht ction next? Stochtic Intntneou Intructor: Dn Klein nd Pieter Abbeel - - - Univerity

More information

Burrows-Wheeler Transform and FM Index

Burrows-Wheeler Transform and FM Index Burrows-Wheeler Trnsform nd M Index Ben ngmed You re free to use these slides. If you do, plese sign the guestbook (www.lngmed-lb.org/teching-mterils), or emil me (ben.lngmed@gmil.com) nd tell me briefly

More information

Creating a zero coupon curve by bootstrapping with cubic splines.

Creating a zero coupon curve by bootstrapping with cubic splines. MMA 708 Analytcal Fnance II Creatng a zero coupon curve by bootstrappng wth cubc splnes. erg Gryshkevych Professor: Jan R. M. Röman 0.2.200 Dvson of Appled Mathematcs chool of Educaton, Culture and Communcaton

More information

Economics of Behavioral Finance. Lecture 3

Economics of Behavioral Finance. Lecture 3 Economics of Behavioral Finance Lecture 3 Security Market Line CAPM predicts a linear relationship between a stock s Beta and its excess return. E[r i ] r f = β i E r m r f Practically, testing CAPM empirically

More information

Topics on the Border of Economics and Computation November 6, Lecture 2

Topics on the Border of Economics and Computation November 6, Lecture 2 Topcs on the Border of Economcs and Computaton November 6, 2005 Lecturer: Noam Nsan Lecture 2 Scrbe: Arel Procacca 1 Introducton Last week we dscussed the bascs of zero-sum games n strategc form. We characterzed

More information

An Example (based on the Phillips article)

An Example (based on the Phillips article) An Eample (based on the Phllps artcle) Suppose ou re the hapless MBA, and ou haven t been fred You decde to use IP to fnd the best N-product soluton, for N = to 56 Let be 0 f ou don t produce product,

More information

Outline. CSE 326: Data Structures. Priority Queues Leftist Heaps & Skew Heaps. Announcements. New Heap Operation: Merge

Outline. CSE 326: Data Structures. Priority Queues Leftist Heaps & Skew Heaps. Announcements. New Heap Operation: Merge CSE 26: Dt Structures Priority Queues Leftist Heps & Skew Heps Outline Announcements Leftist Heps & Skew Heps Reding: Weiss, Ch. 6 Hl Perkins Spring 2 Lectures 6 & 4//2 4//2 2 Announcements Written HW

More information

Lie Algebras and Representation Theory Homework 7

Lie Algebras and Representation Theory Homework 7 Lie Algebras and Representation Theory Homework 7 Debbie Matthews 2015-05-19 Problem 10.5 If σ W can be written as a product of t simple reflections, prove that t has the same parity as l(σ). Let = {α

More information

Problem Set 2 Suggested Solutions

Problem Set 2 Suggested Solutions 4.472 Prolem Set 2 Suggested Solutions Reecc Zrutskie Question : First find the chnge in the cpitl stock, k, tht will occur when the OLG economy moves to the new stedy stte fter the government imposes

More information

Hark! the herald angels sing

Hark! the herald angels sing The Ptmos Book Crols To sbscr n occsonl stt from Ptmos Crols project, eml: hrk@1eqlmsc.com Mo sheet msc vsons vlb for fe downlod t www.ptmoscrols.com Hrk! hld n s for chors SATB hrmony pls descnt, wth

More information

Online Appendix for Merger Review for Markets with Buyer Power

Online Appendix for Merger Review for Markets with Buyer Power Onlne Appendx for Merger Revew for Markets wth Buyer Power Smon Loertscher Lesle M. Marx July 23, 2018 Introducton In ths appendx we extend the framework of Loertscher and Marx (forthcomng) to allow two

More information

(II) THE MUNDELL-FLEMING MODEL

(II) THE MUNDELL-FLEMING MODEL (II) THE MUNDELL-FLEMING MODEL LECTURE 3: THE MODEL WITH A FIXED EXCHANGE RATE Keynesan Model of the trade balance TB & ncome.. Key assumpton: P fxed =>. Mundell-Flemng model Key addtonal assumpton: nternatonal

More information

Appendix for Solving Asset Pricing Models when the Price-Dividend Function is Analytic

Appendix for Solving Asset Pricing Models when the Price-Dividend Function is Analytic Appendx for Solvng Asset Prcng Models when the Prce-Dvdend Functon s Analytc Ovdu L. Caln Yu Chen Thomas F. Cosmano and Alex A. Hmonas January 3, 5 Ths appendx provdes proofs of some results stated n our

More information

Trigonometry - Activity 21 General Triangle Solution: Given three sides.

Trigonometry - Activity 21 General Triangle Solution: Given three sides. Nme: lss: p 43 Mths Helper Plus Resoure Set. opyright 003 rue. Vughn, Tehers hoie Softwre Trigonometry - tivity 1 Generl Tringle Solution: Given three sides. When the three side lengths '', '' nd '' of

More information

Optimal Binary Search Trees (and a second example of dynamic programming): [ref:

Optimal Binary Search Trees (and a second example of dynamic programming): [ref: Topc CS 466/666 Fll 2008 Optml Bry Serch Trees (d secod exmple of dymc progrmmg): [ref: Corme Leserso, Rvest d Ste secto 5.5] We strt wth smple prolem regrdg ry serch trees evromet whch the proltes of

More information

Fast Laplacian Solvers by Sparsification

Fast Laplacian Solvers by Sparsification Spectral Graph Theory Lecture 19 Fast Laplacan Solvers by Sparsfcaton Danel A. Spelman November 9, 2015 Dsclamer These notes are not necessarly an accurate representaton of what happened n class. The notes

More information

General Examination in Microeconomic Theory. Fall You have FOUR hours. 2. Answer all questions

General Examination in Microeconomic Theory. Fall You have FOUR hours. 2. Answer all questions HARVARD UNIVERSITY DEPARTMENT OF ECONOMICS General Examnaton n Mcroeconomc Theory Fall 2010 1. You have FOUR hours. 2. Answer all questons PLEASE USE A SEPARATE BLUE BOOK FOR EACH QUESTION AND WRITE THE

More information

A ppendix to. I soquants. Producing at Least Cost. Chapter

A ppendix to. I soquants. Producing at Least Cost. Chapter A ppendix to Chpter 0 Producing t est Cost This ppendix descries set of useful tools for studying firm s long-run production nd costs. The tools re isoqunts nd isocost lines. I soqunts FIGURE A0. SHOWS

More information

Alternatives to Shewhart Charts

Alternatives to Shewhart Charts Alternatves to Shewhart Charts CUSUM & EWMA S Wongsa Overvew Revstng Shewhart Control Charts Cumulatve Sum (CUSUM) Control Chart Eponentally Weghted Movng Average (EWMA) Control Chart 2 Revstng Shewhart

More information

(a) by substituting u = x + 10 and applying the result on page 869 on the text, (b) integrating by parts with u = ln(x + 10), dv = dx, v = x, and

(a) by substituting u = x + 10 and applying the result on page 869 on the text, (b) integrating by parts with u = ln(x + 10), dv = dx, v = x, and Supplementry Questions for HP Chpter 5. Derive the formul ln( + 0) d = ( + 0) ln( + 0) + C in three wys: () by substituting u = + 0 nd pplying the result on pge 869 on the tet, (b) integrting by prts with

More information

ECON 105 Homework 2 KEY Open Economy Macroeconomics Due November 29

ECON 105 Homework 2 KEY Open Economy Macroeconomics Due November 29 Instructions: ECON 105 Homework 2 KEY Open Economy Mcroeconomics Due Novemer 29 The purpose of this ssignment it to integrte the explntions found in chpter 16 ok Kennedy with the D-S model nd the Money

More information

Problem Set #4 Solutions

Problem Set #4 Solutions 4.0 Sprng 00 Page Problem Set #4 Solutons Problem : a) The extensve form of the game s as follows: (,) Inc. (-,-) Entrant (0,0) Inc (5,0) Usng backwards nducton, the ncumbent wll always set hgh prces,

More information

Access your online resources today at

Access your online resources today at 978--07-670- - CmbridgeMths: NSW Syllbus for the Austrlin Curriculum: Yer 0: Stte./. Access your online resources tody t www.cmbridge.edu.u/go. Log in to your existing Cmbridge GO user ccount or crete

More information

Math 210 Exam 4 - Practice Problem Solutions. 1. Answer the following questions based on the rooted tree shown below:

Math 210 Exam 4 - Practice Problem Solutions. 1. Answer the following questions based on the rooted tree shown below: Mt 0 Exm 4 - Prctce Proem Soutons. Answer te foowng questons se on te roote tree sown eow: c m n o p q r s t () Lst te cren of vertex. n,o,p () Lst te ncestors of vertex s m,,,, (c) Lst te sngs of vertex

More information

Macroeconomic Theory and Policy

Macroeconomic Theory and Policy ECO 209 Macroeconomc Theory and Polcy Lecture 7: The Open Economy wth Fxed Exchange Rates Gustavo Indart Slde 1 Open Economy under Fxed Exchange Rates Let s consder an open economy wth no captal moblty

More information

Chapter55. Algebraic expansion and simplification

Chapter55. Algebraic expansion and simplification Chpter55 Algebric expnsion nd simplifiction Contents: A The distributive lw B The product ( + b)(c + d) C Difference of two squres D Perfect squres expnsion E Further expnsion F The binomil expnsion 88

More information

Mode is the value which occurs most frequency. The mode may not exist, and even if it does, it may not be unique.

Mode is the value which occurs most frequency. The mode may not exist, and even if it does, it may not be unique. 1.7.4 Mode Mode s the value whch occurs most frequency. The mode may not exst, and even f t does, t may not be unque. For ungrouped data, we smply count the largest frequency of the gven value. If all

More information

LR Parsing. Bottom-Up Parsing

LR Parsing. Bottom-Up Parsing LR Parsing Bottom-Up Parsing #1 Outline No Stopping The Parsing! LL(1 Construction Bottom-Up Parsing LR Parsing Shift and Reduce LR(1 Parsing Algorithm LR(1 Parsing Tables #2 Software ngineering The most

More information

3: Inventory management

3: Inventory management INSE6300 Ji Yun Yu 3: Inventory mngement Concordi Februry 9, 2016 Supply chin mngement is bout mking sequence of decisions over sequence of time steps, fter mking observtions t ech of these time steps.

More information

Characterisation of Strongly Normalising λµ-terms

Characterisation of Strongly Normalising λµ-terms Characterisation of Strongly Normalising λµ-terms Ugo de Liguoro joint work with Steffen van Bakel and Franco Barbanera ITRS - June 2012, Dubrovnik Introduction Parigot s λµ-calculus is an extension of

More information

COMPARISON OF THE ANALYTICAL AND NUMERICAL SOLUTION OF A ONE-DIMENSIONAL NON-STATIONARY COOLING PROBLEM. László Könözsy 1, Mátyás Benke 2

COMPARISON OF THE ANALYTICAL AND NUMERICAL SOLUTION OF A ONE-DIMENSIONAL NON-STATIONARY COOLING PROBLEM. László Könözsy 1, Mátyás Benke 2 COMPARISON OF THE ANALYTICAL AND NUMERICAL SOLUTION OF A ONE-DIMENSIONAL NON-STATIONARY COOLING PROBLEM László Könözsy 1, Mátyás Benke Ph.D. Student 1, Unversty Student Unversty of Mskolc, Department of

More information

Algorithmic Game Theory and Applications. Lecture 11: Games of Perfect Information

Algorithmic Game Theory and Applications. Lecture 11: Games of Perfect Information Algorithmic Game Theory and Applications Lecture 11: Games of Perfect Information Kousha Etessami finite games of perfect information Recall, a perfect information (PI) game has only 1 node per information

More information

Data Mining Linear and Logistic Regression

Data Mining Linear and Logistic Regression 07/02/207 Data Mnng Lnear and Logstc Regresson Mchael L of 26 Regresson In statstcal modellng, regresson analyss s a statstcal process for estmatng the relatonshps among varables. Regresson models are

More information

Analysis of Variance and Design of Experiments-II

Analysis of Variance and Design of Experiments-II Analyss of Varance and Desgn of Experments-II MODULE VI LECTURE - 4 SPLIT-PLOT AND STRIP-PLOT DESIGNS Dr. Shalabh Department of Mathematcs & Statstcs Indan Insttute of Technology Kanpur An example to motvate

More information

Answers to exercises in Macroeconomics by Nils Gottfries 2013

Answers to exercises in Macroeconomics by Nils Gottfries 2013 . a) C C b C C s the ntercept o the consumpton uncton, how much consumpton wll be at zero ncome. We can thnk that, at zero ncome, the typcal consumer would consume out o hs assets. The slope b s the margnal

More information

Semantic Types for Classes and Mixins

Semantic Types for Classes and Mixins University of Turin ITRS 14, Vienna, July 18, 2014 Motivations Motivations Issues: Mixins have been proposed in the late 80 s to enhance modularity and reusability of code for class based OO programming

More information

Lecture Note 1: Foundations 1

Lecture Note 1: Foundations 1 Economcs 703 Advanced Mcroeconomcs Prof. Peter Cramton ecture Note : Foundatons Outlne A. Introducton and Examples B. Formal Treatment. Exstence of Nash Equlbrum. Exstence wthout uas-concavty 3. Perfect

More information

Random Variables. 8.1 What is a Random Variable? Announcements: Chapter 8

Random Variables. 8.1 What is a Random Variable? Announcements: Chapter 8 Announcements: Quz starts after class today, ends Monday Last chance to take probablty survey ends Sunday mornng. Next few lectures: Today, Sectons 8.1 to 8. Monday, Secton 7.7 and extra materal Wed, Secton

More information

Simple Regression Theory II 2010 Samuel L. Baker

Simple Regression Theory II 2010 Samuel L. Baker SIMPLE REGRESSIO THEORY II Smple Regresson Theory II 00 Samuel L. Baker Assessng how good the regresson equaton s lkely to be Assgnment A gets nto drawng nferences about how close the regresson lne mght

More information

1 Manipulation for binary voters

1 Manipulation for binary voters STAT 206A: Soil Choie nd Networks Fll 2010 Mnipultion nd GS Theorem Otoer 21 Leturer: Elhnn Mossel Srie: Kristen Woyh In this leture we over mnipultion y single voter: whether single voter n lie out his

More information

ECON 312/302: MICROECONOMICS II Lecture 6: W/C 7 th March 2016 FACTOR MARKETS 1 Dr Ebo Turkson. Chapter 15. Factor Markets Part 1

ECON 312/302: MICROECONOMICS II Lecture 6: W/C 7 th March 2016 FACTOR MARKETS 1 Dr Ebo Turkson. Chapter 15. Factor Markets Part 1 ECON 312/302: MICROECONOMICS II Lecture 6: W/C 7 th March 2016 FACTOR MARKETS 1 Dr Ebo Turkson Chapter 15 Factor Markets Part 1 1 Topics Competitive Factor Market. Competitive factor and output markets

More information

Lecture 4. Finite difference and finite element methods

Lecture 4. Finite difference and finite element methods Finite difference and finite element methods Lecture 4 Outline Black-Scholes equation From expectation to PDE Goal: compute the value of European option with payoff g which is the conditional expectation

More information

Reinforcement Learning. CS 188: Artificial Intelligence Fall Grid World. Markov Decision Processes. What is Markov about MDPs?

Reinforcement Learning. CS 188: Artificial Intelligence Fall Grid World. Markov Decision Processes. What is Markov about MDPs? CS 188: Artificil Intelligence Fll 2010 Lecture 9: MDP 9/2/2010 Reinforcement Lerning [DEMOS] Bic ide: Receive feedbck in the form of rewrd Agent utility i defined by the rewrd function Mut (lern to) ct

More information

Dynamic model of funding in interbank payment systems

Dynamic model of funding in interbank payment systems 5 th Bn of Fnlnd s Pyment nd Settlement Smulton Semnr August 2007 Dscusson of Mrco Glbt nd Kmmo Sormä s Dynmc model of fundng n nterbn pyment systems By Fben Renult (Bnque de Frnce) The vews expressed

More information

Mutual Funds and Management Styles. Active Portfolio Management

Mutual Funds and Management Styles. Active Portfolio Management utual Funds and anagement Styles ctve Portfolo anagement ctve Portfolo anagement What s actve portfolo management? How can we measure the contrbuton of actve portfolo management? We start out wth the CP

More information

Today s Outline. One More Operation. Priority Queues. New Operation: Merge. Leftist Heaps. Priority Queues. Admin: Priority Queues

Today s Outline. One More Operation. Priority Queues. New Operation: Merge. Leftist Heaps. Priority Queues. Admin: Priority Queues Tody s Outline Priority Queues CSE Dt Structures & Algorithms Ruth Anderson Spring 4// Admin: HW # due this Thursdy / t :9pm Printouts due Fridy in lecture. Priority Queues Leftist Heps Skew Heps 4// One

More information

ECO 209Y MACROECONOMIC THEORY AND POLICY LECTURE 11: THE IS-LM MODEL AND EXOGENOUS/ENDOGENOUS MONEY

ECO 209Y MACROECONOMIC THEORY AND POLICY LECTURE 11: THE IS-LM MODEL AND EXOGENOUS/ENDOGENOUS MONEY ECO 209Y MCROECONOMIC THEORY ND POLICY LECTURE 11: THE IS-LM MODEL ND EXOGENOUS/ENDOGENOUS MONEY Gustavo Indart Slde 1 KEYNESIN MONETRY THEORY EXOGENOUS MONEY SUPPLY Gustavo Indart Slde 2 Keynes treated

More information

Multifactor Term Structure Models

Multifactor Term Structure Models 1 Multfactor Term Structure Models A. Lmtatons of One-Factor Models 1. Returns on bonds of all maturtes are perfectly correlated. 2. Term structure (and prces of every other dervatves) are unquely determned

More information

332 Mathematical Induction Solutions for Chapter 14. for every positive integer n. Proof. We will prove this with mathematical induction.

332 Mathematical Induction Solutions for Chapter 14. for every positive integer n. Proof. We will prove this with mathematical induction. 33 Mathematcal Inducton. Solutons for Chapter. Prove that 3 n n n for every postve nteger n. Proof. We wll prove ths wth mathematcal nducton. Observe that f n, ths statement s, whch s obvously true. Consder

More information

An Introduction to General Equilibrium Policy Modeling

An Introduction to General Equilibrium Policy Modeling Lecture 3.1 An Introducton to General Equlbrum Polcy Modelng Davd Roland-Holst, Sam Heft-Neal, and Anaspree Chawan UC Berkeley and Chang Ma Unversty Tranng Workshop Economywde Assessment of Hgh Impact

More information

style type="text/css".wpb_animate_when_almost_visible { opacity: 1; }/style

style type=text/css.wpb_animate_when_almost_visible { opacity: 1; }/style style type="text/css".wpb_nimte_when_lmost_visible { opcity: 1; }/style Sign in How py bills with bnk meric crd How py bills with bnk meric crd mobile How py bills with bnk meric crd & online bnking ccess

More information

Problem Set for Chapter 3: Simple Regression Analysis ECO382 Econometrics Queens College K.Matsuda

Problem Set for Chapter 3: Simple Regression Analysis ECO382 Econometrics Queens College K.Matsuda Problem Set for Chpter 3 Simple Regression Anlysis ECO382 Econometrics Queens College K.Mtsud Excel Assignments You re required to hnd in these Excel Assignments by the due Mtsud specifies. Legibility

More information

ECO 209Y MACROECONOMIC THEORY AND POLICY LECTURE 8: THE OPEN ECONOMY WITH FIXED EXCHANGE RATES

ECO 209Y MACROECONOMIC THEORY AND POLICY LECTURE 8: THE OPEN ECONOMY WITH FIXED EXCHANGE RATES ECO 209 MACROECONOMIC THEOR AND POLIC LECTURE 8: THE OPEN ECONOM WITH FIXED EXCHANGE RATES Gustavo Indart Slde 1 OPEN ECONOM UNDER FIXED EXCHANGE RATES Let s consder an open economy wth no captal moblty

More information

SIMPLE FIXED-POINT ITERATION

SIMPLE FIXED-POINT ITERATION SIMPLE FIXED-POINT ITERATION The fed-pont teraton method s an open root fndng method. The method starts wth the equaton f ( The equaton s then rearranged so that one s one the left hand sde of the equaton

More information

Choosing the Correct Currency Anchor for a Small Economy: The Case of Nepal

Choosing the Correct Currency Anchor for a Small Economy: The Case of Nepal WP/04/42 Choosng the Correct Currency Anchor for Smll Economy: The Cse of Nepl Sbel Yelten 2004 Interntonl Monetry Fund WP/04/42 IMF Worng Pper As nd Pcfc Deprtment Choosng the Correct Currency Anchor

More information

ECE 586GT: Problem Set 2: Problems and Solutions Uniqueness of Nash equilibria, zero sum games, evolutionary dynamics

ECE 586GT: Problem Set 2: Problems and Solutions Uniqueness of Nash equilibria, zero sum games, evolutionary dynamics Unversty of Illnos Fall 08 ECE 586GT: Problem Set : Problems and Solutons Unqueness of Nash equlbra, zero sum games, evolutonary dynamcs Due: Tuesday, Sept. 5, at begnnng of class Readng: Course notes,

More information

TOPICS IN MACROECONOMICS: MODELLING INFORMATION, LEARNING AND EXPECTATIONS LECTURE NOTES. Lucas Island Model

TOPICS IN MACROECONOMICS: MODELLING INFORMATION, LEARNING AND EXPECTATIONS LECTURE NOTES. Lucas Island Model TOPICS IN MACROECONOMICS: MODELLING INFORMATION, LEARNING AND EXPECTATIONS LECTURE NOTES KRISTOFFER P. NIMARK Lucas Island Model The Lucas Island model appeared in a series of papers in the early 970s

More information

Fall 2017 Social Sciences 7418 University of Wisconsin-Madison Problem Set 3 Answers

Fall 2017 Social Sciences 7418 University of Wisconsin-Madison Problem Set 3 Answers ublc Affars 854 enze D. Chnn Fall 07 Socal Scences 748 Unversty of Wsconsn-adson roblem Set 3 Answers Due n Lecture on Wednesday, November st. " Box n" your answers to the algebrac questons.. Fscal polcy

More information

P roceedings of the Third International Colloquium on Grammatical Inference, ICGI'96 Lecture Notes in Artificial Intelligence Vol

P roceedings of the Third International Colloquium on Grammatical Inference, ICGI'96 Lecture Notes in Artificial Intelligence Vol P roeedings of the Third Interntionl Colloquium on Grmmtil Inferene, ICGI'96 Leture Notes in Artifiil Intelligene Vol. 1147. Springer 1996 Lerning liner grmmrs from struturl inform tion.? Jose M. Sempere

More information

>1 indicates country i has a comparative advantage in production of j; the greater the index, the stronger the advantage. RCA 1 ij

>1 indicates country i has a comparative advantage in production of j; the greater the index, the stronger the advantage. RCA 1 ij 69 APPENDIX 1 RCA Indces In the followng we present some maor RCA ndces reported n the lterature. For addtonal varants and other RCA ndces, Memedovc (1994) and Vollrath (1991) provde more thorough revews.

More information

Combinational Vs Sequential Logic Combinational circuit. Sequential Circuit ? F. CS221: Digital Design Sequential Logic Design (Latch & FF)

Combinational Vs Sequential Logic Combinational circuit. Sequential Circuit ? F. CS221: Digital Design Sequential Logic Design (Latch & FF) /5/25 22: Digil Design equenil Logic Design (Lch & FF) A. hu Dep of omp. c. & Engg. Indin Insiue of Technology Guwhi Ouline ominionl Vs equenil Logic Design Design flip flop, h sores one i lch ilizing

More information

Inequality, imperfect competition, and fiscal policy

Inequality, imperfect competition, and fiscal policy MRA Munch ersonl ReEc Archve Inequlty, mperfect competton, nd fscl polcy vlos Blmtss 4 October 07 Onlne t https://mpr.ub.un-muenchen.de/8556/ MRA per No. 8556, posted 0 November 07 07:09 UTC Inequlty,

More information

Revision Topic 14: Algebra

Revision Topic 14: Algebra Revision Topi 1: Algebr Indies: At Grde B nd C levels, you should be fmilir with the following rules of indies: b b y y y i.e. dd powers when multiplying; y b b y y i.e. subtrt powers when dividing; b

More information

Applications of Myerson s Lemma

Applications of Myerson s Lemma Applcatons of Myerson s Lemma Professor Greenwald 28-2-7 We apply Myerson s lemma to solve the sngle-good aucton, and the generalzaton n whch there are k dentcal copes of the good. Our objectve s welfare

More information

Elements of Economic Analysis II Lecture VI: Industry Supply

Elements of Economic Analysis II Lecture VI: Industry Supply Elements of Economc Analyss II Lecture VI: Industry Supply Ka Hao Yang 10/12/2017 In the prevous lecture, we analyzed the frm s supply decson usng a set of smple graphcal analyses. In fact, the dscusson

More information