[JustForFunEconomics] Dynamic Programming for Cake Eating Problem — (1) Intro

Photo by Caitlyn de Wild on Unsplash

Hi, in this posting, let’s talk Cake Eating problem which can be categorized in the Dynamic Optimization problem utilizing Dynamic Programming.

By the way, this method of planning can also be applied in diverse areas, not just in eating a mere cake, but, in setting up a plan to finish up a bottle of wine! (Sorry for the not-funny-at-all joke..)

1. Overview

Dynamic Programming as a way to address dynamic optimization problems in Economics dates back to the contribution of Bellman(1957). For further details and more information, check out the two Wikipedia pages below!

So, what is Dynamic Programming? Is it something about writing a program dynamically? Actually this was my first impression of the term. It sounded super fancy so I checked it, and what I faced was bunch of math. So, unlike what is sounds, Dynamic Programming is more about ‘planning’ (planning with math!), rather than ‘programming’ or ‘coding’(but we will use codes to solve this in Python later on). Thereby, it is natural to use this method to plan for optimal consumption plan to achieve the utmost level of utility. Basically, from what I understand, this Cake-Eating problem is like an appetizer for people interested in utilizing Dynamic Programming in Economics. (And here I am struggling to chew and swallow this cute little appetizer even before having the main dish..)

2. Consumer’s Decision-making basics

Simply put, let’s say c is a vector of consumption goods, p is a vector of prices and I, income. And u(c) means a utility level coming from consuming c.

In Short, these can be put like the following.

And the best decision comes out by solving the above problem. (First Order Condition)

3. Cake-Eating Problem: definition and set up

(Is it true that Medium does not support subscript yet??? Hm,,,)

t: time period from 1 to T; 1, 2, 3, ……… , (T-1), T

W(t): Cake size at time period t

c(t): consumption of the cake at time t

u(c(t)): utility from the consumption c(t)

b: discount factor, 0≤b≤1

So, we can figure out that the evolution of the size of a cake would be governed by the following formula, W(t+1) = W(t)-c(t). And c(t) should be always less or equal to W(t), as we cannot eat more than what we have.

The total utility that we will have by consuming the whole cake would be the following. We use b to discount future utility level to that of the current.

My handwriting

To make the problem simpler and easier, we will add some assumptions about the utility function.

(1) The utility function is real-valued.

(2) The utility function is differentiable.

(3) The utility function is strictly increasing and strictly concave.

(4) The derivative of the Utility function having c to zero will be infinite.

Utility function assumption (4)

Also, as you can see, the utility function is not having any t, time period value in it, which means our preference and appetite will be stationary the whole time.

So, now we are ready to dive in to solve this problem! But, I need to read and learn more to write up about that, so see you in the next posting!

I hope you stay safe!

--

--

--

Ydobon is nobody.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Road to coding interview (Day 2)

Hostinger Web Hosting Review|A Good Choice For Beginners & Professionals

How to Transition from a Software Engineer to a Product Manager?

A Short Example to Build Intuition about POMDPs

Lawyers in Utah

lawyers in utah

5 Lessons Learned Designing a Web Development Portfolio

Git Your Hub Rolling

Top 5 Reasons to Migrate Your Email to the Cloud

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
A Ydobon

A Ydobon

Ydobon is nobody.

More from Medium

How “love” can make you a machine learning engineer.

How “love” can make you a machine learning engineer.

So you didn’t land a summer software engineering internship…Now what?

Euclidean Algorithm

Count the number of islands 🏝