# Chaitanya's Random Pages

## June 30, 2015

### The Pakistan heat wave of 2015

Filed under: Uncategorized — ckrao @ 11:39 am

This month a heatwave has killed over 1500 people in Pakistan, most of them in Karachi. Here are the temperatures recorded at Karachi airport at that time: note that the average for this time of year is 28-35°C with high humidity. Rarely does the temperature reach 39.5°C three days in a row but here it did so six days in a row plus there seemed to be no relief at night.

 Date 16-Jun 17-Jun 18-Jun 19-Jun 20-Jun 21-Jun 22-Jun 23-Jun 24-Jun Min (°C) 30 29.3 29.5 31 31.6 33 33 33 30.5 Max (°C) 36 38.5 39.5 40.5 44.8 42.5 42.5 41.2 37

Most of the dead were homeless and it was also during the time of Ramadan where fasting is observed during daylight hours. This and the recent heatwave in India are two of the three most fatal on the Indian subcontinent in recent times.

## June 22, 2015

### Places we see powers of 2

Filed under: mathematics — ckrao @ 11:44 am

Here are some obvious and less obvious places where we encounter the sequence $f(n) = 1,2,4,8,16,...$. Most of these come from the corresponding OEIS page.

• as a solution to the recurrence $f(n+1) = 2f(n), f(0) = 1$.
• the number of subsets of a n-element set: To each element there are two choices – to include it or not include it in the subset. Hence there are $2\times 2\times \ldots \times 2 = 2^n$ subsets.
• the sum of the numbers in the n’th row of Pascal’s triangle This is a consequence of the binomial theorem applied to $(1+1)^n = \sum_{i=0}^n \binom{n}{i}$.
• the sum of the coefficients of $(x+1)^n$, which is the sum of binomial coefficients
• the number of even or odd-sized subsets of an (n+1)-element set, i.e. $\sum_{i=0}^{\lfloor{(n+1)/2}\rfloor} \binom{n+1}{2i} = \sum_{i=0}^{\lfloor{n/2}\rfloor} \binom{n+1}{2i+1} = 2^n$, a consequence of the binomial theorem $(1-1)^n = \sum_{i=0}^n (-1)^i \binom{n}{i}$.
• each term in the sequence is the smallest natural number that is not the sum of any number of distinct earlier terms, an example of a sum-free sequence
• the sequence forms the set of every natural number that is not the sum of 2 or more consecutive positive integers: Such a sum has the form $a + (a+1) + \ldots + (a+ k) = (2a + k)(k+1)/2$. If this were a power of 2 then $(2a+k)$ and $(k+1)$ must both be powers of 2 greater than or equal to 2. But their difference $2a-1$ is odd, which is impossible for the difference of even powers of 2. Conversely if a natural number is not a power of two it is of the form $2^m d$ where $d$ is an odd number at least 3. Then $2^m d$ may be written as the sum of either $d$ consecutive positive integers with middle (mean) term $2^m$ (if $(d+1)/2 \leq 2^m$) or $2^{m+1}$ consecutive positive integers with mean $d/2$ (if $2^m < d/2$). For example, $48 = 2^4\times 3$ and $48 = 15 + 16 + 17$ while $44 = 2^2\times 11$ and $44 = 2+3+4+5+6+7+8+9$.
• the number of ordered partitions of $n+1$ is $2^n$: for example, the eight ordered partitions of 4 are: 1+1+1+1, 2+1+1, 1+2+1, 1+1+2, 2+2, 3+1, 1+3, 4 To see why this result is true, imagine $n+1$ items in a row. Imagine separating them with dividers so that the number of items between each divider gives us the ordered partition. For example with 4 items we may place a divider between the third and fourth item to give the partition 3+1. We have $n$ possible locations for dividers (between any adjacent items) and each location has a choice of being assigned to a divider or not. This leads to $2^n$ possible partitions. Alternatively, an ordered partition of $n+2$ may be derived inductively from an ordered partition of $n+1 = a_1 + \ldots + a_k$ by either forming $n+2 = 1 + a_1 + \ldots + a_k$ or $n+2 = (a_1+1) + a_2 + \ldots + a_k$. Also any ordered partition of $n+2$ has one of these forms as we may form from it an ordered partition of $n+1$ by either subtracting 1 from the first element of the partition (if it is greater than 1) or deleting the first element if it is 1. Hence the number of partitions doubles as $n+1$ is increased by 1 and for $n = 1$ we have the single partition.
• the number of permutations of ${1,2,...,n+1}$ with exactly one local maximum: for example, for $n=3$ we have the permutations 1234, 1243, 1342, 2341, 1432, 2431, 3421, 4321. Here we have the highest element $n+1$ somewhere and there are $2^n$ possible subsets of ${1,2,...,n}$ that we may choose to precede it. These elements must be in ascending order, while the elements after $n+1$ are in descending order to ensure exactly one local maximum at $n+1$. Hence the order of terms is determined once the subset is chosen and we have $2^n$ permutations.
• the number of permutations of $n+1$ elements where no element is more than one position to the right of its original place: for example, for $n=3$ the allowed permutations are 1234, 1243, 1324, 1423, 2134, 2143, 3124, 4123. This can be seen inductively: if $a_1a_2\ldots a_{n+1}$ is a valid permutation of n+1 elements, then $1(1+a_1)(1+a_2)\ldots (1+a_{n+1})$ and $(1+a_1)1(1+a_2)\ldots (1+a_{n+1})$ are valid permuations of n+2 elements. Also any valid (n+2) element permutation is of this form as it may be reduced to a valid (n+1) element permutation by deleting the 1 (which must occur in either the first or second position) and subtracting 1 from every other element. This describes a one to two mapping between valid permutations of n+1 and n+2 elements. Finally for 1 element there is $1 = 2^0$ allowed permutation, so the result follows by induction.

## May 31, 2015

### Test pace bowlers to have conceded 100 runs in an innings the most

Filed under: cricket,sport — ckrao @ 10:16 am

