Stable Marriage Algorithm

March is the month that many families waited, anxiously, the result from NRMP, National Resident Matching Program. This centralized “exchange” determined the fate for almost every medical doctors in the US. Residency is the last stop of the long journey to become a real doctor. The program is pivotal to the career of the young graduates. “So, how do they (NRMP) do it?”, many asked this alleged computer software expert.

It is based on the, invented in 1962, Gale-Shapley algorithm. In 2012, Al Roth and Lloyd Shapley (namesake for the algorithm, picture from Economist.com) received Nobel prize for researches based on the this algorithm. It computes the stable matching: that the pairings are as good as they can possibly be.

The algorithm works quite simply: members from one side “propose” according to their preference. The other side will say “maybe” if the current proposal the best, otherwise reject. The subsequent rounds ensue with those yet to be “engaged.” Some of those “maybes” in the previous rounds can be broken when the proposed get a better choice in a later round. The algorithm ends when all proposers received an “engagement.” Supposedly, all pairs will then proceed to get married.

After NRMP, Al Roth and Lloyd Shapley moved on to solve kidney donation matching problem and saved many lives.

There are some well known “cheats” for this algorithm. One side can lock down a partner before the “settle date,” as in “early commitment” in college applications. Theoretically, both sides may lose: the student may miss out a better college and the college may not get the best students. The other cheat is to disguise the preference: rank the person differently than the true desirability. Or one can also reject certain candidates, forcing a no match even one should be possible. The kid ended up going stag because he/she will only go with her/him.

As long as people do not cheat, this algorithm gives the mathematically the best pairings. Sigh… How computers fail to solve the real life problems!?

Posted in Management Thoughts, Peek into my mind | Leave a comment

How to Command?

New managers actually do not know how to “command and control.” Heck, many experienced ones don’t either. The class trap is to be explicit on the procedure and process. Do this, then do that, talk to that guy, then do that. They usually leave the intention ambiguous — too much explanation and not necessary. But the result is usually not satisfying: the subordinates felt they are mere robots carrying out mindless tasks; the manager is frustrated from the lack of innovation and motivation from the staff; the procedure and process become long and boring; people start to cut corners; worse, they do it only in form; management became tedious and tiring.

In modern “knowledge-based” world, the manager needs to communicate the “intention” of the decisions. There are several elements* in such communication:

What’s the purpose? Our troops need more supplies.
What’s the objective? We will secure the port so that supply ships can dock.
What is the processes, steps, tasks, that need to be accomplished in what sequence?
Why are we doing it this way?
The key points of the plan that would have force us to re-plan or abort. We suspect alternative sources of supply. In that case, we shall switch to plan B.
The things that should not happen, the goals that should not be reached. Civilians activities should be minimally impacted. The unloading equipment cannot be damaged.
The key constraints and conditions. Ships arrive in 18 hours. There will be no air-cover in this mission. Radio communications can only be done in these frequencies.

Memorize these points and make sure you cover them in your communication. In fact, the preparation for them will already make you a better manager.

*Gary Klein: the Sources of Power.

Posted in Management Thoughts | Leave a comment

One Country, One Marriage

Years ago, I accepted a foreign assignment and convinced Kid and Wife to go with me. Unexpectedly, I needed to prove, to the other country, that this woman was indeed my wife. The destination country required a federal level document for such a proof. I was stumped. At the end, we had a State Department affidavit stating that US Federal Government recognizes my Californian marriage certificate. “How absurd,” I thought at the time. “How is it possible that Federal Government would not recognize that certificate!”

At a social event, I found myself talking to a judge (state level). I asked her, “If two people got married in the State of Washington, and one of them go to another state that does not recognize same-sex marriage, are they still married? For example, can one married again or, legally, evade child-support?”

She gave me a long explanation that my drunken brain stored as “It is messy.” And I realized that a same-sex couple wouldn’t be able to accept that foreign assignment, given DOMA (Defense of Marriage Act).

Posted in Peek into my mind | Leave a comment

They all come to Westlake Park

Just after my bus was pulling out of the stop, two police motorcycles zipped in front and stopped all traffic. What’s going on? My fellow riders and I were expecting celebrity dignitaries. Then the protesters came. Worse. They took a turn into 4th Ave, exactly where the bus was supposed to go. There would be no hope, I got off and walked. Who protest on Friday evening, seriously!

There were about slightly more than two dozens protesters, many wore masks, two on bicycles, led a banner. About ten police motorcycles proceeded them to clear the traffic; a dozen or so more police on bicycles followed; another 10 or so, also on bicycles, flanked from the side to buffer the protesters from the by-standers on the sidewalk. Put it simply, there were more policemen than protesters.

