October 5, 2014

Taken in Colombia.

Sydney v Richmond

August 27, 2014

You are the captain of Sydney. The phone rings and you pick it up. Trent Cotchin is on the line.

“G’day Trent, what’s up?”

“I’m calling to discuss our game on this weekend. It seems that there’s an opportunity for us both to arrange things to benefit both of us.”

“Um, how?”

“Well what do you guys want to get out of this weekend’s match? The minor premiership, for sure, but even more importantly you want none of your players to get injured or suspended. Agree?”


“Well listen, I have a way to guarantee that you get all of the above. Interested?”

“Um, I’m not sure how you can guarantee that we don’t have any injuries.”

“All I ask for in return is that you let us win. Only by a small enough margin that you still keep top spot from the Hawks on percentage. But you see, we do really need the win more than you guys this time so we can make the eight.”

Trent pauses to take a breath, and continues

“Here’s how I propose we work things out. Come Saturday’s game, when the ball is bounced you allow us with no contest to score a couple of goals. Then both teams agree to sit down for the rest of the game and do nothing. We both get what we want out of the game without having to take any risks. Do you agree to this proposal?

What is your response?

(Also, if you accept, what will be the response of the rest of the world to such a highly contrived outcome?)

Concyclicity in the Euclidean Plane

August 21, 2014

I want to address the question of how to determine whether or not four points are concyclic. In a previous post, this question reared its head and was solved by an introduction of the circumcentre of three of the points. In this post, I present a direct approach.

We prove the following:

Let (x_1,y_1),(x_2,y_2),(x_3,y_3),(x_4,y_4) be four points in \mathbb{R}^2. Then these four points are concyclic if and only if

\displaystyle \left| \begin{array}{cccc} x_1^2+y_1^2 & x_1 & y_1 & 1 \\ x_2^2+y_2^2 & x_2 & y_2 & 1 \\ x_3^2+y_3^2 & x_3 & y_3 & 1 \\ x_4^2+y_4^2 & x_4 & y_4 & 1 \end{array} \right|=0.

For the proof, first suppose that the points (x_i,y_i) all lie on the curve

\displaystyle (x-x_0)^2+(y-y_0)^2=r^2.

The four equations we obtain give a linear dependence of the columns in the 4\times 4 matrix under consideration, hence its determinant is zero.

Conversely, suppose that the determinant in question is zero. Then there is a nonzero vector in the nullspace of our 4\times 4 matrix. If its first entry is nonzero, we can normalise it to be of the form (1,-2x_0,-2y_0,x_0^2+y_0^2-r^2)^T and we obtain the circle that the four points lie on. If the first entry of this vector is equal to zero, then the four points must lie on a line, which after is all is just a degenerate circle, QED.

bartogian does the IMO (2014 Q4)

July 16, 2014

The fourth question on this year’s IMO is a Euclidean geometry question. And so I thought to myself, I wonder if I could get a computer algebra package (with Grobner bases, etc) to do the relevant algebraic manipulation to solve the problem for me, once I had converted the problem into coordinate geometry.

This is a desription of that journey. But first the problem:

Points P and Q lie on side BC of acute-angled triangle ABC such that \angle PAB=\angle BCA and \angle CAQ = \angle ABC. Points M and N lie on lines AP and AQ, respectively, such that P is the midpoint of AM and Q is the midpoint of AN. Prove that the lines BM and CN intersect on the circumcircle of triangle ABC.

As every good student knows, it is a good idea to do a little bit of Euclidean geometry before starting on the trigonometry or coordinate geometry. So we will begin by noticing that APQ is isosceles.

We will set up our coordinates so that the line BC is the horizontal axis, with the origin at the midpoint of PQ. Then we introduce variables h,x,y,z by A=(0,h), P=(x,0), Q=(-x,0), B=(y,0) and C=(z,0). Hence M=(2x,-h) and N=(-2x,-h).

Let X=(p,q) be the intersection of BM and CN and let O=((y+z)/2,w) be the circumcentre of ABC.

So now for the equations that these seven variables satisfy.

Since X lies on BM, there is

\displaystyle \frac{q}{p-y} = \frac{-h}{2x-y}

and since X also lies on CN, there is

\displaystyle \frac{q}{p-z} = \frac{-h}{-2x-z}

From |AO|=|BO| there is

\displaystyle \left(\frac{y+z}{2}\right)^2 + (w-h)^2=\left(\frac{y-z}{2}\right)^2+w^2