Below is a list of pace bowlers who have conceded 100 or more runs in an innings at least 14 times (* indicates active players).

 Name Tests Innings Bowled Wickets times conceded 100 runs innings per century Botham 102 168 383 31 5.42 Kapil Dev 131 227 434 25 9.08 Ntini 101 190 390 23 8.26 Hadlee 86 150 431 21 7.14 Caddick 62 105 234 20 5.25 Imran Khan 88 142 362 20 7.1 M Johnson* 64 123 283 20 6.15 Vaas 111 194 355 20 9.7 Lillee 70 132 355 19 6.95 McDermott 71 124 291 19 6.53 I Sharma* 61 107 187 18 5.94 Anderson* 104 194 401 17 11.41 Gough 58 95 229 17 5.59 Srinath 67 121 236 17 7.12 F Edwards 55 97 165 16 6.06 Lawson 46 78 180 16 4.88 Mohammad Sami 36 66 85 16 4.13 Sarfraz Nawaz 55 95 177 16 5.94 Hoggard 67 122 248 15 8.13 Lee 76 150 310 15 10 Martin 71 126 233 15 8.4 Morrison 48 76 160 15 5.07 Steyn* 78 147 396 15 9.8 Bedser 51 92 236 14 6.57 Z Khan 92 165 311 14 11.79

Here are the numbers for remaining pace bowlers with at least 200 test wickets (Ray Lindwall a stand-out here):

 Name Tests Innings Bowled Wickets times conceded 100 runs innings per century Waqar Younis 87 154 373 13 11.85 Harmison 63 115 226 13 8.85 Wasim Akram 104 181 414 12 15.08 McKenzie 60 113 246 12 9.42 Cairns 62 104 218 12 8.67 Walsh 132 242 519 11 22 Sobers (not always pace) 93 159 235 11 14.45 Snow 49 93 202 11 8.45 Broad 79 143 285 11 13 Donald 72 129 330 10 12.9 Pollock 108 202 421 10 20.2 Willis 90 165 325 10 16.5 Hughes 53 97 212 10 9.7 Thomson 51 90 200 10 9 McGrath 124 243 563 9 27 Trueman 67 127 307 9 14.11 Statham 70 129 252 8 16.13 Flintoff 79 137 226 8 17.13 Streak 65 102 216 8 12.75 Roberts 47 90 202 8 11.25 Morkel 62 117 217 7 16.71 Gillespie 71 137 259 6 22.83 Marshall 81 151 376 5 30.2 Holding 60 113 249 5 22.6 Garner 58 111 259 4 27.75 Kallis 166 272 292 4 68 Lindwall 61 113 228 1 113

The numbers are generally higher for spin bowlers – the top six centurions overall are all spin bowlers:

Muralitharan (61), Kumble (57), Harbhajan Singh (43), Warne (40), Kaneria (39), Vettori (34).

## May 24, 2015

### A collection of proofs of Ptolemy’s Theorem

Filed under: mathematics — ckrao @ 11:39 am

Here we collect some proofs of the following nice geometric result.

If $ABCD$ is a quadrilateral, then $AB.CD + BC.DA \geq AC.BD$ with equality if $ABCD$ is cyclic.

In words, the sum of the product of the lengths of the opposite sides of a quadrilateral is at least the product of the lengths of its diagonals.

The equality for a cyclic quadrilateral is known as Ptolemy’s theorem while the more general inequality applying to any quadrilateral is called Ptolemy’s inequality. Many of the proofs below that establish Ptolemy’s theorem can be modified slightly to prove the inequality.

## Proofs of Ptolemy’s Theorem

Proof 1:

Choose point $P$ on line $CD$ extended beyond $D$ as shown so that $\angle DAP = \angle BAC$.

Then

a) $\triangle ABC \sim \triangle ADP$ ($\angle ABC = \angle ADP$ and $\angle BAC = \angle DAP$).

b) $\triangle BAD \sim \triangle CAP$ ($\angle BAD = \angle CAP$ and $\angle ADB = \angle APC$).

From a) $BC.DA = BA.DP$ so $AB.CD + BC.DA = AB(CD + DP) = AB.CP = AC.BD$ by b) and we are done.

Proof 2: (a slightly different choice of constructed point)

Let $K$ be the point on $AC$ so that $\angle CBK = \angle ABD$.

Then

a) $\triangle ABD \sim \triangle KBC$ ($\angle ABD = \angle KBC$ and $\angle BDA = \angle BCK$) so $KC = AD.BC/BD$.

b) $\triangle ABK \sim \triangle DBC$ ($\angle ABK = \angle DBC$ and $\angle KAB = \angle CDB$) so $AK = DC.AB/DB$.

Adding the two gives $AC = (AD.BC + DC.AB)/BD$ or $AC.BD = AD.BC + DC.AB$ as required.

