Tuesday, June 26, 2018

Implementing a Thanos process

Avengers Infinity War was an interesting movie. Pretty well done. You think about it a bit afterwards. Which is a bit unusual for superhero movies. I've seen a number of superhero movies over the years and there is a kind of sameness and forgetability about them afterwards. Some are more memorable like the original spider man trilogy, the dark night batman trilogy.

The villain in Avengers was Thanos. Now Thanos had an interesting plan to deal with human caused problems such as overpopulation, resource depletion, and environmental degradation. The Thanos process is that in one swoop half of the population of a planet is eliminated. Also the choosing of which half is done totally by random chance. Thanos makes it clear that everyone is subject to the "coin flip" that decides each persons fate. There are no exemptions or appeals afterward. On his own planet when he came up with the plan Thanos made it very clear that he too would be subject to the risk of the coin flip.

After the choice of the coin flip is made the implementation of the elimination is actually pretty clean. The unlucky just turn to dust simultaneously on the spot. No messiness, no pain, no ruined landscape from war, it just happens, it's done, it's over. Everyone else gets to continue on for 25, 50, 100, however many years until the next Thanos process is necessary to apply again.

twice times a half

If you think about it a bit you will realize there is a problem with the Thanos process. The issue is about the "half the population" requirement. Everyone faces the coin flip, the half risk, which is guaranteed to be random. However in aggregate it is unknown and not guaranteed that the total unlucky coin flips will turn out to be half the population. A simple example with a population of 4 will demonstrate, with tails as the unlucky coin flip result.


Number of TailsPercent Chance this could happen
06.25
125
237.5
325
46.25

So while 2 tails is the most likely outcome (37.5% of the time), Thanos is going to have a problem 62.5% of the time, since the total tails is something other than half the population. When the population gets larger such as millions or billions this problem gets even worse, so although half tails is the most likely total, on its own it is not a likely result.

So what to do? How to make the total also come out to half the population.

I thought about it a bit and figured two possible solutions for Thanos. One not too interesting and one a bit more interesting. The more interesting one involves creating new guiding principles and allows Thanos to be a bit lenient in the process due to those principles.

I will get the less interesting one out of the way first. In the less interesting one, Thanos checks the total of the coin flips. If the total tails is not exactly half the population, the process is discarded. The coin flip process runs repeatedly until the overall total of tails is exactly half the population. So in the population=4 above, if the total tails is not 2, then the whole process resets and repeats until the result is total tails=2. For a large population such as Earth at over 7 billion, the process may have to run a large number of times (like in the thousands or millions) to get the desired aggregate result.

The first solution isn't bad I guess. It does meet the requirement that everyone face the coin flip. It also meets the second requirement that the total number eliminated is half the population. Somehow though the idea of running trails repeatedly isn't quite to the spirit of one time coin flip. I tried to think of an approach that would better meet the requirement to eliminate half overall. Adding a new principle may help. This one might help.
if you survive a coin flip you are safe
That does seem fair to the individual. A one-off coin flip and if you draw heads you're safe, that's it. no further risk. so in that case a Thanos process would actually only eliminate half the population in one case. any overall result of half, or fewer than half, would have to be accepted by the "heads you are safe" principle. so in the example of 4 above, of the total tails comes up 0,1,2 then that's it. in 31.25% of the cases fewer than half were eliminated.

So then Thanos after applying the initial coin flips only has a problem if the total tails is more than half. Here I think there is a way to respect the two principles and get the result down to a (now) maximum of half eliminated in total.

Basically take the group of tails, draw a new random number to adjust down the unlucky to a maximum of half the population. For example suppose the population is 100. After the coin flips there are 56 tails. Take the 56 tails, and for each draw a new random number between 1 and 56. Anyone who draws 51-56 is now safe.

So after the second iteration there should be pretty close to half still unlucky even after the second draw. Check the number remaining at risk. If it is more than half continue the process until the result is half or less. For example suppose in the 100 example, of the 56, 8 of them draw 51-56 and are now safe. That means the final result will be 48 still unlucky who are eliminated.

Or suppose only 4 drew 51-56 (remember it is random, it is not known in advance what the result of a fair random draw will be). In that case 4 are now safe, and the process continues now with 52 at risk, everyone getting a new number 1-52. Eventually and it wouldn't take too long to get a final group who was unlucky repeatedly who are then eliminated and vaporized.

It wasn't directly stated, but there is another principle here
everyone in the at risk group faces the same chance of elimination

At the beginning the at risk group is everyone and the chance of elimination is the coin flip. At it progresses the principle (which is the original Thanos rule that the coin flip applies to everyone) remains in place. Everyone at risk faces the same risk.

