1 / 59

ICTSA Programming Contest 2009 Legal Cheating in Elections

ICTSA Programming Contest 2009 Legal Cheating in Elections. Gordon Pace Claudia Borg Chris Porter. Legal Cheating. District boundary manipulation to give an unfair advantage, or gerrymandering has a long history…

lore
Download Presentation

ICTSA Programming Contest 2009 Legal Cheating in Elections

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. ICTSA Programming Contest 2009Legal Cheating in Elections Gordon Pace Claudia Borg Chris Porter

  2. Legal Cheating • District boundary manipulation to give an unfair advantage, or gerrymandering has a long history… • 1812: Governor Elbridge Gerry in Massachusetts drew up a district so distorted geographically, that it was likened to a salamander – ‘better call it a gerrymander’ someone commented!

  3. Legal Cheating

  4. Legal Cheating • Gerrymandering works through the wasted vote effect. Why do we not use a more effective electoral system? • Arrow’s impossibility theorem from 1951 demonstrates that no voting system can convert individual rankings into a global one – there can be no fair election system.

  5. An Example

  6. An Example West Gozo PX=80 PY=100 East Gozo PX=120 PY=190 St Paul’s PX=70 PY=90 Mosta PX=100 PY=150 Cirkewwa PX=60 PY=50 Valletta PX=240 PY=100 Rabat PX=120 PY=140 Marsaxlokk PX=100 PY=50 Zurrieq PX=210 PY=100

  7. An Example PX elects 7 Variance = 255

  8. An Example PX elects 8 Variance = 147

  9. An Example PX elects 8 Variance = 141

  10. The Programming Task • Given: • A set of villages • Connections between villages • Expected voting preferences in each village for the two parties PX and PY • Number of districts to have • To return in less than 5 minutes: • A district partitioning such that districts are connected components

  11. The Programming Task • A good partition is one which: • Maximises the number of seats il-Partit tax-Xurbana (PX) elects; and • Minimises the differences in populations across districts. • Ideally there would have been: • A bound on the difference between district populations; • A bound on the distance between villages in a single district.

  12. How to Solve It • The problem can be shown to be NP-complete (eg via the Knapsack problem). • A brute-force solution will only work for small instances. • Larger problems require the use of some search heuristic.

  13. The Teams • Eat Your Apple! • David Bailey • Andrew Calleja • Alan Cassar • Stephen Fenech • dot • Marco Muscat • Joseph Borg • HND4 • Norbert DeBono • Matthew Xuereb • Andrew Vella • CG • Andrew Said • Village People • Darren Demicoli • Beeef • Alessio Magro • Reuben Bartolo • Jonathan Caruana • Unicus • Gianluca Valentino • WM • James Scicluna • Kevin Falzon • Ingram Bondin • Andrew Gauci • iLike • Andrew Borg Cardona • Michael Debono

  14. The Teams Solutions: Beeef • Genetic Algorithm: using only selection and mutation (cross-over did not give better results). • Chromosome representation: consist of a list of districts, which in turn are composed of a list of villages.  • Creation: ensures that: • All the villages in a district must belong to the same `island'. • Districts must be connected. • Mutation: works by selecting two districts at random and swapping two villages across: • The two districts must belong to the same `island'. • Check that connectivity is not lost by the addition or the removal. • Fitness function: Number of PX members elected, variance. • Termination: upon convergence.

  15. The Teams Solutions: Unicus • Heuristic based: The generator worked as follows, repeating as necessary. • Repeat a number of times: • Identified the village where PX has the largest majority and population and place in District 1. • Identified the village with the largest PY majority and second largest population, and the village with the second largest PX majority and 3rd largest population, both of which had to be connected to each other, and placed them in District 2. • Create a district with the villages with the largest PX and PY majority, and repeat to use up the remaining villages. Repeat this process for all permutations.  • Programmed in C using .NET 2.0

  16. The Teams Solutions: WM • Special case scenarios, a brute-force search and a Montecarlo method were implemented one of which is chosen depending on the problem given. • For non-special cases, a measure of the complexity of the graph is estimated and depending on this one of the solutions is chosen based on benchmarking.  • Approach 1: Fully enumerative approach, resembling brute force, but with immediate pruning of some impossible candidate solutions • Approach 2: An adaptive Montecarlo based approach with generation of results through analysis of the given accident space and appropriate ranking of resulting candidate solutions • A timer ensures a solution in the allotted 5 minutes.

  17. The Teams Solutions: iLike • Random search: A modified Monte Carlo method, taking features from genetic algorithms • Chromosome: District configurations • Random generation: Generates random distribution of villages (randomising villages, and placing random separators), and checked for validity • Selection: • Fitness: More elected PX MPs or better variance is preferred. • Validity: Checked later for performance reasons • Stopping criteria: 100 generations or reaching a long enough plateau (dependant on size of the problem)

  18. The Teams Solutions: Eat Your Apple! • Preprocessing: • Split the country into separate islands • Each island (based on its population) is assigned a number of districts to be allocated within it. • Phase 1: Clustering Algorithm • On each island a clustering algorithm groups villages into districts such that the number of elected PX candidates is maximized.  • Starts off a random village, and adds others clustered around the initial village. • Phase 2: Genetic Algorithm • A genetic algorithm is applied on the output of the clustering algorithm to generate fitter solutions • Fitness function was global maximization of PX candidate count and a globally minimized PY candidate count. • Assigning more weight to the PX count gave better results.

  19. The Teams Solutions: . (dot, tikka) • Preprocessing: Splits the problem into 'islands' to support disconnected nodes. • Genetic algorithm • Generation: using random starting village and generate a connected district with a modified BFS search. • Fitness function: Number of PX members elected and variance 

  20. The Teams Solutions: HND4 • Developed using C# on .NET framework 2.0 • Preprocessing: Separate into different islands. • Heuristic search: • Grouping villages where PY dominates and group them in one district if possible • If more districts are still required PX dominant districts are divided into smaller ones.

  21. The Teams Solutions: CG • Calculate all possible district sizes • For each possible combination of sizes: • A district is created starting from a village and proceeding in a BFS manner. • Try to create the remaining districts ensuring no overlap. • Remember the best solution found. • Would have liked to add: • Heuristics to merge villages in a pre-analysis phase eg PY-strong villages close to each other. • Use a timer to ensure giving results on time.

  22. The Teams Solutions: Village People • Genetic algorithm coded in C • Chromosome representation: partitions with connected villages • Crossover: injects a district into the chromosone • Mutation: randomly assigns a village to a district • Genetic repair: is used to ensure that the partitions are still valid • Fitness function: Sum of the ratio of members elected of party X against party Y, and the inverse of the variance.

  23. The Test Problems • Set of properties specified for 17 fictitious countries. • Each village has: • 300 ≤ Voters ≤ 500 • Generated randomly before the contest • The ratio between the votes for the parties PX:PY was allowed to could range between 20:80 and 80:20 • Generated randomly before the contest • A number of regular map layouts were used. • The number of district was chosen so as to ensure an average of 4 villages per district.

  24. The Test Problems 8 grid countries: 3x3 to 10x10 198,264 175,144 220,91 Lltrdabguo Asgvvjfcne Szoxxldneo 218,179 129,187 267,144 Lczktvafoj Moawloiblf Tgxgmzcaqw 187,120 232,232 354,106 Ciioesvamf Kazucjrgqf Hmxfstqddp

  25. The Test Problems 3 full-mesh grid countries: 3x3, 7x7, 10x10 198,264 175,144 220,91 Lltrdabguo Asgvvjfcne Szoxxldneo 218,179 129,187 267,144 Lczktvafoj Moawloiblf Tgxgmzcaqw 187,120 232,232 354,106 Ciioesvamf Kazucjrgqf Hmxfstqddp

  26. 175,144 168,156 198,264 Szoxxldneo Asgvvjfcne Yisfhxnfvz 129,187 84,266 Lczktvafoj Imutautvmw 187,120 214,285 Ciioesvamf Wdyvaxlzyb 165,309 174,190 Lvjanqoway Xasfeuqsyp 200,227 Vvjzivqcmq The Test Problems 3 circular countries with 10, 20 and 50 villages

  27. The Test Problems 3 circular countries with a hub sizes 10, 20 and 50 175,144 168,156 198,264 Szoxxldneo Asgvvjfcne Yisfhxnfvz 129,187 84,266 Lczktvafoj Imutautvmw 74,263 Dastautvmw 187,120 214,285 Ciioesvamf Wdyvaxlzyb 165,309 174,190 Lvjanqoway Xasfeuqsyp 200,227 Vvjzivqcmq

  28. The Test Problem The biggest problem of them all

  29. The Test Problem The biggest problem of them all Malta

  30. The Test Problem: Malta

  31. The Test Problem: Malta • An example from real-life: Malta • 69 villages • Connectivity based on geographical proximity • Vote distribution based on the results of the last local elections (2006 – 2008)1 • 13 districts1taken from http://www.maltadata.com/tr-count1.htm

  32. The Results: Grids [3x3]

  33. The Results: Grids [4x4]

  34. The Results: Grids [5x5]

  35. The Results: Grids [6x6]

  36. The Results: Grids [7x7]

  37. The Results: Grids [8x8]

  38. The Results: Grids [9x9]

  39. The Results: Grids [10x10]

  40. The Results: Grids+Diagonal [3x3]

  41. The Results: Grids+Diagonal [7x7]

  42. The Results: Grids+Diagonal [10x10]

  43. The Results: Wheels – 10 Villages

  44. The Results: Wheels – 20 Villages

  45. The Results: Wheels – 50 Villages

  46. The Results: Wheels+Hub: 10 Villages

  47. The Results: Wheels+Hub: 20 Villages

  48. The Results: Wheels+Hub: 50 Villages

  49. The Results: Malta

  50. The Scores

More Related