Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Splay Trees Date: 9/27/16

Size: px
Start display at page:

Download "Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Splay Trees Date: 9/27/16"

Transcription

1 Introduction to lgoritms / lgoritms I Lecturer: Micael initz Topic: Splay Trees ate: 9/27/ Introduction Today we re going to talk even more about binary searc trees. -trees, red-black trees, VL trees, etc., go to a lot of effort to keep te tree balanced (or approximately balanced), making inserts pretty complicated. Today, we re going to talk about an advanced (and amazing) binary searc tree known as a splay tree, invented by Sleator and Tarjan. Tese are sometimes called self-adjusting binary searc trees, since tey do two tings very differently from oter balanced searc trees: tey don t do anyting to explicitly enforce balance, and tey cange te tree on lookups as well as on inserts. s we ll see, te worst-case performance of splay trees migt not be very good, but tey ave amazing amortized properties: any seuence of operations is actually very ceap. 8.2 Splay Trees Splay trees take a different approac, and provide wat is (in some sense) a weaker bound. We are only going to get O(log n)-amortized time bounds. Some lookup ueries migt actually take a long time (even Ω(n)) to complete. In return, we will get a muc simpler algoritm wit muc less to keep track of, as well as a number of nice properties wic we won t really ave time to talk about. Informally, toug, it turns out tat for splay trees you can prove te Static Optimality Teorem: if you compare te cost of doing m ueries on any fixed tree (suc as a red-black tree or VL tree after we ave finised all inserts), ten te splay tree is (essentially) optimal. Tis is true even if we know te seuence of lookups aead of time, and can tailor our searc tree exactly to te seuence of lookups! Splay trees manage tis despite not knowing te ueries in advance Tree rotations Tree rotations are a fundamental building block in most binary searc trees, including splay trees. It s an operation wic (in constant time) allows us to move a node one level iger in te tree, wile still ensuring te searc tree property by rearranging te tree structure appropriately. y repeatedly rotating te same node, we can eventually move it up to te root. Tis turns out to be a useful ability. basic rotation works as in te following figure. Tis is also called rotating on, or Rotate(), since it moves up one level. 1

2 learly after we do a rotate we still ave a searc tree, and now is one level closer to te root (te parent of pre-rotation is te parent of post-rotation). I aven t drawn it, but clearly tere s an euivalent rotation operation wen w starts out as te rigt cild of Splay Tree operations Splay trees are usually described in terms of tree basic operations tat extend simple rotations: te zig operation, te zig-zag operation, and te zig-zig operation. Note tat a basic rotation of a node only considers te parent and cildren. For a splay tree, we also need to consider te grandparent. Te two major operations (zig-zig and zig-zag) move a node up two levels at a time, and ten a zig is a one-level operation tat is necessary in case te eigt is odd. Zig: Te zig operation is te simplest: it is just a simple rotation. We only use it wen tere is no grandparent, i.e. te parent of te node tat we re at is te root. 2

3 Zig-Zag: Te zig-zag operation is also pretty simple: it s just two rotations (Rotate() followed by Rotate() again). We only do it wen te direction of te edge from te grandparent to te parent is different from te direction of te edge from te parent to te node. So tere are two settings wen we can use a zig-zag: if te node is te rigt cild of te parent and te parent is te left cild of te grandparent, or if te node is te left cild of te parent and te parent is te rigt cild of te grandparent. In tis case, we can essentially do two rotations so tat te node takes te place of te grandparent. x x Zig-Zig: Tis is te operation wic makes splay trees different from just simple rotations. Tere are two cases wic are not covered by zig-zag: if te node is te left cild of te parent and te parent is te left cild of te grandparent, or if te te node is te rigt cild of te parent and te parent is te rigt cild of te grandparent. In tese cases, instead of doing two rotations on, we rotate on and ten rotate on. Tis is called a zig-zig operation, and canges te tree as in te following figure. 3

4 x x Splay Tree algoritm Wit tese tree operations in and, it s easy to define te splay tree algoritm. Te combination of tese tree operations is called a splay. Tat is, we say tat we splay a node u if we first ceck wic of te tree situations it is in, and ten apply te appropriate operation (zig, zig-zag, or zig-zig). So instead of rotating a node up to te root, in a splay tree we splay it up to te root. On a Lookup uery, we first walk down te tree as in every binary searc tree to find te key. ut once we ave it, instead of returning it, we first splay it to te root, and ten return it. Tus unlike trees you migt be used to, in a splay tree a Lookup operation actually canges te structure of te tree. n Insert operation is done te same way: we walk down te tree to figure out were to insert it, ten insert it as a new leaf, and ten splay it to te root. 4

5 8.3 Splay Tree nalysis Note tat a single operation migt take a long time: te tree could get extremely unbalanced if we ave a particularly bad seuence of ueries, in wic case a single operation could take Ω(n) time (see te omework!). Te amazing ting is tat tis cannot appen very often: te amortized complexity of a Lookup or an Insert is only O(log n). We will tink of a single splay operation as aving cost 1. Tis means tat in te end, we ll get amortized bounds on te number of splay operations. Since eac splay operation takes a constant amount of time, tis will give us bounds on te running time (we re ignoring te cost of walking down te tree on a find or insert, since wenever we walk down we splay up te same amount, and so te adding in te walk down would (at most) double te running time). We first need a few definitions. In te following, T is a (splay) tree, u is an arbitrary node in T, and p is te parent of u and g is te grandparent of u. Let s(u) (called te size of u) be te number of nodes in te subtree rooted at u (including u itself). Let r(u) = log(s(u)) (called te rank of u tis is different from te rank we used in te omework). Let Φ(T ) = u T r(u). Tis is te potential function tat we will use. Let s start by noticing some easy properties of ranks. 1. oing a rotate on u affects te ranks of only u and p (te parent of u), and te rank of u after te rotation is eual to te rank of p before te rotation. 2. If two siblings bot ave rank i, ten te parent as rank i + 1. To see tis, let u and v be siblings of rank r wit parent p. Ten by te definition of rank, 2 i s(u) < 2 i+1 and 2 i s(u) < 2 i+1, and ence (wen we include p in s(p)) we get tat 2 i s(p) < 2 i+2. Tis implies tat r(p) = i Suppose tat a node u and its parent p bot ave rank i. Ten v, te oter cild of p, as rank less tan i. gain, tis is just by figuring out te sizes: if v also ad rank i, ten we would ave tat s(p) s(u) + s(v) 2 i + 2 i = 2 i+1 and so p would ave rank i + 1. Now let s analyze te cange in potential cause by eac of te tree splay operations. Let r be te rank function before te operation, and let r be te rank function after. Lemma In a zig operation, Φ r (u) r(u) 3(r (u) r(u)). Proof: Only p and u cange rank, so by definition Φ = r (p) r(p) + r (u) r(u). y our first property of ranks, we know tat r (u) = r(p), so we get tat Φ = r (p) r(u) r (u) r(u). Lemma In a zig-zag or zig-zig operation, Φ 3(r (u) r(u)) 1 Proof: Note tat only g, p, and u cange ranks, so Φ = r (g) r(g) + r (p) r(p) + r (u) r(u). We analyze te two operations separately. 5

