{"id":"vote-condorcet-winner","version":"1.0.0","description":"Compute weighted pairwise counts, a strict Condorcet winner, and the generalized Smith set.","supported_operations":["compute Condorcet winner","calculate pairwise preference matrix","find Smith set","count weighted ranked ballots","analyze tied rankings","analyze truncated ballots"],"unsupported_operations":["choose a winner by instant-runoff voting","resolve strategic voting or clone independence"],"semantics":["Candidate and all output ordering exactly preserve the caller-supplied candidate order; ballot weights are positive integers.","ranked-over-missing treats every ranked candidate as preferred to every omitted candidate; abstain excludes such pairs.","A strict Condorcet winner has a strictly larger pairwise count than every opponent; ties do not win.","smith_set is the generalized weak-majority top cycle: each returned candidate can reach every candidate along edges whose pairwise count is at least the reverse count."],"limits":{"max_candidates":50,"max_ballots":1000,"max_weight_per_ballot":1000000,"max_total_weight":1000000000,"max_candidate_bytes":64},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"properties":{"candidates":{"type":"array","minItems":2,"maxItems":50,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":64}},"ballots":{"type":"array","maxItems":1000,"items":{"type":"object","additionalProperties":false,"properties":{"ranking":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"string","minLength":1,"maxLength":64}}},"weight":{"type":"integer","minimum":1,"maximum":1000000}},"required":["ranking","weight"]}},"missing_candidate_policy":{"type":"string","enum":["ranked-over-missing","abstain"]}},"required":["candidates","ballots","missing_candidate_policy"]},"output_schema":{"type":"object","additionalProperties":false,"properties":{"candidates":{"type":"array","minItems":2,"maxItems":50,"items":{"type":"string"}},"pairwise":{"type":"array","minItems":2,"maxItems":50,"items":{"type":"object","additionalProperties":false,"properties":{"candidate":{"type":"string"},"counts":{"type":"array","minItems":2,"maxItems":50,"items":{"type":"integer","minimum":0,"maximum":1000000000}}},"required":["candidate","counts"]}},"compared_weight":{"type":"array","minItems":2,"maxItems":50,"items":{"type":"object","additionalProperties":false,"properties":{"candidate":{"type":"string"},"counts":{"type":"array","minItems":2,"maxItems":50,"items":{"type":"integer","minimum":0,"maximum":1000000000}}},"required":["candidate","counts"]}},"condorcet_winner":{"type":["string","null"]},"smith_set":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"string"}},"audit":{"type":"object","additionalProperties":false,"properties":{"ballot_count":{"type":"integer"},"total_weight":{"type":"integer"},"complete_weight":{"type":"integer"},"truncated_weight":{"type":"integer"},"tied_weight":{"type":"integer"}},"required":["ballot_count","total_weight","complete_weight","truncated_weight","tied_weight"]}},"required":["candidates","pairwise","compared_weight","condorcet_winner","smith_set","audit"]},"examples":[{"input":{"candidates":["A","B"],"ballots":[{"ranking":[["A"],["B"]],"weight":3},{"ranking":[["B"],["A"]],"weight":1}],"missing_candidate_policy":"ranked-over-missing"},"output":{"candidates":["A","B"],"pairwise":[{"candidate":"A","counts":[0,3]},{"candidate":"B","counts":[1,0]}],"compared_weight":[{"candidate":"A","counts":[0,4]},{"candidate":"B","counts":[4,0]}],"condorcet_winner":"A","smith_set":["A"],"audit":{"ballot_count":2,"total_weight":4,"complete_weight":4,"truncated_weight":0,"tied_weight":0}}},{"input":{"candidates":["A","B","C"],"ballots":[{"ranking":[["A","B"]],"weight":2}],"missing_candidate_policy":"abstain"},"output":{"candidates":["A","B","C"],"pairwise":[{"candidate":"A","counts":[0,0,0]},{"candidate":"B","counts":[0,0,0]},{"candidate":"C","counts":[0,0,0]}],"compared_weight":[{"candidate":"A","counts":[0,2,0]},{"candidate":"B","counts":[2,0,0]},{"candidate":"C","counts":[0,0,0]}],"condorcet_winner":null,"smith_set":["A","B","C"],"audit":{"ballot_count":1,"total_weight":2,"complete_weight":0,"truncated_weight":2,"tied_weight":2}}}],"execute_url":"/v1/tools/vote-condorcet-winner/versions/1.0.0/execute"}