“Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google...

38
ECS 289F / MAE 298, Lecture 14 May 15, 2014 “Games on networks”

Transcript of “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google...

Page 1: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

ECS 289F / MAE 298, Lecture 14May 15, 2014

“Games on networks”

Page 2: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Topics – Recap of last time

• Optimal allocation of facilities and transport networks:(Heuristic, qualitative – but analytic – approach)(Linear tradeoffs between geometric and network metrics)

– Michael Gastner (SFI) and Mark Newman (U Mich)

• Network flows on road networks(Details of demand, edge capacity, and feasible paths allextremely important!)

– I. User vs System Optimal– II. Braess’ Paradox / Nash Equilibrium– Michael Zhang (UC Davis)

And the the fire alarm!!....

Page 3: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Nash equilibrium versus System optimalPrisoner’s Dilemma

Cooperate DefectCooperate 3, 3 0, 5

Defect 5, 0 1, 1

• Blue Cooperates/Red Cooperates — Blue gets payout “3”

• Blue Cooperates/Red Defects – Blue gets “0”

• Blue Defects/Red Defects – Blue gets “1”

• Blue Defects/Red Cooperates – Blue gets “5”

– Average expected payout for defect is “3”, for cooperate is“1.5”. Blue always chooses to Defect! Likewise Red alwayschooses Defect.

– Both defect and get “1” (Nash), even though each would geta higher payout of “3” if they cooperated (Pareto efficient).

Page 4: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

User optimal versus system optimal(In the traffic context)Behavioral Assumptions

•  Travelers have full knowledge of the network and its traffic conditions

•  Each traveler minimizes his/her own travel cost (time)

•  Travelers choose routes to make the total travel time of all travelers minimal (which can be achieved through choosing the routes with minimal marginal travel cost)

Act on self interests (User Equilibrium):

Act on public interests (System Optimal):

min

Page 5: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Pigou’s example: User versus system optimal

ts

(x) = 1

(x) = x

c

c

• Two roads connecting source, s, and destination, t

• Top road, “infinite” capacity but circuitous; 1 hour travel time

• Bottom road, direct but easily congested; travel time is 1 hourtimes the fraction of traffic on the route

– Route 1, c(x) = 1 hour– Route 2, c(x) = (x) · 1 hour

Page 6: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

ts

(x) = 1

(x) = x

c

c

• Everyone takes the bottom road!

– It is never worse than the top road, and sometimes better– Average travel time = 1 hour = 60 mins

• If could incentivize half the people to take the upper road, thenlower road costs 30 mins.

– Average travel time: 0.5*60mins + 0.5*30 mins = 45 mins!

Page 7: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Braess Paradox

• Dietrich Braess, 1968(Braess currently Prof of Math at Ruhr University Bochum, Germany)

• In a user-optimized network, when a new link is added, thechange in equilibrium flows might result in a higher cost,implying that users were better off without that link.

s t

w

v

(x) = 1

(x) = x

(x) = x

(x) = 1 c

c

c

c

s t

w

v

(x) = 1 (x) = x

(x) = 1

(x) = 0

(x) = x c

c c

c

c

Page 8: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Recall Zhang notation

Flows in a Highway Network

: set of nodes

: set of links

: set of origins

: set of destinations

: set of paths from origin to destination ij

N

A

I

J

R i j

( ), : link travel cost function

: Traffic demand from origin to destination

: Capacity on link

a a a

ij

a

t v C

q i j

C a

i

j

Page 9: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

• Recall Zhang notation

– qij is overall traffic demand from node i to j.– ta(νa) is travel cost along link a,– which is a function of total flow that link νa.

• Equilibrium is when the cost on all feasible paths is equal

Page 10: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Getting from 1 to 4

Assume traffic demand q14 = 6. Originally 2 paths (a-c) and (b-d).

• ta(νa) = 10νa • tc(νc) = νc + 50• tb(νb) = νb + 50 • td(νd) = 10νd

=⇒ Eqm: ν = 3 on each link

C1 = C2 = 83

Add new link with te(νe) = νe + 10

Now three paths:

Path 3 (a - e - d), with νe = 0 initially, so C3 = 0 + 10 + 0 = 10

C3 < C2 and C1 so new equilibrium needed.

Page 11: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

• By inspection, shift one unit of flow form path 1 and from 2 respectively topath 3.

• Now all paths have flow f1 = f2 = f3 = 2.

• Link flow νa = 4, νb = 2, νc = 2, νd = 4, νe = 2.

ta = 40, tb = 52, tc = 52, td = 40, te = 12.

C1 = ta + tc = 92; C2 = tb + td = 92; C3 = ta + te + td = 92.

• 92 > 83 so just increased the travel cost!

Page 12: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Braess paradox – Real-world examples

(from http://supernet.som.umass.edu/facts/braess.html)

• 42nd street closed in New York City. Instead of the predictedtraffic gridlock, traffic flow actually improved.

• A new road was constructed in Stuttgart, Germany, traffic flowworsened and only improved after the road was torn up.

Page 13: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Braess paradox depends on parameter choices

• “Classic” 4-node Braess construction relies on details of q14and the link travel cost functions, ti.

• The example works because for small overall demand (q14),links a and d are cheap. The new link e allows a pathconnecting them.

• If instead demand large, e.g. q14 = 60, now links a and d arecostly! (ta = td = 600 while tb = tc = 110). The new path a-e-dwill always be more expensive so νe = 0. No traffic will flow onthat link. So Braess paradox does not arise for this choice ofparameters.

Page 14: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Another example of Braess

s t

w

v

(x) = 1

(x) = x

(x) = x

(x) = 1 c

c

c

c

s t

w

v

(x) = 1 (x) = x

(x) = 1

(x) = 0

(x) = x c

c c

c

c

How to avoid Braess?

• Back to Zhang presentation .... typically solve for optimal flowsnumerically using computers. Can test for a range of choicesof traffic demand and link costs.

Page 15: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

More flows and equilibirum

• David Aldous, “Spatial Transportation Networks with TransferCosts: Asymptotic Optimality of Hub and Spoke Models”

• Marc Barthelemy, “Spatial networks” Physics Reports 499 (1),2011.

• Flows of material goods, self-organization:Helbing et al.

• Jamming and flow (phase transitions):Nishinari, Liu, Chayes, Zechina.

• Algorithmic game theory: Multiplayer games for usersconnected in a network / interacting via a network.

– Designing algorithms with desirable Nash equilibrium.– Computing equilibrium when agents connected in a network.

Page 16: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

“The price of anarchy”

E. Koutsoupias, C. H. Papadimitriou“Worst-case equilibria,” STACS 99.

Cost of worst case Nash equilibrium / cost of system optimalsolution.

Page 17: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

4

The Price of Anarchy

Nash Equilibrium:

cost = 14+14 = 28

s t2x 12

5x50

(From Roughgarden Barbados Talk, http://theory.stanford.edu/ tim/)

Page 18: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

5

The Price of Anarchy

Nash Equilibrium: To Minimize Cost:

Price of anarchy = 28/24 = 7/6.�• if multiple equilibria exist, look at the worst one

s t2x 12

5x5

cost = 14+10 = 24cost = 14+14 = 28

s t2x 12

5x500

(From Roughgarden Barbados Talk, http://theory.stanford.edu/ tim/)

Page 19: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Selfish routing and the POA on the Internet

T. Roughgarden and E. Tardos, How Bad is Selfish Routing?,FOCS ’00/JACM ’02

• Routing in the Internet is decentralized: Each router makes adecision, so path dynamically decided as packet passed on.

• Cost of an edge c(e), may be constant (infinite capacity) ordepend on the load.

• “Shortest path” routing (really lowest∑c(e) routing) typically

implemented.

• This is equivalent to “selfish routing” (each router chooses bestoption available to it).

• Resulting POA = 2!

Page 20: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Braess and the POA for Internet traffic

Greg Valiant, Tim Roughgarden, Eva Tardos“Braess’s paradox in large random graphs”, Proceedings of the

7th ACM conference on Electronic commerce, 2006.

• Removing edges from a network with “selfish routing” candecrease the latency incurred by traffic in an equilibrium flow.

• With high probability, (as the number of vertices goes toinfinity), there is a traffic rate and a set of edges whose removalimproves the latency of traffic in an equilibrium flow by aconstant factor.

• Braess paradox found in random networks often (not just“classic” 4-node construction).

Page 21: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Algorithmic game theory

• Since we know users act according to Nash, can we designalgorithms (mechanisms) that bring Nash and System Optimalas close together as possible?

• Typically we think of players who interact via a network, orwho’s connectivity is described by a network of interactions.

– Multiplayer games for users connected in a network orinteracting via a network.

– Designing algorithms with desirable Nash equilibrium.

– Computing equilibrium when agents connected in a network.

Page 22: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

focs 2001 20

mechanism design (or inverse game theory)

•  agents have utilities – but these utilities are known only to them

•  game designer prefers certain outcomes depending on players’ utilities

•  designed game (mechanism) has designer’s goals as dominating strategies

(Papadimitriou, “Algorithms, Games, and the Internet” presented at STOC/ICALP 2001.)

Page 23: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Some traditional games:

focs 2001 7

1,-1 -1,1

-1,1 1,-1

0,0 0,1

1,0 -1,-1

3,3 0,4

4,0 1,1

matching pennies prisoner’s dilemma

chicken auction

1 … n 1 . . n

u – x, 0

0, v – y

e.g.

(Papadimitriou, “Algorithms, Games, and the Internet” presented at STOC/ICALP 2001.)

Page 24: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Mechanism design example:

focs 2001 25

e.g., Vickrey auction

•  sealed-highest-bid auction encourages gaming and speculation

•  Vickrey auction: Highest bidder wins, pays second-highest bid

Theorem: Vickrey auction is a truthful mechanism.

Theorem: It maximizes social benefit and auctioneer expected revenue.

(Papadimitriou, “Algorithms, Games, and the Internet” presented at STOC/ICALP 2001.)

Page 25: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

(Modified) Vickrey auctions in real life –Google AdWords, and Yahoo’s ad sales

• Bidding on a “keyword” so that your advertisement is displayedwhen a search user enters in this keyword

• You can safely bid the maximum price you think is fair, and ifyou win, you actually pay less!

• Mechanism design– Incentivizes users to bid what they think is fair(reveal their true utilities)– Keeps more people in the bidding– Does not necessarily maximize profits for seller

Page 26: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Back to flows on spatial networks:

• David Aldous, “Spatial Transportation Networks with TransferCosts: Asymptotic Optimality of Hub and Spoke Models”

• Flows of material goods, self-organization:Helbing et al.

• Jamming and flow (phase transitions):Nishinari, Liu, Chayes, Zechina.

Page 27: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Our modern infrastructure

Layered, interacting networks

Page 28: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

“Layered complex networks”

[ M. Kurant and P. Thiran, “Layered Complex Networks”, PhysRev Lett. 89, 2006.]

• Offer a simple formalism to think about two coexisting networktopologies.

• The physical topology.

• And the virtual (application) topology.

Page 29: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Example 1:WWW and IP layer views of the Internet

• Each WWW link virtually connects two IP addresses.

• Those two IP nodes are typically far apart in the underlyingIP topology, so the virtual connection is realized as a multihoppath along IP routers.

• (Of course the IP network is then mapped onto the physicallayer of optical cables and routers.)

Page 30: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement
Page 31: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Example 2:Transportation networks

Up until now separate studies of:

1. Physical topology (of roads)

2. Real-life traffic patterns

Want a comprehensive view analyzing them both together.

Page 32: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

The “multilayer” formalism

Consider two different networks:

• Gφ = (V φ, Eφ); the physical graph.

• Gλ = (V λ, Eλ); the logical/application-layer graph.

Assume both sets of nodes identical, V φ = V λ.

• The logical edges are made of a collection of physical edges.M(eλ) is a mapping of logical onto physical edges.

Page 33: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

The load on a node

• Load on node i, l(i), is the sum of the weights of all logicaledges whose paths traverse i.

• E.g., in a transportation network l(i) is the total amount oftraffic that flows through node i.

Here Gφ is physical connection (e.g., road, rail line), Gλ “logical”is the actual flow.

Page 34: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Application

Study three transportation systems:

1. Mass transit system of Warsaw Poland (city).

2. Rail network of Switzerland (country).

3. Rail network of major trains in the EU (continent).

• Physical graph

• Logical graph: They can estimate the real load from thetimetables (some assumptions; decompose into units (onetrain, one bus, etc), independent of number of people).

Page 35: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Physical versus logical

Physical

• exponentially decaying degree distributions.

• Diameter ∼√N

Logical

• Right skewed degree distributions

• Shorter shortest paths (e.g, number of transfers).

Page 36: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Load

They can estimate the real load from the timetables (someassumptions; decompose into units (one train, one bus, etc),

independent of number of people).

Two typical load estimators:

1. The node degree of the physical network.

2. Betweenness of the physical network.

(Note, these estimators are the ones currently in use in almostall cases: 1) Resilience of networks to edge removal, 2)

Modeling cascading failures, etc.....)

Page 37: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

FindingsM. Kurant P. Thiran, “Layered Complex Networks”, Phys Rev Lett. 89, 2006.

• All three estimators 1) real load, 2) degree, 3) betweennessdiffer from one-another.

• Using the two-layer view can see the logical graphs may haveradically different properties than the physical graphs.

• May lead to reexamination of network robustness (previousstudies on Internet, power grid, etc, based on physical layer).

• M. Kurant, P. Thiran and P. Hagmann “Error and AttackTolerance of Layered Complex Networks”, Phys. Rev. E, Vol.76, 2007.Multilayer systems much more vulnerable to error and intentional attack than they seem

from single-layer perspective.

Page 38: “Games on networks”mae.engr.ucdavis.edu/dsouza/Classes/289-S14/Lectures/lecture14.pdf · Google AdWords, and Yahoo’s ad sales Bidding on a “keyword” so that your advertisement

Summary of spatial flows and games

• Optimal location of facilities to maximize access for all.

• Designing “optimal” spatial networks (collection/distributionnetworks – subways, power lines, road networks, airlinenetworks).

• Details of flows on actual networks make all the difference!

– Users act according to Nash

– Braess paradox (removing edges may improve a network’sperformance!)

– The “Price of Anarchy” (cost of worst Nash eqm / cost ofsystem optimal)