Monday, 12 November 2012

Proving algorithms

So, we have started proving the correctness of algorithms and devising algorithms following some conditions.

As far as proving the correctness of algorithms goes, I like the fact that we can prove that our algorithm works by following certain steps. The reason why I like that is if I can prove that my algorithm works, then I don't need to write test cases to convince someone that my code works fine.

But what interests me more is devising an algorithm by following the given conditions that our algorithm needs to satisfy and get to a working solution. It prevents us from making mistakes like being off by 1 which I tend to make sometimes.

I'm looking forward to seeing how this technique could turn to be more helpful when I see some more examples. And I feel bad that I tend to forget to post in this slog every week.

No comments:

Post a Comment