MT2 - Wk6 - S11 Notes - Lyapunov Functions
MT2 - Wk6 - S11 Notes - Lyapunov Functions
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.
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
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).
5
Model Thinking Class Session 11