Problem Decomposition or partition
The First step in developing a program is to understand the problem for which program is to be developed. Unless until problem is not clearly understood, program can not be developed or it may be developed incorrectly. The size and complexity of problem are two major factors which needs to be considered while understanding a problem and developing a solution. A small and simple problem can be understood easily, while large and complex problem requires some proper method or procedure to simplify it in order to get its details and to find solution. One of the well known and widely used method is decomposition or partitioning of a problem.
In decomposition or partitioning, given problem which is very difficult to understand as single piece is divided into sub problems. Each sub problem then can be further divided into smaller problems. This process is repeated until, you get a set of sub problems which are small, easy to understand and managed. After developing solution to each small problem, integrating their solutions properly gives total solution. The basic idea is to take small part of large problem at a time and solve it. Solving small problems is easier than considering whole problem at a time. The decomposition must be done on logical basis not on physical basis. Consider an example of banking system. Below Diagram gives partial decomposition of major banking functions.
As shown in diagram, one of the major functions of bank is to manage the various types of accounts like saving, current, loan etc. Within a loan account, there are various types of loans like housing, vehicle etc. Another major function of bank is to manage their personal resources which cover payroll, leave and other information. Note that it is very difficult to understand even whole accounts management as a single function. Rather at a time, if we take only housing loan problem in hand, we can easily understand its rules and regulations. Once you understand all small problems which are results of decomposition, problem is solved. In this, example, decomposition is made on basis of functionality of bank.
Sometimes physical decomposition in system helps us in simplifying problem. Below diagram shows a physical decomposition of a company hierarchy for staff positions. This physical decomposition allows us to separate problem of each division or department.Normally, the functions performed by each division or department are different from other division or department. While developing a solution to a particular division or department, decomposition should be done logically on relation of functions performed.