Tag: calculation

Daylight diagram

Posted by – February 4, 2010

I tried to find a diagram with the distribution of daylight over the course of a year in Helsinki but couldn’t, so I made my own. Shockingly, my little Python script worked the first time I ran it:

More…

Syllable counts

Posted by – November 25, 2009

I learnt on Wikipedia that the intro to Whipping Post is in 11/4 time. 11/4, what the hell? Eventually I figured out how that goes, and also noticed that Finnish is no good for counts that go above 10. Till then most numbers have natural one-syllable abbreviations, but 11 doesn’t. Its unabbreviated form has 4 syllables, one more than in English. Hmm. Long story short, I made a graph of the syllable counts of the counting numbers up to 100 in 9 languages (thanks to Zet@#aspekti for many of them):


(click to see large version)

Some observations:

  • French is most compact, except in the 80-100 range where English (which is quite consistent overall) is best
  • Finnish really is verbose
  • Northern Sámi is most boring
  • Estonian is quite interesting
  • Everybody counts in base 10
  • 3-4 syllables is a sweet spot
  • Graphs with too many lines in them are difficult to read

Btw, a good solution to the Finnish problem: go hexadecimal. Yks kaks kol nel viis kuu see kaa yy aa bee cee dee ee äf.

edit: oh, and code to languages:

Suomi = Finnish
Français = French
Svenska = Swedish
Eesti = Estonian
Davvisámengiella = Northern Sámi, spoken in Lapland
Magyar = Hungarian
Afsoomaali = Somali
Komi = Komi, a Uralic language

Aspects of pizza value

Posted by – July 24, 2009

The paper today had a look into the cost of family-sized pizzas in Helsinki. The story found that family-sized pizzas are a rip because the cost per area was greater than in the normal ones. Whoa! Though I wonder why they didn’t weigh the pizzas.

It occurred to me that the reporter had made the assumption that pizzas grow proportionally, ie. that the crust is as much bigger in a big pizza as the radius. I don’t think this is true – the crust is closer to being constant in width. If this is so, the topping part of the pizza grows quadratically while the crust grows constantly, so some of the extra value of the big pizzas is being overlooked in the newspaper story: with r the radius of the pizza and c the width of the crust, the area of the crust is

pi*r2 – pi*(r-c)2 = pi*(r2 – r2 + 2*c*r – c2) = pi*2*c*r – pi*c2 = A*r + B

where A and B are constants. How significant is this oversight? Pretty significant:


Here the dark blue line is pizza surface area, magenta is topping surface area, and yellow is crust surface area (left scale, cm2). Turquoise is the ratio of topping to pizza (right scale, from 0 to 1). The x-axis represents diameter of pizza in cm. A crust width of 2 cm is presumed throughout. Over the pertinent range, 30 to 40 cm in diameter we go from 75% topping to 80% topping. The marginal topping ratio (the topping ratio of just this extra bit of pizza) of this growth is a whopping 89%! Too bad they don’t sell marginal pizza. Also, I actually rather like the crust.

Still, IS THIS WHAT THEY CALL JOURNALISM THESE DAYS HUFF BHURR

The prime-finding spiral

Posted by – November 18, 2008

The programming problems on Project Euler are almost always fun to do, but the mathematics behind the (early) ones have mostly been unsurprising. But this was something I hadn’t heard about: if you arrange the natural numbers in a counterclockwise square spiral and look at the diagonals like this

you notice that
1) the odd squares are on the lower right diagonal (easily proved and not so shocking)
2) 8 of the 13 numbers (~62%) on the diagonals in this 7×7 square are primes.

If you keep extending the spiral you find that primes end up on the diagonals surprisingly often. The programming task was to find what size the spiral has to be for the proportion of primes on the diagonals to be less than 10%. The suprisingly large answer: 26241×26241, by which point the numbers in question are obviously already quite big.

And of course if one discounted the lower right diagonal there’d be way more primes yet.

edit: apparently this is called the Ulam spiral.