online algorithms for market clearing

225
Online Algorithms for Market Clearing Martin Zinkevich Joint Work with Avrim Blum and Tuomas Sandholm (SODA 2002)

Upload: nita-coffey

Post on 03-Jan-2016

23 views

Category:

Documents


0 download

DESCRIPTION

Online Algorithms for Market Clearing. Martin Zinkevich Joint Work with Avrim Blum and Tuomas Sandholm (SODA 2002). Introduction. E-Bay: Single Auction. Buy Bids: people wanting to buy Sell Bids: people wanting to sell. E-Bay: Single Auction. Buy Bids: people wanting to buy - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Online Algorithms  for Market Clearing

Online Algorithms for Market Clearing

Martin ZinkevichJoint Work with Avrim Blum and Tuomas Sandholm(SODA 2002)

Page 2: Online Algorithms  for Market Clearing

2

Introduction

Page 3: Online Algorithms  for Market Clearing

3

E-Bay: Single Auction

Buy Bids: people wanting to buySell Bids: people wanting to sell

Page 4: Online Algorithms  for Market Clearing

4

E-Bay: Single Auction

Buy Bids: people wanting to buySell Bids: people wanting to sell

Page 5: Online Algorithms  for Market Clearing

5

E-Bay: Single Auction

Buy Bids: people wanting to buySell Bids: people wanting to sell

Page 6: Online Algorithms  for Market Clearing

6

Improvement #1: Double Auction

Buy Bids: people wanting to buySell Bids: people wanting to sell

Page 7: Online Algorithms  for Market Clearing

7

Graphical Version

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price Profit

Page 8: Online Algorithms  for Market Clearing

8

Improvement #2:Bidding For Different Intervals

Page 9: Online Algorithms  for Market Clearing

9

Temporal Bidding Problem

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Introduction Time Expiration Time

Jane

Mark Toy’s R Us

Page 10: Online Algorithms  for Market Clearing

10

How to Make Money

Buy the PS2 from one person for some money, and sell it to someone else for more than you bought it.Keep no inventory, have sellers mail PS2 directly to buyers.

Page 11: Online Algorithms  for Market Clearing

11

Types of Algorithms

One can imagine two types of algorithms: Offline: An algorithm which knows the

whole sequence before making decisions.

Online: An algorithm which finds the type, price, and expiration time of a bid as it is introduced, and must act on a bid before it expires.

Page 12: Online Algorithms  for Market Clearing

12

Formalizing the Goal

Find a matching of concurrent buy and sell bids that maximizes profit

Page 13: Online Algorithms  for Market Clearing

13

The Maximal Matching

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 14: Online Algorithms  for Market Clearing

14

The Offline Problem

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 15: Online Algorithms  for Market Clearing

15

Convert to a Graph

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 16: Online Algorithms  for Market Clearing

16

Convert to a Graph

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 17: Online Algorithms  for Market Clearing

17

Convert to a Weighted Graph

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

5

15

25

Page 18: Online Algorithms  for Market Clearing

18

Convert to a Weighted Graph

5

15

25

Page 19: Online Algorithms  for Market Clearing

19

Find a Matching of Maximum Weight

5

15

25

A matching for a graph is a set of edges which do not share anyvertices

Page 20: Online Algorithms  for Market Clearing

20

Find a Matching of Maximum Weight

15

A matching for a graph is a set of edges which do not share anyvertices

5

25

Page 21: Online Algorithms  for Market Clearing

21

Find a Matching of Maximum Weight

5

15

25

Algorithms existto solve this in polynomial time

Page 22: Online Algorithms  for Market Clearing

22

Find a Matching of Maximum Weight

Page 23: Online Algorithms  for Market Clearing

23

Find a Matching of Maximum Weight

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Matching ofmaximal weightmaximizes profit!

Page 24: Online Algorithms  for Market Clearing

24

What Online Sees…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 25: Online Algorithms  for Market Clearing

25

What Online Sees…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 26: Online Algorithms  for Market Clearing

26

What Online Sees…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 27: Online Algorithms  for Market Clearing

27

What Online Sees…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 28: Online Algorithms  for Market Clearing