6 onsider a zig-zag operation. We split into two cases, depending on te initial ranks. First, suppose tat r(g) = r(u) = r (and tus also r(p) = r). y our first property of ranks, we know tat r (u) = r. So by te last two properties of ranks, eiter r (p) or r (g) is strictly less tan r. Tus Φ 1 = 3(r (u) r(u)) 1. In te second case, suppose tat r(g) > r(u). Since r(g) = r (u), we know tat Φ = r (g) + r (p) r(p) r(u). Now by te last two properties of ranks, we know tat r (g) + r (p) 2r (u) 1, and we also know tat r(p) r(u). Hence Φ 2r (u) 1 2r(u) = 2(r (u) r(u)) 1 3(r (u) r(u)) 1. Now consider a zig-zig operation. We again break into te same two cases. In te first case, suppose tat r(g) = r(u) = r (and tus r(p) = r also). Recall tat wen we do a zig-zig, we first rotate p and ten rotate u. fter rotating p, te rank of p and te rank of u are still bot r, but g is now a cild of p and tus its rank must be strictly less tan r. Now wen we rotate u te rank of u becomes r, te rank of p becomes at most r, and te rank of g is still strictly less tan r. Hence Φ 1 = 3(r (u) r(u)) 1. In te second case, suppose tat r(g) > r(u). s always, r (u) and r(g) cancel out and so Φ = r (g) + r (p) r(p) r(u). Now we know tat r (g) + r (p) 2r (u), and also tat r(p) r(u), so we get tat Φ 2r (u) 2r(u) = 2(r (u) r(u)). Since r (u) r(u) 1, we can conclude tat Φ 3(r (u) r(u)) 1. So in every case, Φ 3(r (u) r(u)) 1. We can now prove te main lemma. Lemma Te amortized cost of splaying a node to te root is O(log n) Proof: We just need to bound te amortized cost of splaying an arbitrary node u up to te root of te tree. Tis will consist of a series of zig-zig or zig-zag operations, and ten possibly one zig operation. Let g 1 be te grandparent of u, let g 2 be te grandparent of g 1, etc., until we get a node g k wic is eiter te root or a cild of te root. We will assume tat g k is a cild of te root, since tat is te more difficult case. So in total we will do k ZZ operations and one zig operation. Let r i be te rank function after we ave done i splay operations, and let Φ i = v T r i(v) be te potential after i splay operations. Ten te total amortized cost is k+1 (1 + Φ i Φ i 1 ) i=1 k (1 + 3(r i (u) r i 1 (u)) 1) + (1 + 3(r k+1 (u) r k (u))) i=1 k+1 3(r i (u) r i 1 (u)) + 1 i=1 = 3(r k+1 (u) r 0 (u)) log n

7 Now we re essentially done! On a Find or an Insert, te time is essentially (up to a constant factor for te walk down) eual to te cost of splaying a node up to te root, and ence is at most O(log n). Sligtly more formally, we get te following corollary. Teorem Te running time of doing m operations on a splay tree wit at most n nodes is O(m log n + n log n). Proof: s we saw before wen doing amortized analysis, te actual running time of doing a seuence of operations is eual to teir amortized running time plus te initial potential minus te final potential. Since te final potential is at least 0 and te initial potential is at most n log n, tis means tat te actual running time is O(m log n + n log n) More results It turns out tat splay trees ave oter, very appealing properties. I m only going to discuss tese informally, but tere s a lot more on te internet. If you re interested, do some googling! Static Optimality: Suppose tat we want a binary searc tree for a specific access seuence. Ten we clearly will use our knowledge of tis seuence to make a better (fixed) tree we can put te most accessed elements towards te top of te tree, for example. Informally, as long as we do at least n Finds, it turns out tat splay trees are self-optimizing: tey perform at least as well (up to a constant factor) as te best fixed tree. Working Set: Suppose tat we want to access item x, and let k(x) be te number of distinct items tat we ave accessed since te last time we accessed x. Ten te amortized time to access x is only O(1 + log(k(x))). So if we ave a small working set (number of items tat we access regularly), ten te cost of eac access is actually less tan O(log n). ynamic Optimality onjecture: Tis is only a conjecture at tis point, not a teorem. Te conjecture is tat splay trees are, up to a constant factor, as good as any oter dynamic tree on every single access seuence. Here by a dynamic tree we mean a tree tat is allowed to cange troug rotations. So for any access seuence, not only are splay trees as good as te best fixed tree, te conjecture is tat tey are as good as te best dynamic tree. 7

Binary Search Tree and AVL Trees. Binary Search Tree. Binary Search Tree. Binary Search Tree. Techniques: How does the BST works?

Binary Search Tree and AVL Trees. Binary Search Tree. Binary Search Tree. Binary Search Tree. Techniques: How does the BST works? Binary Searc Tree and AVL Trees Binary Searc Tree A commonly-used data structure for storing and retrieving records in main memory PUC-Rio Eduardo S. Laber Binary Searc Tree Binary Searc Tree A commonly-used

