0% found this document useful (0 votes)
110 views6 pages

MT2 - Wk6 - S11 Notes - Lyapunov Functions

People adopt a behavior of trying to avoid crowds by adjusting their activities, such as switching errands on different days. This self-organizing behavior distributes activities efficiently without central planning. However, real cities are more complex with visitors and migration. Markets may not reach equilibrium if externalities prevent finding a Lyapunov function showing the system will converge. For example, happiness from trading goods depends on others' actions.

Uploaded by

Juan Toral
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views6 pages

MT2 - Wk6 - S11 Notes - Lyapunov Functions

People adopt a behavior of trying to avoid crowds by adjusting their activities, such as switching errands on different days. This self-organizing behavior distributes activities efficiently without central planning. However, real cities are more complex with visitors and migration. Markets may not reach equilibrium if externalities prevent finding a Lyapunov function showing the system will converge. For example, happiness from trading goods depends on others' actions.

Uploaded by

Juan Toral
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Model Thinking Class Session 11

Session 11: Lyapunov Functions


11.1 – Lyapunov Functions
Functions to Model / Describe System:
 Tool to help determine if system goes to
equilibrium or not
 Recall four system behavior types- looking to
show if stable (equilibrium). If can’t find
function could be any of the four types.
 If can find a ‘Lyapunov’ function  know
system will find equilibrium and approximately
(bound) on how fast.
Physics Example: Economist Example:
 Object with velocity  Happiness index
starts high and continues to
continues to reduce, increase as agents
eventually going to zero makes trades. Each
where the object stops trade increases
– and thus achieves overall happiness.
equilibrium.  Eventually, a maximum in happiness occurs
 Two conditions: (1) has to continually and does not increase further.
decrease , and (2) reach some minimum –  Two conditions: (1) has to continue to
stops. increase, and (2) reach some maximum –stops.
Formally: Zeno’s Paradox:
 F(x), a Lyapunov function  Person trying to leave room,
 A1: has a maximum (or minimum) value each step is half the length of
 A2: there is a such that if , the previous step. Never
maximum, ( ) ( ) , or for a exits!
minimum, ( ) ( )  Escape with constraint – have
to move by at least k
 Claim: at some point units/step at some point.
Bonus: How Fast The Hard Part:
 Once k is known, then the number of steps to  Constructing the Lyapunov function
reach the bound is easily calculated by a  Will discuss some examples below that
simple division. This gives the convergence illustrate how the Lyapunov function can be
rate. constructed and applied
 Will close and discuss Markov (statistical) and
Lyapunov equilibrium differences.

11.2 – The Organization of Cities


Recall: F(x), a Lyapunov function Apparent City Self-Organization:
 A1: has a maximum (or minimum) value number of restaurants, dry
 A2: there is a such that if , cleaners, groceries, train lines, etc.
maximum, ( ) ( ) , or for a distributed usefully without
minimum, ( ) ( ) overcrowding and without a
 Claim: at some point micromanaging city planner.

1
Model Thinking Class Session 11

Example – a weekly errand list: Example (cont.): Say we have five people with the
 C: Cleaners, G: Grocery, D: Deli, B: Book Store, same task list for the week and this is how they
F: Fish Market each schedule – each wants to avoid crowds.
 Can choose which day to go to each. 1: [C, G, D, B, F]
day of week: M, T, W, R Th, F 2: [G, C, D, B, F]
errand: C, G, D, B, F  3: [C, D, G, F, B]
one schedule (by day)  [C, G, D, B, F] 4: [C, B, F, G, D]
 Want to see if we can find a self-organizing 5: [C, F, D, B, G]
insight via Lyapunov.
Observation: Example (cont.): 1: observes crowded cleaners
 Behavior – people observe and adapt. If they 1: [C, G, D, B, F] on Monday so switches with
find, say Mondays at the cleaners is always 2: [G, C, D, B, F] Fish Market,  [F, G, D, B, C]
crowded, they switch going to the cleaners on 3: [C, D, G, F, B] Note also reduces crowding on
Monday with some other task on their list to 4: [C, B, F, G, D] Friday at the Fish Market.
avoid the crowded cleaner on Monday. 5: [C, F, D, B, G]
 Rule – switch day to try to avoid crowd