28

What Online Sees…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 29: Online Algorithms  for Market Clearing

29

What Online Sees…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 30: Online Algorithms  for Market Clearing

30

What Online Sees…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 31: Online Algorithms  for Market Clearing

31

What Online Sees…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 32: Online Algorithms  for Market Clearing

32

What Online Sees…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 33: Online Algorithms  for Market Clearing

33

What Online Sees…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 34: Online Algorithms  for Market Clearing

34

What Online Sees…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 35: Online Algorithms  for Market Clearing

35

What Online Sees…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 36: Online Algorithms  for Market Clearing

36

What Online Sees…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 37: Online Algorithms  for Market Clearing

37

What Online Sees…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 38: Online Algorithms  for Market Clearing

38

What Online Sees…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 39: Online Algorithms  for Market Clearing

39

Two Online Difficulties

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 40: Online Algorithms  for Market Clearing

40

Getting the Most Matches

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 41: Online Algorithms  for Market Clearing

41

Getting the Most Per Match

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 42: Online Algorithms  for Market Clearing

42

Two Small Problems

Maximizing Liquidity: maximizing the number of matchesThe Ice Cream Problem: maximizing profit of one trade

Page 43: Online Algorithms  for Market Clearing

43

Outline

IntroductionSmall Problem #1:Maximizing LiquiditySmall Problem #2:The Ice Cream ProblemPutting it TogetherConclusionNew Results

Page 44: Online Algorithms  for Market Clearing

44

Maximizing Liquidity

Page 45: Online Algorithms  for Market Clearing

45

Simplified Matching

Let’s try to maximize the number of trades with positive profit on each trade.

Page 46: Online Algorithms  for Market Clearing

46

A Maximal Numeric Matching

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 47: Online Algorithms  for Market Clearing

47

Also Maximal Numerically

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 48: Online Algorithms  for Market Clearing

48

Offline: Convert to a Graph

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

No weightsneeded

Page 49: Online Algorithms  for Market Clearing

49

Convert to a Graph

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

No edgehere

Page 50: Online Algorithms  for Market Clearing

50

Convert to a Graph

Page 51: Online Algorithms  for Market Clearing

51

Maximal Matching

Page 52: Online Algorithms  for Market Clearing

52

Maximal Matching

Page 53: Online Algorithms  for Market Clearing

53

Back To The Problem

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

A maximal matching on the graph maximizes liquidity

Page 54: Online Algorithms  for Market Clearing

54

Convert to a Graph Online…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

AliveExpired

Page 55: Online Algorithms  for Market Clearing

55

Convert to a Graph Online…

Price

Time

Buy Bids: people wanting to buySell Bids: people wanting to sell

AliveExpired

Page 56: Online Algorithms  for Market Clearing

56

Convert to a Graph Online…

Price

Time

Buy Bids: people wanting to buySell Bids: people wanting to sell

AliveExpired

Page 57: Online Algorithms  for Market Clearing

57

Convert to a Graph Online…

Price

Time

Buy Bids: people wanting to buySell Bids: people wanting to sell

AliveExpired

Page 58: Online Algorithms  for Market Clearing

58

Convert to a Graph Online…

Price

Time

Buy Bids: people wanting to buySell Bids: people wanting to sell

AliveExpired

Page 59: Online Algorithms  for Market Clearing

59

Convert to a Graph Online…

Price

Time

Buy Bids: people wanting to buySell Bids: people wanting to sell

AliveExpired

Page 60: Online Algorithms  for Market Clearing

60

Convert to a Graph Online…

Price

Time

Buy Bids: people wanting to buySell Bids: people wanting to sell

AliveExpired

Page 61: Online Algorithms  for Market Clearing

61

Convert to a Graph Online…

Price

Time

Buy Bids: people wanting to buySell Bids: people wanting to sell

AliveExpired

Page 62: Online Algorithms  for Market Clearing

62

Convert to a Graph Online…

Price

Time

Buy Bids: people wanting to buySell Bids: people wanting to sell

AliveExpired

Page 63: Online Algorithms  for Market Clearing

63

Convert to a Graph Online…

Price

Time