More information

Practice Exam 1. Use the limit laws from class compute the following limit. Show all your work and cite all rules used explicitly. xf(x) + 5x.

Practice Exam 1. Use the limit laws from class compute the following limit. Show all your work and cite all rules used explicitly. xf(x) + 5x. Practice Exam 1 Tese problems are meant to approximate wat Exam 1 will be like. You can expect tat problems on te exam will be of similar difficulty. Te actual exam will ave problems from sections 11.1

More information

11.1 Average Rate of Change

11.1 Average Rate of Change 11.1 Average Rate of Cange Question 1: How do you calculate te average rate of cange from a table? Question : How do you calculate te average rate of cange from a function? In tis section, we ll examine

More information

Number of Municipalities. Funding (Millions) $ April 2003 to July 2003

Number of Municipalities. Funding (Millions) $ April 2003 to July 2003 Introduction Te Department of Municipal and Provincial Affairs is responsible for matters relating to local government, municipal financing, urban and rural planning, development and engineering, and coordination

More information

PRICE INDEX AGGREGATION: PLUTOCRATIC WEIGHTS, DEMOCRATIC WEIGHTS, AND VALUE JUDGMENTS

PRICE INDEX AGGREGATION: PLUTOCRATIC WEIGHTS, DEMOCRATIC WEIGHTS, AND VALUE JUDGMENTS Revised June 10, 2003 PRICE INDEX AGGREGATION: PLUTOCRATIC WEIGHTS, DEMOCRATIC WEIGHTS, AND VALUE JUDGMENTS Franklin M. Fiser Jane Berkowitz Carlton and Dennis William Carlton Professor of Economics Massacusetts

More information

Chapter 8. Introduction to Endogenous Policy Theory. In this chapter we begin our development of endogenous policy theory: the explicit

Chapter 8. Introduction to Endogenous Policy Theory. In this chapter we begin our development of endogenous policy theory: the explicit Capter 8 Introduction to Endogenous Policy Teory In tis capter we begin our development of endogenous policy teory: te explicit incorporation of a model of politics in a model of te economy, permitting

More information

ACC 471 Practice Problem Set # 4 Fall Suggested Solutions

ACC 471 Practice Problem Set # 4 Fall Suggested Solutions ACC 471 Practice Problem Set # 4 Fall 2002 Suggested Solutions 1. Text Problems: 17-3 a. From put-call parity, C P S 0 X 1 r T f 4 50 50 1 10 1 4 $5 18. b. Sell a straddle, i.e. sell a call and a put to

More information

2017 Year-End Retirement Action Plan

2017 Year-End Retirement Action Plan 2017 Year-End Retirement Action Plan Te end of te year is a good time to assess your overall financial picture, especially your retirement strategy. As te year comes to a close, use tis action plan to

More information

6.854J / J Advanced Algorithms Fall 2008

6.854J / J Advanced Algorithms Fall 2008 MIT OpenCourseWare http://ocw.mit.edu 6.854J / 18.415J Advanced Algorithms Fall 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. 18.415/6.854 Advanced

More information

Lecture 8 Feb 16, 2017

Lecture 8 Feb 16, 2017 CS 4: Advanced Algorithms Spring 017 Prof. Jelani Nelson Lecture 8 Feb 16, 017 Scribe: Tiffany 1 Overview In the last lecture we covered the properties of splay trees, including amortized O(log n) time

More information

What are Swaps? Basic Idea of Swaps. What are Swaps? Advanced Corporate Finance

What are Swaps? Basic Idea of Swaps. What are Swaps? Advanced Corporate Finance Wat are Swaps? Spring 2008 Basic Idea of Swaps A swap is a mutually beneficial excange of cas flows associated wit a financial asset or liability. Firm A gives Firm B te obligation or rigts to someting

More information

Introduction. Valuation of Assets. Capital Budgeting in Global Markets

Introduction. Valuation of Assets. Capital Budgeting in Global Markets Capital Budgeting in Global Markets Spring 2008 Introduction Capital markets and investment opportunities ave become increasingly global over te past 25 years. As firms (and individuals) are increasingly

More information

What are Swaps? Spring Stephen Sapp ISFP. Stephen Sapp

What are Swaps? Spring Stephen Sapp ISFP. Stephen Sapp Wat are Swaps? Spring 2013 Basic Idea of Swaps I ave signed up for te Wine of te Mont Club and you ave signed up for te Beer of te Mont Club. As winter approaces, I would like to ave beer but you would

More information

2.15 Province of Newfoundland and Labrador Pooled Pension Fund

2.15 Province of Newfoundland and Labrador Pooled Pension Fund Introduction Te Province of Newfoundland and Labrador sponsors defined benefit pension plans for its full-time employees and tose of its agencies, boards and commissions, and for members of its Legislature.

More information

ECON 200 EXERCISES (1,1) (d) Use your answer to show that (b) is not the equilibrium price vector if. that must be satisfied?

ECON 200 EXERCISES (1,1) (d) Use your answer to show that (b) is not the equilibrium price vector if. that must be satisfied? ECON 00 EXERCISES 4 EXCHNGE ECONOMY 4 Equilibrium in an ecange economy Tere are two consumers and wit te same utility function U ( ) ln H {, } Te aggregate endowment is tat prices sum to Tat is ( p, p)

More information

A Guide to Mutual Fund Investing

A Guide to Mutual Fund Investing AS OF DECEMBER 2016 A Guide to Mutual Fund Investing Many investors turn to mutual funds to meet teir long-term financial goals. Tey offer te benefits of diversification and professional management and

More information

CAMBRIDGE PUBLIC SCHOOLS FAMILY AND MEDICAL LEAVE, PARENTAL LEAVE AND SMALL NECESSITIES LEAVE POLICY

CAMBRIDGE PUBLIC SCHOOLS FAMILY AND MEDICAL LEAVE, PARENTAL LEAVE AND SMALL NECESSITIES LEAVE POLICY CAMBRIDGE PUBLIC SCHOOLS FAMILY AND MEDICAL LEAVE, PARENTAL LEAVE AND SMALL NECESSITIES LEAVE POLICY File: GCCAG Tis policy covers employee eligibility for leave under te related Family Medical Leave Act

