Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

PART 1: PSEUDO-CODE Let J be a set of jobs that need to be processed on a single

ID: 3745743 • Letter: P

Question

PART 1: PSEUDO-CODE Let J be a set of jobs that need to be processed on a single machine. Let pj and d be the processing time and due date of job j in J. Assume the following inputs: j-[0, 1, 2, 3, 4, 5] p[10, 3, 4, 8, 10, 6] d-[15, 6, 9, 23, 20, 30 f due dates jobs (index) processing times Problem 1 - 20 point:s Develop a pseudo-code that reads the lists j, p and d as inputs and prints the number of jobs that are completed late if the jobs are processed in non-decreasing order of their index (i.e. 01>2>

Explanation / Answer

A pseudocode is a human readable code and there are no strict conventions to write a pseudocode.For the above problem the following pseudocode maybe helpful:

begin

p=[10,3,4,8,10,6];

d=[15,6,9,23,20,30];

   sum:=0;

   count:=0;

   for i:=0 to 5 do

      begin

             sum:=sum+p[i];

          if sum>d[i] then

               count:=count+1

     end

return count

end     

Hope this helps :) .