and from the similarity of triangles ABC and QAC, in particular AC^2=CQ\cdot BC, we get

\displaystyle h^2+z^2 = (z+x)(z-y).

And what do we have to prove? Well nothing other than |AO|=|XO|, so it suffices to prove

\displaystyle \left(p-\frac{y+z}{2} \right)^2+(q-w)^2 = \left(\frac{y+z}{2}\right)^2+(w-h)^2

So, we go to sage (I skip the routine and boring simplification) and execute

sage: x,h,y,z,w,p,q=QQ['x,h,y,z,w,p,q'].gens()
sage: I=ideal(q*(2*x-y)+h*(p-y),q*(2*x+z)-h*(p-z),y*z-2*w*h+h^2,h^2+z^2-(z+x)*(z-y))
sage: (p^2-p*y-p*z+(q-w)^2-(w-h)^2) in I


Well how about:

sage: (p^2-p*y-p*z+(q-w)^2-(w-h)^2) in I.radical()

Yikes again!

While it is tempting to expect a typographical error, that is not in fact the case. The following computation reveals what is really going on.

sage: I.associated_primes()
[Ideal (q, z, y, h) of Multivariate Polynomial Ring in x, h, y, z, w, p, q over Rational Field, Ideal (q, z, h, x) of Multivariate Polynomial Ring in x, h, y, z, w, p, q over Rational Field, Ideal (q, y, h, x) of Multivariate Polynomial Ring in x, h, y, z, w, p, q over Rational Field, Ideal (z, y, h, x) of Multivariate Polynomial Ring in x, h, y, z, w, p, q over Rational Field, Ideal (y*p + z*p - 2*p^2 - 2*h*q + 4*w*q - 2*q^2, y*z - p^2 - 2*h*q + 2*w*q - q^2, h*z - h*p + 2*x*q + z*q, 2*x*z - 2*h*w - 2*x*p - z*p + p^2 + h*q - 2*w*q + q^2, h*y - h*p - 2*x*q + y*q, 2*x*y + 2*h*w - 2*x*p - z*p + p^2 + h*q - 2*w*q + q^2, h^2 - 2*h*w + p^2 + 2*h*q - 2*w*q + q^2, z*p^2 - p^3 - 2*x*h*q + 4*x*w*q - h*p*q + 2*w*p*q - 2*x*q^2 - p*q^2, z^2*p - p^3 - 4*x*h*q + 8*x*w*q + 4*z*w*q - 2*h*p*q + 2*w*p*q - p*q^2, 2*h*w^2 - w*p^2 + 2*x^2*q - h*w*q + 2*w^2*q - w*q^2, h*w*p^2 - 2*x^2*h*q + 4*x^2*w*q - 2*x^2*q^2, w*p^4 - 4*x^2*h*w*q + 8*x^2*w^2*q - 2*x^2*p^2*q - 2*w^2*p^2*q + 2*x^2*h*q^2 - 8*x^2*w*q^2 + w*p^2*q^2 + 2*x^2*q^3) of Multivariate Polynomial Ring in x, h, y, z, w, p, q over Rational Field]

And we see the issue. The ideal I has five associated primes, but only one of these primes corresponds to the geometric problem at hand, the other four correspond to highly degenerate triangles.

So we try

sage: J=I.associated_primes()[4]
sage: (p^2-p*y-p*z+(q-w)^2-(w-h)^2) in J

and the proof is complete.

An alternative approach would be to artificially invert h by creating a new variable t satisfying the relation ht=1:

sage: x,h,y,z,w,p,q,t=QQ['x,h,y,z,w,p,q,t'].gens()
sage: I=ideal(q*(2*x-y)+h*(p-y),q*(2*x+z)-h*(p-z),y*z-2*w*h+h^2,h^2+z^2-(z+x)*(z-y),h*t-1)
sage: (p^2-p*y-p*z+(q-w)^2-(w-h)^2) in I

and QED for the second time.

Bartogian’s guide to Seattle

May 3, 2014

Do: Underground Tour. I’ve only done the day tour and think night tour is essentially the same but with more emphasis on the history deemed inappropriate by the morality police (eg, prostitution). The ticket can give you some discounts on other touristy things.

Eat: Mod Pizza. Good pizza at a good price. Right across the road from WAC.

Sing: Hula Hula. Karaoke every evening. Was not crowded on a Thursday evening, can’t speak for other days of the week.

Follow the Signs

