Category Archives: Uncategorized

An interesting hypothetical election

Here is an election:

  • 1, 4, 2, 3, 5
  • 2, 3, 5, 4, 1
  • 2, 5, 4, 1, 3
  • 3, 2, 5, 1, 4
  • 3, 5, 2, 1, 4
  • 3, 5, 2, 4, 1
  • 4, 1, 3, 2, 5
  • 4, 2, 5, 3, 1
  • 4, 3, 2, 5, 1
  • 5, 4, 1, 2, 3
  • 5, 4, 2, 1, 3

Where each is a vote cast for one of 5 candidates, ordered from favourite to least favourite.

Why is it interesting? Because it produces different answers depending on which of three popular Condorcet voting systems you use.

The Smith set for this election is 2, 3, 4, 5. The Kemeny young winner is 4, the Schulze method winner is 2, and the ranked pairs winner is 5.

More in this vein possibly to follow.

This entry was posted in Uncategorized, voting on by .

A patch for quadratic voting

An idea that always appeals to me is the idea of quadratic vote buying. You have some currency system associated with a vote (it doesn’t have to be real money) and you can buy as many votes as you want. However the cost of buying \(n\) votes is proportional to \(n^2\). So buying 2 votes costs 4 times as many as buying one vote, etc. The cost of your vote is then distributed evenly amongst all the other voters.

This has the nice property of letting you put more of your credibility behind things that are important to you, and then redistributes that credibility at the end.

In practice there are a lot of social problems with this and I’m not at all sure it’s a good idea, but that doesn’t stop it having a lot of appeal for me. People who are aware of my tastes will probably find this spectacularly unsurprising.

But one problem I was thinking about earlier is as follows: Suppose you really really don’t want something to pass. So you buy a lot of votes to prevent it from passing, spending a lot of your bank balance, and it turns out it didn’t have much chance of passing and you comfortably overshoot the mark. It seems a little unfair that you’ve wasted all that money.

It occurred to me that you can solve this with a sort of Vickrey auction. You run the vote as normal, but in the end you only pay enough to buy out the next best option. e.g. in the two outcome case if the vote is won 100 to 80, then the winning voters only pay for 80 votes and the losing voters don’t pay anything.

But how do you actually do this? Those votes aren’t just single bids – they’re the sum of a number of bids from a number of individuals. How do you choose which voter pays what?

I’d argue that the most equitable arrangement of votes is the one that minimizes the total amount spent. This seems both fairest and makes it safer to bid high values to achieve your desired result. I haven’t checked the details too carefully, but I’m pretty sure the correct way to do this is to find the smallest threshold \(t\) such that everyone who bought more than \(t\) votes only buys \(t\) votes and everyone who bought under buys their maximum amount while still achieving the desired number of votes.

You can find this optimal threshold as follows: Iterate over the votes from smallest to largest. Calculate the threshold you would have if every smaller vote were to pay full price. This is the amount of required votes remaining divided by the number of voters remaining. If this threshold is smaller than the current vote, congratulations you’ve found the threshold. If it’s larger than the current vote, deduct the current vote from the amount remaining and keep going.

Here is some python code to implement this:

Note that this requires arbitrary fractional currencies for anyone who is left in at the end. If you’re using a currency that doesn’t support this (e.g. real money) then this is easy to solve: You have n people left paying and are required to pay an amount A as an integer multiple of the smallest currency unit (it’s an integer because the total we’re originally setting out to achieve is an integer, and at each stage we removed a set of votes all of which were themselves integers). We can write this as \(A = pm + r\) with \(r < n\). Then every one in the remainder set pays \(p\) and additionally \(r\) of them selected at random pay an additional one. This is still within their willingness to pay band because they were each willing to pay an integer amount greater than \(\frac{A}{n}\).

I have not checked any sort of voting or game theory for this idea and as such it may be a terrible one, but intuitively it seems to behave nicely.

Generalising to more than two alternatives

It’s interesting to consider how this would work with more than two options. If your vote is just to pick a single candidate then there’s no issue at all – it works exactly as designed – but one thing that appeals to me in quadratic voting is that you can use it to construct a sort of range voting. If you prefer A to B to C you might as well stick a few secondary votes on B because they’re a lot cheaper than piling more votes onto A. However in this system that has some unfortunate results, because if the end result is A vs B you’ve driven up your price!

I think you can solve this with what is essentially instant runoff voting to reduce the n alternative case to the two alternative case:

Your vote is a ranked subset of the alternatives. You also associate a number of votes with each alternative. These are probably not required to be in the same order – i.e. you could vote A over B over C but assign 1 to A, 0 to B and 2 to C if you really wanted. This might be a good strategy if e.g. you had two candidates who you both really hated but had a strong preference as to which would win amongst the two of them. So your vote might be something like “A-10, B-1, C-1, D-10, E-0” – you really don’t want it to get as far as D, but you’re hedging your bets in case it does. (Note: You could also simplify this by only allowing a single weight for the whole thing)

