22.4.08

By the Numbers: Compatibility

ever wonder how those matchmaking sites find people to make matches?

i always thought it'd be something like this:

Matchmaker 1: okay, it's your turn to throw the darts.

Matchmaker 2: so we're putting the green ones together?

Matchmaker 1: and the blues. try to get them in the nostrils.

Matchmaker 2: don't we have to send these photos back?

alas, this is not the case (because matchmakers cannot throw darts). in actuality, they use the power of maths to hook you up with someone compatible.

they don't even know me; how can they possibly find someone that matches? you might ask.

when you sign up with a matchmaking service, you undergo rigorous psychological testing to determine your personality in finite, objective terms; it's a questionnaire. the results of your test are plotted into a vector generator. a vector is like a coordinate (x, y), but has an anchor at (0, 0), thus forming a line. the vector of your personality, lets call it [y1, y2, y3, ... yn], is then dropped into a databank of other desperate lonely folk's personality vectors and a computer runs them through a stiff algorithm: the dot product.

finding the dot product between two vectors is quite fun. you take the number in the first dimension from one vector and multiply it with the number in the first dimension of the other vector and add it to the product of the numbers in the second dimenion and the third and so on:
x dot y = x1y1 + x2y2 + ... xnyn.

this is equivalent to the product of the two vector's magnitudes (lengths) and the cosine of the angle between the two:
x dot y = |x||y|cos(theta).

the computer solves for the angle and uses it to determine the strength of compatibility. really small angles between two vectors mean that they are very similar, and therefore compatible. angles of around 180 degrees are also considered compatible since opposites attract. the computer then compiles a list of candidates for each person based on the data.

3 comments:

Anonymous said...

Would it even need to solve for the angle? If both 180 and 0 degrees are very compatible, then that would mean that not compatible at all is at an angle of 90 degrees, which is a dot product of zero. It would be better to simply compare the dot products to zero (cos(90) = 0) and x*y (cos(0) = 1) since calculating the inverse cosine of an angle is less accurate and slower.

hoimin said...

computer programmers have the enviable knack of taking things one or two steps beyond where the math stops to make things more efficient.

i think that solving for the angle, while technically superfluous and computationally inefficient, gives a definite "strength" factor that is weighed equally regardless of the original personality vectors when defining compatibility. this could be done just as well with percentage differences from, as tim mentioned, 0 and x dot y (which comes out to be the cos(theta) factor anyway).

in the end, the layperson cares little for how the number was achieved.

Anonymous said...

magnetic darts. then the people in the pictures will never know.

  © Blogger template The Professional Template by Ourblogtemplates.com

Back to TOP