Presentation is loading. Please wait.

Presentation is loading. Please wait.

Formal Two Party Debates about Algorithmic Claims or How to Improve and Check your Homework Solutions Karl Lieberherr.

Similar presentations


Presentation on theme: "Formal Two Party Debates about Algorithmic Claims or How to Improve and Check your Homework Solutions Karl Lieberherr."— Presentation transcript:

1 Formal Two Party Debates about Algorithmic Claims or How to Improve and Check your Homework Solutions Karl Lieberherr

2 Learn from your Peers Engage them in a dialog about the homeworks. Competition with Social Welfare Collaboration

3 Competition Examples Historical – Tartaglia and Fior 1535: solving cubic equations Modern – SAT competitions – Netflix prize competition May 16, 20133 Intro

4 Platforms Facilitating Competitions TopCoder – developing software Kaggle – data mining FoldIt – protein foldings EteRNA – protein synthesis Project Euler, Jutge – for education May 16, 20134 Intro

5 Truth and Clever Constructions We are not just interested in WHETHER a claim is true but WHY it is true. We are NOT asking for a PROOF why a claim is true but for a constructive demonstration that the claim is true. Having a proof is ideal but is not required for supporting a claim. It is enough knowing the CLEVER CONSTRUCTIONS without having a proof why they work. May 16, 20135

6 Example: Lab Definition φ(c ∈ C)= ∀ x ∈ X ∃ y ∈ Y : p(x,y,c) – B(ingran): φ(c 0 ) true: verifier – K(arl): φ(c 0 ) false: falsifier 9/24/20156

7 Concrete 1 Stable Marriages Lab φ(c ∈ C)= ∀ x ∈ X ∃ y ∈ Y : p(x,y,c) X = Instances, e.g., preferences. Y = Solutions, e.g., marriages. C = Quality, e.g., 1 if all stable, 0 otherwise. p(x,y,c)=quality(x,y)=c φ(1) is true 9/24/20157

8 Concrete 2 Silver Ratio Lab φ(c ∈ C)= ∀ x ∈ X ∃ y ∈ Y : p(x,y,c) X = [0,1] Y = [0,1] C = [0,1] p(x,y,c) = x*y + (1-x)*(1-y 2 ) >= c φ(0.5) is true φ(0.7) is false 9/24/20158

9 Concrete 3 Protein Folding / Minimization Lab φ(c ∈ C)= ∃ x ∈ X ∀ y ∈ X : p(x,y,c) X = Solutions, e.g., protein foldings C = Quality, e.g., energy of folded protein φ(c ∈ C) = ∃ x in X ∀ y in X: c = quality(x) <= quality(y) (minimum energy protein folding) φ(0.4) is true 9/24/20159

10 Example φ(c ∈ C)= ∀ x ∈ X ∃ y ∈ Y : p(x,y,c) – B(ingran): φ(c 0 ) true: verifier – K(arl): φ(c 0 ) false: falsifier – Experiment K:x 0 B:y 0 p(x 0,y 0,c 0 ) true – objective evidence for B to be stronger than K. » K must have made at least one mistake, while B might have been perfect. if φ(c 0 ) true, K took the wrong side. if φ(c 0 ) false, K chose the wrong x 0 9/24/201510

11 Example (continued 1) φ(c ∈ C)= ∀ x ∈ X ∃ y ∈ Y : p(x,y,c) – B(ingran): φ(c 0 ) true: verifier – K(arl): φ(c 0 ) true: verifier – Experiment 1 B(ingran): φ(c 0 ) true: verifier K(arl): φ(c 0 ) false: forced falsifier – K:x 1 O:y 1 p(x 1,y 1,c 0 ) true » no evidence that Bingran is stronger 9/24/201511

12 Example (continued 2) φ(c ∈ C)= ∀ x ∈ X ∃ y ∈ Y : p(x,y,c) – Z(hengxing): φ(c 0 ) true: verifier – K(arl): φ(c 0 ) true: verifier – Experiment 2 K(arl): φ(c 0 ) true: verifier Z(hengxing): φ(c 0 ) false: forced falsifier – Z:x 2 K:y 2 p(x 2,y 2,c 0 ) false » objective evidence that Zhengxing is stronger. Karl must have made at least one mistake, while Zhengxing might have been perfect. 9/24/201512

13 Silver Ratio claim G(c) = ForAll x in [0,1] Exists y in [0,1]: x*y + (1- x)*(1-y^2) >= c A specification of an algorithm: Write a program which takes an x as input and produces a y as output so that the above condition holds.

14 Silver Ratio G(1/2) winning strategy for verifier: f(x,y) = x*y + (1-x)*(1-y^2) if x>1-x : y=1. f(x,y)=x > 1/2 1-x>x : y=0. f(x,y)=1-x > 1/2 1-x=x : y=1. f(x,y)=1/2 formal debate: falsifier x=0.75 verifier y=1 0.75>0.5 verifier wins

15

16 Silver Ratio G(0.615) winning strategy for verifier: Choose y=x. Result: x^3-x+1 minimize x^3-x+1 local minimum at x=1/sqrt(3) = min{x^3-x+1}~~0.6151 at x~~0.57735 formal debate: falsifier x=0.58 verifier y=0.58 x^3-x+1 where x = 0.58 Result: 0.615112 > 0.615

17 Silver Ratio G(0.616) formal debate 1: falsifier x=0.3 verifier y=0.3 Result 0.727 verifier wins formal debate 2: x=0.57735 y=0.57735 Result 0.6151 < g(0.616) verifier loses!!!!!!!!!!!!!!!

18 Silver Ratio Question: Is G(0.616) really true? What is the winning strategy? The winning strategy is an algorithm which maps an x to a y such that f(x,y)>=0.616 holds for all x in [0,1]. Homework: Find such an algorithm.

19 Silver Ratio

20

21 Goal of a Lab Teaching – If the lab is useful, the students will have fun challenging each other and learning together 9/24/201521

22 22

23 Generic Investigation Cycles Pose a Question Design Experiments Find a Solution Evaluate Results Run Experiments Evaluate Results Pose another Question Popper 9/24/201523

24 Investigation Cycles For questions whose solution can be automated. Cycles – Debug, Improve question: red right cycles – Debug, Improve solution: left gray cycle

25 Important Events during Investigation Cycles First owner/participant who proposes popular question. First participant who finds a solution that is not successfully challenged by experiment.

26

27 Example Lab: Polynomial-time Decision Problems Parameters: Decision Problem, monotonic function LandauAlgorithmic(D:DecisionProblem, f(n)) = Exists algorithm A for D ForAll inputs i of size at most n: runningTime(A,i) in soft O(f(n)). – CobhamLandau(D:DecisionProblem,n^c)=D is in P (solvable in polynomial time) – CobhamLandau(Primes,n^7.5) where n is the number of digits (AKS Algorithm). 9/24/201527 Motivating Labs

28 StrassenLab Matrix Multiplication Algorithms StrassenLab(c in [2,3))=Exists M in MatrixMultiplicationAlgorithms: RunTime(M) in O(n^c). StrassenLab(2.80) 9/24/201528 Motivating Labs

29 Detailed StrassenLab 2 Matrix Multiplication Algorithms StrassenLab(c in [2,3))=Exists M in MatrixMultiplicationAlgorithms: Exists d in Nat: Exists n0 in Nat: ForAll inputs i of size n>n0: RunTime(M,i) < d * (n^c). StrassenLab(2.80) 9/24/201529 Motivating Labs

30 Detailed StrassenLab 3 Matrix Multiplication Algorithms StrassenLab(c in [2,3), d in Nat, n0 in Nat)=Exists M in MatrixMultiplicationAlgorithms: ForAll inputs i of size n>n0: RunTime(M,i) < d * (n^c). StrassenLab(2.80) 9/24/201530 Motivating Labs

31 31 Decision Making Using Semantic Games (SGs) A semantic game for a given claimφ(p 0 ), A is a game played by a verifier and a falsifier, denoted SG(φ(p 0 ), A, verifier, falsifier), such that: – A |= φ(p 0 ) the verifier has a winning strategy. Related

32 32 Toy Example S(c ∈ [0,2]) = ∀ x ∈ [0,1]: ∃ y ∈ [0,1]: x + y > c S(c) is true for c ∈ [0,1) and false for c ∈ [1,2] Best strategy: – for the falsifier: x=0 – for the verifier: y=1 Related

33 33 Toy Example: SG Trace SG( ∀ x ∈ [0,1]: ∃ y ∈ [0,1]: x + y > 1.5,, ) SG( ∃ y ∈ [0,1]: 1 + y > 1.5,, ) Provides 1 for x SG( 1 + 1 > 1.5,, ) Provides 1 for y Wins Weakening (too much!) Strengthening Related

34 34 Related

35 35 Strategies A strategy is a set of functions, one for each potential move. Related

36 9/24/201536 Related

37 37 Example: Silver Ratio For A potential falsifier strategy is: provideX(c){ 0.5 }. A potential verifier strategy is: provideY(x, c){ x }. Related

38 38 Example: SG Trace SG(,, ),, ) Provides 0.5 for x SG(,, ) Provides 0.5 for y Wins Weakening (too much!) Strengthening Related

39 39 SG Properties (Relevant to our approach) SG winners drive their opponents into contradiction. Faulty verifier (falsifier) actions can produce a false (true) claim from a true (false) one. Faulty actions will be exposed by a perfect opponent leading to a loss. Winning against a perfect verifier (falsifier) implies that the claim is false (true). Losing an SG implies that either you did a faulty action or you were on the wrong side. Related

40 Avatar View lab as a language L of all claims that can be formulated in the lab. L true (L false ) is the set of true (false) claims in L. There is a set of required functions S true used to defend claims in L true and another set of required functions S false for L false. The burden of demonstrating the correctness of the required functions is divided among two participants. 9/24/2015 40 Avatar

41 S true and S false are certificates that can be used to defend the true and false claims. A perfect avatar for a claim family is a pair (S true, S false ), where the side chosen by the avatar is the winner side of SG(c, S true, S false ). An avatar (S true, S false ) applied to a claim c is used to take a side on c defend the side taken 9/24/2015 41 Avatar

42 Example Avatar for Silver Ratio Lab Defending SilverRatio(c) if SilverRatio(c) use S true : when given an x, construct y else use S false : construct x Issue: In practice the avatars may be buggy. Issue: humans might have to help the avatar. 9/24/2015 42 Avatar

43 43 Generalizing SGs First ask participants for their favorite side (u is a participant). If both choose the same side, force one to play the devil’s advocate. WinnerForced Payoff (u, !u) Truth evidence uNone(1, 0)Pos(u) uu(1, 0)None u!u(0, 0)Pos(u)

44 Conclusions Use formal debates about claims to improve your solutions and learn from others. Works for other STEM areas. 44


Download ppt "Formal Two Party Debates about Algorithmic Claims or How to Improve and Check your Homework Solutions Karl Lieberherr."

Similar presentations


Ads by Google