Proof 3: (ref: http://mathafou.free.fr/themes_en/kptol.html)

Let the diagonals $AC, BD$ intersect at $P$ and construct $E$ on the circumcircle so that $CE$ is parallel to $BD$. A short angle chase shows that $BCED$ is an isosceles trapezium.

Then $\sin \angle ABE = \sin \angle ACE = \sin \angle BPC$ (angles on common arc $AE$ and using $BD \parallel CE$). Also triangles $BDE$ and $BDC$ have the same base and height and hence the same area.

Hence the area of ABCD is the sum of the areas of triangles ABE and ADE, or

\begin{aligned} & \frac{1}{2} \left( AB.BE\sin \angle ABE + AD.DE\sin \angle ADE \right)\\ &= \frac{1}{2} \left( AB.BE\sin \angle ABE + AD.DE\sin \angle ABE \right) \quad \text{as } \angle ABE \text{ and } \angle ADE \text{ are supplementary }\\ &= \frac{1}{2} \left( AB.BE+ AD.DE \right)\sin \angle ABE\\ &= \frac{1}{2} \left(AB.CD + AD.BC \right)\sin \angle ABE, \quad (1) \end{aligned}

where the last step follows from $BDEC$ being an isosceles trapezium.

But also this area is $\frac{1}{2} AC.BD\sin \angle BPC$ and recall from above that $\sin \angle BPC = \sin \angle ABE$. Therefore equating this with (1) we end up with $AB.CD + AD.BC = AC.BD$.

Proof 4 (ref: [1])

Here three of the triangles of the cyclic quadrilateral are scaled to fit together to form a parallelogram. Namely,

• $\triangle ABD$ is scaled by $AC$,
• $\triangle ABC$ is scaled by $AD$,
• $\triangle ACD$ is scaled by $AB$.

A simple angle chase based on the coloured angles shown reveals that a parallelogram is formed when the triangles are joined together. Ptolemy’s theorem then follows from equating two of its opposite side lengths.

Proof 5: (from here)

Using the cosine rule in triangles $ABC$ and $ADC$ respectively gives

$AC^2 = AB^2 + BC^2 - 2AB.BC\cos \angle ABC = AD^2 + CD^2 - 2AD.CD\cos \angle ADC.$

Since $\angle ABC + \angle ADC = 180^{\circ}$, this becomes

\begin{aligned} AB^2 + BC^2 - 2AB.BC\cos \angle ABC &= AD^2 + CD^2 + 2AD.CD\cos \angle ABC\\ \Rightarrow \cos \angle ABC &= \frac{AB^2 + BC^2 - AD^2 - CD^2}{2(AB.BC + AD.CD)}. \end{aligned}

Hence

\begin{aligned} AC^2 &= AB^2 + BC^2 - 2AB.BC\cos \angle ABC\\ &= AB^2 + BC^2 - 2AB.BC \frac{AB^2 + BC^2 - AD^2 - CD^2}{2(AB.BC + AD.CD)}\\ &= \frac{(AB^2+BC^2)(AB.BC + AD.CD) - AB.BC(AB^2 + BC^2 - AD^2 - CD^2)}{AB.BC + AD.CD}\\ &= \frac{(AB^2+BC^2)(AD.CD) + AB.BC(AD^2 + CD^2)}{AB.BC + AD.CD}\\ &= \frac{AB.AD(AB.CD+BC.AD) + BC.CD(BC.AD+AB.CD)}{AB.BC + AD.CD}\\ &= \frac{(AB.AD+BC.CD)(AB.CD+BC.AD)}{AB.BC + AD.CD}.\\ \end{aligned}

By a similar argument we may write

$\displaystyle BD^2 = \frac{(AB.BC + AD.CD)(BC.AD+AB.CD)}{BC.CD + AB.AD}$.

Multiplying these last two equations by each other and taking the square root gives

$\displaystyle AC.BD = AB.CD + BC.AD,$

which is Ptolemy’s theorem.

Proof 6 (via this):

Let the angles subtended by $AB, BC, CD$ respectively be $\alpha, \beta, \gamma$ and let the circumradius of the quadrilateral be $R$. By the sine rule $AB = 2R \sin \alpha, BC = 2R\sin \beta, CD = 2R \sin \gamma$, $AD = 2R\sin (\alpha + \beta + \gamma )$, $AC = 2R \sin (\alpha + \beta)$, $BD = 2R \sin (\beta + \gamma )$. Then the equality to be proved is equivalent to

$\displaystyle \sin (\alpha + \beta)\sin (\beta + \gamma) = \sin \alpha \sin \gamma + \sin \beta \sin (\alpha + \beta + \gamma).$

But we have

\begin{aligned} & \sin (\alpha + \beta)\sin (\beta + \gamma)\\ &= (\sin \alpha \cos \beta + \cos \alpha \sin \beta)(\sin \beta \cos \gamma + \cos \beta \sin \gamma)\\ &= \sin \alpha \sin \beta \cos \beta \cos \gamma + \sin \alpha \cos^2 \beta \sin \gamma + \cos \alpha \sin^2 \beta \cos \gamma + \cos \alpha \sin \beta \cos \beta \sin \gamma\\ &= \sin \alpha \sin \beta \cos \beta \cos \gamma + \sin \alpha (1- \sin^2 \beta ) \sin \gamma + \cos \alpha \sin^2 \beta \cos \gamma + \cos \alpha \sin \beta \cos \beta \sin \gamma\\ &= \sin \alpha \sin \gamma + \sin \beta (\sin \alpha \cos \beta \cos \gamma - \sin \alpha \sin \beta \sin \gamma + \cos \alpha \sin \beta \cos \gamma + \cos \alpha \cos \beta \sin \gamma )\\ &= \sin \alpha \sin \gamma + \sin \beta (\sin(\alpha + \beta ) \cos \gamma + \cos (\alpha + \beta ) \sin \gamma )\\ &= \sin \alpha \sin \gamma + \sin \beta \sin (\alpha + \beta + \gamma ), \end{aligned}

as required.

## Proofs of Ptolemy’s Inequality (all make use of the triangle inequality)

Proof 7:

Denote the points $A, B, C, D$ by vectors or complex numbers $a, b, c, d$. Then we have the equality

$\displaystyle (a-b).(c-d) + (a-d).(b-c) = (a-c).(b-d).$

Applying the modulus (length) to both sides and then the triangle inequality leads to

$\displaystyle |(a-b).(c-d)| + |(a-d).(b-c)| \geq |(a-c).(b-d)|,$

which is Ptolemy’s inequality.

Proof 8: (ref: [2])

Place the origin at the point $D$ so that $A, B, C$ are represented by the vectors $a, b, c$ respectively. Let $a' = a/|a|^2, b' = b/|b|^2, c' = c/|c|^2$. Then

\begin{aligned} |a'-b'|^2 &= \left| \frac{a}{|a|^2} - \frac{b}{|b|^2}\right|^2\\ &= \frac{|a|^2}{|a|^4} + \frac{|b|^2}{|b|^4} - 2\frac{\langle a, b \rangle}{|a|^2|b|^2}\\ &= \frac{|b|^2 + |a|^2 - 2\langle a, b \rangle}{|a|^2|b|^2}\\ &= \frac{|a-b|^2}{|a|^2|b|^2}. \end{aligned}

Similarly, $|b'-c'| = \frac{|b-c|}{|b||c|}$ and $|c'-a'| = \frac{|c-a|}{|c||a|}$. By the triangle inequality, $\displaystyle |a'-b'| \leq |b'-c'| + |c'-a'|$, or in other words,

\begin{aligned} \frac{|a-b|}{|a||b|} &\leq \frac{|b-c|}{|b||c|} + \frac{|c-a|}{|c||a|}\\ \Rightarrow |a-b||c| \leq |b-c||a| + |c-a||b|, \end{aligned}

which is another way of writing Ptolemy’s inequality.

Proof 9: (inversion)

Recall that under inversion under a point $P$ a circle passing through $P$ maps to a line. If $X, Y$ are points on the circle mapping to $X, Y'$ respectively under inversion in a circle of radius $R$ centred at $P$, then

$\displaystyle X'Y' = R^2.XY/(PX.PY).$

To see this, since $XP.X'P = YP.Y'P = R^2$ by the definition of the inverse, $XP/YP = Y'P/X'P$. This together with the fact that angle $P$ is common implies that triangles $XPY$ and $Y'PX'$ are similar. This gives us the relationship $X'Y' = YX.PY'/PX = XY.R^2/(PX.PY)$ as desired.

For our quadrilateral $ABCD$ apply an inversion centred at $D$ with radius $R$. Then $A, B, C$ map to points $A', B', C'$ which are collinear if $ABCD$ is cyclic. Using the result above $A'B' = AB.R^2/(DA.DB)$ and similarly $A'C' = AC.R^2/(DA.DC)$ and $B'C' = BC.R^2/(DB.DC)$. By the triangle inequality $A'C' \leq AB' + BC'$ and so this becomes

\begin{aligned} \frac{AC.R^2}{DA.DC} &\leq \frac{AB.R^2}{DA.DB} + \frac{BC.R^2}{DB.DC}\\ \Rightarrow AC.DB &\leq AB.DC + BC.DA, \end{aligned}

which is Ptolemy’s inequality.

Proof 10: (ref: [3])

Construct $E$ on $AC$ so that $EC = BC$, then draw $F$ on $CD$ with $EF \parallel AD$. Finally rotate $\triangle FEC$ about $C$ to map to $\triangle F'BC$.

Then $F'B = FE$ and by similarity of triangles $ACD$ and $ECF$, $FE/DA = CE/CA = CB/CA$ so that

(a) $F'B = FE = AD.BC/CA$

Secondly, $\triangle DF'C \sim ABC$ as $F'C/BC = FC/EC = DC/AC$ and $\angle F'CD = \angle BCA$. This gives

(b) $DF' = AB.CD/AC$

Adding (a) and (b) and applying the triangle inequality,

$\displaystyle BD \leq BF' + F'D = (AD.BC + AB.CD)/AC,$

from which

$\displaystyle AC.BD \leq AD.BC + AB.CD$

which is Ptolemy’s inequality.

#### References

[1] A. Bogomolny, Ptolemy Theorem – Proof Without Words from Interactive Mathematics Miscellany and Puzzles
http://www.cut-the-knot.org/proofs/PtolemyTheoremPWW.shtml, Accessed 30 May 2015

[2] W.H. Greub, Linear Algebra, Springer Science & Business Media, 2012 (p 190).

[3] C. Alsina, R. B. Nelsen, When Less is More: Visualizing Basic Inequalities, MAA, 2009.

## April 30, 2015

### Number of countries that have abolished the death penalty by year

Filed under: Uncategorized — ckrao @ 11:36 am

By 1978 only 20 or so countries had abolished the death penalty but over 80 countries have followed suit since. Around 36 countries still retain capital punishment in law and practice with the remaining 50+ countries inactive in its use.

## April 19, 2015

### Distances to a line from vertices of a regular polygon

Filed under: mathematics — ckrao @ 11:01 am

If we take a regular polygon and any line through its centre, then the sum of the squares of the distances from the vertices of the polygon to the line is independent of the orientation of the line or polygon. For example, in the following two diagrams, the sum of the squares of the lengths of the 5 blue line segments is the same.

Such a result is amenable to a proof via complex numbers. Without losing generality the real number line may be our line of interest and the points of the n-sided polygon may be described by the complex numbers $z_k := R\exp(2\pi i k / n + i \phi)$ for $k = 0, 1, ..., n-1$, where $R$ is the circumradius of the polygone and $\phi$ is an arbitrary real-numbered phase. Then the squared distance from a point to the real line is $R^2\cos^2 (2\pi k / n + \phi) = \left(z_k + \overline{z_k})\right)^2/4$ where $\overline{z_k} = R^2/z_k$. Summing this over $k$ gives our sum of squared distances as

