Open In App

What is Problem Decomposition?

Last Updated : 29 Feb, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

If a computer system is a multiprocessing system, then a single problem/program must be divided into subproblems in order to assign them to the processors. In order to perform this task a technique, Problem decomposition is used. It is the process of decomposing a problem/program into multiple subproblems/subprograms. It is the basic building block of Parallel Computing. 

Decomposition is needed because a problem needs to be divided into different tasks and then mapped to the processors, whereas a task is a subproblem resulting from the decomposition of a problem.

Techniques for Problem Decomposition

In order to decompose a problem/program, the following techniques can be used by a computer:

  • Recursive Decomposition: This technique of decomposition is a general-purpose technology that can be used to decompose any sort of problem in computation. It works basically on the basis of the “Divide and Conquer” principle, which basically divides a problem into subproblems (Divide) and then assign them to different processors (Conquer). A simple example is the sorting of an array using the Quick Sort Algorithm, which basically divides the array into simplest units and then processes them in order to sort them in ascending or descending order.
  • Data Decomposition: This technique of decomposition is again general purpose. It divides the data in the program into parts and then assigns them to instructions(tasks). Data Decomposition can be considered in a matrix multiplication problem. Let say we have two matrices A and B, and their product is stored in another matrix C.

Matrix A:                                 Matrix B:                                          Matrix C:

    A1      A2                                            B1      B2                                                          C1      C2
    A3      A4                                B3      B4                                                          C3      C4

So, by data decomposition following tasks will be generated to get the product of A and B, and storing the new matrix in C.
Task 1:   C1= A1*B1
Task 2:   C2= A2*B3
Task 3:   C3= A3*B2
Task 4:   C4= A4*B4

Now, these tasks will be assigned to four processors.

  • Explorative Decomposition: This technique of decomposition is a special-purpose technique, it will be used for a certain types of problems. A problem will be decomposed using explorative decomposition, if by decomposing it a search space is acquired, from where every element (subproblem) is processed by the processors. An example of this type of decomposition is used in Puzzle games, where we have a search space and we have to check the position of every part of the puzzle, to solve it.
  • Speculative Decomposition: This technique is again a special-purpose technique. In this technique, the problem is divided and assigned to the processors without any investigation or research, whether the decision made is correct or wrong (speculative). Its best example is a program comprising of nested if. In a program, if an if statement contains another if, and the program is already decomposed and the lines of code are assigned to multiple processors without even checking the conditions, the processors will run both the if statement and its inner if, but after some time when the condition is checked, e.g. false and the decision is made, then the other if statement will also be discarded. Its limitation is that it doesn’t work on the basis of correct decision making, it just divides and maps to the processors, but it is faster than other decomposition techniques.

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads