# Lecture 10 Hashing - Duke University

Lecture 20 Linear Program Duality Outline Duality for two player games Solving two player games using LP Duality for LP Duality Two-Player Zero-sum Games Game played with two competing players, when one player wins, the other player loses. Goal: Find the best strategy in the game Game as a matrix Can represent the game using a 2-d array

R P S R 0 -1 1 P 1

0 -1 S -1 1 0 A[i, j] = if row player uses strategy i, column player uses strategy j, the payoff for the row player Recall: payoff for the column player is - A[i, j] Pure Strategy vs. Mixed Strategy

Pure strategy: use a single strategy (correspond to a single row/column of the matrix) Obviously not a good idea for Rock-Paper-Scissors. R P S R 0 -1 1 P

1 0 -1 S -1 1 0 Mixed strategy: Play Rock with probability p1 Payoff of the game.

Let Srow be a mixed strategy for the row player, Scol be a mixed strategy for the column player. Payoff for the row player: 1 0 0 0.25 0 -1 1 0.25

1 0 -1 0.5 -1 1 0 Solving two player games by LP A

B C A 3 1 -1 B -2 3

2 C 1 -2 4 Try to use LP to find a good strategy for Duke. What is a good strategy for Duke? A B C

A 3 A with1 probability -1 Strategy: Make play x1, B with probabilityBx2, C with x23. -2 probability 3 Good strategy: no 1matter what the4 opponent does, C -2 we get a good payoff. Let the payoff be x4. Solution: (9,6,4,19)/19.

Duality: what would UNC do? A B C A 3 A with1 probability -1 Strategy: Make play y1, B with probabilityBy2, C with y23. -2 probability 3 UNC wantsC to make 1 sure no

-2 matter 4 what we do, the payoff is always low (say lower than y4) Solution: (1,1,1,3)/3. Comparing the Solution to two LPs Solution to 1st LP: no matter what UNC does, Duke can always get x4 points (in expectation). Solution to 2nd LP: no matter what Duke does, UNC can always make sure Duke dont get more than y4 points (in expectation). Relationship between x4 and y4? Claim (Weak Duality): Min-Max Theorem Theorem [Von Neumann] For any two-player, zero-sum

game, there is always a pair of optimal strategies and a single value V. If the row player plays its optimal strategy, then it can guarantee a payoff of at least V. If the column player plays its optimal strategy, then it can guarantee a payoff of at most V. Corollary: The solution to the two LP must be equal. (x4=y4) Duality for Linear Programs Consider the following LP: Question: How can I prove to you that optimal solution is at most -1? Answer: You can check (4, 3, 0) Question: How to prove the optimal is at least -1? Dual LP

Primal Constraints Variables Feasible solution gives an upper bound. Dual Variables Constraints Feasible solution gives a lowerbound. Strong Duality: The two LP has the same optimal value.

## Recently Viewed Presentations

• similes. and metaphors. He uses similes to paint a visual picture of character, we see this in stave 1 when Scrooge is 'As solitary as an oyster' and 'hard and sharp as a flint' whilst in stave 5 having been...
• Lego NXT ir Robotics Studio Robotics Studio atnaujinimai Išleisti atnaujinimai: Runtime and Tools Update Samples Update Sumo Competition Soccer Simulation Introductory Courseware Visual Programming Language(VPL) servisai Lego NXT Brick (v2) Lego NXT Motor (v2) Lego NXT Drive (v2) Lego NXT...
• B. uild a healthy base. C. ... Food handling by someone with a skin infection, keeping food at room temperature. Fever, nausea, vomiting, cramps, & diarrhea are typical symptoms of foodborne illness. You should rest and drink plenty of fluids.
• It is an important piece to the many applications of colorimetric sensor array data analysis. For example, lung cancer and other diseases can be identified through analysis of the breath of patients with colorimetric sensor arrays (Beukemann et. al., 2012)....
• "Do not move an ancient boundary stone set up by your ancestors" ... Solomon's life stages in 1 Kgs harmonized w/ Eccl. Some sections fit Solomon's life (e.g. wealth, wisdom, women) Some problems w/ Solomon's authorship
• Build and battle your way to glory in Castle Clash! With over 10 million clashers worldwide, the heat is on in the most addictive game ever! In a brilliant mix of fast-paced strategy and exciting combat, Castle Clash is a...
• บทที่ 9 การกำหนดขนาดของตัวอย่าง ความคลาดเคลื่อนจากการสุ่ม