More information

Notes 12 : Kesten-Stigum bound

Notes 12 : Kesten-Stigum bound Notes : Kesten-Stigum bound MATH 833 - Fall 0 Lecturer: Sebastien Roc References: [EKPS00, Mos0, MP03, BCMR06]. Kesten-Stigum bound Te previous teorem was proved by sowing tat majority is a good root estimator

More information

AMERICAN DEPOSITARY RECEIPTS. ISFP Stephen Sapp

AMERICAN DEPOSITARY RECEIPTS. ISFP Stephen Sapp AMERICAN DEPOSITARY RECEIPTS Stepen Sapp Definition: ADRs American Depositary Receipts (ADRs) are dollardenominated negotiable securities representing a sare of a non-us company. Tis security trades and

More information

DATABASE-ASSISTED spectrum sharing is a promising

DATABASE-ASSISTED spectrum sharing is a promising 1 Optimal Pricing and Admission Control for Heterogeneous Secondary Users Cangkun Jiang, Student Member, IEEE, Lingjie Duan, Member, IEEE, and Jianwei Huang, Fellow, IEEE Abstract Tis paper studies ow

More information

2.21 The Medical Care Plan Beneficiary Registration System. Introduction

2.21 The Medical Care Plan Beneficiary Registration System. Introduction 2.21 Te Medical Care Plan Beneficiary Registration System Introduction Te Newfoundland Medical Care Plan (MCP) was introduced in Newfoundland and Labrador on 1 April 1969. It is a plan of medical care

More information

Splay Trees. Splay Trees - 1

Splay Trees. Splay Trees - 1 Splay Trees In balanced tree schemes, explicit rules are followed to ensure balance. In splay trees, there are no such rules. Search, insert, and delete operations are like in binary search trees, except

More information

Complex Survey Sample Design in IRS' Multi-objective Taxpayer Compliance Burden Studies

Complex Survey Sample Design in IRS' Multi-objective Taxpayer Compliance Burden Studies Complex Survey Sample Design in IRS' Multi-objective Taxpayer Compliance Burden Studies Jon Guyton Wei Liu Micael Sebastiani Internal Revenue Service, Office of Researc, Analysis & Statistics 1111 Constitution

More information

Global Financial Markets

Global Financial Markets Global Financial Markets Spring 2013 Wat is a Market? A market is any system, institution, procedure and/or infrastructure tat brings togeter groups of people to trade goods, services and/or information.

More information

2.11 School Board Executive Compensation Practices. Introduction

2.11 School Board Executive Compensation Practices. Introduction Introduction Figure 1 As part of Education Reform in 1996-97, 27 denominational scool boards were consolidated into 10 scool boards and a Frenc-language scool board. From 1 January 1997 to 31 August 2004

More information

Market shares and multinationals investment: a microeconomic foundation for FDI gravity equations

Market shares and multinationals investment: a microeconomic foundation for FDI gravity equations Market sares and multinationals investment: a microeconomic foundation for FDI gravity equations Gaetano Alfredo Minerva November 22, 2006 Abstract In tis paper I explore te implications of te teoretical

More information

Financial Markets. What are Financial Markets? Major Financial Markets. Advanced Corporate Finance

Financial Markets. What are Financial Markets? Major Financial Markets. Advanced Corporate Finance Financial Markets Spring 2008 Wat are Financial Markets? A financial market is a mecanism tat allows people to buy and sell financial securities, commodities, and oter fungible financial assets wit low

More information

The study guide does not look exactly like the exam but it will help you to focus your study efforts.

The study guide does not look exactly like the exam but it will help you to focus your study efforts. Mat 0 Eam Study Guide Solutions Te study guide does not look eactly like te eam but it will elp you to focus your study efforts. Here is part of te list of items under How to Succeed in Mat 0 tat is on

More information

Calculus I Homework: Four Ways to Represent a Function Page 1. where h 0 and f(x) = x x 2.

Calculus I Homework: Four Ways to Represent a Function Page 1. where h 0 and f(x) = x x 2. Calculus I Homework: Four Ways to Represent a Function Page 1 Questions Example Find f(2 + ), f(x + ), and f(x + ) f(x) were 0 and f(x) = x x 2. Example Find te domain and sketc te grap of te function

More information

EXAMINATIONS OF THE HONG KONG STATISTICAL SOCIETY

EXAMINATIONS OF THE HONG KONG STATISTICAL SOCIETY EXAMINATIONS OF THE HONG KONG STATISTICAL SOCIETY HIGHER CERTIFICATE IN STATISTICS, 2012 MODULE 8 : Survey sampling and estimation Time allowed: One and a alf ours Candidates sould answer THREE questions.

More information

Making Informed Rollover Decisions

Making Informed Rollover Decisions Making Informed Rollover Decisions WHAT TO DO WITH YOUR EMPLOYER-SPONSORED RETIREMENT PLAN ASSETS UNDERSTANDING ROLLOVERS Deciding wat to do wit qualified retirement plan assets could be one of te most

More information

Taxes and Entry Mode Decision in Multinationals: Export and FDI with and without Decentralization

Taxes and Entry Mode Decision in Multinationals: Export and FDI with and without Decentralization Taxes and Entry Mode Decision in Multinationals: Export and FDI wit and witout Decentralization Yosimasa Komoriya y Cuo University Søren Bo Nielsen z Copenagen Business Scool Pascalis Raimondos z Copenagen

More information

Managing and Identifying Risk

Managing and Identifying Risk Managing and Identifying Risk Spring 2008 All of life is te management of risk, not its elimination Risk is te volatility of unexpected outcomes. In te context of financial risk it can relate to volatility

More information

3.1 THE 2 2 EXCHANGE ECONOMY