Buy Bids: people wanting to buySell Bids: people wanting to sell

AliveExpired

Page 64: Online Algorithms  for Market Clearing

64

Convert to a Graph Online…

Price

Time

Buy Bids: people wanting to buySell Bids: people wanting to sell

AliveExpired

Page 65: Online Algorithms  for Market Clearing

65

Convert to a Graph Online…

Price

Time

Buy Bids: people wanting to buySell Bids: people wanting to sell

AliveExpired

Page 66: Online Algorithms  for Market Clearing

66

Convert to a Graph Online…

Price

Time

Buy Bids: people wanting to buySell Bids: people wanting to sell

AliveExpired

Page 67: Online Algorithms  for Market Clearing

67

Convert to a Graph Online…

Price

Time

Buy Bids: people wanting to buySell Bids: people wanting to sell

AliveExpired

Page 68: Online Algorithms  for Market Clearing

68

Convert to a Graph Online…

Price

Time

Buy Bids: people wanting to buySell Bids: people wanting to sell

AliveExpired

Page 69: Online Algorithms  for Market Clearing

69

The Online Graph…

AliveExpired

Page 70: Online Algorithms  for Market Clearing

70

The Online Graph…

AliveExpired

Page 71: Online Algorithms  for Market Clearing

71

The Online Graph…

AliveExpired

Page 72: Online Algorithms  for Market Clearing

72

The Online Graph…

AliveExpired

Page 73: Online Algorithms  for Market Clearing

73

The Online Graph…

AliveExpired

Page 74: Online Algorithms  for Market Clearing

74

The Online Graph…

AliveExpired

Page 75: Online Algorithms  for Market Clearing

75

The Online Graph…

AliveExpired

Page 76: Online Algorithms  for Market Clearing

76

The Online Graph…

AliveExpired

Page 77: Online Algorithms  for Market Clearing

77

The Online Graph…

AliveExpired

Page 78: Online Algorithms  for Market Clearing

78

The Online Graph…

AliveExpired

Page 79: Online Algorithms  for Market Clearing

79

The Online Graph…

AliveExpired

Page 80: Online Algorithms  for Market Clearing

80

The Online Graph…

AliveExpired

Page 81: Online Algorithms  for Market Clearing

81

The Online Graph…

AliveExpired

Page 82: Online Algorithms  for Market Clearing

82

The Online Graph…

AliveExpired

Page 83: Online Algorithms  for Market Clearing

83

The Online Graph…

AliveExpired

Page 84: Online Algorithms  for Market Clearing

84

The Greedy Algorithm

If you see an edge you can use, use it.

Page 85: Online Algorithms  for Market Clearing

85

The Greedy Algorithm…

AliveExpiredMatched

Page 86: Online Algorithms  for Market Clearing

86

The Greedy Algorithm…

AliveExpiredMatched

Page 87: Online Algorithms  for Market Clearing

87

The Greedy Algorithm…

AliveExpiredMatched

Page 88: Online Algorithms  for Market Clearing

88

The Greedy Algorithm…

AliveExpiredMatched

Page 89: Online Algorithms  for Market Clearing

89

The Greedy Algorithm…

AliveExpiredMatched

Page 90: Online Algorithms  for Market Clearing

90

The Greedy Algorithm…

AliveExpiredMatched

Page 91: Online Algorithms  for Market Clearing

91

The Greedy Algorithm…

AliveExpiredMatched

Page 92: Online Algorithms  for Market Clearing

92

The Greedy Algorithm…

AliveExpiredMatched

Page 93: Online Algorithms  for Market Clearing

93

The Greedy Algorithm…

AliveExpiredMatched

Page 94: Online Algorithms  for Market Clearing

94

The Greedy Algorithm…

AliveExpiredMatched

Page 95: Online Algorithms  for Market Clearing

95

The Greedy Algorithm…

AliveExpiredMatched

Page 96: Online Algorithms  for Market Clearing

96

The Greedy Algorithm…

AliveExpiredMatched

Page 97: Online Algorithms  for Market Clearing

97

The Greedy Algorithm…

AliveExpiredMatched

Page 98: Online Algorithms  for Market Clearing

