Tuesday, October 9, 2012

Carpeting and Traffic light - Conclusion

Don't you feel the approach that I used in the previous post, traffic light setting, is a little bit overwhelming? I don't blame you if you do. But it does demonstrate some thing important, it's show what we can do with the problem.

First, with this approach, I always get an answer which may be "no, I can not do it in 3 turn per cycle" or "yes, I can". Not only that, I get a specific light setup, a pretty good one. Even with more complicate situations, say bigger intersections, I still definitely get an answer.

I also know that there is no way to let every one pass through safely only 2 turns per cycle, no matter how much I try. It is definitely good to know your limit, isn't it?

Moreover, if I have a problem that have hundreds of directions. Once I turn the problem to a graph, I probably going to look up a solution of graph coloring, which suit my case, or use one if it's already out there. Either way, I have a pretty good idea how to solve my problem.

You probably realize by now that I am using mathematical abstraction, a graph, to help us to understand, learn more about limitations and provide a solution to the problem.

This concept is important in computer science, because when you try to solve problem with computers, you actually turn a real problem into an abstract problem in computers. Mathematics give you a good guide line now to implement these abstractions. This what you are going to learn when you go to collage for computer degree, learning to solve problem using mathematics, and learn how to implement it in computers

In my line of work, a software engineer, If we start with right design and good implementation, the software is less likely to have problems, and easy to maintain. On the other hand, if start with bad design, it is going to cause problems, difficult to maintain and difficult adapt to new requirement.

Many times, I don't have full understand the problem, but I do have implement a systems. A good practice is implement as minimum as possible but still satisfy the requirements. However, if I am blindingly follow this practice, I probably end up with a system that difficult to adapt to new requirement later, which may cause more problem and need to be rewritten later.

To implement as minimum as possible need a good design to guide the implementation, like driving with a good map. Where do I get that good design? That right, mathematics.

I really hope to convince you, learning mathematical abstraction such as graph, tree, set, hash it's not a waste of time. It's will help you become a better problem solver. It's explores you to many problems, and good solutions. It's also good practice for problem solving. Those skills become very important when you have to dealing with problems in the real world.

Have any thought? Let me know. Thanks for reading.