# Dynamic programing solutions

Problem Statement: The following are the available machines along with their respective capacities. Large – 10 units XLarge – 20 units 2XLarge – 40 units 4XLarge – 80 units 8XLarge – 160 units 10XLarge – 320 units These machines are located all over the world and depending on which part of the world they are located in, they have associated costs based on the number of hours they are utilised. Below are the per hour costs New York Large : $ 120 XLarge : $ 230 2XLarge : $450 4XLarge : $ 774 XLarge : $1400 10XLarge : $ 2820 Write an optimized resource allocator program that can be used for cost planning. The program takes the below 2 inputs: Hours: No of hours the machine is required to run Capacity: No of units are required (Will always be multiple of 10) Based on these inputs, the program should optimally allocate the resources such that the cost of the capacity required is minimum. Calculate this for every region and show them as the below example.

5/10/2020 12:41:20 PM

Harish Ragav6 Answers

New AnswerSample Input: Capacity of 1150 units for 1 Hour Expected Output: { “Output”: [ { “region”: “New York”, “total_cost”: “$10150”, “machines”: [ (8XLarge, 7), (XLarge, 1), (Large, 1) ] } ] } Lothar

Harish Ragav what's the problem in this question show your attempt,we do not provide answer directly

This is example for the above question and I don't wht kind of dynamic programing is used Lothar