Country · schedule reviews of GDP observations
Imagine three classroom slots for reviewing country statistics. Six teams must use distinct slots within each of two groups. Which schedules are possible? Actual GDP observations annotate the country labels, while the scheduling rules are newly chosen for this lesson. No historical meeting allocation or policy choice is being observed.
Freshly read the retained World Bank JSON and select the sixteen 2024 records for NY.GDP.PCAP.KD, measured in constant 2015 US dollars per person. Keep one-based positions in the original response. The table rounds displays to two decimals, while threshold classification uses the original numerical tokens as exact rational values.
Define H by GDP at least 30,000 and L by GDP below 30,000. This is a task threshold, not an official income classification. In retained order select AUS, CAN, DEU from H and BRA, CHN, IDN from L. Keep the original sixteen records as well as the selected six and their selection rule.
Each country label is a variable with domain {slot1,slot2,slot3}. Require distinct values for the three H variables and separately for the three L variables. There is no cross-group inequality. A slot may therefore contain one country from each group.
Choose one of three slots for the first H country, one of two unused slots for the second, and the remaining slot for the third. This gives 3×2×1=6 H permutations. L independently has six, so there are 36 complete schedules. This differs from the 3⁶=729 candidate assignments before constraints.
Fixing AUS to slot1 leaves two orders for the other H countries and six L orders, giving twelve schedules. Fixing both AUS and CAN to slot1 violates the H rule immediately, so there are zero completions. Remaining unassigned variables cannot repair a conflict among fixed values.
A displayed first witness and an exhaustive count answer different questions. The first witness follows declared variable and value orders; it has not been scored as fairest or cheapest. Comparing preference or time cost would require an additional objective with a defined interpretation.
Record grouping, six-country selection and slot constraints as separate steps. The data supply no transition saying that a country’s GDP changes when its review slot changes. The calculation verifies compatibility and counts within the chosen finite schedule.
Try it
Is schedule A valid when H and L use the same three-slot order? Which conditions must be checked after changing one H value?
Yes: each group still uses three distinct slots. Check the changed value’s domain and its two within-H comparisons. Sharing a slot with a country in the other group is allowed.
The actual16 CSV preserves observations and original positions; the assumed36 CSV preserves the constructed schedules. Separate Python and R implementations recompute 36, twelve and zero. Agreement supports the declared calculation, while source authenticity and real institutional behavior require different evidence.
Individual record · complete actual pixels from margin clues
Look at four cells inside an actual handwritten-digit record. If only row and column totals are released, can the original cells be recovered? Use actual provided-test optdigits observations while choosing the released clues and threshold for this lesson.
The original optdigits.tes contains 1,797 rows. Freshly retain its first six rows, their labels and all 64 pixels. Values from zero through sixteen form an 8×8 row-major grid. The six labels are zero through five, but a source row number does not identify the writer.
In the first image, zero-based rows six and seven and columns two and three correspond to p50,p51,p58,p59. Their actual values are [14,5;6,13]. Thresholding at values at least eight gives [1,0;0,1]. Preserve this authored binary representation separately from the unchanged original pixels.
Its constraints are a+b=1, c+d=1, a+c=1 and b+d=1. Give each variable domain {0,1}. Substituting all sixteen candidate rows leaves exactly two binary tables.
If a=0, the first row forces b=1, the first column forces c=1, and the second row forces d=0. If a=1, instead b=c=0 and d=1. Both pass all four constraints. The released margins define a feasible set containing the original, rather than uniquely specifying that original.
Revealing an additional actual clue a=1 selects one of the two completions. Asserting a=b=1 would contradict the first-row total and produce zero solutions. The latter is a hypothetical conflicting claim, not an alteration of the observed source pixels.
Row two has raw patch [1,16;0,11], yielding [0,1;0,1]. Its first-column total zero fixes both first-column cells at zero; the row totals then fix the other two cells. It therefore has one completion. Rows one and four have two; the other four records have one each. Ambiguity depends on the actual clues.
Boundary inclusion is part of the representation. On provided-test row three, zero-based rows two/three and columns two/three give the actual patch [8,13;1,6]; the rule ≥8 yields [1,1;0,0], while >8 yields [0,1;0,0]. Retain coordinates, threshold and equality convention so that another reader constructs the same CSP.
Try it
When all four margins equal one and a=1, determine c first. Which additional cell observation could distinguish the two original completions?
The equation a+c=1 forces c=0. The two completions differ in every cell, so one accurately observed binary cell suffices. A freely chosen extra constraint must not be relabeled as an actual observation.
The original CSV retains labels and all pixels; a derived CSV retains coordinates, threshold, source patch, binary patch, margins and count. Another CSV lists all eight allowed completions across the six records. This illustrates compatibility with partial information, not digit-classification accuracy, writer identity or a general anonymity guarantee.
Company · actual invoice quantities and assumed slot capacities
Imagine allocating seven invoice lines to three work slots. Actual quantities are given, but slot capacities, whether a line may be split, and any cost objective are separate choices. Read the quantities from the source while declaring three slots, indivisible lines and a common capacity for this classroom task.
Freshly open Online Retail.xlsx inside the retained UCI ZIP and select the first invoice, 536365, data rows one through seven. Data-row indices exclude the header, so worksheet rows are two through eight. Preserve invoice, stock code, description, quantity, original date/price/account tokens and country.
The first original price token is 2.5499999999999998 and the original date token is 40513.351388888892. Rounded prices or interpreted calendar displays must not overwrite them. The measured inputs used by this CSP are quantities [6,6,8,6,6,2,6], totaling forty.
Create seven distinct variables, one per source line, each with domain {slot1,slot2,slot3}. The five six-unit lines remain distinct. Require each slot’s quantity sum to be at most C. Source quantities do not supply weights or volumes, so those units must not be substituted for the declared count-based capacity.
At C=16, first suppose the eight-unit and two-unit lines share a slot. They must have one six-unit companion so that the four remaining six-unit lines fit two per remaining slot. Choose the slot in three ways, the companion in five ways, and two of the remaining four lines for the first named remaining slot in six ways: ninety assignments.
If eight and two use different slots, choose the eight slot in three ways, the two slot in two ways, the six-unit companion of eight in five ways and the remaining split in six ways: 180 assignments. The disjoint cases total 270. Their slot-load patterns are respectively 16,12,12 and 14,14,12.
At C=13 total capacity is 39, less than observed quantity forty, proving infeasibility. At C=14 the groups 8+6, 2+6+6 and 6+6 give a feasible 14,14,12 witness. Enumeration finds 180 assignments. Sufficient total capacity alone need not guarantee a feasible indivisible allocation; a witness is checked here as well.
At C=20 there are 1,290 solutions; at C=40 all 3⁷=2,187 candidate assignments pass. Increasing C with the same variables and quantities preserves every previous solution. This inclusion is a property of the declared inequalities, not an observed effect of an operational capacity change on profit or delivery outcomes.
Try it
At C=14 assign source rows (3,1), (6,2,4), and (5,7) to the three slots. Is every line used once, and do the capacities pass?
Rows one through seven are used exactly once. Loads are 14, fourteen and twelve, so the witness passes. Checking that witness establishes feasibility but does not by itself count all 180 assignments.
Account 17850 is a source token. It does not establish one unique person behind the account, and a source line is not verified to be a physical packed box. Treating each selected invoice line as indivisible is an explicit task assumption.
Calling the first of 270 schedules cheapest or operationally optimal would require an objective with units and an operational interpretation. None is supplied, so report feasibility, count and any cutoff. Public CSVs and separate Python/R implementations support reproduction of the declared problem; action effects remain questions for new evidence and design.