It has been such an ordinary Monday it is not worth talking about. On the other hand, Friday, oh we all love Fridays! Nobody really bothers- it is doughnut day, for heaven's sake! So I go with the flow- got to work a little bit late than usual, that is 11 am, and spend half an hour making tea and contemplating on how to improve on a already perfect algorithm. When I finally got to the point where I look at my experimental results, I realized I couldn't be more wrong about it. Thing is, the meaningless combination of numbers I got was supposed to represent a simple graph. Well, almost... it was a graph of some sort, but not a single metric was within 50% of the desired, let alone be a precise match. Here is a bit for the technically oriented among you (please feel free to skip the next paragraph if you are not into graph theory of Java):
~~~~~~ TECHNICAL ~~~~~~
The task is to generate a simple undirected graph with a given degree distribution- initially uniform, Gaussian and exponential, with a potential for easy extension. Also, we should be able to control different graph metrics (mean geodesic path length, clustering coefficient and degree correlation) at least to some extent. My original idea was to generate the degree sequence and construct a graph that corresponds to it. The Erdos-Gallai theorem comes handy here- it provides a necessary and sufficient condition that a sequence of number is a graphic, i.e. the degree distribution of a graph. Problem with that is, I was trying to generate a sequence which precisely describes the degree distribution, and you get stuck somewhere between order and chaos. On one hand, the graph still has to be random, but on the other if you give it “hard” numbers and do not allow fluctuation it is really hard to get anything. Cool, huh? No need to reinvent the wheel though, a quick search and you get your hands on a number of clever AI-inspired algorithms to do the job for you.
Unfortunately, I could not make any further progress on this project, since I accidentally discovered requirements mismatch in my previous project (the programming one). I (very conveniently) ignored the bit that said “let the user play around and interact with the program to see what happens if...” and replaced it with a textual description of the process. Still does the job, but not very educational :D. A bit later on, I realized my listener uses the rather simple SwingUtilities.isRightClick() to decide whether to show the context-sensitive menu or not, BUT there is no such thing as a right click on the Mac. The pop-up trigger is left click with a CTRL_DOWN_MASK bitmask. Well done, Apple, elegant, but don't you think that is convenient to have a normal right click like everyone else does? So right now I have no idea how to get around this little complication, especially given that ctrl+click is already mapped to an action.
~~~~~~END OF TECHNICAL BIT~~~~~~
Apart from that, life is not going bad at all, given that I've been away from my precious girl for six weeks now. Missing her gives me that extra motivation when training, and I particularly need it when I do it on my own. By the way , running is going quite good, I did a total of about 6 kilometres over the weekend and I can feel my getting stronger with every meter. If only English weather didn't have that annoying habit to get in my way all the time!
Showing posts with label marathon. Show all posts
Showing posts with label marathon. Show all posts
Monday, 24 August 2009
Tuesday, 18 August 2009
Marathon training
Hi everyone, it's great news! Me and my mate Sam, decided to take part in next year's half marathon in Brighton*. To the sceptics among you, yes, I realize it's only a half-marathon and it doesn't sound quite as impressive as a marathon, but it's a start.
Here's some history: I used to dislike (well, to be completely frank, I absolutely despised) running. I used to have that typical teenage joint thing- to keep up with the rest of the body my bones grew too fast, so they were not an example of strength. Put simply, running was a pain. While at uni I had no other option but to take up running since I could not get my hands on a decent bike for a while. On the other hand, Sam had some previous experience. During our first year, we would go jogging in the woods right next to our house every now and then- the hills around Brighton are amazing. Seriously, I highly recommend visiting the South Downs if you haven't done it by now- it's a one-of experience.
It's decided now, Sam's made a bet with his brother, I've promised myself I will do it as a part of the long term self-development plan**. No turning back at this point. So, anyone up for the challenge? We're looking for a running (and drinking, or course) mate, ideally based in Brighton, starting October 2009. Also we'd love to get in touch with people with more experience in the are, so if you are one post a comment or contact me using the form on the right.
*http://www.sussexbeacon.org.uk/halfmarathon/
**My friend Verena has a thing or two to to say about self-development, check her out at www.selfdev.org
Here's some history: I used to dislike (well, to be completely frank, I absolutely despised) running. I used to have that typical teenage joint thing- to keep up with the rest of the body my bones grew too fast, so they were not an example of strength. Put simply, running was a pain. While at uni I had no other option but to take up running since I could not get my hands on a decent bike for a while. On the other hand, Sam had some previous experience. During our first year, we would go jogging in the woods right next to our house every now and then- the hills around Brighton are amazing. Seriously, I highly recommend visiting the South Downs if you haven't done it by now- it's a one-of experience.
It's decided now, Sam's made a bet with his brother, I've promised myself I will do it as a part of the long term self-development plan**. No turning back at this point. So, anyone up for the challenge? We're looking for a running (and drinking, or course) mate, ideally based in Brighton, starting October 2009. Also we'd love to get in touch with people with more experience in the are, so if you are one post a comment or contact me using the form on the right.
*http://www.sussexbeacon.org.uk/halfmarathon/
**My friend Verena has a thing or two to to say about self-development, check her out at www.selfdev.org
Subscribe to:
Posts (Atom)