need code in python 100 3. Disk Space Analysis A company is performing an analysis on the
Fantastic news! We've Found the answer you've been seeking!
Question:
need code in python
Transcribed Image Text:
100 3. Disk Space Analysis A company is performing an analysis on the computers at its main office. The computers are spaced along a single row. The analysis is performed in the following way: 1. Choose a contiguous segment of a certain number of computers, starting from the beginning of the row. 2. Analyze the available hard disk space on each of the computers. 3. Determine the minimum available disk space within this segment. After performing these steps for the first segment, it is then repeated for the next segment, continuing this procedure until the end of the row (i.e. if the segment size is 4, computers 1 to 4 would be analyzed, then 2 to 5, etc.) Given. this analysis procedure, find the maximum available disk. space among all the minima that are found during the analysis. Example n = 3, the number of computers space = [8, 2, 4] x = 2, the length of analysis segments In this array of computers, the subarrays of size 2 are [8, 2] and [2, 4]. Thus, the initial analysis returns 2 and 2 because those are the minima for the segments. Finally, the maximum of these values is 2. Therefore, the answer is 2. Function Description Complete the function segment in the editor below. segment has the following parameter(s): int x: the segment length to analyze int space[n]: the available hard disk space on each of the computers Returns: int: the maximum of the minimum values of available Te 100 3. Disk Space Analysis A company is performing an analysis on the computers at its main office. The computers are spaced along a single row. The analysis is performed in the following way: 1. Choose a contiguous segment of a certain number of computers, starting from the beginning of the row. 2. Analyze the available hard disk space on each of the computers. 3. Determine the minimum available disk space within this segment. After performing these steps for the first segment, it is then repeated for the next segment, continuing this procedure until the end of the row (i.e. if the segment size is 4, computers 1 to 4 would be analyzed, then 2 to 5, etc.) Given. this analysis procedure, find the maximum available disk. space among all the minima that are found during the analysis. Example n = 3, the number of computers space = [8, 2, 4] x = 2, the length of analysis segments In this array of computers, the subarrays of size 2 are [8, 2] and [2, 4]. Thus, the initial analysis returns 2 and 2 because those are the minima for the segments. Finally, the maximum of these values is 2. Therefore, the answer is 2. Function Description Complete the function segment in the editor below. segment has the following parameter(s): int x: the segment length to analyze int space[n]: the available hard disk space on each of the computers Returns: int: the maximum of the minimum values of available Te
Expert Answer:
Answer rating: 100% (QA)
Python Code I have added comments in the code for better understanding of the program func... View the full answer
Related Book For
Introduction to Operations Research
ISBN: 978-1259162985
10th edition
Authors: Frederick S. Hillier, Gerald J. Lieberman
Posted Date:
Students also viewed these programming questions
-
In the geothermal power plant that produces 12000 kW of energy, the generator inlet pressure is 2.250 kpa and the temperature is 120 degrees Celsius, the generator output is 1.26 kpa and the...
-
2 Evaluate the following integral i cos [2(t+2)]8(2T+4)dt A. 2 B. 0.1 C. 0.5 D. 1 E. None of the given answers.
-
Write Python code to implement the City Council management system. The program should do the following: Deliverables for this assignment are: 1. For the management system allocated to you, develop...
-
Knoko Systems is considering a capital budgeting project with a life of five years that requires an outlay of $90,000. It has free cash flows each period as shown in the following distribution:...
-
Suppose you own a travel agency in a large city. You have many corporate clients, but growth has slowed somewhat. Some long-term employees are getting discouraged, but you feel that there might be a...
-
What were the primary reasons for changing the current system? As CIO Kincaid looked back over the past 12 months, he took pride in the fact that Butler University had taken a major step forward with...
-
Refer to the statements for Google in Appendix A. For the year ended December 31, 2015, what was its debt-to-equity ratio? What does this ratio tell us? Data From Statement Google In Appendix A...
-
The outstanding capital stock of Edna Millay Corporation consists of 2,000 shares of $100 par value, 8% preferred, and 5,000 shares of $50 par value common. Instructions Assuming that the company has...
-
How did Martin Luther and John Calvin differ in their theological views towards the church and Baptism and Eucharist?
-
XYZ Manufacturing would like to purchase a machine for its current operations. XYZ would like to know the maximum price it should pay for that machine. That is, how high must the price be for the...
-
Draw an upward-sloping graph with "study-hours" on the x-axis, and "average quiz score" on the y-axis. If you use this graph to show what happens when "study-hours" increases, you'd show it as a C...
-
2. Consider the following distributed lag model: 4 Y = a(1-X) +3X + XY_ + (u, \u_), - t-1 0 X 1, Suppose in the original model u~ AR(1): u = pu + e, where p is autocorrelation coefficient and e, is...
-
Belenzon, Chatterji and Daley (2017) find that eponymy-firms being named after their owners-is linked to firm performance. The baseline specification in their paper takes the form ROAita Eponymousit...
-
10.4 A specific cable, whose endpoints are fixed, has a length of 5 m and c = T/v = 15. If the cable is released from rest with the initial shape f(x) = 6 x 10-3 sin nx/L, determine the cable shape...
-
In the bivariate linear regression model Vi = Bo + Bixi + ui,i = 1,2,...n, the OLS estimators of the regression parameters are given by (xi-x)(Vi-y) (x x)2 - By definition, Prove that B = Bo = 5 -...
-
For all triangles, the sum of the three Interior angles is always 180. In a right triangle, since one angle must be 90, the sum of the other two angles must be 90. 0 In the right triangle above,...
-
Suppose you want to buy a new car with a purchase price of $22,000, but you only have saved up $5,000 to make as a down payment. Then you'd need to finance (i.e ., get a loan for) the balance of...
-
g(x) = x 5 5x 6 a. Show that g(x) = 0 has a root, , between x = 1 and x = 2. b. Show that the equation g(x) = 0 can be written as x = (px + q) 1/r , where p, q and r are integers to be found. The...
-
A certain small grocery store has a single checkout stand with a full-time cashier. Customers arrive at the stand randomly (i.e., a Poisson input process) at a mean rate of 30 per hour. When there is...
-
Reconsider Prob. 20.3-1. Suppose now that you want to convert these random integer numbers to (approximate) uniform random numbers. For each of the three parts, give a formula for this conversion...
-
Suppose that the air freight charge per ton between seven particular locations is given by the following table (except where no direct air freight service is available): A certain corporation must...
-
Based on this chapter and the case incident, compile a list of 10 international HR mistakes Mr. Fisher has made so far.
-
Based on what you read in this chapter of Dessler, Human Resource Management, whats the first step you would have advised the Hotel Paris to take as part of its new safety and health program, and why?
-
Write a one-page summary addressing the topic, How improving safety and health at the Hotel Paris will contribute to us achieving our strategic goals.
Study smarter with the SolutionInn App