Documentation

DescriptiveComplexity.Problems.JobSequencing.Defs

Job sequencing: definition #

SEQUENCING (Karp 1972): given jobs with execution times, deadlines and penalties, and a bound, is there a one-processor schedule whose jobs missing their deadline carry a total penalty at most the bound? Like Knapsack it is written in binary (DescriptiveComplexity.Numbers.BinRel) – times, deadlines, penalties and the bound – since under the unary encoding the problem is solvable in polynomial time by dynamic programming and is therefore not NP-hard at all.

The vocabulary #

FirstOrder.Language.jobSeq carries

The schedule #

A schedule is a linear order on the universe rather than a permutation of an initial segment: on a finite universe the two are the same thing, and a relation is what a Σ₁ certificate can guess and what a first-order kernel can constrain. A job's completion time is then the total execution time of the jobs at or before it (DescriptiveComplexity.JSCompletion), it is late when that exceeds its deadline, and the schedule is good when the late jobs' penalties sum to at most the bound. Only jobs are summed over, so the elements of the universe that are bit positions ride along in the order harmlessly.

@[reducible, inline]

dline j p: the deadline of j has bit 1 at position p.

Equations
Instances For
    Dependency graph
    Dependency graph
    Dependency graph

    The relation symbols of the language.

    Instances For
      Dependency graph
      def FirstOrder.Language.instDecidableEqJobSeqRel.decEq {a✝ : } (x✝ x✝¹ : jobSeqRel a✝) :
      Decidable (x✝ = x✝¹)
      Equations
      Instances For
        Dependency graph
        @[reducible, inline]

        time j p: the execution time of j has bit 1 at position p.

        Equations
        Instances For
          Dependency graph
          @[reducible, inline]

          pen j p: the penalty of j has bit 1 at position p.

          Equations
          Instances For
            Dependency graph
            Dependency graph
            @[reducible, inline]

            le a b: the linear order carrying the place values.

            Equations
            Instances For
              Dependency graph

              The relational language of job-sequencing instances: jobs and bit positions, the bits of each job's execution time, deadline and penalty, the bits of the penalty bound, and a linear order.

              Equations
              Instances For
                Dependency graph
                @[reducible, inline]

                bnd p: the penalty bound has bit 1 at position p.

                Equations
                Instances For
                  Dependency graph
                  @[reducible, inline]

                  posn p: p is a bit position.

                  Equations
                  Instances For
                    Dependency graph

                    The shorthands of the vocabulary #

                    Dependency graph
                    Dependency graph

                    time j p: the execution time of j has bit 1 at position p.

                    Equations
                    Instances For
                      Dependency graph
                      Dependency graph

                      le a b: the linear order carrying the place values.

                      Equations
                      Instances For
                        Dependency graph
                        Dependency graph

                        pen j p: the penalty of j has bit 1 at position p.

                        Equations
                        Instances For
                          Dependency graph
                          Dependency graph
                          Dependency graph
                          Dependency graph
                          Dependency graph

                          Schedules #

                          noncomputable def DescriptiveComplexity.JSCompletion {A : Type} [FirstOrder.Language.jobSeq.Structure A] (sched : AAProp) (j : A) :

                          The completion time of a job under a schedule: the total execution time of the jobs scheduled at or before it.

                          Equations
                          Instances For
                            Dependency graph
                            def DescriptiveComplexity.JSLate {A : Type} [FirstOrder.Language.jobSeq.Structure A] (sched : AAProp) (j : A) :

                            A job is late under a schedule when it completes after its deadline.

                            Equations
                            Instances For
                              Dependency graph
                              noncomputable def DescriptiveComplexity.JSPenalty {A : Type} [FirstOrder.Language.jobSeq.Structure A] (sched : AAProp) :

                              The total penalty of the jobs a schedule leaves late.

                              Equations
                              Instances For
                                Dependency graph

                                The problem #

                                A job-sequencing instance is a yes-instance when its order is a linear order and some schedule – some linear order on the universe – leaves late only jobs whose penalties sum to at most the bound.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  Dependency graph
                                  Dependency graph

                                  SEQUENCING, as a problem on job-sequencing instances: is there a schedule whose late jobs carry a total penalty at most the bound? The times, deadlines, penalties and bound are written in binary, which is what makes the problem NP-hard rather than polynomial-time.

                                  Equations
                                  Instances For
                                    Dependency graph