Wednesday, 30 July 2008

Algorithm & Pseudocode - are they the same?

I always thought that the word 'algorithm' is the same as 'pseudocode'. Having attended Tim's class yesterday, I noticed the difference. Well actually the course is on JAVA; at the last two sessions of the course, he wanted to instill in our mind the software design is very important - never start coding before you really plan what you are going to do.

Design should be done with pencil and paper. At the initial state, we need to really define the problem or whatever we want to solve. Test it and clarify it with other people; in our case, it would be our supervisor. Once clarified, we can create the algorithm which is the solution to the problem. Since there are many algorithms that are published before, try looking at one to see if it suits our needs. There is no point in reinventing the wheel, isn't it :-)

After successive refinement, pseudocode comes into picture. It is actually the detailed description of a programming in a plain english. If we want to code it in Object Oriented (OO), we should design it as such. When the pseudocode is complete, test it by desk tracing with pen or pencil, following loops and so on. Once satisfied, the pseudocode can be transfered into any programming language that we like and we just have to deal with coding errors. It saves the trouble of rectifying thousands of errors!

Tuesday, 29 July 2008

RM900 allowance per month - hardly enough to pay for utility bills!

From this month on, I'd be getting my allowance in RM. As the title reads, RM900 per month staying in the UK; hardly enough to pay for my utility bills, let alone the monthly rental of £300+ per month. With the recent increase of oil price, the utilities have increased by 20%. Where would I be getting the ££ to pay for all these...

I have sent out an appeal letter to convert for fulltime but then again, it has to go through so many levels before it reaches the final destination. Off record information, the qouta for 2008 has already been used up, implying that I need not appeal for conversion. Come to think of it, MNDP/split program fees are 87% from the total payment for fulltime student. They just need to add in 13% more for me to stay on fulltime.

Well, let's see how it goes. After all, the success of a PhD is not solely on the studies but how well one manages his or her study, family and whatever related to the PhD processes.

Friday, 18 July 2008

Love what you are doing...

Yesterday I went to my kids' school as they are celebrating the head teacher's retirement. Guess what, the guy has worked there for 26 years! He has been the head teacher for 11 years. What's his formula for staying there for too long? He loves what he is doing, he loves kids, and he enjoys working with his staff.

Moral of the story, we must enjoy what we are doing. I enjoy reading, I enjoy programming, I enjoy writing, I'm enjoying my PhD...:-)

Wednesday, 9 July 2008

What's the difference between metaheuristics and hyperheuristics?

A friend who just joined was asking about the difference between heuristics, metaheuristics and hyperheuristics. I have posted the meaning of heuristics before and would now like to compare it against meta and hyperheuristics. Metaheuristics is a collection of heuristics including simulated annealing, tabu search, genetic algorithm, ant colony, swarm and so on. Metaheuristics explore a search spaces of solution to a given problem.

As meta means beyond, and expected to be better than heuristics itself, hyperheuristics is supposed to be better than metaheuristics. Hyperheuristics means heuristics that choose heuristics. The main difference between metaheuristics and hyperheuristics is that hyperheuristics operates on the search space of heuristics. Think of a hyperactive kids; hyperactive kids tend to be more rowdy, excited and energetic. I'll think of a better analogy to describe the hyperheuristics and will post it here once I got one.

Monday, 7 July 2008

Problem formulation

I'm doing a problem-solving research which is dealing with a real world situation. In dealing with a real world situation, initially the process is the collection of problems or so-called mess. The problem is then analysed. We then need to come out with the mathematical representation (model) of the perceived problem. And in the end, we need to find the solution to the model. Once solution is found, we need to verify it with the users, see whether they agree with our solution.

The hardest part is the formulation of the problem. This is the step where I'm currently at now. Typical of OR problem, we need to maximise or minimise, subject to the constraints. Saying it is easy, but to do it -- it is a hell of a job! Come to think of it, we need to recall what has been done 20 or 30 years back whereby subjects like Calculus, linear algebra came into mind...

There is a saying by Krishnamurti (The Penguin Krishnamurti Reader) as such :
"If we can really understand the problem, the answer will come out of it, because the answer is not separate from the problem"
In my case now, I do understand the problem, but the step towards getting the answer is the challenging part...