SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
farmer
Topic Author
Posts: 13477
Joined: December 16th, 2002, 7:09 am

speed question: three-city triangle

March 14th, 2012, 11:21 am

How many different ways can you draw a triangle between three cities around the globe?
 
User avatar
MCarreira
Posts: 1724
Joined: July 14th, 2002, 3:00 am

speed question: three-city triangle

March 14th, 2012, 11:56 am

First reaction is 4. If I'm wrong, I'd guess it's more than 4.
 
User avatar
crito2
Posts: 13
Joined: December 1st, 2011, 1:12 pm

speed question: three-city triangle

March 14th, 2012, 12:27 pm

i'd say 6. assuming different cities and not on the same circle. Edit: On second thoughts, 4 seems to be correct
Last edited by crito2 on March 13th, 2012, 11:00 pm, edited 1 time in total.
 
User avatar
Traden4Alpha
Posts: 23951
Joined: September 20th, 2002, 8:30 pm

speed question: three-city triangle

March 14th, 2012, 1:12 pm

My first, pre-morning-coffee guess is 8. Each pair of cities defines one edge of the triangle and we have a choice of two lines -- the shortest great-circle and it's complement.
 
User avatar
croot
Posts: 104
Joined: July 23rd, 2006, 8:30 pm

speed question: three-city triangle

March 14th, 2012, 1:23 pm

Either infinity or 1, depending whether or not there are two of the points at diametrically opposite locations. Because a triangle is a figure which sides are the straight lines (read "shortest paths") between its 3 vertices. So unless there are two points diametrically opposite, there is only one straight line between each two points and thus one triangle. I think you guys looking for triangles "that go around the other side, in the shortest way possible" are adding your own information into the question. After all, if it's allowed to stray from the straight line, then I can have infinity triangles in every configuration just using squiggly lines between vertices and calling that a triangle.
 
User avatar
croot
Posts: 104
Joined: July 23rd, 2006, 8:30 pm

speed question: three-city triangle

March 14th, 2012, 1:42 pm

haha yes, it's true that if you take "the globe" as meaning Earth, I'm pretty sure you should answer "0" lest the interviewer hand you a pot of paint and ask you "Mumbai, La Paz, Fukushima": prove it!
 
User avatar
Traden4Alpha
Posts: 23951
Joined: September 20th, 2002, 8:30 pm

speed question: three-city triangle

March 14th, 2012, 2:18 pm

QuoteOriginally posted by: outrunQuoteOriginally posted by: Traden4AlphaMy first, pre-morning-coffee guess is 8. Each pair of cities defines one edge of the triangle and we have a choice of two lines -- the shortest great-circle and it's complement.That's a pre-coffee answer to a different question. It's missing the orderingGood point! If ABC != BCA !=CAB !=ACB !=CBA !=BAC, then we have a factor of 6 more triangles based on ordering of the vertices.So, now we are up to 48 ways = (3 first city choices) * (2 second city choices) * (2 direction choices to city 2) * (2 direction choices to city 3) * (2 direction choices to city 1) ? P.S. the "around the globe" phrase in the problem statement seems to make this a problem in spherical geometry with each triangle edge having two "around the globe" alternatives.
Last edited by Traden4Alpha on March 13th, 2012, 11:00 pm, edited 1 time in total.
 
User avatar
MCarreira
Posts: 1724
Joined: July 14th, 2002, 3:00 am

speed question: three-city triangle

March 15th, 2012, 1:21 am

I counted the standard triangle and for each vertex a long way around ... I think that the discussions about the question end up beng better than the actual answer.
 
User avatar
Traden4Alpha
Posts: 23951
Joined: September 20th, 2002, 8:30 pm

speed question: three-city triangle

March 15th, 2012, 12:42 pm

I like the soap bubble analogy for showing that every wireframe spherical triangle is two triangles (the inner and the outer). But it misses some of the possible triangles because it pre-constructs the triangle with the wireframe that holds the bubble. If I make spherical triangle ABC in wire with the AB wire going the long way around the sphere, I have second pair of inner and outer triangles. Similarly, I can make a third and fourth pair of triangles with long-way wires for AC and BC, respectively.And if one is "drawing" a triangle in which both inner and outer are valid alternatives, then one must also draw something additional (e.g., cross-hatching) to designate which part of the sphere is "in" the triangle.Thus we are back to (4 shapes) * (2 inner v. outer) * (3! drawing order permutations) = 48 different ways to draw a spherical triangle with vertices on some set of cities.
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On