Archive for the ‘geogebra’ tag
Who won the 2010 Winter Olympics? Going linear.
In the previous post (of what rapidly seems to be turning into a series) we explored the effect different scoring systems have on the placing of Canada, the USA, and Germany. The boundaries between different orderings looked like this:
These boundaries are a little complicated; it would be nice if they were something simpler, like straight lines.
The curved boundaries comes from the parameters used for our scoring system:
is the value of silver relative to gold, and
is the value of bronze relative to a silver. A country getting
golds,
silvers, and
bronzes has total score
. It's the
in that score that caused the boundaries to be non-linear.
Let's change our parameters so that
is the value of silver relative to gold (like before), and
is now the value of bronze also relative to gold. This will make the score for each country
.
What difference will this make to our graph? Before, the sensible parameter space was a square:
could be anything between 0 and 1, as could
. Now,
can still vary between 0 and 1, but it doesn't make sense for
to be greater than
(we shouldn't value a bronze more than a silver). Our parameter space now is therefore going to be a triangle:
As before, move the blue point to alter the value of a silver and a bronze.
We can still see the four possible regions, corresponding to the four plausible orderings of the top three countries. The only two possible orderings which are not plausible are the two which put Germany first... but it wasn't that far off being a possibility. Indeed, it looks like all three of the lines cross just below our plausible region. Perhaps, if Germany had been able to convert some of its silvers into golds, or some of its bronzes into silvers, it actually could have claimed to be first under some weighting system.
This can be explored in the applet below, which lets you alter the number of golds, silvers and bronzes allocated to each country.
Sorry, the GeoGebra Applet could not be started. Please make sure that Java 1.4.2 (or later) is installed and active in your browser (Click here to install Java now)[Source: 2010-top-three-places-linear.ggb.]
With this applet, we can experiment very quickly with lots of different scenarios (if you want to reset the tallies to the actual results, click the 'recycle' button in the top right). For example:
- With the same number of golds and silvers, Germany would have needed 12 bronzes (up from 7) for there to be a (quite small) region of silver/bronze weights which would put it first. In this case all six orderings would be possible, so we could legitimately argue that all three of the countries 'really' draw for first place.
- Changing one of Germany's bronzes into a silver also gives us a situation with a 'Germany wins' region. Interestingly, this is still true even if we reduce Germany's bronze tally all the way to 0.
- Similarly, changing one of Germany's silvers into a gold (giving a new gold tally of 11, with 12 silvers) gives us a 'Germany wins' region, even if we remove all Germany's bronzes. With 11 golds and 11 silvers, Germany would need 11 bronzes for a winning region, with 10 silvers 12 bronzes, with 9 silvers 13 bronzes,
all the way down to needing 22 bronzes for a (very small!) winning region with 0 silvers. - Moving over to Canada, it looks like we can increase the number of bronzes without limit, and still have a region where Canada come third. Giving Canada 9 silvers and 7 bronzes, we're in the interesting situation where Canada is always rated first or second, unless we count silvers as being worth the same as golds, where Germany and Canada come equal second/third, no matter how much we count a bronze as being worth.
- Giving Canada 10 silvers, and at least 13 bronzes, it will always be ranked first.
There are a lot of patterns and relationships in this that need explaining -- something, hopefully, we will do next time.
Who won the 2010 Winter Olympics? The top three places.
Last time, we explored how changing the relative values of silver and bronze altered the 2010 Winter Olympic medal table.
This time we concentrate on the top three countries: Canada, Germany, and the USA.
| Country | Golds | Silvers | Bronzes |
|---|---|---|---|
| Canada | 14 | 7 | 5 |
| Germany | 10 | 13 | 7 |
| USA | 9 | 15 | 13 |
Here is an applet that lets us assign different values to silver and bronze (by moving the blue dot), and so find the scores, and the rankings, of the countries. The initial setting values a silver at 20% of a gold, and a bronze at 20% of a silver. The results, and the dotted curves, are explored below.
Sorry, the GeoGebra Applet could not be started. Please make sure that Java 1.4.2 (or later) is installed and active in your browser (Click here to install Java now)[Source: 2010-top-three places.ggb.]
As you will have found if you played with the applet, the dotted lines indicate where two of the countries swap position in the rankings. Starting on the left (no or low value for silver), the rankings are the IOC ones:
- Canada
- Germany
- USA
As we increase the value of a silver, the first transition swaps Germany and the USA, giving
- Canada
- USA
- Germany
Next, USA and Canada swap places, giving
- USA
- Canada
- Germany
and finally, with silver valued highly, Canada and Germany swap positions, giving the North American-style ranking:
- USA
- Germany
- Canada
Note that none of these options have Germany leading -- the top country is always either Canada or the USA. This answers one of the questions posted in the last post: it is not possible to find any sensible set of values which lead to Germany winning. I say 'sensible' because it is possible to put Germany first if you allocate a negative value to a bronze, but this would not be an option many people would agree with!
The dotted curves are found by setting the 'scores' of pairs of countries equal to each other. If we call 'x' the value of silver relative to gold (from 0 to 1), and 'y' the value of bronze relative to silver (from 0 to 1), then
- Canada =
. - Germany =
. - USA =
.
and we have, for example, Canada and the USA's score equal when
. Rearranging gives
, and the other two curves are derived similarly.
Who won the 2010 Winter Olympics? An exploration.
The 2010 Winter Olympics in Vancouver have been over for a few days now. 26 countries out of the 82 that competed won at least one of the 258 medals on offer. Toward the end of the event, quite a lot of interest was generated in which country was going to 'win', in the sense of coming top of the medals table. There's an interesting discrepancy in the medal table rankings around the world, though.
On the NBC Olympics site, and the official Vancouver 2010 site, the top of the medal table looks like this:
On the BBC and on Wikipedia, on the other hand, we see the top of the table looking like this:
The difference comes from a disagreement about the relative value of gold, silver and bronze medals. In the North American sites, all medals are valued equally, and the countries are sorted purely on the total number of medals won. The BBC and Wikipedia, on the other hand, use the standard IOC lexicographical ordering convention: sorting by golds, then by silvers, then by bronzes. This is the ranking system I've always been used to in Olympics, and indeed in any multi-event sporting occasion (such as the World Athletic Championships).
This difference in ranking systems first came to my attention during the 2008 Olympics, when the USA used their ranking system to claim victory over China (China won 51 golds to the USA's 36, but the USA won 110 medals overall, beating China's tally of 100).
One interesting mathematical question behind these tables is this: can we say anything about the rankings which is not sensitive to the particular relative values of gold, silver, and bronze? We might not be able to agree on whether the USA or Canada came first, for example, but perhaps it would always be the case that both of them always rank ahead of Norway. Also, is it possible to find a medal ranking system in which Germany comes first?
Simon Tatham has an interesting writeup of an investigation along these lines for the 2008 Olympic medal tables, which concludes with a wonderful diagram of the partial order of countries (using which we can see that, under any medal ranking system, Great Britain came fourth...). We could generate a similar partial order for the 2010 Winter Olympics.
Rather than doing this, I have created the following applet which will let you explore different medal ranking systems. Simply choose what percentage of a gold a silver should be worth, and what percentage of a silver a bronze should be worth. The applet will calculate the 'gold equivalents' for each country, and display them in their correct rank. The initial setting has been chosen to agree with the official IOC ranking system.
[Source: Who-Won-the-2010-Olympics.ggb]
Here are some sample results:
Technical details
The above uses some of the Spreadsheet and List features of the new version of Geogebra. If you double click the applet, it should open in its own window, and from there you can open the Spreadsheet and Algebra views and explore how it was constructed.
Sunday evening symmetry
... or, fun with pentagons:
Geogebra in Wordpress
Several people have emailed me recently, asking me how I include the Geogebra applets (like this one, showing the nine-point circle) in my posts. First, note that I’m using Wordpress, rather than any of the millions of other blog systems. Secondly, and more importantly, I’m self hosting.
Wordpress.com
As far as I can tell, it’s impossible to include Geogebra files in wordpress.com blogs. Wordpress severely restrict the content you can upload to wordpress.com, both for security reasons, and for financial reasons (you can pay them extra to be allowed to embed video/audio). When I tried, it just stripped out the applet information, leaving the ‘please install Java’ text behind.
If you have a wordpress.com blog, then, it looks like you are restricted to hosting your geogebra files on an external system, like Geogebra.org’s own Geogebra upload manager.
Self Hosting Wordpress
Self-hosting means that I’ve got my own Wordpress installation on this site, rather than using wordpress.com, or one of the other free blogging services.
While you might expect that all the wordpress.com restrictions would be lifted on a self-hosted site, this isn’t necessarily true. While there is no issue with using <applet> or <iframe> tags, I recently upgraded this site to Wordpress 2.9 (from the 2.8 version it was running previously), and found that the new version was much more picky about the file-types it allows everyone, even the site admin, to upload. While this is for good security reasons, it was still a little annoying!
There were several ways to deal with this increased security:
- I could start hosting the Geogebra files on an external site, as above.
- I could use the new fileless embedding feature which has recently appeared in Geogebra. This lets you embed small Geogebra creations without having to upload a separate .ggb file. Just make sure the ‘.ggb file and .jar files’ option in the Export dialogue is unticked, and the HTML it generates has the file embedding inside the <applet> tag (encoded using Base 64, from the looks of it).
- I could add .ggb as an allowed filetype to the Wordpress system.
The fileless embedding is useful, but is only sensible for small files — I wouldn’t want to embed a 500kb geogebra file directly into my HTML! For large files I do still want to upload the .ggb files. Rather than hand-editing the Wordpress source, I installed the PJW Mime Config plugin, which lets you edit the allowed filetypes from the standard admin section of the blog.
Other blogs
Another option would be to investigate switching to another blogging platform. For example, it looks like Blogger/Blogspot will let you embed applets in their free service, without too many problems.