Example (cont.): First attempt Example (cont.): Second Example (cont.): Switch F and C
to find ( ) attempt to find ( ) Now with the switch of F and C,
Total number of people that (1) meet 0 at F on Monday, 0 at G
Total number of people going to meets each week. Meets 3 at C on Tuesday, 2 at D on
each location during the week. on Monday, 0 at G on Tuesday, 2 Wednesday, 2 at B on Thursday,
No luck, five people are out each at D on Wednesday, 2 at B on and 0 at C on Friday equals 4
day. Thursday, and 1 at F on Friday total. Note also have to add
equals 8 total. meetings of other four people
1: [C, G, D, B, F] 1: [C, G, D, B, F] 1: [F, G, D, B, C]
2: [G, C, D, B, F] 2: [G, C, D, B, F] 2: [G, C, D, B, F]
3: [C, D, G, F, B] 3: [C, D, G, F, B] 3: [C, D, G, F, B]
4: [C, B, F, G, D] 4: [C, B, F, G, D] 4: [C, B, F, G, D]
5: [C, F, D, B, G] 5: [C, F, D, B, G] 5: [C, F, D, B, G]
Counting total meets: Recall, when person one does not meet n people, they do not meet him so the
total meetings reduced by (1) are multiplied by 2 to get the number of reduced meetings by all five
people. That is: ( )
Analysis of Example: An Equilibrium
A1: the minimum value is 0 (meeting of anyone at your errand store on the day from switching.
you visit the store).
A2: Does a move cause fewer people to meet? Yes, if I meet fewer people then 1: [F, G, D, B, C]
they also meet fewer people and the total number of meetings (at a store) for 2: [B, C, G, D, F]
everyone during the week falls. Note that k=2 because if (1) meets one less 3: [G, D, B, F, C]
person, then that person also meets one less, so there are two fewer meetings in 4: [C, B, F, G, D]
the week. 5: [D, F, C, B, G]
Quiz: What if we "did the opposite" - instead of wanting to avoid others, people want to meet others. Could we
still have a Lyapunov Function? (a) Yes, (b) No
Analysis: A1: there is a maximum value (i.e., meet everyone), A2: ( )
Ans: (a) Yes
Explanation: The Lyapunov Function would be the total number of people who meet, with K=2, just like in our
original example. Any time a person changed her route to meet more people, the total number of people who meet
would increase. So this is an example of a Lyapunov Function with a maximum value as opposed to a minimum
value.

2
Model Thinking Class Session 11

Summary: People adopt a behavior of trying to avoid crowds by way of adjusting their activities via
switching that distributes activities efficiently. Real cities are more complicated of course with visitors,
migrants (in and out), but there is an underlying trend that helps sort activities.

11.3 – Exchange Economies and Externalities


Quick Review: Exchange Economies & Externalities:
 If Lyapunov function, system goes to  Will examine markets that don’t go to
equilibrium by step amounts k until stops. equilibrium – examine what prevents us from
finding a Lyapunov function
 If no Lyapunov function is found, system may  Related to Chris Langton's lambda parameter.
or may not go to equilibrium very abstract one-dimensional cellular
automata models
Exchange Market: Recall (maximum) Lyapunov Function:
 Flea market like with  A1: has a maximum (or minimum) value
