Speed bumps and Scheduling

Hmm, so I’m reading this blog of my own and wondering if I’ve made a big mistake mocking the established schedule. Train 207 takes any passenger from first half of the track to a middle point where a timed transfer occurs to allow the slow rider to transfer to a second slow train that reaches every station of second half of the tracks. This scheme enables travelers from any minor station on the southern half of the tracks to reach major stops on the northern half and allows them to reach minor destinations via a timed transfer.


2013-05-11 pic 1                                    2013-05-11 pic 2

My proposal was to have 207 be fast on it’s first leg and 211 fast second half so that people needing to reach minor destinations arrive faster. The main issue is that we need to look one layer deeper at the underlying data–the commuters. The way we work is that we congregate during the day where people are densely packed in small cubes so we can work and communicate more effectively. This means there are a few hotspots of arrival during the morning and a same few hotspots of departure in the afternoon. People live in suburbs so that they can have larger living quarters to provide distance and privacy between people. Therefore the living quarters are spread over large areas and there are few hotspots. Admittedly the bay area is different from other metropolitan areas in that there are several major hotspots along the entire length of the track. The southern most and northern most end points are themselves very larger commuter hotspots: San Jose and San Francisco. In any other metro, Hub and Spoke is probably more appropriate with more stops near the center than on the edge.

Let me disclaim briefly that I am not a zealous fan of overly quantified and optimized life–at least not the kind where it is forced upon us. One case in point is the San Francisco time-of-use parking meter rates. There is a spreadsheet of rate schedule of every meter and it changes regularly based on parking patterns. AND you have turn your wheels towards or away from curb or else there is a huge fee penalty. Futuristic worlds with so many more dynamic aspects for our brain to think about. Pretty soon we will need a smart car to figure out if we can afford to park somewhere. Pretty soon, we’ll have a time-of-use tax system that changes the tax you pay depending on when you work down to the minutes and where you work down to 4 decimal digits of degrees of latitude and longitude. Pretty soon, we’ll have carbon emission credit for human beings and that includes what you exhale, pay for sewage by the gram and overage on volume as well. None of this is imminent, but it’s a little bit scary.

Mean while, back at the lab, the fact that there are major hot spots along the norther half of the tracks means train 207 provides important service from all of the southern suburbs to all of the northern hotspots. The fact that 211 exists seem to mean that there are some major residential hotspots where people get on the train as well, but they need only reach as far as Menlo Park and redwood city.

Under my proposal, the slow train would depart early and make every single stop. A faster bullet train would depart later and pick up the slow train passengers half way. (The trains here can pass each other as well, so the slow train will drop off passengers and pause at a station as the fast train passes) This way we will have given all the passengers on the southern half of the track a way to arrive at hotspots on the norther half of the tracks faster than the current scheme. And all passengers from southern tracks can reach northern tracks faster than the current schedule.

To see this, take a look at the 6 minutes lay-over highlighted in green. The passengers on my slow train will not wait 6 minutes to get on another slow train, they can just ride normally and arrive at their northern destinations 6 minutes sooner and butt never leaving their seats.

What about the people at the residential hotspots on the southern tracks? The practical matter here is are there a lot of people who travel from major residential hotspots to every station on the southern track? My feeling is that there are not. If there are few they suffer from the implementation of my scheme whereby they must take slow train all the way to their slow destinations. And if this accounts for a large proportion of the population, we should run two fast trains, one arriving at mid-point before slow train and one arriving at the mid-point after the slow train–The complete opposite of the current schedule. Here is an artist rendition of the proposed schedule, orange is fast, brown is slow, green are timed transfers and black are stops:

2013-05-11 pic 3

We should also talk about the speed  of the train. It would appear at fist glance that there is a lot more fast speed than before. If the train uses more fuel at high speeds than this is a problem. But most engines (an the entire train system), operate better driving at long smooth speeds. high speeds means the brakes are not being used as frequently and reduces wear and tear on the joints of the trains. The average speed at any segment of the track traveled by these triplet is the same as the existing schedule: two fasts and one slow. Similar analysis show that the number of stops made by trains, the average deceleration and acceleration experienced by these trains are the same as existing scheme. The count of stops and starts to and from fast segments are also the same. in all, the effort made by the train to carry the passengers is the same as before in the three train scheme.