Seattle Police has been known for their excessive use of force. There were several high-profile incidents, numerous TV and local news coverages, and a DoJ investigation that was not flattening. Seattlites also love to protest, sometime violently. Not a week will pass without some forms of picket lines on various causes. Most by-standers leave them alone. Shouting matches are not uncommon.

As I caught up with the protesters, I learned their cause: against police brutality. The chant was “peace and not police.” The spontaneous argument, passionately shouted out, were on the “facts” that Seattle is a police state that citizens are living in terror.

Now this is just ironic. Here we have a heavily protected protest against the protectors on the oppression and terrorization by the protectors. I chatted up with one of the police on bicycle. He took a political correct stance, “We protect everybody.”

The march ended, of course, at Westlake Park. Speakers, some in masks, took megaphones in turn, talked passionately, and demanded changes. Seattlites, as usual, gave them a glancing interest and kept on walking.

Posted in Seattle, Witness to my life | Leave a comment

Influence Everything

Some defined “Management” as “to make changes happen effectively.” From there, many books and consultation practices flourished. One of them is VitalSmarts. They wrote several books and formed a consultancy to teach people exactly that: to influence changes on self, individuals, groups, the companies, or even the whole societies. For curiosity, mostly on the audacity of the claims, I checked out Influencer from the library.

The books, I think, can be summarized with this table. That people will change if two conditions are met: they have the motivation to change and the ability to do it. The book then broke these two factors into 3 levels: personal, social, and structural. It proceeded to give pointers on how to influence at each of the three levels for both motivation and ability.

Let’s see. I want to lose weight and I am capable of doing it. I have easy assess to a gym. Everyone in the whole world support me and believe in me. I have pretty much all the incentives. But I am not losing weight.

That’s pitfall #1: I was focusing on the result and not the behavior. I shall exercise more and eat sensibly. Again, let me check all 6 boxes: motivation & ability at all 3 levels: personal, social, and structural. Hmm… This is getting hard. Maybe I should sign up for a VitalSmarts seminar? Wait, what’s the point of reading this book if I cannot really influence a change on myself?

If changing the world is easy, as in we can learn it by reading a book, would there be more world changers by now? If an institute can teach people how to change the world, how come they are not doing it? This felt like a get-it-rich-quick book. The only person who’s getting rich is the seller of the book.

Good thing I got the book from the library.

Posted in Books & Reviews, Management Thoughts | Tagged , | 1 Comment

Myth on IP Theft and Offshoring

Unlike many other crimes, Intellectual Property thefts are all premeditated, the perpetrators are usually well-educated and business savvy. Their goal is pure and simple: to make money fastest with minimal risks.

Since you are, too, well-educated and business savvy. How would you do it?

The best way is to do it legally. Identify a proven business model and copy that, not the technologies or implementations. Search, smart phone, internet auction, internet video, flat screen TVs, nuclear power plants, pharmaceutical, etc. Microsoft copied Lotus 123, Pepsi Coke. In fact, few businesses started without copying someone else.

Next attempt reverse engineering: get the product, take it apart, studied the hell out of it, and try to make one just like it. This defines the entire generic drug industry. It was pioneered by Americans and perfected by Japanese.

The last resort is to steal the IPs. Honestly, morality aside, stealing is simply less profitable. It is hard to make a billion dollars this way.

If someone holds you family hostage and forces you to steal IPs from a US company, how would you do it? If you want to steal a DVD, where would you get it? Of course you would just buy one from the any store in the US. What about the source code of some software? Think.

Go the target company’s R&D center, bribe an employee, done.

Would you wait for the company to set up a development center in the offshore country, work to become their head of operation, and disappearing over-night with all assets and employees. If you do that, you are too stupid to be a threat.

Managers who worry about IP theft from offshoring, get real. Those who wanted your source code have already got them, from your headquarters.

Posted in Management Thoughts, Peek into my mind | Leave a comment

The Case of Exploding Wine Bottle

Sunday morning found a pool of sticky liquid on the floor, clear in color, no distinguishable aroma. It did not take long to trace it to bottle of dessert wine on the nearby wine shelf. The cork was hanging by a shred of the foil. After clean-up, we examined the bottle. The remaining wine was cloudy. It smelled alcoholic and sweet, quite normally. We used a coffee filter. The result was quite normal and drinkable.