I like the second approach. It allows Thanos to be a bit lenient in that usually the overall amount eliminated is less than half. And I think it is the fairest in that the process runs just once overall, and once anyone survives any iteration they are safe and face no further risk.

I think it's an interesting problem. How to both expose everyone to a separate individual coin flip, and also achieve a desired aggregate result that the number eliminated is half the population. I will call it the Thanos problem.

I think it could be a high school applied math problem. My niece said she had a math assignment a few weeks ago to find a situation where they could apply math to solve a problem. I think the Thanos problem would have made a good submission for her high school assignment. It's also useful because it shows how the use of principles can simplify a problem, guide the solution to a problem, and allow a defensible solution to emerge.

--

Update I realized I was overthinking this. This is not at all a difficult problem. The problem can be greatly simplified by posing it this way

how would you implement a Thanos process on a deck of cards?

Well that's pretty easy. Shuffle the deck. Select the top 26 cards as the victims. Done.

So on a larger data set, such as a city or planet. You have access to computing resources and a random number generator. A Thanos process could be implemented as follows:

write the population into some kind of a list. use the random number generator to select one person from the list. the selected person is removed from the list and vaporized. repeat this process until half of the original population has been selected.

so it meets the requirements of a Thanos process. it's fair, the random number generator assures that everyone faces the same equal risk of being selected on each iteration. the total number selected is half of the original population. from start to finish as a whole, each person in the original group faced a coin flip on being selected.

Friday, June 22, 2018

B.C. Place streaker tackled

So now the B.C. Place streaker I guess known only as "Surrey Man", let's call him SM, has hired Preszler Law Firm in Vancouver. Real classy case to link your reputation to Preszler. sheesh, disgraceful. Stringing out his 15 seconds of fame, hiring a lawyer to see if it can be monetized, attempting an inversion by bizarrely now representing that he is the victim. What an embarrassment. SM should seek to lay low, keep quiet, make this shameful episode in his life pass over. Notice that SM per CBC story
A spokesman for Preszler Law Firm said their client did not want to be identified.
why doesn't he want to be identified if he did nothing wrong? is there something to hide or be ashamed of? state your name (his face is pretty visible from the pics and video) if you are an innocent victim and want to sue.

Did the player Marcell Young do anything wrong? Clearly the answer to this is no. He acted appropriately. In video from an angle in the stands, SM walks straight past security. Only a single security guard comes out on the field from that stands angle to confront or impede SM. The guard is large and slow moving. The guard waves ineffectually as SM goes by, making no real effort to give chase, lunge in his way, or stop him.

So to player Young, it was clear that security had abdicated their responsibility to protect the players. They were on their own. Now was there any threat to respond to? Who knows, Young had no way to know if SM was armed or dangerous. He was certainly acting dangerously by being on the field, apparently under the influence of some kind of drugs or alcohol, moving toward the players and Young personally.

Also there have been cases recently with fentanyl where paramedics have become seriously ill and died, just by being touched by it. So there is that new risk now just off someone's hands can basically be a weapon from fentanyl. It was reasonable for Young to believe in this circumstance there may have been a danger.

So Young did what he had to to protect himself and his teammates. Where security failed, he used appropriate but not excessive force to counter a real, uncertain, and unpredictable threat. Young exercised quick thinking and watched out for his teammates and himself.

Tuesday, June 19, 2018

Bill Clinton and today's standards

So Bill Clinton was in the news recently promoting a new book. Interesting Bill Clinton drawing attention to himself at this time. Apparently at age 71 he is not considering the quiet retirement he was graciously offered in the wake of me too events and revelations.

Bill had an interesting take on it in the USA Today article. Noting that 'norms have changed'
Clinton, who made headlines last week for saying he did not owe Monica Lewinsky a personal apology, defended former Minnesota senator Al Franken and said "norms have changed" in terms of "what you can do to somebody against their will," during an interview Judy Woodruff on PBS "News Hour."
hmmm interesting theory there. 'judge not by the standards of today the actions of the past'. as a standalone thing it actually makes sense and seems pretty reasonable.

However Bill does not seem too consistent in this judge not by the standards of today appeal. There was a thing in Charlottesville about civil war statues Bill didn't say too much.

A few years ago Bill Clinton was paid to give a speech in Halifax Nova Scotia. Recently a statue of Halifax founder Edward Cornwallis was torn down under activist pressure. Did Bill object or say anything about that? Nope.

How about Bill Clinton's fellow 1980s man Bill Cosby. Has Bill Clinton defended Bill Cosby by noting that the allegations from the 1980s should be judged by the "norms" and standards of the 1980s. Not that I've heard.

So I will conclude then that the judge not by the standards of today request is intended to have limited and selective application. I will speculate that Bill intended it to apply to:
  • Bill Clinton and Al Franken
  • the Clinton family, and Al Franken
  • the Clinton family, the Kennedy family, and Al Franken
