Compare what two specifications permit

A booking controller receives the number xx of currently free seats and returns the number yy of tickets to issue. There are enough applicants to fill every free seat, and no other bookings occur during this decision.


For every specification below, the common domain is integer inputs 0≤x≤400\le x\le40 and integer outputs 0≤y≤410\le y\le41. The baseline specification is


0≤x−y≤3.0\le x-y\le3.


It prohibits issuing more tickets than there are free seats and permits at most three free seats to remain unassigned.


Four candidate specifications are proposed. Each candidate replaces the baseline rule; it is not added to it.

  • A: If x<2x<2, then y=0y=0; otherwise, y=x−2y=x-2.
  • B: y≤xy\le x.
  • C: x−3≤y≤xx-3\le y\le x.
  • D: x−2≤y≤x+1x-2\le y\le x+1.

Use logical implication: one specification guarantees another when every input-output pair permitted by the first also satisfies the second. For each candidate, enter yes or no in both columns. Check both directions across the entire common domain; one permitted counterexample makes a guarantee false.

CandidateCandidate guarantees baselineBaseline guarantees candidate
A
B
C
D

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Specifications and Satisfaction Questions: