Showing posts with label maths. Show all posts
Showing posts with label maths. Show all posts

Sunday, 9 January 2011

Exponential Growth

Yesterday I copied all the photos we had taken over Christmas and New Year off the camera and onto the computer. Given the way I store the photos this meant that I created a new folder for 2011 and started to think about finishing the archiving of the 2010 photos onto DVD.

We bought our first digital camera back in June 2005 and since then have taken an awful lot of photos. For the first few years it was easy to archive the photos by simply burning them onto a single DVD, but given the growth in the number of photos we take archiving to DVD is becoming a time consuming process. So I decided to see just how many photos we have actually been taking over the years.

As we only bought the camera in June of 2005 I've had to extrapolate a little to get a number for the first year on the graph (we took 769 photos in 7 months which suggests 1318 photos in a year), but it is quite clear that we have taken a lot of photos and the growth in the number taken each year shows no sign of slowing down. The red trend line is the most worrying thing -- it's an exponential growth curve!

I suppose the growth can't continue on at this rate forever (there becomes a point where the time needed for the camera to actual take and record each photo becomes a limiting factor) but it won't be too long before the archiving becomes exceptionally time consuming -- it already requires 5 DVDs to archive the 2010 photos.

Of course as well as the archiving, sorting these photos is now becoming more difficult. Whilst I keep trips together in sensibly named folders there can still be hundreds of photos to sort through to find the one I remember taking. Ah well, I suppose I shouldn't be complaining at least I don't have to pay for film development -- just printing all the photos I took last year would cost me around £500 without the cost of the film and processing on top!

Sunday, 18 January 2009

Guinness Based Physics

A long time ago in a high school far far away... I studied applied maths. Like any other job teachers need some on the job training and we ended up with a student teacher. I don't think we were particularly nice to the poor bloke (I can't imagine anything worse than a room full of obnoxious 16/17 year olds). One of his lessons, however, forever changed the way we treated him -- he had somehow managed to make a maths lesson fun.

He was attempting to teach us the maths behind the centre of gravity in different objects. Rather than some random shape though he decided that the most relevant thing to us would be working out how steep a slope you could stand a pint glass on without losing any beer! Of course given a blackboard and white chalk it has stuck in my head as the Guinness based physics lesson. I don't usually reminisce about high school (not the most enjoyable period of my life) but something I saw the other day brought that maths lesson flooding back.

I read a review for a new independently developed computer game called Crayon Physics Deluxe. The game is described by it's developer as a 2D physics puzzle / sandbox game, in which you get to experience what it would be like if your drawings would be magically transformed into real physical objects. Solve puzzles with your artistic vision and creative use of physics. Drawn objects move and fall as they would in real life. No more maths to work out if that pint glass will topple over!

I downloaded and played all the way through the demo and thought it was so good I was quite happy to spend the $19.95 for the full version, especially as buying the game directly supports the single developer rather than going straight to the purse of some large games company.

My Rating: 5 Stars I think the idea behind the game is brilliant and it was well executed to produce a thoroughly enjoyable game.

Monday, 29 September 2008

Another Year of Education

Well another year has passed, the students look even younger and the chance of buying a sandwich in less than 15 minutes at lunch time is now quickly approaching zero! At least it has now stopped raining.

Thinking of education though it reminds me, when does scoring 3/10 on a test give you a mark of 50%?

Friday, 18 July 2008

Erdös Numbers: The Kevin Bacon Game for Mathematicians

I first heard about Erdös Numbers a few years ago when it cropped up in a quiz I was doing. Basically an Erdös number signifies your closeness (based on academic collaboration) to the now deceased Hungarian mathematician Paul Erdös. Erdös himself has an Erdös number of 0 while those who have published work with him have an Erdös number of 1 and their co-authors have a Erdös number of 2 etc. It is very like the more well known (in popular culture at least) Kevin Bacon game which I'm sure you have all played at one time or another. Anyway having solved the quiz question all those years ago I thought no more about Erdös numbers.... until today.

It turns out that I have an Erdös number of 4. The head of the research group I work in, Yorick Wilks, realised from an old publication list that he actually has an Erdös number of 2 due to a paper he published with Frank Harary who published two papers with Erdös and hence has an Erdös number of 1. Now I haven't published any papers with Yorick but my PhD supervisor has and so my Erdös number is 4.