You then run the election as follows:

  1. If you only have two alternatives left, everyone votes for their preferred choice amongst those remaining with the weight they assigned to it. This is resolved as above.
  2. If you have more than two alternatives left, tally up the weights each person has assigned their most preferred choice amongst the remainder. The alternative with the lowest score drops out.
  3. Repeat the process from 1

The result is that you are never bidding against yourself when it comes to spending actual money – the auction at the end occurs between two options and you’re only bidding on one of those options.

I’m even less sure this is a good idea. It probably isn’t. It definitely has weird tactical voting properties that would probably give people a headache (I’m quite concerned about the possibility of distorting the results with high cost votes that you know will drop out before you have to pay them. This can be mitigated by requiring a full ranking of all the candidates and a single weight for your vote, but I’m not sure it’s worth it). It’s an interesting one though. I’ll have to think about it some more.

This entry was posted in Uncategorized on by .

Well that didn’t last long

As you’re probably aware, I joined Google back in June.

Well, on Thursday I handed in my notice. By the time my notice period completes that will be exactly 6 months employed here, making it one of my shortest employments to date.

This shouldn’t be taken as anything against Google per se, it was just a really bad fit between me and them. It resulted in my being unhappy and my doing bad work, so I took the decision that it would be better for both of us if I went and did something else. So that’s what I’m doing.

In the short term my plan is to put the financial buffer that even a short time working at Google was very good for building up to good use, so I am taking until at least the end of February to work on my own projects and do some self-study. I am explicitly refusing to think about what my next job will be until February 1, so please don’t ask or suggest things until then.

I’m not yet sure whether or when I’ll be going back to London. When time comes to look for a new job I’ll be considering jobs in both Zurich and London, as well as remote work ones. If I find a job I want to do in Zurich obviously I’ll stay, similarly if I find one in London I’ll obviously move back. I don’t yet know what I’ll do in the case of remote work.

This entry was posted in Uncategorized on by .

A Martian makes a bet

I’m a Martian.

As a Martian, we’ve long ago licked this “singularity” thing, so I’m logically omniscient, but I’m also bored. I decide to invade Earth, mostly for the lulz. I land my flying saucer, pull out my ray gun, and prepare to get invading.

I come across two earthlings in heated debate. They turn to me and look excited.

“Ah, excellent. A Martian! You can serve as an impartial adjudicator to our debate.”

I am, naturally perplexed.

“Uh, you do know I’m here to invade you right? I have this ray gun?”

“Yes yes. It’s very impressive, but this is much more important.”

“More important than the fact that I’m planning to enslave you all and force you to obey my every whim?”

“Sure, sure. That’s just politics. We don’t care about that. We’re too concerned with matters of real import. We want to know what you think about the sportsball tournament“.

“The what?”

“Ah ha! Excellent. A truly impartial adviser! Tell me, what do you think the chances of the Las Venturas Bandits winning the sportsball tournament are?”

Obviously I have no idea about sportsball. I’m a Martian! We don’t play such things. Still, from a position of complete ignorance I must presume that each team is equally likely to win, so I need only find out how many teams there are to determine my probabilities. So I ask them.

“Oh no. We couldn’t tell you that. If we give you information about sportsball you’d no longer be an impartial judge.”

Their reasoning is odd, but I shall for now adhere to their quaint local customs and apply the obvious prior of \(\frac{1}{n(n+1)}\) on the number of sportsball teams there could be (I leave it as an exercise to the reader why this would be obvious. If you’re logically omniscient like me you already know, if not it should be a simple calculation). From there, the answer is a straightforward calculation.

“Well, naturally the probability is \(\frac{\pi^2}{6} – 1\), or about \(0.645\) if you want to be all numerical about it.”

“Gosh, so confident! But what, then, is the chance of the Beaneaters winning?”

The answer is equally immediate: About \(0.290\).

“Interesting, interesting. But what, pray tell, is the chance of the Jersey Boomers winning?”

“0.185, naturally”

At this point the quieter of the two is starting to look slightly confused, but the loud one keeps talking.

“Truly Martians are very insightful. Can you tell me,  how likely do you think it is that the Swedish Meatballs will win?”

“Oh, about 0.135 I would say”

At this point the one who has been quiet can no longer contain himself.

“I say! These probabilities you’re giving us don’t make any sense. I’ve been counting, and they add up to much more than one! You’re at 1.25 already!”

“Well, naturally. I had to update my probabilities as you gave me new information. At this point the probability of any individual one of the teams you’ve mentioned winning is about 0.135, with about a 0.459 chance that some other team you haven’t mentioned yet wins”.

“But we didn’t give you any information! The whole point was you were supposed to be impartial!”

“Of course you did. You gave me a lower bound on how many teams there were.”

At this point they both turn bright red and start shouting again at each other about how they’ve ruined everything. Thankfully, this gives me the insight I needed to calculate a truly accurate probability for who will win this game.

“Excuse me?”, I interrupt. They both turn to me.

“I’ve now understood the problem more thoroughly and can tell you the chances of each of your teams winning”

“Really? Do tell”.

They both look very eager to have the debate resolved.

So I shoot them.

And then I conquer the planet and ban the whole silly game of sportsball.