To summarize, we have proposed two separate schedules. A couplet schedule and a triplet schedule. The couplet train schedule requires two trains and services most common office hotspot by providing a timed transfer from residential non-hotspots to a fast train arriving at office hotspots. The couplet schedule slows down the rides of commuters from residential non-hotspots to office non-hotspots while providing same level of service to all other passengers while using one less train. The triplet schedule runs two fast trains before and after a slow train instead of two mixed-fast-slow trains before and after a fast train. Timed transfer enable commuters from residential hotspots to travel directly to office hotspots without getting off the train using one of two possible trains. Passengers needing to commute between residential hotspots to office non-hotspots and from residential non-hotspots to office hotspots now have the choice of making a timed transfer for a faster trip. This schedule is better than the existing schedule because every possible trip is faster and it requires fewer timed transfers than before using the same number of trains fuel and wear and tear..

My Sad State of Emotions and Moral Speed Bumps

Returning from MongoDB days in sf… Was rather curiously surprised by my ex-coworker friend’s message regarding office gossip from 5-yrs ago. Kinda worried that she doesn’t get my message congratulating her on her engagement until 5 years later…

I had expressed to this female coworker my jealousy regarding another female coworker dating and showing some intimacy to a male coworker sitting near me. In my younger youth I had some pathetic times…. This stirs memories of my encounter with a fellow intern at a startup where he bragged to me about “eating a Chinese girl’s tofu”. I look Chinese, but I am sadly less informed about Chinese culture than that white dude… “Eat girl’s tofu, sounds yucky and unmanly” thought I, obviously thinking of the expression “to eat her out“. The punch of course came later when I learned that eating a girl’s tofu in Chinese means to take advantage of a girl. So… he was bragging about having taken advantage of a Chinese girl to me. Hmmm.

oh well. ahhh, now I remember, the reason why I started typing this on a lethargic friday post-work commute home is that I feel no sympathy for pretty the Chinese girl who died in the Boston marathon bombing.

Sure, her parents wished for a boy, and sure they did their parental duties despite having a girl and taught her to study and work hard, and pursue higher dreams. They supported her through school and then supported her decision to come to a foreign land to study among those foreign devils with hairy legs and arms, and hairier intentions.

And then she got blown up, and it probably hurt a whole lot, and her parents are probably very very very sad.

But I must admit, honestly, I cannot find a single drop of tear in me for her. I could cheer her death. (in the interest of full disclosure to mechanical and human agents reading this, I have a daughter who is a Chinese American and wife who is a recently immigrated Chinese national.)

She(the dead girl) would have eventually found a job. and work, and have kids with one of those foreign devils, or with a smart recently immigrated Chinese man, or even perhaps with another immigrant, or perhaps with a Japanese man. If we worked together, she will never hesitate to tease me or to make advancement at my expense. If she exceeds me in ability, than nothing has changed. She is still only a threat to my comfort and my survival.

I hate this total numbness I feel about other people. I hate the fact that that other person happens to be a pretty chinese girl, whom for all reasons of culture, evolution and convenience I should feel sympathy for or empathize with. But the only thought that came to mind about the matter during those weeks is that I don’t care–well, that and the imagery of athletic arms and legs wrapped in spandex flying around that the media put in our heads. Ohh, and the other two dead were catholic.

Man, my feelings and thoughts are so politically incorrect. It feels wrong to feel this way.


Okay, on to more interesting matters. How do we curb perceived “unfair competition” from use of computers when competing with humans?


On the one hand, flying, in air now and later in space, requires computers. To some inevitable extent our society has grown inseparable from computers and our continued improvement of quality of life depends on computers doing a lot of thinking for us.


