Good Requirements - Part I - Be Correct

As I was developing as a business analyst, I encountered guidelines that helped me articulate requirements more effectively. The origin of these guidelines was a small card from a company that became a part of Telelogic AB. I would like to share this knowledge with you.

Be Correct
A requirement must be technically and legally possible. One must not violate any legal parameters placed on the company and system in question. A company's legal counsel and government agencies should provide a good foundation for information about legal considerations. Remember that ethical considerations must also be taken into account.

I have heard people say that given time and resources (i.e., money and people) any problem can be solved. Personally, I do not subscribe to this way of thinking. When I was in university I took a course entitled Intractability & Computability; I did quite poorly, but that is besides the point. The premise of Intractability & Computability was to determine whether mathematical problems could be solved algorithmically. What I soon discovered (other than I had issues spelling the name of the course) was there were problems for which one could not reach the best solution. An optimal solution could be achieved in some cases but not the best solution. An example of this type of problem is what is referred to as the traveling salesperson problem (TSP). The traveling salesperson problem is considered np-hard.

The problem is as follows:

  • A salesperson must visit X cities.
  • The salesperson must minimize the distance traveled.
  • The salesperson must only visit any city once.
  • All cities must be visited only once.
  • The trip ends when all cities are visited and the salesperson returns to the starting city.

  1. Figure 1. Shows the cities and the distances that to be traveled.
  2. Figure 2. Shows a path that would be undertaken (assuming A is the start.) The path was chosen by selecting the route to a city that has not been visited and has the shortest distance. Using this methodology, the optimal path is ABCDA, which is 19 units long.
  3. Figure 3. Shows another path, ABDCA, which was chosen by me that is only 14 units long. This is a better path than the optimal solution, but the mathematical algorithm was unable to find it.

Another good reference for the TSP problem is Mathworld.

While I would not expect to encounter situations where the best solution cannot be discovered in practice, one must be cognizant that such situations can exist. How does this tie back to the be correct guideline? TSP is an example of a problem where it is not technically possible to find the best solution, merely an optimal one. Always remember a requirement must be stated in a manner that allows it to be technically and legally possible.

No comments: