Chaitanya's Random Pages

March 31, 2012

Distribution of the Area of Countries

Filed under: geography — ckrao @ 4:12 am

I was looking at this list of countries by area and noticed something unusual – not that many have area between 1,000 and 10,000 square kilometres. The following table confirms this.

Area \left(\times 10^3 \text{km}^2\right) # “countries” excluded (if area > 1000 sq km)
< .25 7
.25-.5 10
.5-1 8
1-2 1 Guadeloupe, Faroe Islands, Martinique,
Hong Kong
2-4 3 South Georgia and the South Sandwich Islands,
Réunion
4-8 3 French Southern and Antarctic Lands, Palestinian territories,
French Polynesia
8-16 10 Falkland Islands, Puerto Rico
16-32 18 New Caledonia
32-64 14 Svalbard
64-128 26 French Guiana
128-256 20
256-512 26 Western Sahara
512-1024 22
1024-2048 16
2048-4096 6 Greenland
4096-8192 1
8192-16384 4
16384+ 1

(Here I have assumed 196 countries: the 193 member states of the UN plus Taiwan, Kosovo and Vatican City. The seven smallest countries are Marshall Islands, Liechtenstein, San Marino, Tuvalu, Nauru, Monaco and Vatican City.)

I would have expected to see reasonably constant numbers except for the tail ends, as they are for other ranges of area. In fact there are just 8 countries between 1,000 and 10,000 square kilometres but 20 between 100 and 1,000 and 57 between 10,000 and 100,000! The 8 special countries in decreasing order of area are:

Cyprus, Brunei, Trinidad and Tobago, Cape Verde, Samoa, Luxembourg, Mauritius, Comoros

Six out of these are islands, so perhaps this anomaly indicates that for this area range, it is on the small side for a continental region or that there are not many groups of islands with total area in this range that are willing to form a unified nation.

March 27, 2012

A cool integral based on the Gaussian

Filed under: mathematics — ckrao @ 11:45 am

In this post I want to show this nice integral I saw once during my graduate studies.

\displaystyle \int_0^{\infty} \exp \left(-(x-a/x)^2 \right)\ dx = \int_0^{\infty} \exp \left(-x^2 \right)\ dx = \frac{\sqrt{\pi}}{2}, \quad \text{Re}(a) > 0.

The cool thing about it is the integral’s value is independent of a. The shape of the integrand changes as a is varied but the area under the curve remains the same.

To prove this, we denote the left side as f(a) (a continuous function of a) and differentiate under the integral sign.

\begin{array}{lcl} \frac{df}{da} &=& \frac{d}{da} \int_0^{\infty} \exp \left(-(x-a/x)^2 \right)\ dx \\&=& \int_0^{\infty} \frac{\partial}{\partial a} \exp \left(-(x-a/x)^2 \right)\ dx\\&=& \int_0^{\infty} \exp \left(-(x-a/x)^2 \right) \left( 2-\frac{2a}{x^2}\right) \ dx. \quad \quad (1)\end{array}

The interchange of integral and derivative is valid here as the integrand and its derivative are continuous in the open interval of interest, plus the integral exists. Next, note that if we make the substitution u = a/x then dx = -a/u^2\ du and

\displaystyle f(a) = \int_{\infty}^0 \exp \left(-(a/u-u)^2 \right) \frac{(-a)}{u^2}\ du = \int_0^{\infty} \exp \left(-(x - a/x)^2 \right)\frac{a}{x^2}\ dx. \quad \quad (2)

Note that this is not valid when \text{Re}(a) \leq 0. Combining (1) and (2),

\begin{array}{lcl} \frac{\partial f}{\partial a} &=& 2 \left(\int_0^{\infty} \exp \left(-(x-a/x)^2 \right) \ dx - \int_0^{\infty} \exp \left(-(x-a/x)^2 \right)\frac{a}{x^2}\right)\ dx\\ &=& 2\left( f(a) - f(a)\right) \\&=& 0.\end{array}

Hence the integral is independent of a in the region where it is differentiable as a function of a. Hence it is equal to its constant value in the limit \text{Re}(a) \rightarrow 0+, which is the Gaussian integral

\int_0^{\infty} \exp \left(-x^2 \right)\ dx = \frac{\sqrt{\pi}}{2},

as we wished to show. Note that when \text{Re}(a) < 0 we can replace a with -a in the above and find that for \text{Re}(a) > 0