Here are details of the four papers showing the link from me all the way back to Erdös
  • Mark A. Greenwood and Robert Gaizauskas. Using a Named Entity Tagger to Generalise Surface Matching Text Patterns for Question Answering. In Proceedings of the Workshop on Natural Language Processing for Question Answering (EACL03), pages 29-34, Budapest, Hungary, April 14, 2003.

  • Robert Gaizauskas and Yorick Wilks. Information Extraction: Beyond Document Retrieval. Journal of Documentation 54(1), 70-105, 1998

  • Frank Harary and Yorick Wilks. On Unidirectional Linguistic Comprehension. New Mexico State University, MCCS-92-238.

  • Paul Erdös, Frank Harary and W.T. Tutte. On the dimension of a graph. Mathematika, 12 (1965)
The Erdös Number Project (which tracks all Erdös number related info) states that the average finite Erdös number is 4.65, which means mine is slightly lower than average. Also it appears I have the same Erdös number as Bill Gates -- not sure if that is a good thing or not!

Thursday, 26 June 2008

Harmonic Stars

One of my pet projects is a web based system for recording all the DVDs and Videos that we own. The original aim of the system was to simply record everything we owned so that we would know what there was to watch. As with everything else software related that I start, I have spent more time on it then is reasonable and so it has grown to be so much more than a simple database. One of the more useful features that I added was a way for a group of people to figure out what they should sit down and watch. To improve the suggestions the system was making I decided to add star ratings. Now each user can assign a star rating to each film which is then used to make suggestions for the group. The problem arose when I was trying to work out the combined star rating for a group of users.

The easiest approach is simply to average the star ratings from the members of a group. For now I'm ignoring the issue of what to do with a film which one or more users hasn't rated (in the final system they are never actually suggested so the problem nicely disappears). Unfortunately simply averaging doesn't produce nice results. Lets assume (for the sake of simplicity) that there are just two users, then if they both give a film 3 out of 5 stars then it gets an average of 3 stars. This seems totally reasonable. If, however, one gives it a 5 and the others gives it a 1, then it also recieves an average star rating of 3. Clearly this isn't right. There is no way we should be suggesting a film that one person loves and one hates.

So my requirements are a function that 1) ranges between 0 and 5 so that I can match the combined star ratings onto the same scale as the individual ratings and 2) gives a combined star rating that matches my logical intuition of what should happen. Well that shouldn't be too hard to find!

After a long period of simply trying every averaging function in Excel I came to the conclusion that the clear winner was the harmonic mean. That is the reciprical of the arithmetic mean of the recipricals or for n positive real numbers:



I have no clear idea as to why the harmonic mean works but it does. Just to show you the difference here is all possible combinations of ratings from two users, showing both the average and harmonic mean to 2 decimal places and the final joint rating (the harmonic mean to 0 decimal places)

Rating 1Rating 2AverageHarmonic MeanJoint Rating
5.005.00
4.504.44
4.504.44
4.004.00
4.003.75
4.003.75
3.503.43
3.503.43
3.003.00
3.502.86
3.502.86
3.002.67
3.002.67
2.502.40
2.502.40
2.002.00
3.001.67
3.001.67
2.501.60
2.501.60
2.001.50
2.001.50
1.501.33
1.501.33
1.001.00

Note that the list is sorted by the harmonic mean so you can see by looking at the average column that it not only gives different numerical results but also would give a different ordering.

Maybe some of the more mathematically inclined of my readers may care to enlighten us all as to why the harmonic mean seems to be a good fit.

Not long after starting to write this post I came across another place where the same problem occurs: peer reviewing papers. I'm currently organising a workshop and so had to decide which of the submitted papers to accept based upon 3 reviews per paper. The system we use to help manage the process (START V2) by default simply averages the overall scores assigned to a paper. This though, suffers from the same problem as the star ratings and should probably be changed to use the harmonic mean. Fortunately in the case of my workshop while the order of the papers did change it didn't make any difference to which papers I accepted, but something to remember for the future.