March 22, 2014

The following picture was taken at the intersection of Cardigan Street and Kilner Lane, Camperdown.

OK, so lets say you want to go to ‘main or ‘te Bay. You ignore the other two signs and continue as directed. Pretty soon you’re dumped at this intersection.

Yes, that is really telling you to turn right onto Parramatta road. But due to the timing of the traffic lights, you’ll likely have three lanes all to yourself, the leftmost of which is a bus lane.

At the first possible opportunity (Gordon St) to turn left, there is another cycling sign. Eager to get off the main road, you take it. Despite the fact that this sign is giving you two new destinations, Glebe and City.

Pretty soon, you’re dumped on Pyrmont Bridge Road, which could really do with both a high quality bike lane and a reduction in the speed limit from 60 to 50. (I don’t know myself how to fix these problems for you).

From here on, the trail goes cold as far as I can tell (as in there being no more signs to tell you where to go). From start to finish, we’ve managed to cover a grand total of just 280 metres.

\def, \newcommand, \span and \align

March 9, 2014

I learnt something about TeX/LaTeX today.

I got the following cryptic error message:
! Missing # inserted in alignment preamble.

l.38 \end{align*}

Now when I went to google “Missing # inserted in alignment preamble”, I immediately got a lovely website which was able to answer my question. But hey, information survives by being copied, so if you’ll kindly allow me to continue, I shall.

Stripped down to a minimal example, here is the problematic code.

\documentclass[11pt, reqno]{amsart}




u &= \arctan x & dv &= 1 \, dx
\\ du &= \frac{1}{1 + x^2} dx & v &= x.


Actually stripping down to a minimal example kind of makes it obvious where the error is – it must be somewhere in the \def\span line.

It turns out that \def and \newcommand act differently. I’d always just assumed that \def and \newcommand were synonymous, and used the former since it involved less typing. And it’s true, most of the time you don’t notice the difference.

The problem in the above code is that \span is already defined to be something important needed to internally execute the \align command. By using \def, we’re redefining what \span means. If we used \newcommand instead, we wouldn’t be able to redefine \span and we’d get an instructive error message.

So the moral of the story is: \newcommand is safer.

Walking between Sydney Airport Domestic Terminal and Mascot Station

February 28, 2014

OK, this one is really easy.

Just follow Google’s directions. You can’t get lost.

If you happen to be travelling at the right time of day between the airport and the CBD, there is also the option of the 305 bus.

Walking between Sydney International and Wolli Creek station

February 9, 2014

First the why:

One way Central-International train ticket: 16.40AUD.

One way Central-Wolli Creek train ticket: 3.80AUD.

[Warning: Never buy a ticket to the City. It prices out to the most expensive option of all city train stations. Always buy a ticket to the specific train station you want to get off on]

The reason for the difference in the train fares is the existence of a station access fee at Sydney airport locations. Or more bluntly, they’re price gouging becasue they think they can get away with it. There is currently an inquiry into this practise by the NSW parliament.

It is very possible and easy to walk from Wolli Creek train station to the international terminal at Sydney airport in less than half an hour.

First the map:


Fortunately there are no fences at Sydney airport waiting to trap you along this route. This makes getting in and out of Sydney airport easy.

The main thing about this route to remember is the loop. Walking to the airport, after travelling along the north side of the bridge, one loops down below at the first opportunity to continue to the airport.

The only possibly tricky part is to orient yourself when leaving Wolli Creek station. Exit the station from the exit closer to the lower platform and you will arrive at the starting point on the map above. Turn right out of the station to begin your walk.

The entire route is on a paved surface (partly on a joint pedestrian/bike path). I’ve only ever done it with a backpack, but it should be easy enough with luggage on wheels as well.

2013 Statistics

February 1, 2014

Countries visited: 10.
New: Denmark, Vatican City, Argentina, Brazil.

too far

Flights: 40
Total distance (great circles): 195,133km
Average flight length: 4878km
Longest flight: SFO-SYD 11937km
Shortest flight: MSY-BHM 517km
Airlines flown: 12
New: WN, SQ, HA, CZ, AR
Airports visited: 31

(a) I don’t have data for flight length in terms of time.
(b) Hopefully the headline figure of 195,133km will decrease in 2014.
(c) I don’t really feel that the Vatican City is a real country.
(d) I visited the old BKK in 1999. The airport code has shifted to the new airport in the interim.


Get every new post delivered to your Inbox.