Monday, January 26, 2009

A political question unanwered

Here's is one project I plan not to continue. I simply lost the motivation to do it. The reason I blog about it is that I wish someone will read this and will finally make it work.

But first a disclaimer: This is a really good and bad idea at the same time. It create a political minefield and possibly something controversial.

It's about the electoral map.

It all started back in November. There was talks in the media that the Quebec electoral map wasn't 100% correct. Some district were too populated and the map had to be re-drawn... The process was started but was too slow for it to be done for the upcoming election. It got me intrigued. I'm pretty sure the way the electoral map is drawn influence a lot the outcome of the election. But how? I wanted to find out.

I wasn't the first time this sort of questioning crossed my mind. Back in 2005, while I was still a student in my final year of Computer Engineering degree, I had a course on algorithms and graph theory. The kind of course were you learn that some problems are unsolvable, unless you have infinite time to solve them. I remember asking the teacher this very question: "Can't we use graphs to map were the votes are and tell if the electoral map is unjust?". He answered that it was possible, but no one would be willing to do this sort of stuff because it's too political.

And so, when the medias started talking about the electoral map, I remembered that talk I had with the teacher. I had an idea at the time of how one would analyze the various information sources to determine how well the electoral map is divided. Here's how I wanted to do it:

You make point of interests, containing all the votes in a giving sector. It could be a municipality of any other sort of subdivision. The more there is, the better. For example, in Quebec city, one could create a Point-of-interest at for voting spot, containing all the various boxes that were in that spot. Each spot has a weight based on the number of registered voters and is linked to the rest of the electoral district to form a single district. Once you have this map, you create "potential links", links from each P-O-I to various neighbors in other district (for example, the 3 closest neighbors not in the district). The create the various potential maps, you turn on and off each link until you have a legal, but different map.

OF course, there is a couple of problems with this approach.First, to do all this you need:
  • Coordinates for each voting poll
  • Number of voters for each voting poll
  • Results for each poll
  • District for each voting poll

Almost all this information is public, except for one: the exact location of each voting poll.The only information giving for each box is the municipality where the voting poll was. So all the maping information for the voting poll in Montreal, only says : "Location: Montreal". Hard to place the voting voting polls with so little information.

The second problem is the complexity of the entire process. My initial list had 1848 potentials P-O-I on the map. If you limits the links to the 5 closest neighbors, you still get somewhere between 3000 and 9000 links... Which means calculating between 2^3000 and 2^9000 possibilities... Which could take a very, very long time. (2^3000 is over 10^600, or 1 with 600 zeros)

After a couple of days of trying to find ways to optimize the algorithm, I simply gave up. There is not enough information to create a meaningful map, since the location information in large urban area is not very detailed and leads only to a partial answer...

It was a great idea, but I can't go further.

I guess my time is better spent elsewhere...

Monday, January 19, 2009

Hellsing (anime) is a perfect match for E Nomine

The music by E Nomine seem to be a perfect match for any sort of Hellsing AMV.

I found several, but I think this one is far better than the rest (I HAD to share this):

Monday, January 12, 2009

The Cost of SMS in Canada

Below is a copy of an E-mail I sent to Mr Jesse Brown who host the CBC podcast Search Engine:
http://www.cbc.ca/searchengine/

The topic was SMS pricing. (Show for 2009-01-12) I checked to see how much we were really paying for SMS compared to talking... my math says 500times... at minimum..

Can you check and tell me if I'm right?


All of the Telephone based information is based on the Creative Common Licensed book "Asterisk, The future of telephony", available at http://oreilly.com/catalog/9780596510480/ , just click the Online book for the entire PDF


Traditional telephone is 8bit sampling 8000 times per seconds, making traditional telephone 64kilobits per seconds. (or 8 kilobytes per second)Codecs might bring this down to anything between 8kbps and 15.2kbps.

One minute of talk can be anything between 480000bytes (at 64kbps) and 60000bytes (at 8kbps). This is, of course, low quality voice talk because a comparable MP3 file of the same length would be around 1024kilobytes (1MB). Let's just use the lower end for comparison.

To get a rough idea of pricing, let's take a talk plan that gives a 400 minutes for 40$. At that price, the cost of talking for 1 minute of talk (if you use all your available minutes) is 40$ / 400 minutes = 0.1$/m

So with 0.1$/m and 60000bytes/m talk costs around:
0.1/60000 = 0.000001667$/byte
or
0.000001667$/byte * (1024*1024) = 1.747626667$ per Megabytes at the low end.

SMS is, by comparison,very small. 140 Characters in 8bit mode or 160 characters in 7 bits encoding, making the content of the message only 140bytes. The overhead of such message makes the entire message under 200bytes, but let's use 200 bytes for comparison.

At 0.15$ per SMS, it cost:
0.15/200 = 0.00075
or
0.00075$/byte * (1024*1024) = 786.43$ per megabytes...

so it's around 500 times more expensive to send SMS at the base price, then to talk on my phone.

An equivalent price for SMS to be billed like talk would be:
0.000001667$/byte * 200 bytes/SMS = 0.00033$/SMS
or
0.33$ per 1000 messages...

Quite a difference, don't you think?

Friday, January 09, 2009

The Last Question, a short story

This is an old but fascinating short story written by Isaac Asimov:

The Last Question