3.1 THE 2 2 EXCHANGE ECONOMY Essential Microeconomics -1-3.1 THE 2 2 EXCHANGE ECONOMY Private goods economy 2 Pareto efficient allocations 3 Edgewort box analysis 6 Market clearing prices and Walras Law 14 Walrasian Equilibrium 16

More information

Managing and Identifying Risk

Managing and Identifying Risk Managing and Identifying Risk Fall 2011 All of life is te management of risk, not its elimination Risk is te volatility of unexpected outcomes. In te context of financial risk te volatility is in: 1. te

More information

a) Give an example of a case when an (s,s) policy is not the same as an (R,Q) policy. (2p)

a) Give an example of a case when an (s,s) policy is not the same as an (R,Q) policy. (2p) roblem a) Give an example of a case wen an (s,s) policy is not te same as an (R,) policy. (p) b) Consider exponential smooting wit te smooting constant α and moving average over N periods. Ten, tese two

More information

2.17 Tax Expenditures. Introduction. Scope and Objectives

2.17 Tax Expenditures. Introduction. Scope and Objectives Introduction Programs offered by te Province are normally outlined in te Estimates and approved by te Members of te House of Assembly as part of te annual budgetary approval process. However, te Province

More information

Can more education be bad? Some simple analytics on financing better education for development

Can more education be bad? Some simple analytics on financing better education for development 55 an more education be bad? ome simple analytics on financing better education for development Rossana atrón University of Uruguay rossana@decon.edu.uy Investigaciones de Economía de la Educación 5 1091

More information

Exercise 1: Robinson Crusoe who is marooned on an island in the South Pacific. He can grow bananas and coconuts. If he uses

Exercise 1: Robinson Crusoe who is marooned on an island in the South Pacific. He can grow bananas and coconuts. If he uses Jon Riley F Maimization wit a single constraint F5 Eercises Eercise : Roinson Crusoe wo is marooned on an isl in te Sout Pacific He can grow ananas coconuts If e uses z acres to produce ananas z acres

More information

Econ 551 Government Finance: Revenues Winter, 2018

Econ 551 Government Finance: Revenues Winter, 2018 Econ 551 Government Finance: Revenues Winter, 2018 Given by Kevin Milligan Vancouver Scool of Economics University of Britis Columbia Lecture 4b: Optimal Commodity Taxation, Part II ECON 551: Lecture 4b

More information

Buildings and Properties

Buildings and Properties Introduction Figure 1 Te Department of Transportation and Works (formerly te Department of Works, Services and Transportation) is responsible for managing and maintaining approximately 650,000 square metres

More information

Data Structures. Binomial Heaps Fibonacci Heaps. Haim Kaplan & Uri Zwick December 2013

Data Structures. Binomial Heaps Fibonacci Heaps. Haim Kaplan & Uri Zwick December 2013 Data Structures Binomial Heaps Fibonacci Heaps Haim Kaplan & Uri Zwick December 13 1 Heaps / Priority queues Binary Heaps Binomial Heaps Lazy Binomial Heaps Fibonacci Heaps Insert Find-min Delete-min Decrease-key

More information

Supplemantary material to: Leverage causes fat tails and clustered volatility

Supplemantary material to: Leverage causes fat tails and clustered volatility Supplemantary material to: Leverage causes fat tails and clustered volatility Stefan Turner a,b J. Doyne Farmer b,c Jon Geanakoplos d,b a Complex Systems Researc Group, Medical University of Vienna, Wäringer

More information

Relaxing Standard Hedging Assumptions in the Presence of Downside Risk

Relaxing Standard Hedging Assumptions in the Presence of Downside Risk Relaxing Standard Hedging Assumptions in te Presence of Downside Risk Fabio Mattos Pilip Garcia Carl Nelson * Paper presented at te NCR-134 Conference on Applied Commodity Price Analysis, Forecasting,

More information

15-451/651: Design & Analysis of Algorithms November 9 & 11, 2015 Lecture #19 & #20 last changed: November 10, 2015

15-451/651: Design & Analysis of Algorithms November 9 & 11, 2015 Lecture #19 & #20 last changed: November 10, 2015 15-451/651: Design & Analysis of Algorithms November 9 & 11, 2015 Lecture #19 & #20 last changed: November 10, 2015 Last time we looked at algorithms for finding approximately-optimal solutions for NP-hard

More information

EconS Advanced Microeconomics II Handout on Moral Hazard

EconS Advanced Microeconomics II Handout on Moral Hazard EconS 503 - dvanced Microeconomics II Handout on Moral Hazard. Maco-Stadler, C. 3 #6 Consider a relationsi between a rincial and an agent in wic only two results, valued at 50,000 and 25,000 are ossible.

More information

15-451/651: Design & Analysis of Algorithms October 23, 2018 Lecture #16: Online Algorithms last changed: October 22, 2018

15-451/651: Design & Analysis of Algorithms October 23, 2018 Lecture #16: Online Algorithms last changed: October 22, 2018 15-451/651: Design & Analysis of Algorithms October 23, 2018 Lecture #16: Online Algorithms last changed: October 22, 2018 Today we ll be looking at finding approximately-optimal solutions for problems

More information

Chapter 16. Binary Search Trees (BSTs)

Chapter 16. Binary Search Trees (BSTs) Chapter 16 Binary Search Trees (BSTs) Search trees are tree-based data structures that can be used to store and search for items that satisfy a total order. There are many types of search trees designed

More information

Capital Budgeting in Global Markets

Capital Budgeting in Global Markets Capital Budgeting in Global Markets Spring 2013 Introduction Capital budgeting is te process of determining wic investments are wort pursuing. Firms (and individuals) can diversify teir operations (investments)

More information

Problem Solving Day: Geometry, movement, and Free-fall. Test schedule SOH CAH TOA! For right triangles. Last year s equation sheet included with exam.

Problem Solving Day: Geometry, movement, and Free-fall. Test schedule SOH CAH TOA! For right triangles. Last year s equation sheet included with exam. Problem Solving Day: Geometry, movement, and Free-fall. Test scedule First mid-term in 2 weeks! 7-10PM; Feb 8, Eiesland Hall. Review and practice a little eac day!!! EMAIL ME THIS WEEK if you ave class