\begin{aligned} \frac{1}{4} \sum_{k=0}^{n-1} \left(z_k + \overline{z_k}\right)^2 &= \frac{1}{4} \sum_{k=0}^{n-1} \left(z_k^2 + 2z_k\overline{z_k} + \overline{z_k}^2\right)\\ &= \frac{1}{4} \sum_{k=0}^{n-1} \left(z_k^2 + 2R^2 + \overline{z_k}^2\right)\\ &= \frac{nR^2}{2} + \frac{1}{4} \left(\sum_{k=0}^{n-1} z_k^2 + \sum_{k=0}^{n-1} \overline{z_k}^2\right).\quad\quad(1)\end{aligned}

Each of these sums is geometric in nature so can be simplified. For example,

\begin{aligned}\sum_{k=0}^{n-1} z_k^2 &= \sum_{k=0}^{n-1} R^2\exp(4\pi i k / n + 2i\phi)\\&= R^2 \exp(2i\phi)\sum_{k=0}^{n-1} \exp(4\pi i k / n)\\ &= \begin{cases}R^2 \exp(2i\phi)\frac{1-\exp(4\pi i n / n)}{1- \exp(4\pi i / n)}, & \text{if }\exp(4\pi i/n)\neq 1 \\ R^2 \exp(2i\phi)n, & \text{if }\exp(4\pi i/n)= 1 \end{cases}\\ &= R^2 \exp(2i\phi)\frac{1-\exp(4\pi i)}{1- \exp(4\pi i / n)}, \quad \text{as }n \geq 3\text{ means }\exp(4\pi i/n)\neq 1\\ & = 0.\quad\quad(2)\end{aligned}