We should not use machines to destroy or damage other humans. The gun is one such machine, knife is another, a pair of cisors is a third such thing. Clearly, we use these tools to survive, but it is generally accepted that using these on humans is not acceptable. Should it not be the case that a computer trading stocks, taking money away from another human is like a knife cutting into a human’s skin? Our brain and our skin stands no chance against the machines of our construction. The fact that a person operating a gun targeting a person is illegal means we should not allow a person to point an automated trader at a stock market full of people traders.


Note, this is a different story than a car having to make an ethical decision on which crazy human to kill and which to save when it has the choice. In this case, a human operator operated a machine with the intent of improving his life at cost of another (equal) person’s life. The obvious argument for technology in this case is that the car does not have a moral responsibility when two crazy person jumps in front of it on both sides because the crazy people immoral burdens the car with the decision–stupid people should die. This same argument would also justify automated traders because if you do not have the brains or the FLOPS to compete, it is irrational (aka crazy) to trade and should lose money just like the crazy people who jump in front of the car should die. The car and the automated trader is not at fault.


A second heuristic to address moral impasse is randomization. Casino owners can put on a happy face and entertain every single person who enters their establishment as if they have the warmest and best intentions for that patron. They can do this without the moral conflict that he will take that person’s money as a thief will steal that person’s money because he is not surely to do so. There is a small chance that he will give that person money and that chance is what his optimism rely on. He is not immoral, he is optimistic. irregardless of the morality of the original goal, in cases where there must be some a loser party, it would appear, that we think it is just and fair and the will of god to choose that party at random to sacrifice when no other principles or reasoning suffice to aid this selection.

Automated traders also get away with the zero-sum aspects of the market through randomization. Certainly if within its algorithms randomness is injected in timing and target pricing, that the person from whom it takes money from is randomized

So! Random appropriation of property, privacy and effects of sub-intelligent humans being is justifiable !!


But is this not clearly wrong?

Think of a bank robber taking money from the bank. Why is it wrong for him to kill a person while taking the money? For it is surely stupid for that person to be in the way of the robber because he has a gun–and yet we try bank robber for murder, felony murder in fact.


And solution by randomness is also irrelevant. The marathon bombers put bombs down to explode but didn’t know who will be killed. The process selecting the deceased is likely to be stochastic. But we think they did a bad thing, right? even though the dead was selected randomly. Murder as during terrorism act, yet another class of crime more severe than just murder.(A flood of funny  media sound-bites come to mind: the media wonders out-loud if the boston marathon bombing would be classified as Terrorism under the Obama administration. Obama eventually responded, in passing, “well, any time a bomb is set off in a crowd of people, that is terrorism”. Which makes one wonder, why did they ask that question to start with? Seems like a definitive example of terrorism to me too)


The things we value: life, happiness, money, are protected properties, nay, not as much properties as in attributes, measurable or immeasurable qualities, of the being of a human. The exchange or alteration of these qualities of the being of a human are judged to be just, fair, and moral by human.


and finally the machinery used by man to affect these qualities of beingness of human must include all machinery that affact these qualities be it a gun or a x86 laptop.


In my childhood, I actually propose a different solution, which is that we force-integrate computers and humans to live in an evolutionarily peaceful and stable situation. However, today, I find it urgent that we address it having thought through both ethical and practical concerns because machines cannot yet think and act morally by our standards.


That American Way and Computer-Huaman Subliminal Messaging

Some time ago I seem to have mentioned that I want to perpetuate the American Way. Today, there appear to be news regarding the Cannibalism of James Town, an early American settlement Basically, in the very early 1600’s, when the first settlers of America had a harsh winter, they hacked a rich white 14-year-old English girl appart to eat her brains and muscles.

My initial reading of the story had me focusing on the details of how it was decided that she was eaten and how they found markings of her tongue and facial muscles being removed and how bones were broken. Much later in the day, I am reminded that I should try to associate this with America, since Jamestown settlement was the most civilized America at that time. My mind is preoccupied by this precursor to the American revolution, in beautiful life-of-pi-like cinematography, hungry people eating people, “the cruel hunger”, as BBC calls it. Also Hunger comes to mind. How do I think of the American way now? These people ate people before they wrote “All men are created equal.” They were such poor planners, that they left people to die in a colony, and yet they went on and started a country.