I theorized that the fermentation was still going when we bought the wine, only slowly. The liquid in the bottle sealed it air-tight. The increased gas, from fermentation, pushed the cork, against only the foil and the friction. We knew which side won.

Normal dry wines, even Champagnes, left no sugar for fermentation. The system is stable if under reasonable ambient temperature. This is really only possible with sweet wines.

Lesson learned? Drink your dessert wine quickly, or store them vertically.

Posted in Witness to my life | Leave a comment

SJC Pwns

Trolling the corridors in a dark mood, I searched for their familiar shapes at the most likely locations. What I wanted was rare and I have competitors. My late arrival put me at a disadvantage, even though I was familiar with this locale. I glanced at some of those who were hunting the same. We knew our chances were not good.

After two rounds of surveying, I gave up and was ready to pay for them. I walked up to this over-priced bar and inquired, “Do you have what I need?” The waitress gave a wry smile. She knew our kind well. Electrical outlets are few in this airport. She led me to the corner seat and expected good tip.

My laptop drank it in, also feeding the MP3 player and cell phone with her USB teats. I launched the batch email sending operation, many with attachments that I sacrificed the batteries for during the flight here. Beer came. Batteries would be ready for the next segment of the journey. Yes, I would leave a good tip.

You don’t live this drama at San Jose International Airport. It is a Silicon Valley airport that provides free internet and seats with electrical outlets. Yep, this is what I wrote while drinking that beer: not at SJC.

Posted in Witness to my life | Leave a comment

The Long Path to Become a Doctor

Two kids visited us some weekends ago. They both are lovely, balanced, charming, and well-educated young ladies that we have known since they were so so small. Habitually, we still call them kids. In fact, these are applicants to the residence programs in Seattle’s prestigious medical facilities: U of Washington and Virginia Mason.

The supply side of America’s medical profession is highly controlled. Medical schools are strategically distributed and limited to ensure good income for this profession. Since there are so few, medical schools are highly selective. All who attempt are bright scholars, but only the perseverent can get in. Once in the program, they labor hard for 4 years, including the internship, to study medicine. Then, they apply for a residence program that lasts 3 to 5 years. As residents, they become “real” doctors that can prescribe drugs and cut people open. Residents earn roughly $70k a year, a paltry sum compared to their engineering friends who have been working 4 years prior and now make 50% more, and without incurring that expensive 4 years of medical schooling.

At the end of the residence program, many simply start their practice. Some continue for fellowships, some pursue the “MD/PhD” route. This is another 2 to 4 years.

Adding these years up, a medical doctor is at the beginning of her career probably 10 years later than her engineering peers. I couldn’t help wondering at the financial and human costs of such long journeys. Is there an easier way?

Posted in Peek into my mind | 1 Comment

Another Book on Decision Making

Daniel Kahneman’s book, Thinking, Fast and Slow, mentioned Gary Klein, particularly on their opposite approaches to decision making. At the end, they “agreed on their disagreement” and accepted that there are two different approaches to better decision making skills. Klein called his approach “naturalistic decision making” and that made Kahneman’s approach “analytical.”

Since I liked Kahneman’s book, I thought I will also give Klein a try and got his “Sources of Power.” If you haven’t, don’t buy the eBook. I was slightly annoyed by the treatment of graphics and tables.

There are two main “sources of power:” recognition-primed decision making” and mental simulation. Gary Klein demonstrated, persuasively, how powerful they are in making good decisions quickly and under high stress. Naturally, we would like to learn how to make decision this way. It comes naturally and therefore effortlessly too. Wouldn’t that be great?

Alas, to be good at making decision naturalistically, one must acquire expertise first and that’s no small feat. You must have experience to gain expertise, experience alone is not enough. In other books, I read about the same. Expertise comes from “deliberate practices” and one must do that for a long time (like 10 years or so) to become an expert.

The conclusion is quite depressing. I, an ordinary person, cannot learn to make excellent decisions quickly. I must invest a large part of my life first. And I would make excellent decisions only in those fields where I invested. If I merely do it for many years, that won’t make me an expert either. I would also need to really “put my heart in it.” Man, that’s really hard.

I knew many experienced yet mediocre software engineers, but I don’t know any truly good ones who are without a few grey hairs. You can draw the same conclusion from every walk of life.

I don’t feel that Kahneman and Klein are in contradiction at all. To “practice” making good decisions, one must do it with Kahneman’s lessons. Then, after several years of such practicing, one will become good at decision making naturally.

Posted in Books & Reviews, Management Thoughts | Tagged , , | 1 Comment