trading of goods and  A2: there is a such that if ,
cash. Is it stable? maximum, ( ) ( ) , or for a
1. Each person just minimum, ( ) ( )
brings a wagon full Claim: at some point
of stuff
Attempt 1: Lyapunov Function
2. You trade with someone only if you're happier
Sum of happiness of people. Does is satisfy the
with what you have now, than what you had
LF? (1) Yes. There is a fixed amount of stuff at the
before.
market  there is a maximum limit to the
3. People trade with others but only if each gets
happiness. (2) K. You will only trade if there is an
an increase in happiness by some amount K. K
increase in happiness. The Exchange market thus
is equivalent to the cost of trade.
has a Lyapunov function.
Externality Example (North Korea, Iran, USA): Other Externality Examples:
NK: trades nuclear weapons (NW) for oil (O)  Political Coalitions – Party A merges with party
I: trades oil (O) for nuclear weapons (NW) B may upset party C. Total happiness not
U: not involved. increasing.
Result:  Mergers – (LF possible metrics: profitability,
NK is happier, I is happier, USA is less happy. security, happiness) other firms may be
Why? Externality of KN-I trading on USA feelings of adversely affected so total metric does not go
security makes USA less happy. Consequence is up.
total happiness may not have gone up (particularly  Political Alliances – Alliance ⋃ could make
if many other countries also less happy). And no other countries less secure  LF unlikely
Lyapunov function as A1 and A2 violated.  Dating – Same with dating (happiness)
Quiz: Consider an exchange economy in which each of four people brings a different kind of fruit. Suppose that
these people are altruistic - when someone becomes happier, everyone else also derives some happiness. Does
trade in this environment create a Lyapunov Function? (Hint: altruism, here, is an externality - but instead of a
negative externality, this a positive one). (a) Yes, (b) No
Analysis: A1 – happiness appears to always be increasing, A2 – trades occur only if generates happiness so
exists.
Ans: (a) yes

Explanation: Let the Lyapunov Function be total happiness. Every trade increases total happiness - even more than
before. So we still have a Lyapunov Function. The difference between this example and the arms race is that here,
the externalities are all positive, so total happiness still increases.

3
Model Thinking Class Session 11

Summary:
1. Exchange markets with happiness as a Lyapunov metric satisfy A1 and A2. However, when
externalities are involved, a Lyapunov function may not exist, particularly for negative externalities.
Positive externalities are reinforcing and do not negate A1 and A2.
2. Langdon’s lambda (the binary representation of the rule) from the simple cellular automata model
essentially says that a system whose behavior isn’t influenced by others, tend to go to equilibrium.
Conversely, where actions and behaviors are influenced by others tend to be more likely to be
complex or random
3. Externalities materially affect other people either negatively or positively. Negative externalities
tend to cause ongoing changes

11.4 – Time to Convergence and Optimality


Two Details: Recall (maximum) Lyapunov Function:
 How long until LF reaches equilibrium?  A1: has a maximum (or minimum) value
 Does the process always stop at the min or  A2: there is a such that if ,
max? That is with a step size K, does that last maximum, ( ) ( ) , or for a
step complete if the distance remaining is less minimum, ( ) ( )
than K? Claim: at some point

How Long Until Equilibrium?: Does the process always stop at the min or max?:
 Example: ( ) , ,  Short answer is NO. Process can get stuck on
implies from the way.
 Find a ‘bound’ by using smallest maximum  Why? Rugged landscape – LF
barrier and largest step. finds local max (or min).

