Rank venues with a nonnegotiable constraint

Read each comparison through to its condition. · 205 words

Use a nonnegotiable constraint to stop a preferred option from entering the results. For example, "Use only the municipal recreation guide entries below to rank indoor tennis venues for a six-player group. Every venue must be indoors and cost no more than 22 dollars per hour. Discard any venue that fails either requirement. Rank the rest by number of courts, highest first; break a court-count tie by lower hourly cost. Return a numbered list with court count, price, and an eligibility check for every source venue, including rejected venues and their reasons." The limits are absolute, and the output shows both kept and rejected places.

The guide lists North Gym with 4 indoor courts for 24 dollars per hour; East Hall with 4 outdoor courts for 14 dollars; Hill Center with 6 indoor courts for 21 dollars; and Riverside Courts with 2 indoor courts for 18 dollars. North Gym fails the price limit, and East Hall fails the indoor rule while meeting the price limit. Hill Center and Riverside Courts pass. The checkable result is Hill Center first, with 6 courts, then Riverside Courts, with 2. The exclusion notes make clear that a high court count cannot compensate for breaking the budget or indoor rule.

Check your recall

Which venues pass both nonnegotiable constraints, and in what order are they ranked?

Check your answer

Hill Center ranks first because it has 6 courts, and Riverside Courts ranks second with 2 courts. North Gym fails the price limit, while East Hall fails the indoor requirement.

Sources and credits

Original KeyTouch lesson. Background reading · DAIR.AI · General Tips for Designing Prompts.