@nixCraft looks like the core algorithm of today's ballot systems