More information

Labor Market Flexibility and Growth.

Labor Market Flexibility and Growth. Labor Market Flexibility and Growt. Enisse Karroubi July 006. Abstract Tis paper studies weter exibility on te labor market contributes to output growt. Under te assumption tat rms and workers face imperfect

More information

Raising Capital in Global Financial Markets

Raising Capital in Global Financial Markets Raising Capital in Global Financial Markets Fall 2010 Introduction Capital markets facilitate te issuance and subsequent trade of financial securities. Te financial securities are generally stock and bonds

More information

What is International Strategic Financial Planning (ISFP)?

What is International Strategic Financial Planning (ISFP)? Wat is International Strategic Financial Planning ()? Spring 2013 Wy do we need? Wat do we do in Finance? We evaluate and manage te timing and predictability of cas in- and outflows related to a corporation's

More information

Fibonacci Heaps Y Y o o u u c c an an s s u u b b m miitt P P ro ro b blle e m m S S et et 3 3 iin n t t h h e e b b o o x x u u p p fro fro n n tt..

Fibonacci Heaps Y Y o o u u c c an an s s u u b b m miitt P P ro ro b blle e m m S S et et 3 3 iin n t t h h e e b b o o x x u u p p fro fro n n tt.. Fibonacci Heaps You You can can submit submit Problem Problem Set Set 3 in in the the box box up up front. front. Outline for Today Review from Last Time Quick refresher on binomial heaps and lazy binomial

More information

Raising Capital in Global Financial Markets

Raising Capital in Global Financial Markets Raising Capital in Global Financial Markets Fall 2009 Introduction Capital markets facilitate te issuance and subsequent trade of financial securities. Te financial securities are generally stock and bonds

More information

Unemployment insurance and informality in developing countries

Unemployment insurance and informality in developing countries 11-257 Researc Group: Public economics November 2011 Unemployment insurance and informality in developing countries DAVID BARDEY AND FERNANDO JARAMILLO Unemployment insurance/severance payments and informality

More information

In the following I do the whole derivative in one step, but you are welcome to split it up into multiple steps. 3x + 3h 5x 2 10xh 5h 2 3x + 5x 2

In the following I do the whole derivative in one step, but you are welcome to split it up into multiple steps. 3x + 3h 5x 2 10xh 5h 2 3x + 5x 2 Mat 160 - Assignment 3 Solutions - Summer 2012 - BSU - Jaimos F Skriletz 1 1. Limit Definition of te Derivative f( + ) f() Use te limit definition of te derivative, lim, to find te derivatives of te following

More information

Raising Capital in Global Financial Markets

Raising Capital in Global Financial Markets Raising Capital in Global Financial Markets Fall 2011 Introduction Capital markets facilitate te issuance and subsequent trade of financial securities. Te financial securities are generally stock and bonds

More information

Facility Sustainment and Firm Value: A Case Study Based on Target Corporation

Facility Sustainment and Firm Value: A Case Study Based on Target Corporation Facility Sustainment and Firm Value: A Case Study Based on Target Corporation Autor Robert Beac Abstract Tis paper argues tat increasing te level of facility sustainment (maintenance and repair) funding

More information

Climate Change and Flood Risk. Tim Reeder Regional Climate Change Programme Manager

Climate Change and Flood Risk. Tim Reeder Regional Climate Change Programme Manager Climate Cange and Flood Risk Tim Reeder Regional Climate Cange Programme Manager Structure of talk Callenges of flood risk management in London & climate cange issues Te TE 2100 Project - Climate Cange

More information

Figure 11. difference in the y-values difference in the x-values

Figure 11. difference in the y-values difference in the x-values 1. Numerical differentiation Tis Section deals wit ways of numerically approximating derivatives of functions. One reason for dealing wit tis now is tat we will use it briefly in te next Section. But as

More information

Growth transmission. Econ 307. Assume. How much borrowing should be done? Implications for growth A B A B

Growth transmission. Econ 307. Assume. How much borrowing should be done? Implications for growth A B A B Growt transmission Econ 307 Lecture 5 GDP levels differ dramatically across countries Wy does tis not open up uge gains from trade? According to te most simple model, very low GDP countries sould ave very

More information

The International Elasticity Puzzle

The International Elasticity Puzzle Marc 2008 Te International Elasticity Puzzle Kim J. Rul* University of Texas at Austin ABSTRACT In models of international trade, te elasticity of substitution between foreign and domestic goods te Armington

More information

FDI and International Portfolio Investment - Complements or Substitutes? Preliminary Please do not quote

FDI and International Portfolio Investment - Complements or Substitutes? Preliminary Please do not quote FDI and International Portfolio Investment - Complements or Substitutes? Barbara Pfe er University of Siegen, Department of Economics Hölderlinstr. 3, 57068 Siegen, Germany Pone: +49 (0) 27 740 4044 pfe

More information

THE ROLE OF GOVERNMENT IN THE CREDIT MARKET. Benjamin Eden. Working Paper No. 09-W07. September 2009

THE ROLE OF GOVERNMENT IN THE CREDIT MARKET. Benjamin Eden. Working Paper No. 09-W07. September 2009 THE ROLE OF GOVERNMENT IN THE CREDIT MARKET by Benjamin Eden Working Paper No. 09-W07 September 2009 DEPARTMENT OF ECONOMICS VANDERBILT UNIVERSITY NASHVILLE, TN 37235 www.vanderbilt.edu/econ THE ROLE OF

More information

SAT Practice Test #1 IMPORTANT REMINDERS. A No. 2 pencil is required for the test. Do not use a mechanical pencil or pen.

SAT Practice Test #1 IMPORTANT REMINDERS. A No. 2 pencil is required for the test. Do not use a mechanical pencil or pen. SAT Practice Test # IMPORTAT REMIDERS A o. pencil is required for te test. Do not use a mecanical pencil or pen. Saring any questions wit anyone is a violation of Test Security and Fairness policies and

More information

The Leveraging of Silicon Valley

