Computers and Technology

Suppose that you run a simple consulting business. Your clients are mostly clustered on the East and West coasts. From month to month, you could either run your business from an office in NYC or an office in San Francisco. You have some budget numbers to help: if you run your business out of NYC in month i, you expect to incur costs N_i, and likewise costs S_i for San Francisco. Furthermore, every time you move from one office to another, you incur a moving cost, M.

Given monthly cost estimates N_i, S_i, for i=1 ... n, and the moving cost M,
Find the best schedule of where to work each month.
For example, suppose that M = 10, and
i=1 i=2 i=3 i=4
N_i 1 3 20 30
S_i 50 20 2 4then the optimal schedule is [NY, NY, SF, SF].
Write an algorithm (based on dynamic programming) to solve this problem.
Write the program using C++

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:30, yudayang2012pa9u8p
Consider the following statements: #include #include class temporary { private: string description; double first; double second; public: temporary(string = "", double = 0.0, double = 0.0); void set(string, double, double); double manipulate(); void get(string& , double& , double& ); void setdescription(string); void setfirst(double); void setsecond(double); }; write the definition of the member function set() so that the instance variables are set according to the parameters. write the definition of the constructor so that it initializes the instance variables using the function set() write the definition of the member function manipulate() that returns a decimal number (double) as follows: if the value of description is "rectangle", it returns first * second if the value of description is "circle" it returns the area of a circle with radius first if the value of description is "cylinder" it returns the volume of a cylinder with radius first and height second. hint: the volume of a cylinder is simply the area of the circle at the base times the height. if the value of description is "sphere" it returns the volume of the sphere with radius first. otherwise it returns -1.0;
Answers: 1
image
Computers and Technology, 24.06.2019 10:00, ariyanadavid5989
1. which of these is not true about torsion bars? a. they can be used to adjust ride height b. they can be adjusted anytime since they don't affect alignment angles c. they attach between the frame and the lower control arm d. they twist to produce a spring effect
Answers: 1
image
Computers and Technology, 24.06.2019 11:00, zeesharpe05
These statements describe lists in presentation programs: a. bullets can be turned off and on. b. bullets cannot be turned off. c. bullet styles, colors, and sizes can be changed. d. lists don't have to use bullets or numbers. e. numbering styles, colors, and sizes can be changed. f. numbers can be turned off and on. g. numbers cannot be turned off. select all that apply
Answers: 2
image
Computers and Technology, 24.06.2019 14:00, MK100
What are the different components of the cloud architecture?
Answers: 2
Do you know the correct answer?
Suppose that you run a simple consulting business. Your clients are mostly clustered on the East and...

Questions in other subjects:

Konu
Mathematics, 17.12.2019 22:31