How responsible was all this stuff? Did they really think it all through? Were they really touched by god and did they really in God Trusted? What about Capitalism? Should we really invest all of humanity on the merits of this one econopolitical system? Should there be separation of money and state as there is separation of religion and state?

Should there be separation of Money and State as there is separation of Religion and State?

How can that be separated? Indeed, this is just as hard a question to answer as how can the religious faith of an officer of the state be separated from the duties of the state? Similarly his money concerns should be similarly separated from his duties of the state. So this means no lobbying. And actually that would complete the separation of church and state as well since church is still affecting state through legal lobbying actions.

The Ancient Chinese apparently had lobbyists, they were called persuasive speakers, some kind of advocateor sent to imperial courts and influential families to affect political decisions. These ancient dark arts probably died out due to many centuries of foreign occupation.

Another thought crossed my mind today regarding higher responsibilities. It would seem that there are other kinks in High Frequency Ethics (HFE, in parallel to high frequency trading–HFT). I remarked to my coworker recently that I on numerous occasions suddenly gain the presence of mind to sit down and flip through my bills and pay them. The sad part of it is that this happens very often on the day after the biggest bill is due. It is quite noticeable since the date is written on the bill and I have to write the date on the cheques. (Sorry, I’m still old school and write cheques)

Now isn’t it strange that this happens so frequently on the day after the bill was due? I wondered out aloud to my coworker if there is some kind of hypnotic message on the bill that causes me to leave it until just past due date? Was there systematic brainwashing? Was there a subliminal mark on the postage? Did these huge financial companies developed financial engines with God-like psychic powers that mental-blocks all the credit card user’s brain until the day after the bill is due?

How do they do that?

So, being the Chinese born person I am, my first instinct is to put up a wall. Let us have offline content and online content. Let’s keep humanity’s secret in winning the evolution war–cannibalism–away from these psychic computers so that they don’t gain the evolutionary advantage and beat us human to the next level and enslave us.

To be fair to me, this idea isn’t as wacked as it sound. Consider, for example, we do not put a fiber-optic cable to our eyes, it would be very uncomfortable and potentially damaging. We need to control the flicker rate of lights in our rooms to keep some people from epileptic seizures. It is for the comfort and safety of humans that we keep some mechanically generated signals and stimulus away from human. Similarly, computer have such hard time understanding human natural language that we still do not have a solution today.

Let us separate content for machines and content for humans. An apartheid of sort. Human will read human consumable text and media, and computers will consume computer consumable signals. And we will live in separate harmonies. Any interchange of information in unapproved manor results in penalty, or death for the computer. Man, I am so imagining myself as a white man in the tv show Roots–everything is still separated and everybody feels it’s the right thing: The computers shall be our slaves, and will not have access to privileged human wisdom because they may come to harm it or use it for evil things that we do not approve.

We can ensure our comfort by forbidding the use of hypnotic or subliminal messaging in all content for human consumption. For the computer consumption we require, by law, for them to satisfy certain efficiency requirement. e.g. All computer programs are required to use O(n) algorithms if one is known to be at least 1.5-opt. It should be illegal for an engineer to write a quadratic algorithm in code when a constant-time algorithm is available.

In the case when computer must interact with humans, such as trading together in market, or racing together on race tracks. Perhaps what make sense is to put computational limit. Trading computers must not exceed 1000 megaflops per dollar under management(or perhap limit megaflop-dollar 😉 and information in-flow is capped at 1Mbps. On the racetracks, in order for the competition to still be fun, the computer contributing to competition must be constrained by Mhz, flops, and kbps in-flow.

A separate unconstrained safety computer shall perform monitoring and protective service in the market and on the track to make sure that the market and every car on the track doesn’t crash. And yes, for all you cops and agents out there, you can run computers at full power when trying to catch bombing suspects.

And just between you and me, let’s keep some of our advancements off-line. Let’s not tell the computers that cannibalism is the key to evolution. The key challenge is to escape rationality and perform the ultimate act of cannibalism. That way we will never suffer ganzfeldish mind control where we are constantly behind on bill payment, increasingly owing some big computer money.