Anyone else who finds their actions of the past judged harshly by today's standards, tough.

Saturday, June 16, 2018

Jordan Peterson 12 Rules for Life

I hadn't thought I would do another book review on this site. But this book is important enough and worth a review. I recently read 12 Rules for Life by Dr. Jordan B. Peterson. It was a very good book. I got a lot out of it. I wish it had been around and I'd read it 10, 20, 30 years ago. I bought my copy at Chapters. It was marked down on special, I had some Chapters next purchase limited time promo, and I had a gift card. So I got a good deal too.

Dr. Peterson is a great thinker of our times. Right up there with David Sklansky and Nassim Nicholas Taleb. I'd been hearing stuff about Peterson so I was keen when this title came out. I knew I had to read this book after the infamous Channel 4 Newman crushing by Peterson.

The book opens strong with the famous discussion on lobsters and hierarchies. The whole book is full of great stuff. There is a lot in there and Peterson, a practicing clinical psychologist and academic from Harvard and University of Toronto, makes pretty much every paragraph work. So it can read a bit dense but definitely keeps the reader engaged and is worth reading every sentence, pausing to think, and perhaps reread some paragraphs, maybe read 1-2 pages at a time and absorb. So it's a worthwhile read, personally challenging in parts, manageable but I would not call it a quick read if you are motivated to benefit from it.

So definite recommend really for anyone, especially younger people with most of their lives still in front of them. There is a lot of misinformation in our society and culture. Peterson cuts through it and exposes it and offers solutions. 12 Rules is a great counter, an actual realistic positive way forward.

Thursday, June 14, 2018

Youth Action Now

I was sad to hear that former NDP MP Paul Dewar is dying. Too bad, he seems like a decent fellow.

One of Paul's last initiatives is to launch a Youth Action Now initiative. Obviously aimed at Canada's youth.

Paul has been admirably interested in children and youth in Canada for some time. He launched a Canada Youth Plan back in 2011 when he was running for leadership of the NDP party.

I wrote about children in Canada and Dewar's plan back then on this site. Over 6 years later, my take on it has stood up pretty well and is still relevant today.

Thursday, June 07, 2018

Lucas Glover PGA incident

Seems there was an unfortunate incident recently involving PGA pro Lucas Glover, his wife Krista Glover, and his mother.

This from USA today story the PGA tour response.
"We are aware of the situation and Lucas informed us of his statement, which has since been posted to his Twitter account," the PGA Tour said in a statement. "Of course, we are here to provide support to Lucas and his family if needed; however, we are also respecting their request for privacy during this time."
Here are some of my thoughts on all this.

Many PGA WAGS are younger and prettier than Krista Glover.

If Krista Glover thinks hitting a golf ball far and straight is easy then let her demonstrate how easy it is by making a living herself playing golf. Lucas can stay home with the kids, allow himself to get drunk during the daytime while she is at work, and they can all live off her paycheques for a few years. Just like she has been allowed to live and live well off his ability to play golf for all these years. Then berate her if she dares have a stray bad round. See how mouthy she is then about playing golf at the highest level.

Also of course Lucas should leave her, kids or no kids. She is a terrible wife, an embarrassment to him.

How would the PGA be responding if it was reversed and Lucas as arrested for being an abuser? Would they be so respectful of personal privacy? Would the PGA insist it's a "personal" or "private" matter, an "off field problems" issue not the concern of the PGA? hardly. If things were reversed Lucas Glover would be getting the Ray Rice treatment.

I understand Krista herself is not a member of the PGA and thus not under a PGA code of conduct. Still the PGA in the interest of equality should do a lot more to support Lucas, and come down hard against domestic abuse. There are some real steps the PGA could choose to take.

Make a strong public statement against domestic abuse and violence. Make Krista non grata with the PGA. She is not to show her face. Disinvite from the WAG social and charity wing. Disinvite from the 18th green on Sunday when Lucas is in the final group.

--

It should be noted self defense is a right. Defending yourself and your mother from physical attack is a right. Gender, spousal status, physical size is not an issue. It is the responsibility of the attacker to use good judgment in choosing who to bully, physically attack, and attempt to beat up. If an abuser gets hit back while attacking another then that's just tough. Any individual under attack has the right to use reasonable and appropriate force in self defense.

Abuse can drag on for years cycling through a usual list of excuses "clinical depression", "alcoholism", "bipolar", "uncontrollable temper", "was provoked/just reacting", "exhausted", "drank too much", "bad childhood". Yet in the face of determined self defense the excuses magically evaporate, self control emerges, and the abuse ends. An abuser understands force very well. If an abuser knows an attack will be equally self defended going forward then the attacks will abruptly end.