\displaystyle \int_0^{\infty} \exp \left(-(x+a/x)^2 \right)\ dx = \exp (-4a) \int_0^{\infty} \exp \left(-(x-a/x)^2 \right)\ dx = \exp(-4a)f(a),

which though no longer constant has the same limit f(0) = \sqrt{\pi}/2 as \text{Re}(a) \rightarrow 0+.

March 25, 2012

Fastest to n ODI centuries for n sufficiently large

Filed under: cricket,sport — ckrao @ 8:13 pm

Recently Virat Kohli has been in a rich vein of form, scoring 3 one day international centuries in his last four innings and upping his overall average to over 50 with a monumental 183 his most recent effort. He is the quickest to score 10 centuries according to this page (Edit: others have since surpassed this record). The following graphs show the rate at which top ODI century-makers have scored centuries. The first shows the top nine century-makers, while the second graph shows nine who have scored 9-13 centuries in not so many innings. A * next to the player’s name indicates a potential for him to add to his tally.

New plot below (click to interact – updated 28 Oct 2018):

10plus odi centuries

For players who have scored 10 or more ODI centuries, here is a list of those who have scored them with fewest innings/century (updated Oct 21 2023).

Babar Azam* 5.68
Kohli* 5.69
Amla 6.59
Warner* 7.24
Hope* 7.53
de Kock* 7.79
Fakhar Zaman* 7.80
Sharma* 7.97
Finch 8.35
Bairstow* 8.36
MacLeod* 8.60
de Villiers 8.72
Roy* 9.17
Tendulkar 9.22
Root* 9.63
Dhawan* 9.65
Trescothick 10.17
R Taylor 10.48
Stirling* 10.71
Guptill* 10.83
Smith* 11.00
du Plessis 11.33
Gibbs 11.43
Greenidge 11.55
Gayle 11.76
Williamson* 11.85
Ponting 12.17
Saeed Anwar 12.2

We see that current players have a good lead over the rest of the field at this point. One interesting aspect of the above graphs is how many players were fastest to various landmarks of the number of centuries. The following table attempts to capture this (updated Nov 16 2023 – also interactive plot linked at the bottom).

n Fastest to n ODI centuries (innings required)
1 17 players (1)    
2 Mohammad Shahzad, Knight (3) Ingram, Amiss (4) Rahmanullah Gurbaz, W Young, Imam-ul-Haq, P Hughes, Nicol, Porterfield (5)
3 Imam-ul-Haq, J Malan, Ibrahim Zadran (8) Rahmanullah Gurbaz, Pietersen, Amiss (9) Mohammad Shahzad (11)
4 Imam-ul-Haq (9) Ibrahim Zadran (13) de Kock, D Malan (16)
5 de Kock, Imam-ul-Haq (19) D Malan (21) Conway (22)
6 D Malan (23) Imam-ul-Haq (27) Tharanga (29)
7 Babar Azam (33) Imam-ul-Haq (36) Amla (41)
8 Amla (43) Babar Azam (44) Imam-ul-Haq (47)
9 Imam-ul-Haq (48) Amla (52) de Kock (53)
10 de Kock (55) Amla (57) Fakhar Zaman (67)
11 Amla (64) de Kock (65) Babar Azam (71)
12 de Kock (74) Babar Azam (75) Amla (81)
13 Babar Azam (76) Amla (83) Kohli, de Kock (86)
14 Babar Azam (81) Amla (84) Warner (98)
15 Babar Azam (83) Amla (86) Hope (105)
16 Babar Azam (84) Amla (94) Kohli, Warner (110)
17 Babar Azam (85) Amla (98) Kohli (112)
18 Babar Azam (97) Amla (102) Warner (115)
19 Babar Azam (102) Amla (104) Kohli (124)
20 Amla (108) Kohli (133) Warner (142)
21 Amla (116) Kohli (138) Warner, de Kock (152)
22 Amla (126) Kohli (143) Warner (153)
23 Amla (132) Kohli (157) de Villiers (187)
24 Amla (142) Kohli (161) de Villiers (192)
25 Amla (151) Kohli (162) Sharma (206)
26 Amla (154) Kohli (166) Sharma (207)
27 Amla (167) Kohli (169) Sharma (208)
28 Kohli (181) Sharma (213) Tendulkar (259)
29 Kohli (185) Sharma (217) Tendulkar (265)
30 Kohli (186) Sharma (234) Tendulkar (267)
31 Kohli (192) Sharma (245) Tendulkar (271)
32 Kohli (194) Tendulkar (283)  
33 Kohli (195) Tendulkar (286)  
34 Kohli (197) Tendulkar (298)  
35 Kohli (200) Tendulkar (307)  
36 Kohli (204) Tendulkar (311)  
37 Kohli (205) Tendulkar (321)  
38 Kohli (206) Tendulkar (337)  
39 Kohli (210) Tendulkar (350)  
40 Kohli (216) Tendulkar (355)  
41 Kohli (217) Tendulkar (369)  
42 Kohli (229) Tendulkar (406)  
43 Kohli (230) Tendulkar (415)  
44 Kohli (256) Tendulkar (418)  
45 Kohli (257) Tendulkar (424)  
46 Kohli (259) Tendulkar (431)  
47 Kohli (267) Tendulkar (435)  
48 Kohil (273) Tendulkar (438)  
49 Kohil (277) Tendulkar (451)  
50 Kohil (279)    

