I remember that during my senior year of high school, there was some unofficial competition among friends to get the lowest final grade possible without ``Asian-failing." That is, to do as poorly as possible on graded assignments without getting the dreaded B+. The GPA cutoffs was set such that an A [93%, 100%] was a 4.0/4.0, A- [90%, 93%) was a 3.8/4.0, and B+ [87%, 90%) was a 3.3/4.0, so dropping from an A- to B+ is a much bigger deal than dropping from an A to A-. This game was certainly fun to play, but at that time I didn't understand the reasons that we participated.
It turns out that costly signaling could explain this phenomenon. Costly signaling, or the handicap principle, is a behavior that is costly for all groups, but more costly for the ``worse'' group than it is for the ``better'' group. In this case, better and worse are in terms of ability to do well in class and cost is the expected grade, which is related to the probability of sinking below 90% and the probability of being able to rescue a failure. I assume that the less smart kids have less control over their performance on assessments since they probably (1) can correctly answer fewer questions and (2) are more prone to make trivial errors.
Riskier variations include playing the game below senior year, during which grades are more valuable (since colleges will see them), or at MIT. I wonder how the brave souls at the Institvte would do, since the cliff between an A- (5.0/5.0) and a B+ (4.0/5.0) is massive.
29 October 2013
28 October 2013
All I Do These Days
- Problem sets
- Ride planes and trains
- Code over the phone or on whiteboards
- Obsessively hit refresh on Autotrader.com
Labels:
MIT
24 September 2013
Porsche 918 Configurator LIVE!
The most expensive car whose price is shown in an online configurator is...the Porsche 918 Spyder! And to add further insult, all 918 examples have been pre-ordered.
Here's to hoping I'll have a chance to drive one of these bad boys!
Here's to hoping I'll have a chance to drive one of these bad boys!
Labels:
carpe diem,
cars
15 September 2013
San Francisco
Immediately after my internship, I flew to San Francisco for a short one-week vacation to chillax while I still had the chance.
Jet lag produces excellent morning photos
I made a day trip to south bay to visit Apple. I had lunch with my mentor and then went for coffee with a few others on the iOS team.
The reason I chose to go to south bay on this day is that Apple organized a small auto show at one of the campuses. I got to see a number of supercars and classics.
AC Cobra
McLaren MP4-12C air vent
Wings of freedom
Lamborghini Gallardo LP570-4 Superleggera mirror cap
AC Cobra Coupe
Salute
McLaren MP4-12C mirror cap
McLaren MP4-12C engine
McLaren MP4-12C door opened
Mercedes-Benz SLS AMG front emblem
The most intriguing supercars were the McLaren MP4-12C and the Mercedes SLS. I may just have a thing for door mechanisms, but I gotta say, scissor doors are the coolest. I think they intrigue me because I don't have a clear picture of where the hinge mechanism is mounted -- there's no obvious flat edge on which the door pivots like in traditional doors (leftmost edge) or gullwings (topmost edge).
I'm not too versed on classic cars, but I did recognize the BMW 2002! Oh, the things I learn from playing Forza 4. There were also a bunch of Cobras and a Porsche 356 Speedster in British racing green.
Automobiles aside, staying in San Francisco, specifically SoMa (South of Market for non-natives), was quite pleasant. Compared to the Tenderloin, where I stayed for an on-site interview. The surrounding area was decently clean (I would say not as clean as the loop in Chicago) and had plenty of attractions. Namely, the Apple store was only five minutes away by foot. :) Plenty of restaurants were close by, including Chinatown. (Aside/funny story: we went to a dim sum place for lunch, and I was awed when our waiter computed our bill (including tax!) in his head. I joked that I would never be able to work there.) We also walked along the piers and went to Ghiradelli Park one afternoon.
That said, rent in San Francisco is laughably expensive, to say the least. It turns out that rent for a one bedroom corner unit in a relatively nice location is $4k/month. To put this in perspective, a two bedroom/two bathroom unit in the penthouse tower in Chicago is $3.2k/month. One would think that high rent and high income taxes would be sufficiently large deterrents.
But inexplicably, I think that I will be sucked into this vortex known as the Bay Area.
Labels:
carpe diem,
cars,
photography,
vacation
05 September 2013
Automobile Shortlist
If you had unlimited funds to obtain the 10 cars of choice, what would you have?
- Porsche Boxster (981), daily driver.
- Lotus Elise (S2), in which general awesomeness can be had anywhere and everywhere (except in snow and rain).
- Jaguar C-X75, for its epic twincharged 4-cyl hybrid powertrain and its wonderful sports bike-like exhaust note.
- McLaren MP4-12C, high-speed beast, also nondescript enough for a viable occasional driver
- Lexus LF-A, for its lovely F1 exhaust note.
- Mercedes-Benz S600 (W222), because Magic Body Control and I need a limo.
- Tesla Model X, for all things that require a SUV and the exotic falcon wing doors.
- Mercedes-Benz 300SL, because every stable should have a classic, and who can deny gullwings?
- Koenigsegg Agera, for the exotic Koenigsegg doors and their no-compromise philosophy reflects what I want to achieve.
- Porsche 911 Carrera (991; in Guards Red, of course, and perhaps a GT3), because I've always wanted one as a kid.
Labels:
carpe diem,
cars
02 September 2013
Standards
Never apologize for having high standards. People who really want to be in your life will rise up to meet them.
Labels:
life
18 August 2013
Union Find
I never understood the point of union find (not after learning it in high school with Dr. Nevard, or even after learning about Kruskal's minimum spanning tree algorithm) until I saw this problem:
This pre formatting sucks, but that's beside the point.
Here's my solution:
Maybe someday I will get proper code formatting for my blog.
A journey to the Moon The member states of the UN are planning to send two people to the Moon. But there is a problem. In line with their principles of global unity, they want to pair astronauts in such a way, that both are citizens of different countries. There are N astronauts numbered with identifiers from 0 to N-1. They are qualified and trained to be sent to the moon. But the trouble is that those in charge of the mission haven’t been directly informed about the citizenship of each astronaut. The only information they have is that some particular pairs of astronauts belong to the same country. Your task is to compute in how many ways they can pick a pair of astronauts satisfying the above criteria, to be sent to the moon. Assume that you are provided enough pairs to let you identify the groups of astronauts even though you might not know their country directly. For instance, if 1,2,3 are astronauts from the same country; it is sufficient to mention that (1,2) and (2,3) are pairs of astronauts from the same country without providing information about a third pair (1,3).
Input Format The first line contains two integers, N and I separated by a single space. I lines follow. each line contains 2 integers separated by a single space A and B such that 0 ≤ A, B ≤ N-1 and A and B are astronauts from the same country. Output Format An integer containing the number of permissible ways in which a pair of astronauts can be sent to the moon. Constraints 1<=N<=10^5 1<=I<=10^6 Sample Input 4 2 0 1 2 3
Sample Output 4 Explanation As persons numbered 0 and 1 belong to same country and 2 and 3 belong to same country. So the UN can choose one person of 0,1 and one out of 2,3. So number of ways of choosing pair is 4.
This pre formatting sucks, but that's beside the point.
Here's my solution:
class DisjointSet(object):
def __init__(self, vals):
self.parents = {x: x for x in vals}
def find(self, x):
if self.parents[x] == x:
return x
else:
return self.find(self.parents[x])
def union(self, x, y):
xRoot = self.find(x)
yRoot = self.find(y)
self.parents[xRoot] = yRoot
def sets(self):
d = {}
for child in self.parents:
parent = self.find(child)
if parent not in d:
d[parent] = set()
d[parent].add(child)
return d
N, L = map(int, raw_input().strip().split())
ds = DisjointSet(range(N))
for i in range(1, L+1):
a, b = map(int, raw_input().strip().split())
ds.union(a, b)
s = ds.sets()
acc = 0
if len(s) > 1:
cumsum = [len(x) for x in s.values()]
for i in range(len(cumsum)-2, 0, -1):
cumsum[i] += cumsum[i+1]
for i, x in enumerate(s.values()[:-1]):
acc += len(x) * cumsum[i+1]
print acc
Maybe someday I will get proper code formatting for my blog.
Labels:
code
15 August 2013
Stark Contrast
"That's the difference between you and me," he said. "I just assume that there will be nannies."--Elon Musk
but s/nannies/supercars/
Source: http://www.marieclaire.com/sex-love/relationship-issues/millionaire-starter-wife
Labels:
life
08 August 2013
Chilling
"I am your wife," I told [Elon Musk] repeatedly, "not your employee."Justine Musk's account of her failed marriage: http://www.marieclaire.com/sex-love/relationship-issues/millionaire-starter-wife
"If you were my employee," he said just as often, "I would fire you."
Labels:
life
07 August 2013
A Summer of Cars: Part III
A generous salesman by the name of Matt at the New England Aston Martin-Lotus dealer volunteered to teach me how to drive a manual. Thanks for making my summer complete!
After arriving at the dealer, we took this beautiful white Lotus Elise to a nearby parking lot. Matt pushed the car quite hard to show me how nimble it was -- very! It showcased the car's favorable power-to-weight ratio.
A bit more about the Elise: it's a sub-2000lb roadster powered by a 180hp Toyota engine. The car is very stripped, whose interior consists of…almost nothing. The mirrors are manually adjusted. The seats don't have a backrest adjustment. The passenger seat is bolted to the chassis. As in, it doesn't move back and forth. And that's why I can't believe this car has power windows.
Now onto the fun part. I've watched several videos of people driving a stick, heel-to-toeing (an advanced technique), and such, but they don't reveal the subtleties. In particular, the clutch behaves more like a sigmoid than a digital function, to my surprise:
When you shift into gear, you (slowly) let go of the clutch until you feel it grabbing the engine, then give the engine some gas, and finally (slowly) release it. Releasing the clutch too fast, and the engine stalls. Release it too slow, and the clutch wears and may start smelling badly.
We started off by starting the car, shifting into first, driving in a large circle, shifting into neutral, and stopping. This took a few tries to get, and even then, I sometimes still had trouble because I was releasing the clutch too quickly after it engaged with the engine.
Next up was shifting into 2nd, which was fairly easy. I pushed the car a little harder by going faster (about 20mph) and making tighter turns while doing figure eights.
Impressed by how quickly I have progressed, Matt let me shift into third, which went smoothly, although an ominous smell emanated from the clutch. Oops!
I then tried starting the car on a 5* hill. The process was more or less the same, but I had to give the car a little more gas to counteract gravity. I took a few tries to get it since I wasn't stepping on the throttle enough.
Finally was reverse. I found this the trickiest, mainly because I suffered from some cognitive dissonance -- I illogically thought that reverse was so different from the forward gears. I got it after a few tries, but wasn't as good was shifting into first, etc.
As for the ride experience, the car is very loud. The engine drones, since it cruises around 3000-3500rpm; if you've sat in the godawful Smart ForTwo, it's a comparable experience. You feel every single imperfection in the road, and know which tires ran over the bump. An accurate description is a box on wheels, or a street legal go-kart. But it's so undeniably lovable, and I think that makes me sad if I were to turn it down.
So here comes the really heartbreaking part: I have to make a choice between the Elise and the 981 Boxster before the end of the year, since the lead time for order a bespoke Porsche is 6 months. (Porsche essentially shuts down the factory to handle all of the special orders at the end of a model year.) I'm not sure if I'll be able to live with the Lotus and its dearth of practicalities, such as next-to-nothing sound deadening, track seats, briefcase-sized trunk, and possibly awkward blind spots.
But for now, I'll live and dream as if I had both.
After arriving at the dealer, we took this beautiful white Lotus Elise to a nearby parking lot. Matt pushed the car quite hard to show me how nimble it was -- very! It showcased the car's favorable power-to-weight ratio.
A bit more about the Elise: it's a sub-2000lb roadster powered by a 180hp Toyota engine. The car is very stripped, whose interior consists of…almost nothing. The mirrors are manually adjusted. The seats don't have a backrest adjustment. The passenger seat is bolted to the chassis. As in, it doesn't move back and forth. And that's why I can't believe this car has power windows.
Now onto the fun part. I've watched several videos of people driving a stick, heel-to-toeing (an advanced technique), and such, but they don't reveal the subtleties. In particular, the clutch behaves more like a sigmoid than a digital function, to my surprise:
When you shift into gear, you (slowly) let go of the clutch until you feel it grabbing the engine, then give the engine some gas, and finally (slowly) release it. Releasing the clutch too fast, and the engine stalls. Release it too slow, and the clutch wears and may start smelling badly.
We started off by starting the car, shifting into first, driving in a large circle, shifting into neutral, and stopping. This took a few tries to get, and even then, I sometimes still had trouble because I was releasing the clutch too quickly after it engaged with the engine.
Next up was shifting into 2nd, which was fairly easy. I pushed the car a little harder by going faster (about 20mph) and making tighter turns while doing figure eights.
Impressed by how quickly I have progressed, Matt let me shift into third, which went smoothly, although an ominous smell emanated from the clutch. Oops!
I then tried starting the car on a 5* hill. The process was more or less the same, but I had to give the car a little more gas to counteract gravity. I took a few tries to get it since I wasn't stepping on the throttle enough.
Finally was reverse. I found this the trickiest, mainly because I suffered from some cognitive dissonance -- I illogically thought that reverse was so different from the forward gears. I got it after a few tries, but wasn't as good was shifting into first, etc.
As for the ride experience, the car is very loud. The engine drones, since it cruises around 3000-3500rpm; if you've sat in the godawful Smart ForTwo, it's a comparable experience. You feel every single imperfection in the road, and know which tires ran over the bump. An accurate description is a box on wheels, or a street legal go-kart. But it's so undeniably lovable, and I think that makes me sad if I were to turn it down.
So here comes the really heartbreaking part: I have to make a choice between the Elise and the 981 Boxster before the end of the year, since the lead time for order a bespoke Porsche is 6 months. (Porsche essentially shuts down the factory to handle all of the special orders at the end of a model year.) I'm not sure if I'll be able to live with the Lotus and its dearth of practicalities, such as next-to-nothing sound deadening, track seats, briefcase-sized trunk, and possibly awkward blind spots.
But for now, I'll live and dream as if I had both.
Labels:
carpe diem,
cars
Subscribe to:
Posts (Atom)


