The Leveraging of Silicon Valley Te Leveraging of Silicon Valley Jesse Davis, Adair Morse, Xinxin Wang Marc 2018 Abstract Venture debt is now observed in 28-40% of venture financings. We model and document ow tis early-stage leveraging

More information

A NOTE ON VARIANCE DECOMPOSITION WITH LOCAL PROJECTIONS

A NOTE ON VARIANCE DECOMPOSITION WITH LOCAL PROJECTIONS A NOTE ON VARIANCE DECOMPOSITION WITH LOCAL PROJECTIONS Yuriy Gorodnicenko University of California Berkeley Byoungcan Lee University of California Berkeley and NBER October 7, 17 Abstract: We propose

More information

Labor Market Flexibility and Growth.

Labor Market Flexibility and Growth. Labor Market Flexibility and Growt. Enisse Karroubi May 9, 006. Abstract Tis paper studies weter exibility on te labor market contributes to output growt. First I document two stylized facts concerning

More information

Stochastic Dominance of Portfolio Insurance Strategies

Stochastic Dominance of Portfolio Insurance Strategies Annals of Operations Researc manuscript No. (will be inserted by te editor) Stocastic Dominance of Portfolio Insurance Strategies OBPI versus CPPI Rudi Zagst, Julia Kraus 2 HVB-Institute for Matematical

More information

PARELLIZATION OF DIJKSTRA S ALGORITHM: COMPARISON OF VARIOUS PRIORITY QUEUES

PARELLIZATION OF DIJKSTRA S ALGORITHM: COMPARISON OF VARIOUS PRIORITY QUEUES PARELLIZATION OF DIJKSTRA S ALGORITHM: COMPARISON OF VARIOUS PRIORITY QUEUES WIKTOR JAKUBIUK, KESHAV PURANMALKA 1. Introduction Dijkstra s algorithm solves the single-sourced shorest path problem on a

More information

The Long (and Short) on Taxation and Expenditure Policies

The Long (and Short) on Taxation and Expenditure Policies Zsolt Becsi Economist Te Long (and Sort) on Taxation and Expenditure Policies O ne of te central issues in te 1992 presidential campaign was ow best to promote economic growt Because muc of te growt debate

More information

PROCUREMENT CONTRACTS: THEORY VS. PRACTICE. Leon Yang Chu* and David E. M. Sappington** Abstract

PROCUREMENT CONTRACTS: THEORY VS. PRACTICE. Leon Yang Chu* and David E. M. Sappington** Abstract PROCUREMENT CONTRACTS: THEORY VS. PRACTICE by Leon Yang Cu* and David E. M. Sappington** Abstract La ont and Tirole s (1986) classic model of procurement under asymmetric information predicts tat optimal

More information

The Implicit Pipeline Method

The Implicit Pipeline Method Te Implicit Pipeline Metod Jon B. Pormann NSF/ERC for Emerging Cardiovascular Tecnologies Duke University, Duram, NC, 7708-096 Jon A. Board, Jr. Department of Electrical and Computer Engineering Duke University,

More information

Price indeterminacy in day-ahead market

Price indeterminacy in day-ahead market Price indeterminacy in day-aead market Mid-Price rule A "price indeterminacy" is a situation in wic at least two feasible solutions wit te same matced volume, te same block and MIC selections and te same

More information

Who gets the urban surplus?

Who gets the urban surplus? 8/11/17 Wo gets te urban surplus? Paul Collier Antony J. Venables, University of Oxford and International Growt Centre Abstract Hig productivity in cities creates an economic surplus relative to oter areas.

More information

European Accounting Review, 17 (3):

European Accounting Review, 17 (3): Provided by te autor(s) and University College Dublin Library in accordance wit publiser policies. Please cite te publised version wen available. Title A Comparison of Error Rates for EVA, Residual Income,

More information

Maximizing the Sharpe Ratio and Information Ratio in the Barra Optimizer

Maximizing the Sharpe Ratio and Information Ratio in the Barra Optimizer www.mscibarra.com Maximizing te Sarpe Ratio and Information Ratio in te Barra Optimizer June 5, 2009 Leonid Kopman Scott Liu 2009 MSCI Barra. All rigts reserved. of 4 Maximizing te Sarpe Ratio ABLE OF

More information

Delocation and Trade Agreements in Imperfectly Competitive Markets (Preliminary)

Delocation and Trade Agreements in Imperfectly Competitive Markets (Preliminary) Delocation and Trade Agreements in Imperfectly Competitive Markets (Preliminary) Kyle Bagwell Stanford and NBER Robert W. Staiger Stanford and NBER June 20, 2009 Abstract We consider te purpose and design

More information

Financial Constraints and Product Market Competition: Ex-ante vs. Ex-post Incentives

Financial Constraints and Product Market Competition: Ex-ante vs. Ex-post Incentives University of Rocester From te SelectedWorks of Micael Rait 2004 Financial Constraints and Product Market Competition: Ex-ante vs. Ex-post Incentives Micael Rait, University of Rocester Paul Povel, University

More information

Outline for Today. Quick refresher on binomial heaps and lazy binomial heaps. An important operation in many graph algorithms.

Outline for Today. Quick refresher on binomial heaps and lazy binomial heaps. An important operation in many graph algorithms. Fibonacci Heaps Outline for Today Review from Last Time Quick refresher on binomial heaps and lazy binomial heaps. The Need for decrease-key An important operation in many graph algorithms. Fibonacci Heaps

More information

Lifetime Aggregate Labor Supply with Endogenous Workweek Length*

Lifetime Aggregate Labor Supply with Endogenous Workweek Length* Federal Reserve Bank of Minneapolis Researc Department Staff Report 400 November 007 Lifetime Aggregate Labor Supply wit Endogenous Workweek Lengt* Edward C. Prescott Federal Reserve Bank of Minneapolis

More information

Bayesian range-based estimation of stochastic volatility models

