Question: The dispatch department has contacted you with a new problem. Once they receive a new order, they have to look for each product's availability in

The dispatch department has contacted you with a new problem. Once they receive a new order, they have to look for each product's availability in the existing warehouses. The preference is to ship from the minimum amount of warehouses and to always ship from the warehouse that contains the maximum amount of units.

For example, review the following order (number 10333) that was received by the dispatch department this morning: Product ID Amount

0001 10

0005 12

0003 3

0002 4

Be sure to also review the following diagram that shows the warehouse and the list of available products: Warehouse 1 Warehouse 2 Warehouse 3

Product 001 10 3 100

Product 002 0 7 6

Product 003 3 4 1

Product 004 4 4 4

Product 005 7 1 4 T

he ideal shipment would be as follows:

Product ID Units Warehouse

0001 10 1

0005 7 1 1 2 4 3

0003 3 2

0002 4 2

Complete the following:

What approach would you follow to create an algorithm to solve this particular problem? Brute force or greedy? Explain the logic that you follow for your choice.

Present the algorithm either using pseudocode or a flowchart.

The following is a screenshot of the tables in the text above for reference:

The dispatch department has contacted you with a new problem. Once they

Product ID Amount 0001 10 0005 12 0003 0002 4 Warehouse 1 Warehouse 2 Warehouse 3 Product 001 10 3 100 Product 002 Product 003 4 Product 004 4 4 Product 005 4 1 Warehouse Product ID Units 0001 10 0005 4 0003 0002 4 2 6. 2. 2. 7, 3. 4. Product ID Amount 0001 10 0005 12 0003 0002 4 Warehouse 1 Warehouse 2 Warehouse 3 Product 001 10 3 100 Product 002 Product 003 4 Product 004 4 4 Product 005 4 1 Warehouse Product ID Units 0001 10 0005 4 0003 0002 4 2 6. 2. 2. 7, 3. 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!