There are a few Gs involved: Greenidge, Ganguly, Gibbs, Gayle (edit: none of them left now)! Here are some notable spurts of century scoring:

  • Zaheer Abbas scored 4 centuries in 6 innings and 5 in 11. (Edit: Sangakkara has since surpassed this with 4 centuries in 4 innings and 5 in 7.)
  • A B de Villiers scored 6 centuries in 13 innings and 10 in 34. He has once scored three in a row and five other times scored two in a row!
  • Warner scored 6 centuries in 11 innings and 7 in 15.
  • Tendulkar scored 7 centuries in 17 innings, 8 in 20, 9 in 26, 10 in 32
  • Kohli scored 8 centuries in 15 innings, 11 in 26, and 16 in 50!
  • Babar Azam scored 17 centuries in 70 innings.
  • Rohit Sharma scored 25 centuries in 99 innings.

Tendulkar’s stats are amazing. He took 76 innings to score his first century, then had 9 after 117 and entered the above list (before recent updates) during an amazing 12 hundreds in 45 innings period. Since then he only had one gap of more than 16 innings between centuries (37 innings from his 41st to 42nd century). Nobody else (until the mid 2010s) had such consistency of century-scoring over a long period.

NEW: You can see more than the top three for each row by viewing this interactive visualisation (example below, data from https://data.world/cclayford/cricinfo-statsguru-data – missing players from Canada, East Africa, Hong Kong, Nepal, Oman, Papua New Guinea, UAE, USA).

inns_to_score_100_10_times_ODI

March 14, 2012

The sum of consecutive squares formula

Filed under: mathematics — ckrao @ 10:26 pm

This post shows two ways of seeing why the following sum of consecutive squares is true.

\displaystyle 1^2 + 2^2 + 3^2 + \ldots + n^2 = \frac{n(n+1)(2n+1)}{6}

The first way involves writing the numbers 1 to n in an equilateral triangle, where the nth row consists of n ns.  The sum of the numbers in such a triangle is 1.1 + 2.2 + \ldots + n.n which is what we wish to find.

We then consider the same triangle rotated by 120, then 240 degrees. This gives us three triangles, illustrated here in the case n = 4.

 

Something magical happens when we add the corresponding entries of each triangle – we get the same number (2n+1) everywhere!

The reason for this is that when one goes from an entry to an adjacent one (either left-right or diagonally), in one triangle the number increases by 1, in another it decreases by 1 and in the third it remains the same. Overall the sum of the three corresponding entries in each triangle is unaltered. This can be made rigorous by using coordinates (an exercise for the interested reader!).

Hence three times the sum of the numbers in each original triangle is (2n+1) times the number of entries in the triangle: 1 + 2 + \ldots + n.

In other words,

\displaystyle 1^2 + 2^2 + \ldots + n^2 = \frac{(2n+1)(1 + 2 + \ldots + n)}{3} = \frac{n(n+1)(2n+1)}{6},

as desired.

 

The second way of seeing why the sum is true (that can be made into a rigorous proof) is to show that 6 times the sum is n(n+1)(2n+1). We consider six pyramids where the nth level (counting from the top) consists of an n\times n array of unit cubes. This is photographed here (while I visited this awesome place in Dresden, Germany) in the case n=3.

 

These pyramids can then be joined together to form a rectangular box of dimension n \times (n+1) \times (2n+1) as required.

Layer by layer, this appears as follows, where each pyramid is shown in a different colour.

To show that this was no fluke, here is the corresponding illustration of the 4x4x4 case, which should demonstrate how the above can be generalised.

 

 

Create a free website or blog at WordPress.com.