Similarly, $\sum_{k=0}^{n-1} \overline{z_k}^2 = 0$, being the conjugate of (2), and so from (1) our required sum of squared distances is $nR^2/2$, which is independent of $\phi$ proving the orientation independence.

More generally,

\begin{aligned}\sum_{k=0}^{n-1} z_k^m &= R^m\exp(i m \phi) \sum_{k=0}^{n-1} \exp(2\pi i k m / n) \\ &= \begin{cases} R^m\exp(i m \phi) n, & \text{if }m/n \text{ is an integer}\\ 0, & \text{otherwise}\end{cases}.\quad\quad(3)\end{aligned}

This enables us to generalise the above result to the following.

Given a regular n-sided polygon and line through its circumcentre, the sum of the mth power signed distances from the vertices of the polygon to the line is independent of the orientation when n > m.

By signed distances, we mean that points on different sides of the line will have distances of opposite sign.

To prove this, we define $z_k := R\exp(2\pi i k / n + i \phi)$ as before and this time our desired sum is

\begin{aligned}\sum_{k=0}^{n-1} \left(\frac{z_k + \overline{z_k}}{2}\right)^m &= \frac{1}{2^m}\sum_{k=0}^{n-1} \sum_{j=0}^m z_k^j \overline{z_k}^{m-j} \binom{m}{j}\\ &= \frac{1}{2^m}\sum_{k=0}^{n-1} \sum_{j=0}^m z_k^j (R^2/z_k)^{m-j}\binom{m}{j}\\ &= \frac{1}{2^m}\sum_{k=0}^{n-1} \sum_{j=0}^m z_k^{2j-m} (R^2)^{m-j}\binom{m}{j}\\ &= \frac{1}{2^m} \sum_{j=0}^m (R^2)^{m-j}\binom{m}{j}\sum_{k=0}^{n-1}z_k^{2j-m}. \quad\quad(4)\\ \end{aligned}

By (3), $\sum_{k=0}^{n-1}z_k^{2j-m} = 0$ unless $(2j-m)/n$ is an integer. For $m < n$ this can only occur in the case $j = m/2$ (if $m$ is even). Hence (4) becomes

\begin{aligned}\sum_{k=0}^{n-1} \left(\frac{z_k + \overline{z_k}}{2}\right)^m &= \begin{cases} \left(\frac{R}{2}\right)^m\binom{m}{m/2}n, & \text{if }m\text{ is even,}\\ 0, & \text{otherwise.}\end{cases}\end{aligned} \quad\quad(5)

Finally, what if the line does not pass through the centre of the polygon but is instead at distance $d$ from the centre?

This corresponds to replacing $\left(\frac{z_k + \overline{z_k}}{2}\right)$ with $\left(\frac{z_k + \overline{z_k}}{2}-d\right)$ in the above calculations and we find

\begin{aligned} \sum_{k=0}^{n-1} \left(\frac{z_k + \overline{z_k}}{2}-d\right)^m &= \sum_{k=0}^{n-1} \sum_{j = 0}^m\left(\frac{z_k + \overline{z_k}}{2}\right)^j (-d)^{m-j} \binom{m}{j}\\ &= \sum_{j = 0}^m (-d)^{m-j} \binom{m}{j}\sum_{k=0}^{n-1} \left(\frac{z_k + \overline{z_k}}{2}\right)^j\\ &= \sum_{i = 0}^{\lceil{m/2}\rceil} (-d)^{m-2i} \binom{m}{2i} \left(\frac{R}{2}\right)^{2i}\binom{2i}{i} n\\ &= (-1)^m n \sum_{i = 0}^{\lceil{m/2}\rceil} \frac{m!}{(m-2i)!i!i!}d^{m-2i}\left(\frac{R}{2}\right)^{2i}.\quad\quad(6)\end{aligned}

Once again we find the sum is independent of the orientation of the line or polygon. In the particular case of $m=2$ this sum is $nR^2/2 + nd^2$, which also may be obtained by an application of the parallel axis theorem.

## March 31, 2015

### 2015 ICC Cricket World Cup Attendances

Filed under: cricket,sport — ckrao @ 10:26 am

The 2015 ICC Cricket World Cup held in Australia and New Zealand saw over one million people attend its 49 matches, with attendances shown below, taken from here.

If we compare these numbers with the ground capacities shown below (largely taken from ground pages at ESPNcricinfo), we can make a graph of ground occupancy for each game.

 Ground Capacity Melbourne Cricket Ground 95,000 Adelaide Oval 50,000 Sydney Cricket Ground 44,000 Eden Park, Auckland 41,000 Gabba, Brisbane 37,000 Westpac Stadium, Wellington 33,500 WACA Ground, Perth 24,500 Hagley Oval, Christchurch 18,000 Blundstone Arena, Hobart 16,200 Manuka Oval, Canberra 12,000 Seddon Park, Hamilton 12,000 McLean Park, Napier 10,500 Saxton Oval, Nelson 6,000 University Oval, Dunedin 5,000

We see that most of the first 10 matches (up to the wash-out between Australia and Bangladesh) were close to capacity, while some of the later matches leading up the quarter final had attendances well under 50% of capacity.

Finally, the table below shows the total attendances for games involving each country, as well as average ground occupancy percentages for their matches.

 Team total attendance average % occupancy #matches attendance per match New Zealand 277,024 94.2 9 30,780 Australia 360,086 83.7 8 45,011 India 288,888 73.8 8 36,111 South Africa 223,803 65.1 8 27,975 Scotland 39,518 63.7 6 6,586 Afghanistan 48,847 63.1 6 8,141 West Indies 96,788 60.4 7 13,827 Sri Lanka 138,893 58.6 7 19,842 England 166,221 57.8 6 27,704 Bangladesh 118,337 57.6 6 19,723 Pakistan 136,419 51.3 7 19,488 Ireland 42,352 47.8 6 7,059 Zimbabwe 60,490 47.4 6 10,082 UAE 25,138 23.8 6 4,190

Australia had a lowish attendance for its game against Afghanistan while New Zealand had every match at least 86% full.

## March 28, 2015

### A triangle centre arising from central projections

Filed under: mathematics — ckrao @ 10:23 pm

In this recent post, the following figure was formed by considering two triangular regions in three-dimensional space, where $a,b,c > 0$:

$\displaystyle ax + by + cz = 1, 0 \leq x, 0 \leq y, 0 \leq z,$

$\displaystyle ax + by + cz = 1, x \leq 1, y \leq 1, z \leq 1.$

The intersection of the two triangles is the cross-section of a cube, but in this post we wish to explore further the centre of similarity of the two triangles.

The line joining $(1/a, 0, 0)$ and $((1-b-c)/a, 1, 1)$ satisfies

\begin{aligned} (x,y,z) &= (1/a, 0, 0) + t\left[ ((1-b-c)/a, 1, 1)-(1/a, 0, 0) \right]\\ &= (t,t,(1-ta-tb)/c), t \in \mathbb{R}. \end{aligned}

Similarly, the line joining $(0,1/b,0)$ and $(1,(1-a-c)/b,1)$ satisfies

$(x,y,z) = (u, (1-ua-uc)/b, u), u \in \mathbb{R}.$

Equating the two expressions gives $t = u$ and $t = (1-ta-tc)/b$ from which $t = u = 1/(a+b+c)$. The point of intersection is therefore at $(t,t,(1-ta-tb)/c) = (1/(a+b+c), 1/(a+b+c), 1/(a+b+c))$. By symmetry of this expression the line joining $(0,0,1/c)$ and $(1,1,(1-a-b)/c)$ also passes through this point. This is the point on the plane $ax + by + cz = 1$ that is equi-distant from the xy-, yz- and xz- coordinate planes. It is also the central projection of the origin onto the plane along the vector parallel to $(1,1,1)$.

In terms of the original two triangles this point is neither the centroid, incentre, orthocentre, circumcentre nor other commonly encountered triangle centre. Let us find the barycentric coordinates of this point (call it $S$) in terms of the triangle with vertices at $A(1/a,0,0), B(0,1/b,0), C(0,0,1/c)$.

The first barycentric coordinate will be the ratio of the area of $\triangle SBC$ to the area of $\triangle ABC$. Since $B$ and $C$ have the same x-coordinate, this will be the ratio of the x-coordinates of $S$ to $A$, which is $1/(a+b+c) / (1/a) = a/(a+b+c)$. By symmetry it follows that the barycentric coordinates have the attractive form

$\displaystyle \frac{a}{a+b+c} : \frac{b}{a+b+c} : \frac{c}{a+b+c}.$

Let the side lengths of $\triangle ABC$ be $BC = x, CA = y, AB = z$. Then by Pythagoras’ theorem, $x^2 = 1/b^2 + 1/c^2, y^2 = 1/a^2 + 1/c^2, z^2 = 1/a^2 + 1/b^2$. Hence

$x^2 + y^2 - z^2 = 2/c^2$.

By the cosine rule, $x^2 + y^2 - z^2 = 2xy \cos C$ (where $C = \angle ACB$) which equals $2/c^2$ from the above expression. Therefore $c^2 = \sec C/xy$ and similarly we obtain $a^2 = \sec A/yz, b^2 = \sec B/xz$. Then

\begin{aligned} \frac{a}{a+b+c} &= \frac{\sqrt{\sec A}/\sqrt{yz}}{\sqrt{\sec B}/\sqrt{xz} + \sqrt{\sec C}/\sqrt{xy} + \sqrt{\sec A}/\sqrt{yz}}\\ &= \frac{\sqrt{x\sec A}}{\sqrt{x\sec A} + \sqrt{y\sec B} + \sqrt{z\sec C}}.\end{aligned}

By the sine rule, $x = 2R\sin A$ ($R$ being the circumradius of $\triangle ABC$) from which $x \sec A = 2R\sin A/\cos A = 2R\tan A$. Hence the barycentric coordinates of $S$ may be written in non-normalised form as

$\displaystyle {\sqrt{\tan A}} : {\sqrt{\tan B}} : {\sqrt{\tan C}}.$

Comparing this with the coordinates of the orthocentre $\tan A : \tan B : \tan C$, the point $S$ is known as the square root of the orthocentre (see Theorem 1 of [1]). Note that the real existence of the point requires $\triangle ABC$ to be acute, which it is when $a,b,c > 0$. A geometric construction of the square root of a point is given in Section 8.1.2 of [2].

#### References

[1] Miklós Hoffmann, Paul Yiu. Moving Central Axonometric Reference Systems, Journal for Geometry and Graphics, Volume 9 (2005), No. 2, 127–134.

[2] Paul Yiu. “Introduction to the Geometry of the Triangle”. http://math.fau.edu/Yiu/GeometryNotes020402.pdf

## February 28, 2015

### Large US+Canada box office openings

Filed under: movies and TV — ckrao @ 1:38 pm

The site boxofficemojo.com lists the opening weekend grosses of movies in the US and Canada dating back to the early 1980s. Via this page on top opening weekends, I worked out movies that at their time of release attained the n’th highest grossing opening weekend where n ranges from 1 to 10 (all dollar amounts in $US). It gives a perspective on how big some movies were at the time. It also shows how movie grosses have grown through inflation and more frontloading over the years. Note that only opening weekends are shown here – for example Superman’s third weekend was once the largest grossing weekend at the time, but is not listed here. n=1 (i.e. current and previous record-breaking openings):  Title Opening Date (mm/dd/yyyy) Marvel’s The Avengers$207,438,708 5/4/2012 Harry Potter and the Deathly Hallows Part 2 $169,189,427 7/15/2011 The Dark Knight$158,411,483 7/18/2008 Spider-Man 3 $151,116,516 5/4/2007 Pirates of the Caribbean: Dead Man’s Chest$135,634,554 7/7/2006 Spider-Man $114,844,116 5/3/2002 Harry Potter and the Sorcerer’s Stone$90,294,621 11/16/2001 The Lost World: Jurassic Park $72,132,785 5/23/1997 Batman Forever$52,784,433 6/16/1995 Jurassic Park $47,026,828 6/11/1993 Batman Returns$45,687,711 6/19/1992 Batman $40,489,746 6/23/1989 Ghostbusters II$29,472,894 6/16/1989 Indiana Jones and the Last Crusade $29,355,021 5/24/1989 Beverly Hills Cop II$26,348,555 5/20/1987 Indiana Jones and the Temple of Doom $25,337,110 5/23/1984 Return of the Jedi$23,019,618 5/25/1983 Star Trek II: The Wrath of Khan $14,347,221 6/4/1982 Superman II$14,100,523 6/19/1981 Star Trek: The Motion Picture $11,926,421 12/7/1979 Every Which Way But Loose$10,272,294 12/20/1978

n=2 (i.e. the second largest opening at the time)

 Title Opening Date Iron Man 3 $174,144,585 5/3/2013 Star Wars: Episode III – Revenge of the Sith$108,435,841 5/19/2005 Shrek 2 $108,037,878 5/19/2004 The Matrix Reloaded$91,774,413 5/15/2003 Planet of the Apes (2001) $68,532,960 7/27/2001 The Mummy Returns$68,139,035 5/4/2001 Star Wars: Episode I – The Phantom Menace $64,820,970 5/19/1999 Independence Day$50,228,264 7/3/1996 Lethal Weapon 3 $33,243,086 5/15/1992 Terminator 2: Judgment Day$31,765,506 7/3/1991 Rocky III $12,431,486 5/28/1982 The Cannonball Run$11,765,654 6/19/1981 Smokey and the Bandit II $10,883,835 8/15/1980 The Empire Strikes Back$10,840,307 6/20/1980

n=3:

 Title Opening Date The Dark Knight Rises $160,887,295 7/20/2012 The Hunger Games$152,535,747 3/23/2012 The Twilight Saga: New Moon $142,839,137 11/20/2009 Shrek the Third$121,629,270 5/18/2007 Harry Potter and the Prisoner of Azkaban $93,687,367 6/4/2004 Harry Potter and the Chamber of Secrets$88,357,488 11/15/2002 Star Wars: Episode II – Attack of the Clones $80,027,814 5/16/2002 Hannibal$58,003,121 2/9/2001 Mission: Impossible II $57,845,297 5/24/2000 Toy Story 2$57,388,839 11/24/1999 Austin Powers: The Spy Who Shagged Me $54,917,604 6/11/1999 Men in Black$51,068,455 7/2/1997 The Lion King $40,888,194 6/24/1994 Rambo: First Blood Part II$20,176,217 5/22/1985 Star Trek III: The Search for Spock $16,673,295 6/1/1984 n=4:  Title Opening Date X-Men: The Last Stand$102,750,665 5/26/2006 Harry Potter and the Goblet of Fire $102,685,961 11/18/2005 X2: X-Men United$85,558,731 5/2/2003 Austin Powers in Goldmember $73,071,188 7/26/2002 Rush Hour 2$67,408,222 8/3/2001 Pearl Harbor $59,078,912 5/25/2001 Mission: Impossible$45,436,830 5/22/1996 Twister $41,059,405 5/10/1996 Back to the Future Part II$27,835,125 11/22/1989 Rocky IV $19,991,537 11/27/1985 Beverly Hills Cop$15,214,805 12/5/1984 Jaws 3-D $13,422,500 7/22/1983 Superman III$13,352,357 6/17/1983

n=5:

 Title Opening Date The Twilight Saga: Breaking Dawn Part 1 $138,122,261 11/18/2011 Iron Man 2$128,122,480 5/7/2010 Pirates of the Caribbean: At World’s End $114,732,820 5/25/2007 How the Grinch Stole Christmas$55,082,330 11/17/2000 Interview with the Vampire $36,389,705 11/11/1994 Home Alone 2: Lost in New York$31,126,882 11/20/1992 Bram Stoker’s Dracula $30,521,679 11/13/1992 Star Trek IV: The Voyage Home$16,881,888 11/26/1986 The Best Little Whorehouse in Texas $11,874,268 7/23/1982 E.T.: The Extra-Terrestrial$11,835,389 6/11/1982

n=6:

 Title Opening Date The Hunger Games: Catching Fire $158,074,286 11/22/2013 Harry Potter and the Deathly Hallows Part 1$125,017,372 11/19/2010 Alice in Wonderland (2010) $116,101,023 3/5/2010 The Passion of the Christ$83,848,082 2/25/2004 Monsters, Inc. $62,577,067 11/2/2001 X-Men$54,471,475 7/14/2000 Ace Ventura: When Nature Calls $37,804,076 11/10/1995 Robin Hood: Prince of Thieves$25,625,602 6/14/1991 Total Recall $25,533,700 6/1/1990 Teenage Mutant Ninja Turtles$25,398,367 3/30/1990 Ghostbusters $13,578,151 6/8/1984 Staying Alive$12,146,143 7/15/1983

n=7:

 Title Opening Date Transformers: Revenge of the Fallen $108,966,307 6/24/2009 Spider-Man 2$88,156,227 6/30/2004 Batman and Robin $42,872,605 6/20/1997 Lethal Weapon 2$20,388,800 7/7/1989 Star Trek V: The Final Frontier $17,375,648 6/9/1989 n=8:  Title Opening Date The Twilight Saga: Breaking Dawn Part 2$141,067,634 11/16/2012 The Lord of the Rings: The Return of the King $72,629,713 12/17/2003 Godzilla$44,047,541 5/20/1998 The Flintstones $29,688,730 5/27/1994 Gremlins$12,511,634 6/8/1984

n=9:

 Title Opening Date Finding Nemo $70,251,710 5/30/2003 The Mummy$43,369,635 5/7/1999 Deep Impact $41,152,375 5/8/1998 n=10:  Title Opening Date Toy Story 3$110,307,189 6/18/2010 Indiana Jones and the Kingdom of the Crystal Skull $100,137,835 5/22/2008 Iron Man$98,618,668 5/2/2008 Dick Tracy \$22,543,911 6/15/1990

(To create the above lists the movie lists in decreasing order of gross were pasted into Excel and the opening weekend date was converted to a number by creating a new column with formula =–TEXT(,”mm/dd/yyyy”). This was then converted to a rank by a countif formula to count the number of occurrences with higher gross that predated each movie. Finally a filter was applied to select ranks 1 to 10.)

## February 27, 2015

### Cross sections of a cube

Filed under: mathematics — ckrao @ 9:59 pm
When a plane intersects a cube there is a variety of shapes of the resulting cross section.
• a single point (a vertex of the cube)
• a line segment (an edge of the cube)
• a triangle (if three adjacent faces of the cube are intersected)
• a parallelogram (if two pairs of opposite faces are intersected – this includes a rhombus or rectangle)
• a trapezium (if two pairs of
• a pentagon (if the plane meets all but one face of the cube)
• a hexagon (if the plane meets all faces of the cube)

The last five of these (the non-degenerate cases) are illustrated below and at http://cococubed.asu.edu/images/raybox/five_shapes_800.png . Some are demonstrated in the video below too.

One can use [1] to experiment interactively with cross sections given points on the edges or faces, while [2] shows how to complete the cross section geometrically if one is given three points on the edges.

Let us be systematic in determining properties of the cross sections above. Firstly, if the plane is parallel to an edge (any of four parallel edges), the cross section can be seen to be a line or rectangle with the longer dimension of length at most $\sqrt{2}$ times the other. That rectangle becomes a square if the plane is parallel to a face.

If the plane is not parallel to a face, we may set up a coordinate system where a unit cube is placed in the first octant aligned with the coordinate axes and the normal to the plane has positive x, y and z coordinates. In other words, we may assume the plane has equation $ax + by + cz = 1$ and intercepts at $(1/a,0,0), (0,1/b,0)$ and $(0,0,1/c)$, where $a, b, c$ are positive.

The cross section satisfies $ax + by + cz = 1$ and the inequalities $0 \leq x \leq 1$, $0 \leq y \leq 1$ and $0 \leq z \leq 1$. This can be considered the intersection of the two regions

$\displaystyle ax + by + cz = 1, 0 \leq x, 0 \leq y, 0 \leq z,$

$\displaystyle ax + by + cz = 1, x \leq 1, y \leq 1, z \leq 1,$

each of which is an acute-angled triangle in the same plane (acute because one can show that the sum of the squares of any two sides is strictly greater than the square of the third side). Note that the triangles have parallel corresponding sides, being bounded by the pairs of parallel faces of the cube $x = 0, x=1, y = 0, y= 1, z=0, z=1$. Hence the two triangles are oppositely similar with a centre of similarity.

The following diagram shows the coordinates of the vertices of the two triangles, which in this case intersect in a hexagon.

The centre of similarity of the two triangles is the intersection of two lines joining corresponding sides – this can be found to be the point $(1/(a+b+c), 1/(a+b+c), 1/(a+b+c))$, which is the intersection of the unit cube’s diagonal from the origin (to $(1,1,1)$) and the plane $ax + by + cz = 1$.

Side lengths of the triangles and distances between corresponding parallel sides may be found by Pythagoras’ theorem and are shown below for one pair of corresponding sides (the remaining lengths can be found by cyclically permuting $a,b,c$).

To sum up, all of the possible cross sections of a cube where the plane is not parallel to an edge can be described by the intersection of two oppositely similar triangles with corresponding sides parallel.

The type of polygon obtained depends on which vertices of the figure below are selected, as determined by the values of $a,b,c$.

In this figure a vertex for the cross-sectional polygon is chosen if the constraint associated with it is satisfied. A red vertex has a conflicting constraint with its neighbouring two blue vertices, so either a red point or one or more blue points in this area can be chosen. Note that for the plane to intersect the cube at all we require $(1,1,1)$ to be on the different side of the plane from the origin, or in other words, $a + b + c \geq 1$.

Let us look at a few examples. Firstly, if $a, b, c$ are all greater than 1 we choose the following triangle.

Similarly if $a+b, b+c, c+a$ all are less than 1, the oppositely similar triangle on the red vertices would be chosen.

Next, if $c > 1, a < 1, a+b < 1$ we obtain the following parallelogram.

If $c > 1, a < 1, a+b > 1$ we obtain either a pentagon (parallelogram truncated at a vertex) or a trapezium depending on whether $b < 1$ or $b \geq 1$ respectively.

$b < 1$:

$b\geq 1$:

Finally, if $a, b, c$ are less than 1 and $a+b, b+c, c+a$ are greater than 1, we obtain a hexagon.

For details on calculating the areas of such polygons refer to [3], especially the method applying the area cosine principle that relates an area of a figure to its projection. For calculating volumes related to regions obtained by the cross section refer to [4].

#### References

[1] Cross Sections of a Cube: http://www.wou.edu/~burtonl/flash/sandbox.html

[2] Episode 16 – Cross sections of a cube: http://sectioneurosens.free.fr/docs/premiere/s02e16s.pdf

Next Page »

The Rubric Theme. Blog at WordPress.com.