

 Eustace Copeland
 3 years ago
 Views:
Transcription
1 The Roos of Lisp paul graham Draf, January 18, In 1960, John McCarhy published a remarkable paper in which he did for programming somehing like wha Euclid did for geomery. 1 He showed how, given a handful of simple operaors and a noaion for funcions, you can build a whole programming language. He called his language Lisp, for \Lis Processing," because one of his key ideas was o use a simple daa srucure called a lis for boh code and daa. I's worh undersanding wha McCarhy discovered, no jus as a landmark in he hisory of compuers, bu as a model for wha programming is ending o become in our own ime. I seems o me ha here have been wo really clean, consisen models of programming so far: he C model and he Lisp model. These wo seempoins of high ground, wih swampylowlands beween hem. As compuers have grown more powerful, he new languages being developed have been moving seadily oward he Lisp model. A popular recipe for new programming languages in he pas 20 years has been o ake he C model of compuing and add o i, piecemeal, pars aken from he Lisp model, like runime yping and garbage collecion. In his aricle I'm going o ry o explain in he simples possible erms wha McCarhy discovered. The poin is no jus o learn abou an ineresing heoreical resul someone gured ou fory years ago, bu o show where languages are heading. The unusual hing abou Lisp in fac, he dening qualiy of Lisp is ha i can be wrien in iself. To undersand wha Mc Carhy meanby his, we're going o rerace his seps, wih his mahemaical noaion ranslaed ino running Common Lisp code. 1 Seven Primiive Operaors To sar wih, we dene an expression. An expression is eiher an aom, which is a sequence of leers (e.g. foo), or a lis of zero or more expressions, separaed by whiespace and enclosed by parenheses. Here are some expressions: foo (foo) (foo bar) (a b (c) d) The las expression is a lis of four elemens, he hird of which is iself a lis of one elemen. 1 \Recursive Funcions of Symbolic Expressions and Their Compuaion by Machine, Par I." Communicaions of he ACM 3:4, April 1960, pp. 184{195. 1
2 In arihmeic he expression has he value 2. Valid Lisp expressions also have values. If an expression e yields a value v we sayhae reurns v. Our nex sep is o dene wha kinds of expressions here can be, and wha value each kind reurns. If an expression is a lis, we call he rs elemen he operaor and he remaining elemens he argumens. We are going o dene seven primiive (in he sense of axioms) operaors: quoe, aom, eq, car, cdr, cons, and cond. 1. (quoe x) reurns x. For readabiliy we will abbreviae (quoe x) as 'x. > (quoe a) a > 'a a > (quoe ) 2. (aom x) reurns he aom if he value of x is an aom or he empy lis. Oherwise i reurns. In Lisp we convenionally use he aom o represen ruh, and he empy lis o represen falsiy. > (aom 'a) > (aom ') > (aom ') Now ha we have an operaor whose argumen is evaluaed we can show wha quoe is for. By quoing a lis we proec i from evaluaion. An unquoed lis given as an argumen o an operaor like aom is reaed as code: > (aom (aom 'a)) whereas a quoed lis is reaed as mere lis, in his case a lis of wo elemens: > (aom '(aom 'a)) This corresponds o he way we use quoes in English. Cambridge is a own in Massachuses ha conains abou 90,000 people. \Cambridge" is a word ha conains nine leers. 2
3 Quoe may seem a bi of a foreign concep, because few oher languages have anyhing like i. I's closely ied o one of he mos disincive feaures of Lisp: code and daa are made ou of he same daa srucures, and he quoe operaor is he way we disinguish beween hem. 3. (eq x y) reurns if he values of x and y are he same aom or boh he empy lis, and oherwise. > (eq 'a 'a) > (eq 'a 'b) > (eq ' ') 4. (car x) expecs he value of x o be a lis, and reurns is rs elemen. > (car ') a 5. (cdr x) expecs he value of x o be a lis, and reurns everyhing afer he rs elemen. > (cdr ') (b c) 6. (cons x y) expecs he value of y o be a lis, and reurns a lis conaining he value of x followed by he elemens of he value of y. > (cons 'a '(b c)) > (cons 'a (cons 'b (cons 'c '))) > (car (cons 'a '(b c))) a > (cdr (cons 'a '(b c))) (b c) 7. (cond (p 1 e 1 ) ::: (p n e n )) is evaluaed as follows. The p expressions are evaluaed in order unil one reurns. When one is found, he value of he corresponding e expression is reurned as he value of he whole cond expression. > (cond ((eq 'a 'b) 'firs) ((aom 'a) 'second)) second 3
4 In ve of our seven primiive operaors, he argumens are always evaluaed when an expression beginning wih ha operaor is evaluaed. 2 We will call an operaor of ha ype a funcion. 2 Denoing Funcions Nex we dene a noaion for describing funcions. A funcion is expressed as (lambda (p 1 :::p n ) e), where p 1 :::p n are aoms (called parameers) and e is an expression. An expression whose rs elemen is such an expression ((lambda (p 1 :::p n ) e) a 1 :::a n ) is called a funcion call and is value is compued as follows. Each expression a i is evaluaed. Then e is evaluaed. During he evaluaion of e, he value of any occurrence of one of he p i is he value of he corresponding a i in he mos recen funcion call. > ((lambda (x) (cons x '(b))) 'a) (a b) > ((lambda (x y) (cons x (cdr y))) 'z ') (z b c) If an expression has as is rs elemen an aom f ha is no one of he primiive operaors (f a 1 :::a n ) and he value of f isafuncion(lambda (p 1 :::p n ) e) hen he value of he expression is he value of ((lambda (p 1 :::p n ) e) a 1 :::a n ) In oher words, parameers can be used as operaors in expressions as well as argumens: > ((lambda (f) (f '(b c))) '(lambda (x) (cons 'a x))) There is anoher noaion for funcions ha enables he funcion o refer o iself, hereby giving us a convenien way odene recursive funcions. 3 The 2 Expressions beginning wih he oher wo operaors, quoe and cond, are evaluaed differenly. When a quoe expression is evaluaed, is argumen is no evaluaed, bu is simply reurned as he value of he whole quoe expression. And in a valid cond expression, only an Lshaped pah of subexpressions will be evaluaed. 3 Logically we don' need o dene a new noaion for his. We could dene recursive funcions in our exising noaion using a funcion on funcions called he Y combinaor. I may be ha McCarhy did no know abou he Y combinaor when he wroe his paper in any case, label noaion is more readable. 4
5 noaion (label f (lambda (p 1 :::p n ) e)) denoes a funcion ha behaves like (lambda (p 1 :::p n ) e), wih he addiional propery ha an occurrence of f wihin e will evaluae o he label expression, as if f were a parameer of he funcion. Suppose we wan o dene a funcion (subs x y z), which akes an expression x, an aom y, and a lis z, and reurns a lis like z bu wih each insance of y (a any deph of nesing) in z replaced by x. > (subs 'm 'b '(a b d)) (a m (a m c) d) We can denoe his funcion as (label subs (lambda (x y z) (cond ((aom z) (cond ((eq z y) x) (' z))) (' (cons (subs x y (car z)) (subs x y (cdr z))))))) We will abbreviae f = (label f (lambda (p 1 :::p n ) e)) as (defun f (p 1 :::p n ) e) so (defun subs (x y z) (cond ((aom z) (cond ((eq z y) x) (' z))) (' (cons (subs x y (car z)) (subs x y (cdr z))))))) Incidenally, we see here how o ge a defaul clause in a cond expression. A clause whose rs elemen is' will always succeed. So (cond (x y) (' z)) is equivalen o wha we migh wrie in a language wih synax as if x hen y else z 3 Some Funcions Now ha we have away of expressing funcions, we dene some new ones in erms of our seven primiive operaors. Firs i will be convenien o inroduce 5
6 some abbreviaions for common paerns. We will use cxr, where x is a sequence of as or ds, as an abbreviaion for he corresponding composiion of car and cdr. So for example (cadr e) is an abbreviaion for (car (cdr e)), which reurns he second elemen of e. > (cadr '((a b) (c d) e)) (c d) > (caddr '((a b) (c d) e)) e > (cdar '((a b) (c d) e)) (b) Also, we will use (lis e 1 :::e n ) for (cons e 1 ::: (cons e n ') ::: ). > (cons 'a (cons 'b (cons 'c '))) > (lis 'a 'b 'c) Now we dene some new funcions. I've changed he names of hese funcions by adding periods a he end. This disinguishes primiive funcions from hose dened in erms of hem, and also avoids clashes wih exising Common Lisp funcions. 1. (null. x) ess wheher is argumen is he empy lis. (defun null. (x) (eq x ')) > (null. 'a) > (null. ') 2. (and. x y) reurns if boh is argumens do and oherwise. (defun and. (x y) (cond (x (cond (y ') (' '))) (' '))) > (and. (aom 'a) (eq 'a 'a)) > (and. (aom 'a) (eq 'a 'b)) 3. (no. x) reurns if is argumen reurns, and if is argumen reurns. 6
7 (defun no. (x) (cond (x ') (' '))) > (no (eq 'a 'a)) > (no (eq 'a 'b)) 4. (append. x y) akes wo liss and reurns heir concaenaion. (defun append. (x y) (cond ((null. x) y) (' (cons (car x) (append. (cdr x) y))))) > (append. '(a b) '(c d)) (a b c d) > (append. ' '(c d)) (c d) 5. (pair. x y) akes wo liss of he same lengh and reurns a lis of woelemen liss conaining successive pairs of an elemen from each. (defun pair. (x y) (cond ((and. (null. x) (null. y)) ') ((and. (no. (aom x)) (no. (aom y))) (cons (lis (car x) (car y)) (pair. (cdr x) (cdr y)))))) > (pair. '(x y z) ') ((x a) (y b) (z c)) 6. (assoc. x y) akes an aom x and a lis y of he form creaed by pair., and reurns he second elemen of he rs lis in y whose rs elemen is x. (defun assoc. (x y) (cond ((eq (caar y) x) (cadar y)) (' (assoc. x (cdr y))))) > (assoc. 'x '((x a) (y b))) a > (assoc. 'x '((x new) (x a) (y b))) new 7
8 4 The Surprise So we can dene funcions ha concaenae liss, subsiue one expression for anoher, ec. An elegan noaion, perhaps, bu so wha? Now comes he surprise. We can also, i urns ou, wrie a funcion ha acs as an inerpreer for our language: a funcion ha akes as an argumen any Lisp expression, and reurns is value. Here i is: (defun eval. (e a) (cond ((aom e) (assoc. e a)) ((aom (car e)) (cond ((eq (car e) 'quoe) (cadr e)) ((eq (car e) 'aom) (aom (eval. (cadr e) a))) ((eq (car e) 'eq) (eq (eval. (cadr e) a) (eval. (caddr e) a))) ((eq (car e) 'car) (car (eval. (cadr e) a))) ((eq (car e) 'cdr) (cdr (eval. (cadr e) a))) ((eq (car e) 'cons) (cons (eval. (cadr e) a) (eval. (caddr e) a))) ((eq (car e) 'cond) (evcon. (cdr e) a)) (' (eval. (cons (assoc. (car e) a) (cdr e)) a)))) ((eq (caar e) 'label) (eval. (cons (caddar e) (cdr e)) (cons (lis (cadar e) (car e)) a))) ((eq (caar e) 'lambda) (eval. (caddar e) (append. (pair. (cadar e) (evlis. (cdr e) a)) a))))) (defun evcon. (c a) (cond ((eval. (caar c) a) (eval. (cadar c) a)) (' (evcon. (cdr c) a)))) (defun evlis. (m a) (cond ((null. m) ') (' (cons (eval. (car m) a) (evlis. (cdr m) a))))) The deniion of eval. is longer han any of he ohers we've seen before. Le's consider how each par works. The funcion akes wo argumens: e, he expression o be evaluaed, and a, a lis represening he values ha aoms have been given by appearing as 8
9 parameers in funcion calls. This lis is called he environmen, and i is of he form creaed by pair.. I was in order o build and search hese liss ha we wroe pair. and assoc.. The spine of eval. is a cond expression wih four clauses. How we evaluae an expression depends on wha kind i is. The rs clause handles aoms. If e is an aom, we look up is value in he environmen: > (eval. 'x '((x a) (y b))) a The second clause of eval. is anoher cond for handling expressions of he form (a :::), where a is an aom. These include all he uses of he primiive operaors, and here is a clause for each one. > (eval. '(eq 'a 'a) ') > (eval. '(cons x '(b c)) '((x a) (y b))) All of hese (excep quoe) call eval. o nd he value of he argumens. The las wo clauses are more complicaed. To evaluae a cond expression we call a subsidiary funcion called evcon., which works is way hrough he clauses recursively, looking for one in which he rs elemen reurns. When i nds such a clause i reurns he value of he second elemen. > (eval. '(cond ((aom x) 'aom) (' 'lis)) '((x '(a b)))) lis The nal par of he second clause of eval. handles calls o funcions ha have been passed as parameers. I works by replacing he aom wih is value (which ough o be a lambda or label expression) and evaluaing he resuling expression. So (eval. '(f '(b c)) '((f (lambda (x) (cons 'a x))))) urns ino (eval. '((lambda (x) (cons 'a x)) '(b c)) '((f (lambda (x) (cons 'a x))))) which reurns. The las wo clauses in eval. handle funcion calls in which he rs elemen is an acual lambda or label expression. A label expression is evaluaed by pushing a lis of he funcion name and he funcion iself ono he environmen, and hen calling eval. on an expression wih he inner lambda expression subsiued for he label expression. Tha is, 9
10 (eval. '((label firsaom (lambda (x) (cond ((aom x) x) (' (firsaom (car x)))))) y) '((y ((a b) (c d))))) becomes (eval. '((lambda (x) (cond ((aom x) x) (' (firsaom (car x))))) y) '((firsaom (label firsaom (lambda (x) (cond ((aom x) x) (' (firsaom (car x))))))) (y ((a b) (c d))))) which evenually reurns a. Finally, an expression of he form ((lambda (p 1 :::p n ) e) a 1 :::a n ) is evaluaed by rs calling evlis. o ge a lis of values (v 1 ::: v n ) of he argumens a 1 :::a n, and hen evaluaing e wih (p 1 v 1 ) :::(p n v n ) appended o he fron of he environmen. So (eval. '((lambda (x y) (cons x (cdr y))) 'a '(b c d)) ') becomes (eval. '(cons x (cdr y)) '((x a) (y (b c d)))) which evenually reurns (a c d). 5 Afermah Now ha we undersand how eval works, le's sep back and consider wha i means. Wha we have here is a remarkably elegan model of compuaion. Using jus quoe, aom, eq, car, cdr, cons, and cond, we can dene a funcion, eval., ha acually implemens our language, and hen using ha we can dene any addiional funcion we wan. There were already models of compuaion, of course mos noably he Turing Machine. Bu Turing Machine programs are no very edifying o read. If you wan a language for describing algorihms, you migh wan somehing more absrac, and ha was one of McCarhy's aims in dening Lisp. 10
11 The language he dened in 1960 was missing a lo. I has no sideeecs, no sequenial execuion (which is useful only wih side eecs anyway), no pracical numbers, 4 and dynamic scope. Bu hese limiaions can be remedied wih surprisingly lile addiional code. Seele and Sussman show how o do i in a famous paper called "The Ar of he Inerpreer." 5 If you undersand McCarhy's eval, you undersand more han jus a sage in he hisory of languages. These ideas are sill he semanic core of Lisp oday. So sudying McCarhy's original paper shows us, in a sense, wha Lisp really is. I's no somehing ha McCarhy designed so much as somehing he discovered. I's no inrinsically a language for AI or for rapid prooyping, or any oher ask a ha level. I's wha you ge (or one hing you ge) when you ry o axiomaize compuaion. Over ime, he median language, meaning he language used by he median programmer, has grown consisenly closer o Lisp. So by undersanding eval you're undersanding wha will probably be he main model of compuaion well ino he fuure. 4 I is possible o do arihmeic in McCarhy's 1960 Lisp by using e.g. a lis of n aoms o represen he number n. 5 Guy Lewis Seele, Jr. and Gerald Jay Sussman, "The Ar of he Inerpreer, or he Modulariy Complex (Pars Zero, One, and Two)," MIT AI Lab Memo 453, May
12 Noes In ranslaing McCarhy's noaion inorunningcodeiriedochange as lile as possible. I was emped o make he code easier o read, bu I waned o keep he avor of he original. In McCarhy's paper, falsiy is represened by f, no he empy lis. Iused o represen falsiy so ha he examples would work in Common Lisp. The code nowhere depends on falsiy happening also o be he empy lis nohing is ever consed ono he resul reurned by a predicae. I skipped building liss ou of doed pairs, because you don' need hem o undersand eval. I also skipped menioning apply, houghiwas apply (a very early form of i, whose main purpose was o quoe argumens) ha McCarhy called he universal funcion in 1960 eval was hen jus a subrouine ha apply called o do all he work. I dened lis and he cxrs as abbreviaions because ha's how McCarhy did i. In fac he cxrs could all have been dened as ordinary funcions. So could lis if we modied eval, as we easily could, o le funcions ake any number of argumens. McCarhy's paper only had ve primiive operaors. He used cond and quoe bu may have hough of hem as par of his mealanguage. He likewise didn' dene he logical operaors and and no, bu his is less of a problem because adequae versions can be dened as funcions. In he deniion of eval. we called oher funcions like pair. and assoc., bu any call o one of he funcions we dened in erms of he primiive operaors could be replaced by a call o eval.. Tha is, (assoc. (car e) a) could have been wrien as (eval. '((label assoc. (lambda (x y) (cond ((eq (caar y) x) (cadar y)) (' (assoc. x (cdr y)))))) (car e) a) (cons (lis 'e e) (cons (lis 'a a) a))) There was a small bug in McCarhy's eval. Line 16 was (equivalen o) (evlis. (cdr e) a) insead of jus (cdr e), which caused he argumens in a call o a named funcion o be evaluaed wice. This suggess ha his descripion of eval had no ye been implemened in IBM 704 machine language when he paper was submied. I also shows how hard i is o be sure of he correcness of any lengh of program wihou rying o run i. I encounered one oher problem in McCarhy's code. Afer giving he definiion of eval he goes on o give some examples of higherorder funcions funcions ha ake oher funcions as argumens. He denes maplis: 12
13 (label maplis (lambda (x f) (cond ((null x) ') (' (cons (f x) (maplis (cdr x) f)))))) hen uses i o wrie a simple funcion diff for symbolic diereniaion. Bu diff passes maplis a funcion ha uses x as a parameer, and he reference o i is capured by he parameer x wihin maplis. 6 I's an eloquen esimony o he dangers of dynamic scope ha even he very rs example of higherorder Lisp funcions was broken because of i. I may be ha McCarhy was no fully aware of he implicaions of dynamic scope in Dynamic scope remained in Lisp implemenaions for a surprisingly long ime unil Sussman and Seele developed Scheme in Lexical scope does no complicae he deniion of eval very much, bu i maymake compilers harder o wrie. 6 Presen day Lisp programmers would use mapcar insead of maplis here. This example does clear up one mysery: why maplis is in Common Lisp a all. I was he original mapping funcion, and mapcar a laer addiion. 13
State Machines: Brief Introduction to Sequencers Prof. Andrew J. Mason, Michigan State University
Inroducion ae Machines: Brief Inroducion o equencers Prof. Andrew J. Mason, Michigan ae Universiy A sae machine models behavior defined by a finie number of saes (unique configuraions), ransiions beween
More informationGraphing the Von Bertalanffy Growth Equation
file: d:\b1732013\von_beralanffy.wpd dae: Sepember 23, 2013 Inroducion Graphing he Von Beralanffy Growh Equaion Previously, we calculaed regressions of TL on SL for fish size daa and ploed he daa and
More information11. Tire pressure. Here we always work with relative pressure. That s what everybody always does.
11. Tire pressure. The graph You have a hole in your ire. You pump i up o P=400 kilopascals (kpa) and over he nex few hours i goes down ill he ire is quie fla. Draw wha you hink he graph of ire pressure
More informationDuration and Convexity ( ) 20 = Bond B has a maturity of 5 years and also has a required rate of return of 10%. Its price is $613.
Graduae School of Business Adminisraion Universiy of Virginia UVAF38 Duraion and Convexiy he price of a bond is a funcion of he promised paymens and he marke required rae of reurn. Since he promised
More informationRelative velocity in one dimension
Connexions module: m13618 1 Relaive velociy in one dimension Sunil Kumar Singh This work is produced by The Connexions Projec and licensed under he Creaive Commons Aribuion License Absrac All quaniies
More informationChapter 8: Regression with Lagged Explanatory Variables
Chaper 8: Regression wih Lagged Explanaory Variables Time series daa: Y for =1,..,T End goal: Regression model relaing a dependen variable o explanaory variables. Wih ime series new issues arise: 1. One
More informationThe Transport Equation
The Transpor Equaion Consider a fluid, flowing wih velociy, V, in a hin sraigh ube whose cross secion will be denoed by A. Suppose he fluid conains a conaminan whose concenraion a posiion a ime will be
More informationPROFIT TEST MODELLING IN LIFE ASSURANCE USING SPREADSHEETS PART ONE
Profi Tes Modelling in Life Assurance Using Spreadshees PROFIT TEST MODELLING IN LIFE ASSURANCE USING SPREADSHEETS PART ONE Erik Alm Peer Millingon 2004 Profi Tes Modelling in Life Assurance Using Spreadshees
More information1 HALFLIFE EQUATIONS
R.L. Hanna Page HALFLIFE EQUATIONS The basic equaion ; he saring poin ; : wrien for ime: x / where fracion of original maerial and / number of halflives, and / log / o calculae he age (# ears): age (halflife)
More informationIndividual Health Insurance April 30, 2008 Pages 167170
Individual Healh Insurance April 30, 2008 Pages 167170 We have received feedback ha his secion of he e is confusing because some of he defined noaion is inconsisen wih comparable life insurance reserve
More informationInductance and Transient Circuits
Chaper H Inducance and Transien Circuis Blinn College  Physics 2426  Terry Honan As a consequence of Faraday's law a changing curren hrough one coil induces an EMF in anoher coil; his is known as muual
More informationRepresenting Periodic Functions by Fourier Series. (a n cos nt + b n sin nt) n=1
Represening Periodic Funcions by Fourier Series 3. Inroducion In his Secion we show how a periodic funcion can be expressed as a series of sines and cosines. We begin by obaining some sandard inegrals
More informationWhy Did the Demand for Cash Decrease Recently in Korea?
Why Did he Demand for Cash Decrease Recenly in Korea? Byoung Hark Yoo Bank of Korea 26. 5 Absrac We explores why cash demand have decreased recenly in Korea. The raio of cash o consumpion fell o 4.7% in
More informationC FastDealing Property Trading Game C
AGES 8+ C FasDealing Propery Trading Game C Y Collecor s Ediion Original MONOPOLY Game Rules plus Special Rules for his Ediion. CONTENTS Game board, 6 Collecible okens, 28 Tile Deed cards, 16 Wha he Deuce?
More informationEntropy: From the Boltzmann equation to the Maxwell Boltzmann distribution
Enropy: From he Bolzmann equaion o he Maxwell Bolzmann disribuion A formula o relae enropy o probabiliy Ofen i is a lo more useful o hink abou enropy in erms of he probabiliy wih which differen saes are
More informationChapter 7. Response of FirstOrder RL and RC Circuits
Chaper 7. esponse of FirsOrder L and C Circuis 7.1. The Naural esponse of an L Circui 7.2. The Naural esponse of an C Circui 7.3. The ep esponse of L and C Circuis 7.4. A General oluion for ep and Naural
More informationINTEREST RATE FUTURES AND THEIR OPTIONS: SOME PRICING APPROACHES
INTEREST RATE FUTURES AND THEIR OPTIONS: SOME PRICING APPROACHES OPENGAMMA QUANTITATIVE RESEARCH Absrac. Exchangeraded ineres rae fuures and heir opions are described. The fuure opions include hose paying
More informationA Reexamination of the Joint Mortality Functions
Norh merican cuarial Journal Volume 6, Number 1, p.166170 (2002) Reeaminaion of he Join Morali Funcions bsrac. Heekung Youn, rkad Shemakin, Edwin Herman Universi of S. Thomas, Sain Paul, MN, US Morali
More informationPermutations and Combinations
Permuaions and Combinaions Combinaorics Copyrigh Sandards 006, Tes  ANSWERS Barry Mabillard. 0 www.mah0s.com 1. Deermine he middle erm in he expansion of ( a b) To ge he kvalue for he middle erm, divide
More information2.6 Limits at Infinity, Horizontal Asymptotes Math 1271, TA: Amy DeCelles. 1. Overview. 2. Examples. Outline: 1. Definition of limits at infinity
.6 Limis a Infiniy, Horizonal Asympoes Mah 7, TA: Amy DeCelles. Overview Ouline:. Definiion of is a infiniy. Definiion of horizonal asympoe 3. Theorem abou raional powers of. Infinie is a infiniy This
More information17 Laplace transform. Solving linear ODE with piecewise continuous right hand sides
7 Laplace ransform. Solving linear ODE wih piecewise coninuous righ hand sides In his lecure I will show how o apply he Laplace ransform o he ODE Ly = f wih piecewise coninuous f. Definiion. A funcion
More informationRandom Walk in 1D. 3 possible paths x vs n. 5 For our random walk, we assume the probabilities p,q do not depend on time (n)  stationary
Random Walk in D Random walks appear in many cones: diffusion is a random walk process undersanding buffering, waiing imes, queuing more generally he heory of sochasic processes gambling choosing he bes
More informationTable of contents Chapter 1 Interest rates and factors Chapter 2 Level annuities Chapter 3 Varying annuities
Table of conens Chaper 1 Ineres raes and facors 1 1.1 Ineres 2 1.2 Simple ineres 4 1.3 Compound ineres 6 1.4 Accumulaed value 10 1.5 Presen value 11 1.6 Rae of discoun 13 1.7 Consan force of ineres 17
More informationcooking trajectory boiling water B (t) microwave 0 2 4 6 8 101214161820 time t (mins)
Alligaor egg wih calculus We have a large alligaor egg jus ou of he fridge (1 ) which we need o hea o 9. Now here are wo accepable mehods for heaing alligaor eggs, one is o immerse hem in boiling waer
More informationUSE OF EDUCATION TECHNOLOGY IN ENGLISH CLASSES
USE OF EDUCATION TECHNOLOGY IN ENGLISH CLASSES Mehme Nuri GÖMLEKSİZ Absrac Using educaion echnology in classes helps eachers realize a beer and more effecive learning. In his sudy 150 English eachers were
More informationA Brief Introduction to the Consumption Based Asset Pricing Model (CCAPM)
A Brief Inroducion o he Consumpion Based Asse Pricing Model (CCAPM We have seen ha CAPM idenifies he risk of any securiy as he covariance beween he securiy's rae of reurn and he rae of reurn on he marke
More informationWHAT ARE OPTION CONTRACTS?
WHAT ARE OTION CONTRACTS? By rof. Ashok anekar An oion conrac is a derivaive which gives he righ o he holder of he conrac o do 'Somehing' bu wihou he obligaion o do ha 'Somehing'. The 'Somehing' can be
More information23.3. Even and Odd Functions. Introduction. Prerequisites. Learning Outcomes
Even and Odd Funcions 23.3 Inroducion In his Secion we examine how o obain Fourier series of periodic funcions which are eiher even or odd. We show ha he Fourier series for such funcions is considerabl
More informationNASDAQ100 Futures Index SM Methodology
NASDAQ100 Fuures Index SM Mehodology Index Descripion The NASDAQ100 Fuures Index (The Fuures Index ) is designed o rack he performance of a hypoheical porfolio holding he CME NASDAQ100 Emini Index
More informationMorningstar Investor Return
Morningsar Invesor Reurn Morningsar Mehodology Paper Augus 31, 2010 2010 Morningsar, Inc. All righs reserved. The informaion in his documen is he propery of Morningsar, Inc. Reproducion or ranscripion
More informationOn the degrees of irreducible factors of higher order Bernoulli polynomials
ACTA ARITHMETICA LXII.4 (1992 On he degrees of irreducible facors of higher order Bernoulli polynomials by Arnold Adelberg (Grinnell, Ia. 1. Inroducion. In his paper, we generalize he curren resuls on
More informationUnderstanding Sequential Circuit Timing
ENGIN112: Inroducion o Elecrical and Compuer Engineering Fall 2003 Prof. Russell Tessier Undersanding Sequenial Circui Timing Perhaps he wo mos disinguishing characerisics of a compuer are is processor
More informationPart 1: White Noise and Moving Average Models
Chaper 3: Forecasing From Time Series Models Par 1: Whie Noise and Moving Average Models Saionariy In his chaper, we sudy models for saionary ime series. A ime series is saionary if is underlying saisical
More informationYTM is positively related to default risk. YTM is positively related to liquidity risk. YTM is negatively related to special tax treatment.
. Two quesions for oday. A. Why do bonds wih he same ime o mauriy have differen YTM s? B. Why do bonds wih differen imes o mauriy have differen YTM s? 2. To answer he firs quesion les look a he risk srucure
More information23.3. Even and Odd Functions. Introduction. Prerequisites. Learning Outcomes
Even and Odd Funcions 3.3 Inroducion In his Secion we examine how o obain Fourier series of periodic funcions which are eiher even or odd. We show ha he Fourier series for such funcions is considerabl
More informationFourier Series Solution of the Heat Equation
Fourier Series Soluion of he Hea Equaion Physical Applicaion; he Hea Equaion In he early nineeenh cenury Joseph Fourier, a French scienis and mahemaician who had accompanied Napoleon on his Egypian campaign,
More informationMortality Variance of the Present Value (PV) of Future Annuity Payments
Morali Variance of he Presen Value (PV) of Fuure Annui Pamens Frank Y. Kang, Ph.D. Research Anals a Frank Russell Compan Absrac The variance of he presen value of fuure annui pamens plas an imporan role
More informationAppendix A: Area. 1 Find the radius of a circle that has circumference 12 inches.
Appendi A: Area workedou s o OddNumbered Eercises Do no read hese workedou s before aemping o do he eercises ourself. Oherwise ou ma mimic he echniques shown here wihou undersanding he ideas. Bes wa
More informationSinglemachine Scheduling with Periodic Maintenance and both Preemptive and. Nonpreemptive jobs in Remanufacturing System 1
Absrac number: 050407 Singlemachine Scheduling wih Periodic Mainenance and boh Preempive and Nonpreempive jobs in Remanufacuring Sysem Liu Biyu hen Weida (School of Economics and Managemen Souheas Universiy
More informationUsefulness of the Forward Curve in Forecasting Oil Prices
Usefulness of he Forward Curve in Forecasing Oil Prices Akira Yanagisawa Leader Energy Demand, Supply and Forecas Analysis Group The Energy Daa and Modelling Cener Summary When people analyse oil prices,
More informationMathematics in Pharmacokinetics What and Why (A second attempt to make it clearer)
Mahemaics in Pharmacokineics Wha and Why (A second aemp o make i clearer) We have used equaions for concenraion () as a funcion of ime (). We will coninue o use hese equaions since he plasma concenraions
More informationThe Application of Multi Shifts and Break Windows in Employees Scheduling
The Applicaion of Muli Shifs and Brea Windows in Employees Scheduling Evy Herowai Indusrial Engineering Deparmen, Universiy of Surabaya, Indonesia Absrac. One mehod for increasing company s performance
More informationMath 201 Lecture 12: CauchyEuler Equations
Mah 20 Lecure 2: CauchyEuler Equaions Feb., 202 Many examples here are aken from he exbook. The firs number in () refers o he problem number in he UA Cusom ediion, he second number in () refers o he problem
More informationChapter 4: Exponential and Logarithmic Functions
Chaper 4: Eponenial and Logarihmic Funcions Secion 4.1 Eponenial Funcions... 15 Secion 4. Graphs of Eponenial Funcions... 3 Secion 4.3 Logarihmic Funcions... 4 Secion 4.4 Logarihmic Properies... 53 Secion
More informationPresent Value Methodology
Presen Value Mehodology Econ 422 Invesmen, Capial & Finance Universiy of Washingon Eric Zivo Las updaed: April 11, 2010 Presen Value Concep Wealh in Fisher Model: W = Y 0 + Y 1 /(1+r) The consumer/producer
More informationA Note on Using the Svensson procedure to estimate the risk free rate in corporate valuation
A Noe on Using he Svensson procedure o esimae he risk free rae in corporae valuaion By Sven Arnold, Alexander Lahmann and Bernhard Schwezler Ocober 2011 1. The risk free ineres rae in corporae valuaion
More informationChapter 2 Problems. 3600s = 25m / s d = s t = 25m / s 0.5s = 12.5m. Δx = x(4) x(0) =12m 0m =12m
Chaper 2 Problems 2.1 During a hard sneeze, your eyes migh shu for 0.5s. If you are driving a car a 90km/h during such a sneeze, how far does he car move during ha ime s = 90km 1000m h 1km 1h 3600s = 25m
More informationImpact of scripless trading on business practices of Subbrokers.
Impac of scripless rading on business pracices of Subbrokers. For furher deails, please conac: Mr. T. Koshy Vice Presiden Naional Securiies Deposiory Ld. Tradeworld, 5 h Floor, Kamala Mills Compound,
More informationSection 7.1 Angles and Their Measure
Secion 7.1 Angles and Their Measure Greek Leers Commonly Used in Trigonomery Quadran II Quadran III Quadran I Quadran IV α = alpha β = bea θ = hea δ = dela ω = omega γ = gamma DEGREES The angle formed
More informationCHARGE AND DISCHARGE OF A CAPACITOR
REFERENCES RC Circuis: Elecrical Insrumens: Mos Inroducory Physics exs (e.g. A. Halliday and Resnick, Physics ; M. Sernheim and J. Kane, General Physics.) This Laboraory Manual: Commonly Used Insrumens:
More informationRC (ResistorCapacitor) Circuits. AP Physics C
(ResisorCapacior Circuis AP Physics C Circui Iniial Condiions An circui is one where you have a capacior and resisor in he same circui. Suppose we have he following circui: Iniially, he capacior is UNCHARGED
More informationTerm Structure of Prices of Asian Options
Term Srucure of Prices of Asian Opions Jirô Akahori, Tsuomu Mikami, Kenji Yasuomi and Teruo Yokoa Dep. of Mahemaical Sciences, Risumeikan Universiy 111 Nojihigashi, Kusasu, Shiga 5258577, Japan Email:
More informationMotion Along a Straight Line
Moion Along a Sraigh Line On Sepember 6, 993, Dave Munday, a diesel mechanic by rade, wen over he Canadian edge of Niagara Falls for he second ime, freely falling 48 m o he waer (and rocks) below. On his
More information4. International Parity Conditions
4. Inernaional ariy ondiions 4.1 urchasing ower ariy he urchasing ower ariy ( heory is one of he early heories of exchange rae deerminaion. his heory is based on he concep ha he demand for a counry's currency
More informationAcceleration Lab Teacher s Guide
Acceleraion Lab Teacher s Guide Objecives:. Use graphs of disance vs. ime and velociy vs. ime o find acceleraion of a oy car.. Observe he relaionship beween he angle of an inclined plane and he acceleraion
More informationInformation Theoretic Approaches for Predictive Models: Results and Analysis
Informaion Theoreic Approaches for Predicive Models: Resuls and Analysis Monica Dinculescu Supervised by Doina Precup Absrac Learning he inernal represenaion of parially observable environmens has proven
More informationEconomics 140A Hypothesis Testing in Regression Models
Economics 140A Hypohesis Tesing in Regression Models While i is algebraically simple o work wih a populaion model wih a single varying regressor, mos populaion models have muliple varying regressors 1
More informationCredit Index Options: the noarmageddon pricing measure and the role of correlation after the subprime crisis
Second Conference on The Mahemaics of Credi Risk, Princeon May 2324, 2008 Credi Index Opions: he noarmageddon pricing measure and he role of correlaion afer he subprime crisis Damiano Brigo  Join work
More informationInformation Theoretic Evaluation of Change Prediction Models for LargeScale Software
Informaion Theoreic Evaluaion of Change Predicion Models for LargeScale Sofware Mina Askari School of Compuer Science Universiy of Waerloo Waerloo, Canada maskari@uwaerloo.ca Ric Hol School of Compuer
More informationChabot College Physics Lab RC Circuits Scott Hildreth
Chabo College Physics Lab Circuis Sco Hildreh Goals: Coninue o advance your undersanding of circuis, measuring resisances, currens, and volages across muliple componens. Exend your skills in making breadboard
More informationCan Individual Investors Use Technical Trading Rules to Beat the Asian Markets?
Can Individual Invesors Use Technical Trading Rules o Bea he Asian Markes? INTRODUCTION In radiional ess of he weakform of he Efficien Markes Hypohesis, price reurn differences are found o be insufficien
More informationUsing Monte Carlo Method to Compare CUSUM and. EWMA Statistics
Using Mone Carlo Mehod o Compare CUSUM and EWMA Saisics Xiaoyu Shen Zhen Zhang Absrac: Since ordinary daases usually conain change poins of variance, CUSUM and EWMA saisics can be used o deec hese change
More informationPrincipal components of stock market dynamics. Methodology and applications in brief (to be updated ) Andrei Bouzaev, bouzaev@ya.
Principal componens of sock marke dynamics Mehodology and applicaions in brief o be updaed Andrei Bouzaev, bouzaev@ya.ru Why principal componens are needed Objecives undersand he evidence of more han one
More informationTHE LAW SOCIETY OF THE AUSTRALIAN CAPITAL TERRITORY
Complee he form in BLOCK LETTERS Provide deails on separae shees if required To Responden Address THE LAW SOCIETY OF THE AUSTRALIAN CAPITAL TERRITORY Personal Injury Claim ificaion pursuan o he Civil Law
More informationTwo Compartment Body Model and V d Terms by Jeff Stark
Two Comparmen Body Model and V d Terms by Jeff Sark In a onecomparmen model, we make wo imporan assumpions: (1) Linear pharmacokineics  By his, we mean ha eliminaion is firs order and ha pharmacokineic
More informationChapter 2 Kinematics in One Dimension
Chaper Kinemaics in One Dimension Chaper DESCRIBING MOTION:KINEMATICS IN ONE DIMENSION PREVIEW Kinemaics is he sudy of how hings moe how far (disance and displacemen), how fas (speed and elociy), and how
More informationTEMPORAL PATTERN IDENTIFICATION OF TIME SERIES DATA USING PATTERN WAVELETS AND GENETIC ALGORITHMS
TEMPORAL PATTERN IDENTIFICATION OF TIME SERIES DATA USING PATTERN WAVELETS AND GENETIC ALGORITHMS RICHARD J. POVINELLI AND XIN FENG Deparmen of Elecrical and Compuer Engineering Marquee Universiy, P.O.
More informationDIFFERENTIAL EQUATIONS with TI89 ABDUL HASSEN and JAY SCHIFFMAN. A. Direction Fields and Graphs of Differential Equations
DIFFERENTIAL EQUATIONS wih TI89 ABDUL HASSEN and JAY SCHIFFMAN We will assume ha he reader is familiar wih he calculaor s keyboard and he basic operaions. In paricular we have assumed ha he reader knows
More informationImagine a Source (S) of sound waves that emits waves having frequency f and therefore
heoreical Noes: he oppler Eec wih ound Imagine a ource () o sound waes ha emis waes haing requency and hereore period as measured in he res rame o he ource (). his means ha any eecor () ha is no moing
More informationChapter 2 Problems. s = d t up. = 40km / hr d t down. 60km / hr. d t total. + t down. = t up. = 40km / hr + d. 60km / hr + 40km / hr
Chaper 2 Problems 2.2 A car ravels up a hill a a consan speed of 40km/h and reurns down he hill a a consan speed of 60 km/h. Calculae he average speed for he rip. This problem is a bi more suble han i
More informationJournal Of Business & Economics Research September 2005 Volume 3, Number 9
Opion Pricing And Mone Carlo Simulaions George M. Jabbour, (Email: jabbour@gwu.edu), George Washingon Universiy YiKang Liu, (yikang@gwu.edu), George Washingon Universiy ABSTRACT The advanage of Mone Carlo
More information4.8 Exponential Growth and Decay; Newton s Law; Logistic Growth and Decay
324 CHAPTER 4 Exponenial and Logarihmic Funcions 4.8 Exponenial Growh and Decay; Newon s Law; Logisic Growh and Decay OBJECTIVES 1 Find Equaions of Populaions Tha Obey he Law of Uninhibied Growh 2 Find
More informationAnalogue and Digital Signal Processing. First Term Third Year CS Engineering By Dr Mukhtiar Ali Unar
Analogue and Digial Signal Processing Firs Term Third Year CS Engineering By Dr Mukhiar Ali Unar Recommended Books Haykin S. and Van Veen B.; Signals and Sysems, John Wiley& Sons Inc. ISBN: 073807 Ifeachor
More informationEconomics Honors Exam 2008 Solutions Question 5
Economics Honors Exam 2008 Soluions Quesion 5 (a) (2 poins) Oupu can be decomposed as Y = C + I + G. And we can solve for i by subsiuing in equaions given in he quesion, Y = C + I + G = c 0 + c Y D + I
More informationThe naive method discussed in Lecture 1 uses the most recent observations to forecast future values. That is, Y ˆ t + 1
Business Condiions & Forecasing Exponenial Smoohing LECTURE 2 MOVING AVERAGES AND EXPONENTIAL SMOOTHING OVERVIEW This lecure inroduces imeseries smoohing forecasing mehods. Various models are discussed,
More information11/6/2013. Chapter 14: Dynamic ADAS. Introduction. Introduction. Keeping track of time. The model s elements
Inroducion Chaper 14: Dynamic DS dynamic model of aggregae and aggregae supply gives us more insigh ino how he economy works in he shor run. I is a simplified version of a DSGE model, used in cuingedge
More informationWhat is a swap? A swap is a contract between two counterparties who agree to exchange a stream of payments over an agreed period of several years.
Currency swaps Wha is a swap? A swap is a conrac beween wo counerparies who agree o exchange a sream of paymens over an agreed period of several years. Types of swap equiy swaps (or equiyindexlinked
More informationMultiple Structural Breaks in the Nominal Interest Rate and Inflation in Canada and the United States
Deparmen of Economics Discussion Paper 0007 Muliple Srucural Breaks in he Nominal Ineres Rae and Inflaion in Canada and he Unied Saes Frank J. Akins, Universiy of Calgary Preliminary Draf February, 00
More informationTEACHER NOTES HIGH SCHOOL SCIENCE NSPIRED
Radioacive Daing Science Objecives Sudens will discover ha radioacive isoopes decay exponenially. Sudens will discover ha each radioacive isoope has a specific halflife. Sudens will develop mahemaical
More informationStability. Coefficients may change over time. Evolution of the economy Policy changes
Sabiliy Coefficiens may change over ime Evoluion of he economy Policy changes Time Varying Parameers y = α + x β + Coefficiens depend on he ime period If he coefficiens vary randomly and are unpredicable,
More informationA Mathematical Description of MOSFET Behavior
10/19/004 A Mahemaical Descripion of MOSFET Behavior.doc 1/8 A Mahemaical Descripion of MOSFET Behavior Q: We ve learned an awful lo abou enhancemen MOSFETs, bu we sill have ye o esablished a mahemaical
More informationMaking a Faster Cryptanalytic TimeMemory TradeOff
Making a Faser Crypanalyic TimeMemory TradeOff Philippe Oechslin Laboraoire de Securié e de Crypographie (LASEC) Ecole Polyechnique Fédérale de Lausanne Faculé I&C, 1015 Lausanne, Swizerland philippe.oechslin@epfl.ch
More informationFullwave rectification, bulk capacitor calculations Chris Basso January 2009
ullwave recificaion, bulk capacior calculaions Chris Basso January 9 This shor paper shows how o calculae he bulk capacior value based on ripple specificaions and evaluae he rms curren ha crosses i. oal
More informationLectures # 5 and 6: The Prime Number Theorem.
Lecures # 5 and 6: The Prime Number Theorem Noah Snyder July 8, 22 Riemann s Argumen Riemann used his analyically coninued ζfuncion o skech an argumen which would give an acual formula for π( and sugges
More informationACTUARIAL FUNCTIONS 1_05
ACTUARIAL FUNCTIONS _05 User Guide for MS Office 2007 or laer CONTENT Inroducion... 3 2 Insallaion procedure... 3 3 Demo Version and Acivaion... 5 4 Using formulas and synax... 7 5 Using he help... 6 Noaion...
More informationC The FastDealing Property Trading Game C
AGES 8+ C The FasDealing Propery Trading Game C Y riginal MNPLY Game Rules plus Special Rules for his Ediion. CNTENTS Gameboard, 6 okens, 28 Tile Deed cards, 6 U.N.I.T Cards, 6 Gallifrey Cards, pack of
More informationAutomatic measurement and detection of GSM interferences
Auomaic measuremen and deecion of GSM inerferences Poor speech qualiy and dropped calls in GSM neworks may be caused by inerferences as a resul of high raffic load. The radio nework analyzers from Rohde
More informationDOES TRADING VOLUME INFLUENCE GARCH EFFECTS? SOME EVIDENCE FROM THE GREEK MARKET WITH SPECIAL REFERENCE TO BANKING SECTOR
Invesmen Managemen and Financial Innovaions, Volume 4, Issue 3, 7 33 DOES TRADING VOLUME INFLUENCE GARCH EFFECTS? SOME EVIDENCE FROM THE GREEK MARKET WITH SPECIAL REFERENCE TO BANKING SECTOR Ahanasios
More informationForecasting and Information Sharing in Supply Chains Under QuasiARMA Demand
Forecasing and Informaion Sharing in Supply Chains Under QuasiARMA Demand Avi Giloni, Clifford Hurvich, Sridhar Seshadri July 9, 2009 Absrac In his paper, we revisi he problem of demand propagaion in
More informationSignal Processing and Linear Systems I
Sanford Universiy Summer 214215 Signal Processing and Linear Sysems I Lecure 5: Time Domain Analysis of Coninuous Time Sysems June 3, 215 EE12A:Signal Processing and Linear Sysems I; Summer 1415, Gibbons
More informationTHE EQUATIONS OF THE IDEAL LATCHES
THE EUATIONS OF THE IDEAL LATHES SERBAN E. VLAD Oradea iy Hall, iaa Unirii Nr., 4000, Oradea, Romania www.geociies.com/serban_e_lad, serban_e_lad@yahoo.com ABSTRAT We presen he eqaions ha model seeral
More informationANALYSIS AND COMPARISONS OF SOME SOLUTION CONCEPTS FOR STOCHASTIC PROGRAMMING PROBLEMS
ANALYSIS AND COMPARISONS OF SOME SOLUTION CONCEPTS FOR STOCHASTIC PROGRAMMING PROBLEMS R. Caballero, E. Cerdá, M. M. Muñoz and L. Rey () Deparmen of Applied Economics (Mahemaics), Universiy of Málaga,
More informationThe Grantor Retained Annuity Trust (GRAT)
WEALTH ADVISORY Esae Planning Sraegies for closelyheld, family businesses The Granor Reained Annuiy Trus (GRAT) An efficien wealh ransfer sraegy, paricularly in a low ineres rae environmen Family business
More informationForecasting Sales: A Model and Some Evidence from the Retail Industry. Russell Lundholm Sarah McVay Taylor Randall
Forecasing Sales: A odel and Some Evidence from he eail Indusry ussell Lundholm Sarah cvay aylor andall Why forecas financial saemens? Seems obvious, bu wo common criicisms: Who cares, can we can look
More informationMTH6121 Introduction to Mathematical Finance Lesson 5
26 MTH6121 Inroducion o Mahemaical Finance Lesson 5 Conens 2.3 Brownian moion wih drif........................... 27 2.4 Geomeric Brownian moion........................... 28 2.5 Convergence of random
More informationAP Calculus AB 2010 Scoring Guidelines
AP Calculus AB 1 Scoring Guidelines The College Board The College Board is a noforprofi membership associaion whose mission is o connec sudens o college success and opporuniy. Founded in 1, he College
More informationINTRODUCTION TO EMAIL MARKETING PERSONALIZATION. How to increase your sales with personalized triggered emails
INTRODUCTION TO EMAIL MARKETING PERSONALIZATION How o increase your sales wih personalized riggered emails ECOMMERCE TRIGGERED EMAILS BEST PRACTICES Triggered emails are generaed in real ime based on each
More informationMaking Use of Gate Charge Information in MOSFET and IGBT Data Sheets
Making Use of ae Charge Informaion in MOSFET and IBT Daa Shees Ralph McArhur Senior Applicaions Engineer Advanced Power Technology 405 S.W. Columbia Sree Bend, Oregon 97702 Power MOSFETs and IBTs have
More informationCaring for trees and your service
Caring for rees and your service Line clearing helps preven ouages FPL is commied o delivering safe, reliable elecric service o our cusomers. Trees, especially palm rees, can inerfere wih power lines and
More informationMachine Learning in Pairs Trading Strategies
Machine Learning in Pairs Trading Sraegies Yuxing Chen (Joseph) Deparmen of Saisics Sanford Universiy Email: osephc5@sanford.edu Weiluo Ren (David) Deparmen of Mahemaics Sanford Universiy Email: weiluo@sanford.edu
More information