TITLE: Designing a Custom "Abbreviated Wheel" System for the Lottery
QUESTION [1 upvotes]: My friend and I are interested in playing the lottery. We plan to enter multiple number combinations (a.k.a. "lines") per drawing to increase our chances of winning. Specifically, we would like to use a system known as an "abbreviated wheel" to construct the lines that we will play.
(Side note: For the purposes of this question, please overlook the fact that government-run lotteries are negative-expectation games. We are well aware of this. We are playing solely for the entertainment value, not as a serious investment to get rich quick.)
Together we chose 8 of our favorite numbers to use in our wheel. In our state's lotto game 5 balls are picked in each drawing without replacement, so each of our lines will contain exactly 5 of our 8 numbers. To maintain a fair amount of variation among the lines, we don't want to have any 2 lines that share more than 3 numbers in common.
So we went to a local gas station and took home a lotto betting slip that we could fill out and later return to the station. Each slip lets you select up to 5 separate lines. Naturally I was curious if we could come up with enough different lines to fill the whole slip without using more than our 8 numbers or breaking our commonality limit of 3. We found a few ways to make 4 lines pretty easily, but it took a surprising amount of time, scrap paper, and trial-and-error for us to discover just 1 way to get 5 lines. This ordeal made me think: "There has to have been an easier way. Is there a formula that could have told us the maximum number of lines that are possible given our restrictions?"
To formalize and generalize our scenario, let's call the alphabet of usable lottery numbers/symbols $\Sigma$; the individual lines/symbol sets $S_1,S_2,...,S_n$; the common size of these symbol sets $z$; and the maximum number of overlapping symbols $m$. We want a formula that outputs (in terms of $|\Sigma|,z,m$) the largest possible value of $n$ such that all 3 of these statements hold true: $$S_1,S_2,...,S_n\subseteq\Sigma$$ $$\forall i=1,2,...,n:|S_i|=z$$ $$\forall i=1,2,...,n-1:\forall j=i+1,i+2,...,n:|S_i\cap S_j|\leq m$$
For example, in the specific case of the betting slip described above, $|\Sigma|=8,z=5,m=3$. If we call the elements of $\Sigma$ (i.e. our 8 favorite numbers) $a,b,c,d,e,f,g,h$ for simplicity's sake, the custom abbreviated wheel we came up with was: $$S_1=\{a,b,c,d,e\}$$ $$S_2=\{a,b,c,f,g\}$$ $$S_3=\{a,b,d,f,h\}$$ $$S_4=\{a,d,e,f,g\}$$ $$S_5=\{a,c,e,g,h\}$$ This wheel demonstrates the case when $n=5$. We are fairly certain that $n=6$ sets is impossible without changing 1 or more parameters; therefore our final output is 5.
To attempt to derive such a formula on my own, I experimented with low values of $|\Sigma|$ and $z$, recorded tables of $n$-values vs. $m$-values, and searched for patterns in the results. These were the generalizations I was able to make:

As $m$ increases while $|\Sigma|$ and $z$ are held constant, $n_{largest}$ never decreases.
If $z>|\Sigma|$ then $n_{largest}=0$ regardless of the value of $m$ because there are too few symbols in the alphabet to construct any valid sets.
If $m\geq z$ then $n_{largest}=\infty$ because you can repeat the same set as many times as you want and still never exceed the overlap limit.
If $m=0$ then $n_{largest}=\lfloor\frac{|\Sigma|}z\rfloor$; since no symbol can appear in more than one set, you simply divide the alphabet into groups of equal size and count the number of complete groups.
If $m=z-1$ then $n_{largest}=_{|\Sigma|}C_z$ where $_xC_y$ is the combination function.

Once I started testing values of $|\Sigma|$ greater than 5 I had to resort to trial-and-error, and I could no longer rely on my own calculations to be accurate enough for me to base any new observations.
If a well-known formula for computing $n_{largest}$ exists, can you identify what it is? Perhaps, if my observations noted above are correct, you could continue where I left off in making generalizations and explaining how the formula can be derived.
As a bonus, I realize there are other metrics -- such as the number of distinct valid wheels for a given parameter set, or the number of times each symbol occurs within a wheel -- that my friend and I never investigated. Yes, I realize how long and meaty of a post this already is...but if you have any insights on these extra topics I'd be thrilled to hear!
Cheers to all,
Craig

REPLY [0 votes]: In the example, there are five 'a', two 'h', and three each of the other six numbers. Other count combinations will work.
Basically, use a logic to develop a set and to get to the fifth line of a set but then if the fifth line has repeating numbers then use a logic to swap with other lines. Hopefully, the logic is good enough such that there is only one number that repeats in the preliminary fifth line.
{"set_name": "stack_exchange", "score": 1, "question_id": 3765091}