TL;DR: The 1,002 sampled coupons follow two arithmetic patterns. No subset sums to any of the tested targets, 100, 200, β¦, 1,000. This result concerns the sample and does not establish that the entire lottery was unwinnable.
Updated 2025-01-05
Introduction
Kasa Romana was a well-known lottery in Poland, organized by the Amino food company. Participants collected coupons and tried to combine them into round hundreds, up to 1000 PLN, to win cash prizes. Here I use data from the last Kasa Romana event, held in 2016, and check it with the Knapsack Algorithm in R.
The data was gathered by BezKanalu, a Polish YouTube channel known for testing promotional products. They collected 1002 coupons from the final event. The question is simple: could these coupons realistically produce a winning combination?
To tackle this challenge, I utilized the Knapsack Algorithm, a well-established optimization technique. The algorithm identifies the optimal way to select items (in this case, coupons) that meet specific constraints (summing to full hundreds) while maximizing value. Using R, I implemented this algorithm to determine if any subset of the collected coupons could satisfy the winning conditions of the lottery.
The analysis found that no subset of the sampled coupons reaches any of the tested targets. A modular arithmetic proof explains why, conditional on the observed value patterns. The sample alone does not establish the odds of winning across the full lottery.
Apply Knapsack Algorithm on Lottery Coupons
First we will define the lottery coupons and analyze them.
It is worth to try to understand the data patterns before running the Knapsack Algorithm.
Sorted unique values:
Sorted table of frequencies:
Histrogram might be helpful to find certain patterns:
The observed values fit two arithmetic patterns:
- multiples of 13;
- 165 plus a multiple of 13.
The following check confirms that every sampled value belongs to the specified finite portions of these sequences. It does not establish how the values were generated.
Single Knapsack Problem
Knapsack is an optimization method, linear programming for integers. Each of 1000 coupons is replicated 10 times before the procedure. This replication step is not needed to get this certain results although it will be even more convincing. Remainder, I was looking for set of coupons which sum to full hundreds (100, 200, β¦) up to 1000.
For these coupon values, none of the tested target sums is attainable. The following proof explains why independently of the knapsack calculation.
Theoretical Proof: Modular Arithmetic Analysis
The check above shows that each sampled coupon value belongs to one of these two families:
\[ A = \{13k : k \in \mathbb{Z}_{\geq 0}\}, \qquad B = \{165 + 13k : k \in \mathbb{Z}_{\geq 0}\}. \]
These families include all values tested above and may include other values. Proving the result for these larger families therefore also proves it for the sample.
Proposition. If every coupon in a selection has a value in \(A \cup B\), the selectionβs total cannot equal \(100n\) for any integer \(n \in \{1,\ldots,12\}\). In particular, none of the tested targets from 100 through 1,000 is attainable.
Proof. Let \(C\) be the number of selected coupons from \(B\), and let \(K\) be the sum of the corresponding indices \(k\) for all selected coupons, from both \(A\) and \(B\). Both \(C\) and \(K\) are non-negative integers, and the total is
\[ S = 13K + 165C. \]
Suppose, for a contradiction, that \(S = 100n\) for some \(1 \leq n \leq 12\). Reducing the equation modulo 13 and using \(165 \equiv 100 \equiv 9 \pmod{13}\) gives
\[ 9C \equiv 9n \pmod{13}. \]
Because \(\gcd(9,13)=1\), 9 is invertible modulo 13, so \(C \equiv n \pmod{13}\). Since \(C \geq 0\) and \(1 \leq n < 13\), it follows that \(C = n + 13t\) for some non-negative integer \(t\). Hence \(C \geq n\), and
\[ 100n = 13K + 165C \geq 165C \geq 165n > 100n, \]
a contradiction. Therefore no such selection exists. \(\square\)
The restriction on \(n\) matters: the proof does not rule out larger multiples of 100. For example, the sample contains more than one 650 coupon, and \(650 + 650 = 1{,}300\). The argument applies to any number of coupons from the two families, but the sample does not show that every coupon issued in the lottery belonged to those families.
Conclusion
The knapsack analysis and the modular arithmetic proof both rule out the tested targets of 100 through 1,000 for the sampled coupons. The proof is stronger in one respect: it does not depend on the number of coupons selected, provided their values follow the two stated patterns. Neither result establishes that the same patterns held for every coupon in the lottery.