Skip to content
An implementation of Frege's voting method
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
bias-experiments.py
examples.py
frege.py

README.md

A Python implementation of Frege's voting method

For a detailed description of Frege's voting method as well as the modified Frege method, see the research paper by Harrenstein, Lackner, and Lackner [1].

How-to

For a fixed electorate:

from frege import * 
profile = [5,1,1,1,1,1]
k = 10
frege(profile , k, verbose=True)
modfrege(profile , k, verbose=True)

For a variable electorate:

from frege import * 
profiles = [[3,2,1],[3,1,1],[1,2,2]]
frege(profiles, verbose=True)
modfrege(profiles, verbose=True)

Further examples

Further examples can be found in frege/examples.py.

Bias experiments

The file bias-experiments.py contains the code for the experiments in "A Mathematical Analysis of an Election System Proposed by Gottlob Frege" [1], Section 5.3. This code requires apportionment.py from https://github.com/martinlackner/apportionment.

References

[1] Paul Harrenstein, Marie-Louise Lackner, and Martin Lackner. A Mathematical Analysis of an Election System Proposed by Gottlob Frege. 2019.

You can’t perform that action at this time.