98

The Greedy Algorithm…

AliveExpiredMatched

Page 99: Online Algorithms  for Market Clearing

99

The Greedy Algorithm…

AliveExpiredMatched

Page 100: Online Algorithms  for Market Clearing

100

The Greedy Algorithm…

AliveExpiredMatched

Page 101: Online Algorithms  for Market Clearing

101

The Greedy Algorithm…

AliveExpiredMatched

Page 102: Online Algorithms  for Market Clearing

102

The Greedy Algorithm…

AliveExpiredMatched

Page 103: Online Algorithms  for Market Clearing

103

A General Solution

Thinking aboutarbitrary graphs

Optimal:6 edges,12 vertices

Page 104: Online Algorithms  for Market Clearing

104

What If…

Thinking aboutarbitrary graphs

Optimal:6 edges,12 vertices

You:At least 6 vertices

Page 105: Online Algorithms  for Market Clearing

105

What If…

Thinking aboutarbitrary graphs

Optimal:6 edges,12 vertices

You:At least 6 verticesImplies at least 6/2=3 edges

Page 106: Online Algorithms  for Market Clearing

106

Proof(Everyone Remain Calm)

Of each edge in the optimal matching, we get at least one endpoint in our matching.Call the first vertex to be introduced for the edge v1 and the second vertex v2.

v2

v1

Page 107: Online Algorithms  for Market Clearing

107

v2

When v2 Arrives…

Either v1 is unmatched…

v1

Thinking aboutarbitrary graphs

Page 108: Online Algorithms  for Market Clearing

108

When v2 Arrives…

Either v1 is unmatched…

v1

v2

Thinking aboutarbitrary graphs

Page 109: Online Algorithms  for Market Clearing

109

When v2 Arrives…

Or v1 is matched…

v1

v2

Thinking aboutarbitrary graphs

Page 110: Online Algorithms  for Market Clearing

110

Proof Summary

We get at least one endpoint from each edge in the optimal matching.This guarantees us at least half of the edges in the optimal matching.

Page 111: Online Algorithms  for Market Clearing

111

Back To Bids

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

If we know whenthings expire,it helps to waitsometimes

Page 112: Online Algorithms  for Market Clearing

112

A Problem…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 113: Online Algorithms  for Market Clearing

113

A Problem…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 114: Online Algorithms  for Market Clearing

114

A Problem…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Don’t know untilits too late!

Page 115: Online Algorithms  for Market Clearing

115

A Solution…Subsidy

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

But at all times,have positivefunds

Negative!

Page 116: Online Algorithms  for Market Clearing

116

An Observation About Profit

$5

$1 $4

$8

$6

$8

+4 +4 +2 +4+4+2=10

Let’s forget time

Page 117: Online Algorithms  for Market Clearing

117

An Observation About Profit

$5

$1 $4

$8

$6

$2

+4 +4 -4 +4+4-4=4

Let’s forget time

Page 118: Online Algorithms  for Market Clearing

118

An Observation About Profit

$5

$1 $4

$8

$6

$2 5+8+2=15

1+4+6=11

+4

Let’s forget time

Insert FavoriteMatching Here

Page 119: Online Algorithms  for Market Clearing

119

Another Matching

$5

$1 $4

$8

$6

$2

Let’s forget time

+1

+1

+2

+1+1+2=4

Page 120: Online Algorithms  for Market Clearing

120

How To Track

If there exists any matching(each pair positive profit) on the bids we have seen so far, then the total profit is positive.From now on, we will commit to bids instead of trades, and select vertices instead of edges.

Page 121: Online Algorithms  for Market Clearing

121

A Matchable Set of Vertices

The red verticesare matchable

Page 122: Online Algorithms  for Market Clearing

122

Not A Matchable Set

Must use the wholeset!

The red verticesare NOT matchable

Page 123: Online Algorithms  for Market Clearing

123

Not A Matchable SetCan’t useverticesnot in the set

The red verticesare NOT matchable

Page 124: Online Algorithms  for Market Clearing

124

A Solution…Subsidy

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

No edge here

Page 125: Online Algorithms  for Market Clearing

