[EM] Deduction engine idea for proving property-set incompatibilities for EMs

Jan Kok jan.kok.5y at gmail.com
Tue Jan 30 15:26:16 PST 2007

A few random thoughts:

- It looks like you might need a sparse array to store those bytes in.
Check out the "Judy" sparse array http://judy.sourceforge.net/ . I've
used it, it works very well.

- However, it's probably not necessary to store anything, if you have
a loop that generates election types and then you apply all of your
tests at once to each individual election type as it is generated.
This implies several major components to the program: a data structure
that describes an election type, a data structure that describes a
vote type, an election type generator loop, a "user defined" function
that applies tests to an election type, and a collection of tests
(FBC, etc.) that can be applied to election types.

- The election type generator may look like a mess to program, but it
shouldn't be that hard. Here is one way to think of it (just a rough
sketch, for 15 voters and 12 voting types):

for number_of_voters_in_1st_faction in 1..15
  for 1st_voting_type in 1..12
    if more voters to assign then
      for number_of_voters_in_2nd_faction in
        for 2nd_voting_type_in 1..12
          if 2nd_voting_type has already been used by a previous
faction, continue
          ... more of the same, 13 more levels ...

That can be turned into a recursive function:

function voting_type_generator(int faction, int remaining_voters...)
  for number_of_voters_in_Nth_faction[faction] in 1..remaining_voters
    for Nth_voting_type[faction] in 1..12
      if Nth_voting_type[faction] has been used by a previous faction, continue
      if more voters to assign then

- Jan

More information about the Election-Methods mailing list