200 likes | 287 Views
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).
E N D
Majority voting Mehrdad Mahdavi 83206054
Winning an election Predicates: (strict majority) (exists majority) (conditional majority) Abstract program :
Disjunction inherent using (i) (ii)
First refinement (i) If there is no majority is a as i, then the only possible maj . In as (i+1) is as[i]
Add variable d (State transformation)
Merge alternation Law 18.2 left-distribution of composition over alternation
Simplify alternation Law 18.4 remove false guard Law 18.5 remove alternation
Flatten nested alternations Law 18.6