125

An Incomplete Interval Graph

Time

Maintainexpirationtimes

Page 126: Online Algorithms  for Market Clearing

126

Defining A New Algorithm

Time

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Page 127: Online Algorithms  for Market Clearing

127

Defining A New Algorithm

Time

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Page 128: Online Algorithms  for Market Clearing

128

Defining A New Algorithm

Time

Currentbid

Page 129: Online Algorithms  for Market Clearing

129

Defining A New Algorithm

Time

Page 130: Online Algorithms  for Market Clearing

130

Defining A New Algorithm

Time

Expiresfirst

Expiressecond

Page 131: Online Algorithms  for Market Clearing

131

A New Algorithm

TimeAliveExpiredMatched

Page 132: Online Algorithms  for Market Clearing

132

A New Algorithm

TimeAliveExpiredMatched

Page 133: Online Algorithms  for Market Clearing

133

A New Algorithm

TimeAliveExpiredMatched

Page 134: Online Algorithms  for Market Clearing

134

A New Algorithm

TimeAliveExpiredMatched

Page 135: Online Algorithms  for Market Clearing

135

A New Algorithm

TimeAliveExpiredMatched

Page 136: Online Algorithms  for Market Clearing

136

A New Algorithm

TimeAliveExpiredMatched

Page 137: Online Algorithms  for Market Clearing

137

A New Algorithm

TimeAliveExpiredMatched

Page 138: Online Algorithms  for Market Clearing

138

A New Algorithm

TimeAliveExpiredMatched

Page 139: Online Algorithms  for Market Clearing

139

A New Algorithm

TimeAliveExpiredMatched

Page 140: Online Algorithms  for Market Clearing

140

A New Algorithm

TimeAliveExpiredMatched

Page 141: Online Algorithms  for Market Clearing

141

A New Algorithm

TimeAliveExpiredMatched

Page 142: Online Algorithms  for Market Clearing

142

A New Algorithm

TimeAliveExpiredMatched

Page 143: Online Algorithms  for Market Clearing

143

A New Algorithm

TimeAliveExpiredMatched

Page 144: Online Algorithms  for Market Clearing

144

A New Algorithm

TimeAliveExpiredMatched

Page 145: Online Algorithms  for Market Clearing

145

A New Algorithm

TimeAliveExpiredMatched

Page 146: Online Algorithms  for Market Clearing

146

A New Algorithm

TimeAliveExpiredMatched

Page 147: Online Algorithms  for Market Clearing

147

A New Algorithm

TimeAliveExpiredMatched

Page 148: Online Algorithms  for Market Clearing

148

Outline

IntroductionSmall Problem #1: Maximizing LiquiditySmall Problem #2: The Ice Cream ProblemPutting it TogetherConclusionNew Results

Page 149: Online Algorithms  for Market Clearing

149

The Ice Cream Problem

Page 150: Online Algorithms  for Market Clearing

150

Heh Heh Heh…I’ll

wash your car!

AND I’ll do your

homework!

AND I’ll clean your

room!

AND I’ll give you my life

savings!

Page 151: Online Algorithms  for Market Clearing

151

Whoops!

At some point in the future, Mom is going to walk in the room, and get more ice cream for little brother from the freezer.

Page 152: Online Algorithms  for Market Clearing

152

Oh Well

Page 153: Online Algorithms  for Market Clearing

153

OK, Let’s Formalize

Your little brother offers you increasing dollar amounts for your ice cream, stopping at some price not exceeding $9(his life savings).If you do not accept any bid, you eat the ice cream, which is worth $1.

Page 154: Online Algorithms  for Market Clearing

154

Relation to the Problem

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

pmax

Page 155: Online Algorithms  for Market Clearing

155

Offline/Online

Offline knows all the bids your brother will offer in the future.Online does not know what bids your brother will offer in the future, and must act on a bid as it is offered(before the next bid).

Page 156: Online Algorithms  for Market Clearing

156

Solution Concept

Try to do at least as well as some factor of the optimal offline algorithm, called the competitive ratio.Max(Offline/Online) over all scenariosBigger is BAD!

Page 157: Online Algorithms  for Market Clearing

157

Comparing Strategies

Offline Strategy: Take the highest offerOnline Strategy: Take $3 if offered

H. Offer

1 2 3 4 5 6 7 8 9

Offline 1 2 3 4 5 6 7 8 9

Online 1 1 3 3 3 3 3 3 3

Ratio 1 2 1 4/3

5/3

2 7/3

8/3

3

Page 158: Online Algorithms  for Market Clearing

158

Comparing Strategies

0

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 10

Offline

Online

C.R.

Highest Offer

$$$/Ratio

Page 159: Online Algorithms  for Market Clearing

159

Threshold Algorithms

We can consider a family of online algorithms that wait for some threshold bid.There are two bad cases.

Page 160: Online Algorithms  for Market Clearing

160

Threshold Algorithms

One bad case is when the highest offer is $9.

Threshold

1 2 3 4 5 6 7 8 9

Offline 9 9 9 9 9 9 9 9 9 9

Value at 9

1 2 3 4 5 6 7 8 9

Ratio at 9

9 9/2

3 9/4

9/5

3/2

9/7

9/8

1

Page 161: Online Algorithms  for Market Clearing

161

Threshold Algorithms

The other is when the highest offer is just below the threshold.

Threshold

1 2 3 4 5 6 7 8 9

Offline atT-1

1 1 2 3 4 5 6 7 8

Value atT-1

1 1 1 1 1 1 1 1 1

Ratio at T-1

1 1 2 3 4 5 6 7 8

Page 162: Online Algorithms  for Market Clearing

162

Threshold AlgorithmsThreshold

1 2 3 4 5 6 7 8 9

Ratio at 9

9 9/2

3 9/4

9/5

3/2

9/7

9/8

1

Ratio at T-1

1 1 2 3 4 5 6 7 8

WC Ratio

9 9/2

3 3 4 5 6 7 8Occur when highest offer 9

Occur when highest offerthreshold-1

Page 163: Online Algorithms  for Market Clearing

163

What if he has $N?

Threshold

1 … …N

Ratio at N

N

Ratio at T-1

Ratio N … …N-1Occur when

highest offer NOccur when highest offerthreshold-1

N

N

1N

NN

N N

1NN

Page 164: Online Algorithms  for Market Clearing

164

What if he has $64?

Sell if more than $8.

0

10

20

30

40

50

60

70

0 10 20 30 40 50 60 70

Offline

Online

C.R.

Highest Offer

$$$/Ratio

Page 165: Online Algorithms  for Market Clearing

165

Mixing Thresholds

“Best” threshold gets Low thresholds do better if the highest offer is lower.Higher thresholds do better if the highest offer is higher.How can we mix these together?

N

Page 166: Online Algorithms  for Market Clearing

166

Game Show Online Algorithms

There is a prize behind one door.

$1

Page 167: Online Algorithms  for Market Clearing

167

Game Show Online Algorithms

There is a prize behind one door.

$1

Page 168: Online Algorithms  for Market Clearing

168

Game Show Online Algorithms

There is a prize behind one door.

$1

Page 169: Online Algorithms  for Market Clearing

169

Randomization

Choose a door at random.

1/3 1/3 1/3

Page 170: Online Algorithms  for Market Clearing

170

Randomization

Case 1: the prize is behind the left door

$1

1/3

Page 171: Online Algorithms  for Market Clearing

171

Randomization

Case 2: the prize is behind the center door

$1

1/3

Page 172: Online Algorithms  for Market Clearing

172

Randomization

Case 3: the prize is behind the right door

$1

1/3

Page 173: Online Algorithms  for Market Clearing

173

Game Show Problem

No deterministic algorithm can achieve a reward in the worst case.A randomized algorithm receives a mean reward of $1/3 dollars in each case.For every case, the competitive ratio is the same(3).

Page 174: Online Algorithms  for Market Clearing

174

The Ice Cream Problem

Page 175: Online Algorithms  for Market Clearing

175

Better Business ThroughRandomization

Choose k uniformly at random from {1,2,3,4,5,6}(roll a six-sided die). Choose a threshold of 2k.Now we compare the expected reward of the online algorithm to the offline algorithmStill worst case scenario for brother’s valuation.

