To save content items to your account,
please confirm that you agree to abide by our usage policies.
If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account.
Find out more about saving content to .
To save content items to your Kindle, first ensure no-reply@cambridge.org
is added to your Approved Personal Document E-mail List under your Personal Document Settings
on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part
of your Kindle email address below.
Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations.
‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi.
‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
In this chapter simple graphics programming in Haskell will be explained. Graphics in Haskell is consistent with the notion of computation via calculation, although it is special enough to warrant the use of special terminology and notation. In the next chapter we will use the techniques learned here to draw in a graphics window the geometric shapes defined in the last chapter. The ideas developed in this chapter will be put into a module called SimpleGraphics:
module SimpleGraphics where
There are many predefined functions and data types in Haskell, so many, in fact, that they demand some organization. Entities that are deemed essential to defining the fundamental nature of Haskell are contained in what is called the Standard Prelude, a collection of modules defining various categories of functionality. Entities that are deemed useful but not essential are contained in one of several Standard Libraries, also a collection of modules. The entire Standard Prelude is automatically imported into every program that you write, whereas the Standard Libraries need to be imported module-by-module.
Unfortunately, there is no standard graphics library for Haskell yet, although there is one in popular use on Windows machines called Graphics. The basic graphics functionality that we will use is defined in a library called SOEGraphics, which is very similar to Graphics but is guaranteed to work with this textbook, whereas the Graphics library may evolve over time. To use SOEGraphics, it must be imported into the module that is using it, as follows:
import SOEGraphics
Graphics is a special case of input/output (IO) processing in Haskell, and thus I will begin with a discussion of this more general idea.
Basic Input/Output
The Haskell Report defines the result of a program as the value of the name main in the module Main. On the other hand, the Hugs implementation of Haskell allows you to type whatever expression you wish to the Hugs prompt, and it will evaluate it for you.
In this chapter we will review some applications of dynamic optimization to economics. In Section 1 we develop two models of search to illustrate the use of dynamic programming in a stochastic setting. Section 2 analyzes the decision problem faced by a social planner who maximizes the utility of an infinitely-lived representative agent in a one-good neoclassical economy. In Section 3 we study the optimal investment policy of a competitive firm when the installation of capital is costly. Finally, in Section 4 we develop the Cass-Koopmans model of a dynamic competitive economy and use it to analyze the welfare cost of factor taxes. Section 5 concludes with a series of problems.
Search Models
Search theory provides a simple and yet interesting application of dynamic programming to economics. In the basic search model, wage offers drawn from a given distribution arrive at fixed or random intervals, and an agent simply decides whether to accept one of them and become employed or reject them and continue searching for a better opportunity. We have, then, a very simple problem in stochastic dynamic programming: The control is simply a take-it-or-leave-it decision, and the distribution of the state variables (the offers) is time-invariant and does not depend on either the state or the control.
The first part of this section introduces the basic “microeconomic” model of job search. In addition to its interest as an application of dynamic programming, this model provides a useful counterpoint to the neoclassical model of a competitive labor market.
Much of the time of the average graduate student in economics is spent learning a new language, that of mathematics. Although the investment does eventually pay off in many ways, the learning process can be quite painful. I know because I have been there. I remember the long nights spent puzzling over the mysteries of the Hamiltonian, the frustration of not understanding a single one of the papers in my second macroeconomics reading list, the culture shock that came with the transition from the undergraduate textbooks, with their familiar diagrams and intuitive explanations, into Debreu's Theory of Value, and my despair before the terse and incredibly dry prose of the mathematics texts where I sought enlightenment about the arcane properties of contractions.
This book is an attempt to make the transition into graduate economics somewhat less painful. Although some of my readers may never believe me, I have tried to do a number of things that should make their lives a bit easier. The first has been to collect in one place, with a homogeneous notation, most of the mathematical concepts, results, and techniques that are required to follow the standard first- and second-year theory courses. I have also tried to organize this material into a logical sequence and have illustrated its applications to some of the standard models. And last but not least, I have attempted to provide rigorous proofs for most of the results as a way to get the reader used to formal reasoning.
The first part of this book has covered most of the mathematical tools required for analysis of static economic models. In this chapter we will discuss some applications of this material to a number of microeconomic models. Our goal will not be to provide a comprehensive treatment of a set of topics generally covered in the standard first-year graduate sequence in microeconomics, but only to illustrate the usefulness of the techniques we have developed and to introduce the reader to the general logic of modelbuilding in economic theory.
We began Chapter 7 with the observation that the “postulate of rationality” – the assumption that individuals have well-defined and consistent preferences and act accordingly – is central in (neoclassical) economics as a source of regularity in individual behavior that makes prediction possible, at least in principle. We then claimed that this postulate led naturally to the modeling of individual decision-making as the outcome of a constrained optimization problem, and we devoted a fair amount of time to studying the “technology” required for solving such problems. Section 1 of this chapter backtracks a little. We consider a standard consumer and discuss how his preferences can be represented by a binary relation and how this relation can be used to construct a utility function. Section 2 then analyzes the behavior of this consumer when he faces market-determined prices for the commodities he wants to purchase with his (exogenously given) income.