Counting Votes with Multisets
Abstract
A multiset is a 'set' in which elements may occur multiple times. These structures are ideal for expressing the outcome of an election, for instance of the form 60 'yes' and 40 'no'. Moreover, multisets are a useful datatype in vote counting algorithms. This will be illustrated in three different forms of vote counting, known as: 'instant-runoff', 'De Borda', and 'single transferrable vote'. The relevant abstract properties of multisets are: (1) they form a (free) commutative monoid, and (2) they form a functor, and (3) also a monad. This paper illustrates how such categorical properties can be put to good use in deriving and expressing election outcomes. The emphasis is not on the (elementary) category theory involved, but on its application in voting systems.
Turn this paper into a full lesson
ArcXiv compiles a staged curriculum from this paper: 8-12 lessons across beginner → advanced, synthesised section guides, visuals, flashcards, a quiz, exercises, and on-demand deep dives per section. Grounded in the abstract, never invented.