Bayesian range-based estimation of stochastic volatility models Finance Researc Letters (005 0 09 www.elsevier.com/locate/frl Bayesian range-based estimation of stocastic volatility models Micael W. Brandt a,b,, Cristoper S. Jones c a Fuqua Scool of Business, Duke

More information

A N N U A L R E P O R T 225 North 13th Avenue Post Office Box 988 Laurel, Mississippi

A N N U A L R E P O R T 225 North 13th Avenue Post Office Box 988 Laurel, Mississippi COMPANY PROFILE Sanderson Farms, Inc. is engaged in te production, processing, marketing and distribution of fres and frozen cicken and oter prepared food items. Te Company sells its cicken products primarily

More information

Asset Pricing with Heterogeneous Agents and Long-Run Risk

Asset Pricing with Heterogeneous Agents and Long-Run Risk Asset Pricing wit Heterogeneous Agents and Long-Run Risk Walter Pol Dept. of Finance NHH Bergen Karl Scmedders Dept. of Business Adm. University of Zuric Ole Wilms Dept. of Finance Tilburg University September

More information

Research. Michigan. Center. Retirement

Research. Michigan. Center. Retirement Micigan University of Retirement Researc Center Working Paper WP 2008-179 Ho Does Modeling of Retirement Decisions at te Family Level Affect Estimates of te Impact of Social Security Policies on Retirement?

More information

Engineering and Information Services BENEFITS ENROLLMENT

Engineering and Information Services BENEFITS ENROLLMENT Engineering and Information Services 2018 BENEFITS ENROLLMENT Welcome to 2018 Open Enrollment We are pleased to continue to offer eligible employees and teir dependents a robust benefits program for 2018.

More information

Meld(Q 1,Q 2 ) merge two sets

Meld(Q 1,Q 2 ) merge two sets Priority Queues MakeQueue Insert(Q,k,p) Delete(Q,k) DeleteMin(Q) Meld(Q 1,Q 2 ) Empty(Q) Size(Q) FindMin(Q) create new empty queue insert key k with priority p delete key k (given a pointer) delete key

More information

NBER WORKING PAPER SERIES EMPIRICAL ESTIMATES FOR ENVIRONMENTAL POLICY MAKING IN A SECOND-BEST SETTING. Sarah E. West Roberton C.

NBER WORKING PAPER SERIES EMPIRICAL ESTIMATES FOR ENVIRONMENTAL POLICY MAKING IN A SECOND-BEST SETTING. Sarah E. West Roberton C. NBER WORKING PAPER SERIES EMPIRICAL ESTIMATES FOR ENVIRONMENTAL POLICY MAKING IN A SECOND-BEST SETTING Sara E. West Roberton C. Williams III Working Paper 10330 ttp://www.nber.org/papers/w10330 NATIONAL

More information

Introduction to Greedy Algorithms: Huffman Codes

Introduction to Greedy Algorithms: Huffman Codes Introduction to Greedy Algorithms: Huffman Codes Yufei Tao ITEE University of Queensland In computer science, one interesting method to design algorithms is to go greedy, namely, keep doing the thing that

More information

Raising Capital in Global Financial Markets

Raising Capital in Global Financial Markets Raising Capital in Global Financial Markets Spring 2012 Wat are Capital Markets? Capital markets facilitate te issuance and subsequent trade of financial securities. Te financial securities are generally

More information

On the Optimality of a Family of Binary Trees Techical Report TR

On the Optimality of a Family of Binary Trees Techical Report TR On the Optimality of a Family of Binary Trees Techical Report TR-011101-1 Dana Vrajitoru and William Knight Indiana University South Bend Department of Computer and Information Sciences Abstract In this

More information

How Effective Is the Minimum Wage at Supporting the Poor? a

How Effective Is the Minimum Wage at Supporting the Poor? a How Effective Is te Minimum Wage at Supporting te Poor? a Tomas MaCurdy b Stanford University Revised: February 2014 Abstract Te efficacy of minimum wage policies as an antipoverty initiative depends on

More information

Hedging Segregated Fund Guarantees

Hedging Segregated Fund Guarantees Hedging Segregated Fund Guarantees Heat A. Windcliff Dept. of Computer Science University of Waterloo, Waterloo ON, Canada N2L 3G1. awindcliff@elora.mat.uwaterloo.ca Peter A. Forsyt Dept. of Computer Science

More information

Sublinear Time Algorithms Oct 19, Lecture 1

Sublinear Time Algorithms Oct 19, Lecture 1 0368.416701 Sublinear Time Algorithms Oct 19, 2009 Lecturer: Ronitt Rubinfeld Lecture 1 Scribe: Daniel Shahaf 1 Sublinear-time algorithms: motivation Twenty years ago, there was practically no investigation

More information

Efficient Replication of Factor Returns

Efficient Replication of Factor Returns www.mscibarra.com Efficient Replication of Factor Returns To appear in te Journal of Portfolio Management June 009 Dimitris Melas Ragu Suryanarayanan Stefano Cavaglia 009 MSCI Barra. All rigts reserved.

More information

Journal of Corporate Finance

Journal of Corporate Finance Journal of Corporate Finance 9 (23) 9 39 Contents lists available at civerse ciencedirect Journal of Corporate Finance journal omepage: www.elsevier.com/locate/jcorpfin Production and edging implications

More information

Price Level Volatility: A Simple Model of Money Taxes and Sunspots*

Price Level Volatility: A Simple Model of Money Taxes and Sunspots* journal of economic teory 81, 401430 (1998) article no. ET972362 Price Level Volatility: A Simple Model of Money Taxes and Sunspots* Joydeep Battacarya Department of Economics, Fronczak Hall, SUNY-Buffalo,

More information

1 Solutions to Tute09

1 Solutions to Tute09 s to Tute0 Questions 4. - 4. are straight forward. Q. 4.4 Show that in a binary tree of N nodes, there are N + NULL pointers. Every node has outgoing pointers. Therefore there are N pointers. Each node,

More information

Lecture l(x) 1. (1) x X

Lecture l(x) 1. (1) x X Lecture 14 Agenda for the lecture Kraft s inequality Shannon codes The relation H(X) L u (X) = L p (X) H(X) + 1 14.1 Kraft s inequality While the definition of prefix-free codes is intuitively clear, we

More information