Please help me with this
Job Object Class
ATTRIBUTES (Make “friendly” / “protected”)
-arrTime -random 1-250
-cpuBurst -random 2-15
-priority -random 1-5 (5 is highest)
-exitTime -
-turnAroundTime -algorithmresult
-remainingTime -updated in algorithms
METHODS:
-constructor(s)
-toString (to display initial jobs and algorithm results)
-compareTo (general, by arrival time)
//Note: different algorithms may need a different compare. i.e. by priority, etc.
Those can be defines in the algorithm methods.
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
- The search algorithm developed will be used for users to search the catalog for all items matching the search keyword(s), and there are a total of 15000 items in the catalog. During development, three different algorithms were created. • Algorithm A runs in constant time, with a maximum runtime of 1.10 seconds and returns all matching results. ● Algorithm B runs in logarithmic time, with a maximum runtime of 0.3 seconds, and returns only the first result. ● Algorithm C runs in linear time, with a maximum runtime of 1.50 seconds and returns all matching results. Which algorithm would be the least suitable for the requirements stated? In your answer, justify your choice by explaining why you picked that algorithm, and why you did not pick the other two algorithms.OND OND OND DADarrow_forwardQuestion 10 Full explain this question and text typing work only thanks We should answer our question within 2 hours takes more time then we will reduce Ratingarrow_forward8. A school is creating class schedules for its students. The students submit their requested courses and then a program will be designed to find the optimal schedule for all students. The school has determined that finding the absolute best schedule cannot be solved in a reasonablo time. Instead they have decided to use a simpler algorithm that produces a good but non-optimal schedule in a more reasonable amount of time. Which principle does this decision best demonstrate? O A Unreasonable algorithms may sometimes also be undecidable O B. Heuristics can be used to solve some problems for which no reasonable algorithm exsts O C. efficiency Two algorithms that solve the same problem must also have the same O B. Approximate solutions are often identical to optimal solutionsarrow_forward
- 1. Let S = {1,2...n} be a set activities, where activity i € S has a start time si, a finish time f; and a profit p, asSociated with it. Design an dynamic programming algorithm for computing a set of compatible activities of maximum profit. Argue that the time complexity of you algorithm is O(n log(n)). (You must start with the correct definitions, and then write a recurrence relation.)arrow_forwardConsider a set of n independent tasks. All tasks arrive at t = 0. Each task Ti is characterized by its computation time Ci and deadline Di. Prove that EDF is optimal for both preemptive AND non-preemptive cases. please type the answersarrow_forwardCalculate average waiting time (AWT), average turnaround time (ATAT) and average response time (ART) for the following Ready Queue scenario by using following algorithms.A) Shortest Job First Algorithm (Preemptive)B) Round Robin where Time Quantum = 2C) Analyze and tell that which one is efficient in term of AWT, ATAT and ART.arrow_forward
- Computer science question using knapsack problemarrow_forwardA service station has both self-service and full-service islands. On each island, there is a single regular unleaded pump with two hoses. Let X denote the number of hoses being used on the self-service island at a particular time, and let Y denote the number of hoses on the full-service island in use at that time. The joint pmf of X and Y appears in the accompanying tabulation. p(x, y) 0 1 2 0 0.10 0.05 0.01 x 1 0.06 0.20 0.07 2 0.06 0.14 0.31 (a) What is P(X = 1 and Y = 1)? P(X = 1 and Y = 1) = | (b) Compute P(X ≤ 1 and Y < 1). P(X ≤1 and Y < 1) = (c) Give a word description of the event { X0 and Y + 0 }. One hose is in use on one island. One hose is in use on both islands. At least one hose is in use at both islands. At most one hose is in use at both islands. Compute the probability of this event. P(X +0 and Y 0) = [ (d) Compute the marginal pmf of X. x 0 Px(x) Compute the marginal pmf of Y. y Py(y) 0 Using Px(x), what is P(X ≤ 1)? P(X ≤ 1) = = 1 2 1 2arrow_forwardMarco Dorigo developed Ant Colony Optimization (ACO) algorithm and this algorithm is used to solve many case studies. Let's say, you are using ACO to solve Travelling Repairman Problem (TRP). Describe the process on how ACO implemented in TRP case study. State if there are any improvisation you would like to make in ACO to improve the implementation in TRP case study. Following Figure 2 shows the definition of the case study. Also, include which algorithm, PSO or ACO, is better used for solving TRP case study. You may use any illustration/description to describe your solution. Travelling repairman problem (TRP) is a scheduling problem whereby a repairman must visit the scheduled locations to conduct the job needed. Each location has a period/time in which the repairman is allowed to arrive. This is to allow maximum number of repair jobs are successfully performed.arrow_forward
- Consider the two versions of Quicksort that are based on the following: (i) Median selection algorithm using the linear-time select method; (ii) The randomized pivot selection algorithm Which of the two algorithms has a faster worst-case asymptotic behavior? Which of the two algorithms has a faster average-case performance? Provide empirical evidence of your answer by writing the corresponding programs for each and conducting experimental evaluation. Your experimental results should provide evidence of your answer. For this you need to run an adequate number of experiments on a variety of array/list sizes (use large randomly generated lists of integers).arrow_forwardGiven two strings A and B and the following operations can be performed on A. Find a minimum number of operations required to make A and B equal. (Please Design a dynamic programming algorithm that can use the following operations to make A equals to B and analyze the complexity. Assume the size of the string is n.). When designing the dynamic programming algorithm, please describe the size and dimensionality of the dynamic programming table, and explicitly formulate the recurrence relationship. 1. Insert 2. Delete 3. Replacearrow_forwardSuppose that a manufacturing company builds n different types of robots, sayrobots 1, 2, . . . , n. These robots are made from a common set of m types of materials, saymaterials 1, 2, . . . , m. The company has only a limited supply of materials for each year,the amount of materials 1, 2, . . . , m are limited by the numbers b1, b2, . . . , bm, respectively.Building robot i requires an aij amount from material j. For example, building robot 1requires a11 from material 1, a12 from material 2, etc. Suppose the profit made by sellingrobot i is pi. Write an integer linear program for maximizing the annual profit for thecompanyarrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education