1 / 20

Majority voting

Majority voting. Mehrdad Mahdavi 83206054. Winning an election. Predicates:. ( s trict m ajority). ( e xists m ajority). ( c onditional m ajority). Abstract program :. A straightforward attempt. Disjunction inherent. using. (i). (ii). First refinement. (i).

eshana
Download Presentation

Majority voting

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. Majority voting Mehrdad Mahdavi 83206054

  2. Winning an election Predicates: (strict majority) (exists majority) (conditional majority) Abstract program :

  3. A straightforward attempt

  4. Disjunction inherent using (i) (ii)

  5. First refinement (i) If there is no majority is a as i, then the only possible maj . In as (i+1) is as[i]

  6. Introduction count c

  7. A Second attemp is faster

  8. Define variable

  9. Refine…

  10. Count c

  11. Linear Time Code

  12. Add variable d (State transformation)

  13. Remove auxiliary c,j

  14. Fast Code ………..

  15. Merge alternation Law 18.2 left-distribution of composition over alternation

  16. Right-distribution of assignment over alternation

  17. Simplify alternation Law 18.4 remove false guard Law 18.5 remove alternation

  18. Flatten nested alternations Law 18.6

  19. Introduce invariant d>=0

  20. Thanks

More Related