Page 176: Online Algorithms  for Market Clearing

176

What if he has $64?

Choosing threshold at random.Off On C.R. 2 4 8 16 32 641 1 1 1 1 1 1 1 12 1.17 1.7 2 1 1 1 1 13 1.17 2.6 2 1 1 1 1 14 1.67 2.4 2 4 1 1 1 15 1.67 3 2 4 1 1 1 16 1.67 3.6 2 4 1 1 1 17 1.67 4.2 2 4 1 1 1 1

Page 177: Online Algorithms  for Market Clearing

177

What if he has $64?

Choosing threshold at random.

0

10

20

30

40

50

60

70

0 10 20 30 40 50 60 70

Offline

Online(Expected)

C.R.Max C.R. 6

Highest Offer

$$$/Ratio

Page 178: Online Algorithms  for Market Clearing

178

In General

If your little brother has $N, the C.R. is log2 N.

Can do better: we can decrease the C.R. to ln N with a different exponential distribution.

N

xxT

ln

ln]Pr[

Page 179: Online Algorithms  for Market Clearing

179

Don’t like ice cream?

What happens if you don’t like ice cream?

Page 180: Online Algorithms  for Market Clearing

180

Relation to the Problem

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

pmax

Page 181: Online Algorithms  for Market Clearing

181

Don’t like ice cream?

Suppose you unconditionally refuse the first bid: competitive ratio of INFINITY!Deterministic strategy: take first bid.

Page 182: Online Algorithms  for Market Clearing

182

Don’t like ice cream?

Randomized strategy Choose k uniformly at random from

{0,1,2,3,4,5,6}. Choose a threshold of 2k.

Page 183: Online Algorithms  for Market Clearing

183

Don’t Like Ice Cream?

Choosing threshold at random.

0

10

20

30

40

50

60

70

0 10 20 30 40 50 60 70

Offline

Online

C.R.Max C.R. 7

Highest Offer

$$$/Ratio

Page 184: Online Algorithms  for Market Clearing

184

Bounds Still Good

Achieve a competitive ratio of (log2N)+1.

Again, we can get a (ln N)+1 with a different exponential distribution.

1)(ln

ln]Pr[

N

xxT

1)(ln

1]1Pr[

NT

Page 185: Online Algorithms  for Market Clearing

185

Application to One Sell Bid

Buy/Sell bids in [0,pmax]

See a sell bid at almost zero.Choose a profit threshold T at random according to:

1ln

ln]Pr[

max

p

xxT

1ln

1]1Pr[

max

pT

Page 186: Online Algorithms  for Market Clearing

186

Application To One Sell Bid

The competitive ratio of this algorithm is:

ln(pmax)+1

Page 187: Online Algorithms  for Market Clearing

187

Outline

IntroductionSmall Problem #1: Maximizing LiquiditySmall Problem #2: The Ice Cream ProblemPutting it TogetherConclusionNew Results

Page 188: Online Algorithms  for Market Clearing

188

Putting it Together

The ice cream problem represents well when we only have one sell bid.The matching problem allows us to maximize volume, but does not consider the profit that we will achieve with each edge.

Page 189: Online Algorithms  for Market Clearing

189

A Helpful Guarantee

What if we had a guarantee that every edge in the graph corresponded to a high profit?

Page 190: Online Algorithms  for Market Clearing

190

The Final Algorithm

Choose a threshold according to a specific exponential distribution.When you convert the auction to a graph, only include edges that have a profit above that threshold.Run the matching algorithm on the graph as it is observed.

Page 191: Online Algorithms  for Market Clearing

191

Outline

IntroductionSmall Problem #1: Maximizing LiquiditySmall Problem #2: The Ice Cream ProblemPutting it TogetherConclusionNew Results

Page 192: Online Algorithms  for Market Clearing

192

Conclusion

On the temporal bidding problem, there exists an algorithm which can achieve a competitive ratio of:

ln(pmax)+1

This is the best possible competitive ratio for an online algorithm

Page 193: Online Algorithms  for Market Clearing

193

Outline

IntroductionSmall Problem #1: Maximizing LiquiditySmall Problem #2: The Ice Cream ProblemPutting it TogetherConclusionNew Results

Page 194: Online Algorithms  for Market Clearing

194

Break

Page 195: Online Algorithms  for Market Clearing

195

Bidding Truthfully

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Why not lie?

Page 196: Online Algorithms  for Market Clearing

196

Bidding Truthfully

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

TimeWhy not lie?

Page 197: Online Algorithms  for Market Clearing

197

Bidding Truthfully

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

TimeWhy not lie?

Page 198: Online Algorithms  for Market Clearing

198

Profit

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

$0

Profit=$5

$5

$10

Page 199: Online Algorithms  for Market Clearing

199

Social Welfare

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

$0

Social Welfare=$10

$5

$10

Page 200: Online Algorithms  for Market Clearing

200

Profit

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

$0

Profit = $0$5

$10C.R.:

Page 201: Online Algorithms  for Market Clearing

201

Social Welfare

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

$0

Social Welfare=$5

$5

$10C.R.:2

Page 202: Online Algorithms  for Market Clearing

202

Two Problems

Agents not motivated to bid truthfullyProfit and social welfare competitive ratios different

Page 203: Online Algorithms  for Market Clearing

203

New Objectives

Maximize Global WelfareHave Agents Bid Truthfully

Page 204: Online Algorithms  for Market Clearing

204

The Price is Right!

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 205: Online Algorithms  for Market Clearing

205

The Price is Right!

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 206: Online Algorithms  for Market Clearing

206

The Price is Right!

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 207: Online Algorithms  for Market Clearing

207

The Price is Right!

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 208: Online Algorithms  for Market Clearing

208

Convert To A Graph…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 209: Online Algorithms  for Market Clearing

209

Match Greedily…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 210: Online Algorithms  for Market Clearing

210

Match Greedily…

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 211: Online Algorithms  for Market Clearing

211

What Did We Win?

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 212: Online Algorithms  for Market Clearing

212

What Could We Win?

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 213: Online Algorithms  for Market Clearing

213

What Could We Win?

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 214: Online Algorithms  for Market Clearing

214

The Price Is Right!

Bids in range [pmin, pmax]Choose a price p at random between pmin and pmax according to an exponential distribution.Greedily match those buy bids above to sell bids below that price.Worst-case competitive ratio for true bids is below 2(ln(pmax)-ln(pmin))

Page 215: Online Algorithms  for Market Clearing

215

The Gift Problem

Page 216: Online Algorithms  for Market Clearing

216

The Gift Problem:Buyer View

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

I am ALMOSTCERTAIN thishappens

HIGHLY unlikely

Page 217: Online Algorithms  for Market Clearing

217

The Gift Problem:Buyer View

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

I am ALMOSTCERTAIN thishappens

HIGHLY unlikely

I’ll bid what I expect it to be worth

Page 218: Online Algorithms  for Market Clearing

218

The Gift Problem:Worst Case

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Guess I was wrong!

Page 219: Online Algorithms  for Market Clearing

219

The Gift Problem:Worst Case

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Guess I was wrong!

Page 220: Online Algorithms  for Market Clearing

220

Where it gets REAL ugly…

Buyer: well, I REALLY think my son would like a Playstation.Seller: well, I REALLY think my daughter wouldn’t like a Playstation.

Page 221: Online Algorithms  for Market Clearing

221

Restricting the Valuation

Agents have a point in time where they precisely discover their valuations: no probabilities.Under this model, the mechanism is incentive-compatible.

Page 222: Online Algorithms  for Market Clearing

222

Lying Does Not Help

Buy Bids: people wanting to buySell Bids: people wanting to sell

Price

Time

Page 223: Online Algorithms  for Market Clearing

223

Other Results

Lower boundsMaximizing buy/sell volumeLearning a good threshold

Page 224: Online Algorithms  for Market Clearing

224

Future Work

Multiple item bids(“I want 50 kegs, no less!”)Combinatorial auctionsSupport of more general valuations

Page 225: Online Algorithms  for Market Clearing

225

Questions?