The answer is of course, zero. When you make me play silly guessing games, everyone loses.

Addendum

What’s going on here?

Well, the Martian’s prior doesn’t matter really. If you must know, it’s based on a hierarchical Bayesian model where the number of teams is geometric, but the geometric parameter is also unknown and is distributed uniformly on \([0, 1]\). Really this example would work with almost any reasonable prior though (say, any proper prior which assigns non-zero probability to every positive integer). I just wanted something concrete so I could put numbers to it.

So we have a prior on the number of teams. Call this number of teams \(T\). The probability of a given team winning given \(T = n\) is \(\frac{1}{n}\), so the probability of a single named team winning is \(E(\frac{1}{T})\).

But we don’t have a single named team. We’ve been asked a series of questions, each of which tells us the existence of a named team. Therefore our answer to the nth question is not \(E(\frac{1}{T})\) but instead \(E(\frac{1}{T} | T \geq n)\), because we know at that point that there must be at least \(n\) named teams.

For our particular example this is always decreasing, but even in general it must eventually head towards zero because \(E(\frac{1}{T} | T \geq n) \leq \frac{1}{n}\). So as time progresses and we become aware of the existence of more and more teams your probability that you assign to any given one of them must go down.

This is a neat example because it demonstrates how if you insist on Bayesian rather than Knightian uncertainty here, the mere asking of questions can itself be a source of information which causes you to update your probabilities. As we are asked questions we are given an idea of the scope of possibilities available, and this forces us to adjust our updates. This happens even though we are logically omniscient – the questions are not forcing us to consider new possibilities, they are genuinely providing us with new information about the world.

(It is of course possible that the questioners are making names up – say by some ludicrous procedure like just picking names at random from Wikipedia’s list of fictional sports teams – but you could include a term in your probability distribution for that if you wished. I didn’t because that would have made the example harder to follow)

 

This entry was posted in Uncategorized on by .

Order dependence in preference elicitation

The Von Neumann-Morgenstern utility theorem effectively states that you can get a utility function from someone by forcing them to make a series of “this or that” questions (you actually need potentially an infinite number of questions, but this isn’t that interesting because you can get an arbitrarily good approximation in a finite number of steps). It requires you to satisfy a bunch of axioms with (one of the) argument(s) that you should satisfy those axioms being that otherwise you are vulnerable to Dutch book problems where you get pumped for infinitely large amounts of money.

(The above is a hopefully accurate but very simplified summary. Feel free to tell me if you think it’s unfair and I will update it).

The VNM axioms are generally presumed to apply to “logically omniscient” beings. i.e. entities who have fully thought through all the implications of their belief and can instantly answer any purely logical question. This post is purely about what happens when you try to apply them to non-logically-omniscient beings, which is all we have access to when implementing decisions on actual people. It could be regarded as exploring the boundaries of just how logically omniscient you have to actually be in order to use these axioms in certain contexts.

One of the problems for applying this process to us non logically omniscient beings is that it ignores the fact that these questions have to be asked in actual time – it switches between an instantaneous notion of preference and the Dutch book sequence which happens in time, during which you might update your preference (in the Dutch book context this doesn’t even require a failure of omniscience because you’re getting new information – that someone is prepared to make this bet, but I’m going to focus on the failure of logical omniscience).

In particular it ignores that merely asking the question can change your preferences. I have spotted a nice example of this:

You: “Would you like $100?”
Me: *reaches for money*
You: Orrrrr…. you can have TWO HUNDRED dollars, but you’ll only get it if this set of 1000 boolean formulae is simultaneously satisfiable.
Me: Yes I am totally going to do an NP-hard problem for the possibility of an extra $100. Give me the easy money.

Alternatively:

You: “Would you like $100?”
Me: *reaches for money*
You: Orrrrr…. you can have TWO HUNDRED dollars, but you’ll only get it if this set of 1000 boolean formulae is satisfied by this set of assignments.
Me: Hmm. That’s just about worth it. *does the calculation*. Oh, cool. Yes that’s totally a satisfaction. I’ll take $200 please.
You: Cool. Now for the second question. $100 or $200 if (the same boolean problem) is satisfiable?
Me: … welll…. I’ve literally just seen a satisfaction for this, so I’ll take the $200 please.

This is essentially transitivity at work: It is clear that the answer to the question “Is this satisfiable?” is true if the answer to “Is this a satisfaction?” is ever true, but you have to find the right instance of the latter class of question in order to make this implication. Essentially, requiring transitivity forces you to turn a reasonable amount of computation into an unreasonable amount of computation if you want all your preferences to be consistent in advance. Otherwise you introduce path dependence into the value function you get out of a sequence of questions.

If we insisted on maintaining the same order over all time and that you had to be transitive, if we’d asked the two questions in the other order consistency would have forced you to not do the calculation and just take the $100. A decision to always take the $100 is of course perfectly consistent, but then you’re losing out in some cases where you could have turned an easy profit.

Note: This example extracted from my answer to this question I asked on the cstheory stack exchange, which I probably wouldn’t have spotted without the answers from Emil and Denis coming first.

This entry was posted in Uncategorized on by .