Quiz: There are 100 people divided between Waiting Room A and Waiting Room B. These people will switch rooms
if one is too busy. They have varying thresholds for "too busy", but no one has a threshold below 58. In other
words, so long as 58 or fewer people are in a room, no one will want to leave that room. In the first time period,
there are 87 people in Room A and only 13 in Room B. What is the maximum number of time periods that it could
take for this system to reach equilibrium? (a) 29, (b) 13, (c) 87, (d) 20
Analysis: Step size is person at a time. Room A has a lower bound of 58. Room B has threshold of 58 before
anyone would move. 29 people move from Room A to Room B emptying room A to 58 people and filling Room B
to 42 people (still below move threshold).
Ans: (a) 29
Explanation: We want to assume that one person moves each time period - in terms of our function, K=1 (since
we're looking for the maximum amount of time periods, we want K to be as small as possible). Since there are 87
people in Room A, it will take 87−58=29 time periods until there are 58 people in Room A, and no one wants to
switch.
You might have noticed that there may be an externality in this example - that is, when someone switches rooms,
he is happier, and so are the people in the room he just left, but the people in the new, emptier room may have a
decrease in happiness. But this doesn't change our answer. After our 29 time periods, there are 13+29=42 people in
Room B (and 58 in Room A). Since no one in either waiting room has a threshold below 58, no one in Room B will
move. So the externalities don't change the answer here.
Process always stops at the min or max? (cont.):
 Preference model example: Assume preferences as shown. Can they
trade to improve happiness? Pairwise trading blocks the path to the
clear higher happiness possible (column 1) as all pairwise trades are
rejected. Similar to the ‘rugged landscape’ trap at a local maximum.

4
Model Thinking Class Session 11

Summary:
 Possible to have a Lyapunov function that stops at some intermediate point (local maximum or
minimum).
 Possible to find a bound on how fast with better bound on maximum (or minimum) and largest k
step value.
 Process can get stuck at local maximum (or minimum).

11.5 – Lyapunov Fun and Deep


Can we always tell if goes to equilibrium?: Contrary Example (Offices):
Example – Chairs and Offices  Office swapping faces externalities!
 Give everyone a chair at random and then let  Behavior of people
them trade (pairwise). Will trading churn or around you influences
not? your happiness – just
 LF (happiness) suggests that will trade to get like the externalities
preferred chair until everyone is sufficiently examples in 11.3. So
happy ( ). Note there is a each move may make
maximum happiness (everyone has their some happy and some
preferred chair). Isn’t this like a LF that gets unhappy meaning no
stuck at a local maximum? clear LF. May converge or not.
How can you decide if Equilibrium?: HOTPO Examples:
Simple problem to show how difficult it is to
determine.
Collatz Problem
 HOTPO (half or three plus 1)
pick a number
if even: divide by two
if odd: times three plus one
Stop: if you reach one
Start at 19, go to ( )
At 58 divide by 2 to get 29
Chart of Periods to
converge versis starting
number. Note the
complexity.

 Bottom line: some


problems are tractable
and some not. Pay
attention to
externalities.

5
Model Thinking Class Session 11

11.6 – Lyapunov or Markov


Recall: Markov and Lyapunov:
 Lyapunov
A1: has a maximum (or minimum) value
A2: there is a such that if ,
maximum, ( ) ( ) , or for a
minimum, ( ) ( )
Claim: at some point
 Markov (statistically unique convergence)
A1- Finite States
Markov and Lyapunov: A2- Fixed Transition probabilities
 Both describe conditions under which we say A3- Can eventually get from any one state to
the system can go to equilibrium (fixed and any other state
statistical). A4- Not a simple cycle.
Lyapunov Differences: Lyapunov:
 Could be highly path dependent. 1. If you can construct a Lyapunov function, then
 Depends on the initial conditions the system goes to equilibrium.
 Possibly many equilibrium 2. You can compute a maximum time to
 Not a stochastic equilibrium, it’s fixed. equilibrium.
3. The equilibrium need not be unique or
efficient
4. Externalities are a reason systems don’t go to
equilibrium – if they counteract behavior and
preferred actions, check closely.
Quiz: A supervisor for a firm is deciding whether to let employees make their own decisions about a number of
things: desks, office paint, vacation dates, and membership on committees. Select any option(s) for which you
think a Lyapunov Function would work. (a) Desks, (b) Vacation Dates, (c) Committee Membership, (d) Paint Color
in Individual's Office
Analysis: Look for externalities that influence negatively.
Ans: (a) desks, (d) paint color
Explanation: Desks and office paint are typically personal choices - who cares about someone else's desk or wall
color? - so a Lyapunov Function is likely to work. On the other hand, vacation dates and committee memberships
are likely to include negative externalities, so I would say Lyapunov Functions are no good there.
Summary:
1. Externalities are a reason systems don’t go to equilibrium. Recall Langdon’s Lambda () for cellular
automata.*
2. Multiple models add diversity to thinking and understanding.
3. Understand source of equilibrium: Stochastic from Markov processes and in exchange market the
Lyapunov function of happiness.
* Automata Theory is the study of self-operating virtual machines to help in logical understanding of input and
output process. Wikipedia

You might also like