1 / 57

Cupid’s Arrow

Cupid’s Arrow. 電機一 b99901090 黃翔致 電機一 b99901117 吳名弘 電機 三 b96502031 李宗燁. men to women. The Basic Model – a Matrix. preference number 0 > 1 > 2. women to men. The Basic Model – a Matrix. sum!!. The Basic Model – a Matrix. min = 1 + 0 + 2 = 3 This is the best solution !. Notation.

chase
Download Presentation

Cupid’s Arrow

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Cupid’s Arrow 電機一 b99901090黃翔致 電機一 b99901117吳名弘 電機三 b96502031李宗燁

  2. men to women The Basic Model – a Matrix preference number 0 > 1 > 2

  3. women to men The Basic Model – a Matrix

  4. sum!! The Basic Model – a Matrix min = 1 + 0 + 2 = 3 This is the best solution !

  5. Notation The model absolutely has the solution. But the solution may not be unique.

  6. Find The Best Solution • Standard Answer: C++ naïve method • Solution: • Best Choice Method • Worst Choice Method • Purpose: • Quick! • Accurate!

  7. C++ naïve method 1 1 2 2 3 3 1 1 2 2 3 3 1 1 2 2 3 3

  8. C++ Naïve Solution

  9. C++ Naïve Solution Answer: 1+0+2=3

  10. C++ Naïve Solution Answer: 1+0+2=3

  11. C++ Naïve Solution Answer: 1+2+2=5

  12. C++ Naïve Solution Answer: 4+4+2=10

  13. C++ Naïve Solution Answer: 4+2+1=7

  14. C++ Naïve Solution Answer: 2+4+2=8

  15. C++ Naïve Solution Answer: 2+0+1=3

  16. C++ Naïve Solution Best: 3Worst:10

  17. Best Choice Method • Each round, choose the best choice.

  18. Best Choice Method Step 1: Find the best choice

  19. Best Choice Method Step 1: Find the best choice

  20. Best Choice Method Step 1: Find the best choice

  21. Best Choice Method Step 1: Find the best choice

  22. Best Choice Method Step 1: Find the best choice

  23. Best Choice Method Step 1: Find the best choice

  24. Best Choice Method Step 1: Find the best choice

  25. Best Choice Method Step 1: Find the best choice

  26. Best Choice Method Step 1: Find the best choice

  27. Best Choice Method Step 1: Find the best choice

  28. Best Choice Method Again : Find the best choice

  29. Best Choice Method

  30. Best Choice Method Solution: 1+0+2=3

  31. Improvement of Best Choice Method Finding best choice is a repeating step

  32. Improvement of Best Choice Method

  33. Improvement of Best Choice Method • Using Sorting Algorithm: • 0(1,1) • 1(0,0) • 1(2,0) • 2(0,2) • 2(1,2) • 2(2,1) • 2(2,2) • 4(0,1) • 4(1,0)

  34. Improvement of Best Choice Method • Using Sorting Algorithm: • 0(1,1) • 1(0,0) • 1(2,0) • 2(0,2) • 2(1,2) • 2(2,1) • 2(2,2) • 4(0,1) • 4(1,0)

  35. Improvement of Best Choice Method • Using Sorting Algorithm: • 0(1,1) • 1(0,0) • 1(2,0) • 2(0,2) • 2(1,2) • 2(2,1) • 2(2,2) • 4(0,1) • 4(1,0)

  36. Improvement of Best Choice Method • Using Sorting Algorithm: • 0(1,1) • 1(0,0) • 1(2,0) • 2(0,2) • 2(1,2) • 2(2,1) • 2(2,2) • 4(0,1) • 4(1,0) It doesn’t do the same step.

  37. Worst Choice Method • The Defect of Best Choice Method is that it may choose a worst choice accidently.

  38. Worst Choice Method Step1 : Find the worst choice

  39. Worst Choice Method Step 2 : To prevent the worst choice

  40. Worst Choice Method Step 2 : To prevent the worst choice,find the best choice on its row/column

  41. Worst Choice Method Repeat the step1:Find the worst choice

  42. Worst Choice Method Repeat the step2:Find the best choice on its row/column

  43. Worst Choice Method Answer: 1+1+2=4Correct!

  44. Comparison

  45. Comparison

  46. Special situation-Judge by face

  47. Answer=6 Answer=6 Answer=6 Answer=6 Answer=6 Answer=6

  48. Homosexual A B C D A B C D

  49. Homosexual A B C D A B C D

More Related