SPOILER if you haven't seen the first episode of "Sherlock" on PBS, go away.
OK, the problem presented by the cabbie with the poison pill is the same one Vizzini presented Wesley. Presuming for a moment the cabbie isn't going to pull a reverse Wesley (put out two poison pills because he's developed an immunity to the poison), which one is the safe pill?
Obviously, there are two possibilities:
1. The poison is in front of Sherlock
2. The poison is in front of the cabbie
The previous victims all chose badly, but we're only assuming the choice was ALWAYS the same. If the cabbie is playing chess, which he likened the game to, then his placement of the bottle would vary with each victim.
Let me play Sherlock - probably very badly - for a moment.
We don't have to factor in the cabbie's fatal condition in these scenarios. From the cabbie's being impressed that Sherlock was able to deduce the fact that he didn't have long to live, we'll take it as given that none of the victims were able to deduce it. In their minds, he was just a psychopath, but one with the same sense of self-preservation that most people have.
I'm also deducing the locations for each of the murders are not random. Though it's not discussed, the cabbie is leaving little to chance. The locations are obviously remote (empty buildings, a storage yard), but in selecting a school for Sherlock, he is telegraphing a desire to "school" the great detective in who is superior. Also, being a cabbie, it is possible he had prior dealings with the victims and remember where he had taken them before.
Victim No. 1: The politician having an affair. Being somewhat of an egotist (a sense of self-importance being essential for a politician, combined with the selfishness that comes with being an adulterer), he would likely presume the bottle in front of the cabbie was the safe one. He would think the cabbie gave him the poison to ensure the death of an important figure. Also, being as a politician he would be presuming the offer had ulterior motives.
Victim No. 2: The 18-year-old. We know the least about him, but from one thing we do know (refusing to share an umbrella with another guy) and the cabbie's choice of murder scene (a gym), we'll posit he was a healthy guy with the same sense of invulnerability most teen males have. In which case, he would presume the safe pill was in front of him, if he believed there was any poison to begin with. Being 18, he might be presuming the whole thing was a gag, perhaps inspired by films like the "Saw" movies, just to frighten him. Or he might presume the cabbie wouldn't kill a "kid." Having the least information about him, I admit I'm drawing most of this out of the air, but I'll give the odds at 75% that the poison pill was in front of cabbie.
Victim No. 3: the MP. Reusing part of the same presumption as victim No. 1 (being a fellow politician), she would presume the safe pill was in front of the cabbie.
Victim No. 4: the woman in pink. We know she is a serial adulteress from Cardiff, so this is unlikely to be her first trip to London. Odds are the locale is one from a previous tryst. We'll also take it the color coordination, as well as packing an overnight case versus stuffing a few things in a handbag, reveals something of a orderly mind. I then posit she would have presumed the safe pill was in front of the cabbie for she will try to apply logic to the problem. The cabbie, of course, would presume that and put the poison pill in front of himself.
OK, so was Sherlock correct in deducing the safe pill was in front of the cabbie?
I believe the cabbie put the safe pill in front of himself, presuming Holmes would deduce his ailment (not underestimating his foe, he must presume this would not be secret for long), and deduce that he was pulling a double cross.
The argument that the cabbie put the safe pill in front of Sherlock don't work for me. The cabbie couldn't take it for granted that the detective wouldn't deduce his terminal condition and presume a sense of self-preservation, which would presume Sherlock would expect a double cross.
The death of the cabbie would seem to make the question unanswerable, but it doesn't. Though he died without telling Sherlock, a final act of defiance, all Sherlock has to do is test the pill he had. Whether we ever learn the results of that test is, of course, yet to be seen.
That's my take on it. I, of course, am not the detective, and am only glad I do not have to make the choice. Naturally, I hear the original detective's response to Watson's deductions about Dr. Mortimer's cane:
"I am afraid, my dear Watson, that most of your conclusions were erroneous. When I said that you stimulated me I meant, to be frank, that in noting your fallacies I was occasionally guided towards the truth. "