there is a program called lottogenius at

www.lottogenius.com
it works on the covering theory and covering design theorem

has anybody got any code in any programming language (vb preferred) so that

i can see how this works?

i'd like to make my own lotto genius.

Is there any mathematical background to lottery wheels?

Yes, there is. Lottery wheeling is based on Covering theory, and Covering Design theorem:

Covering Design C(v,k,t,m,l,=b) is a pair (V,B), where V is a set of v elements (called points) and B is a collection of b k-subsets of V (called blocks), such that every m-subset of V intersects at least l members of B in at least t points. It is required that v >= k >= t and m >= t. The case m > k is also a valid case. B can be a multiset.

When applied to lottery:

v total numbers in the design (amount of numbers you play)

k amount of numbers drawn

t min match t (t of m)

m min match of m (t of m)

l lambda (min l times t of m) (it is always 1and usually omitted)

b number of blocks (number of games)

For example, C(44,6,3,5,154) describes wheel with 44 numbers designed for "pick 6" lottery that guarantees 3 matches if 5 officially drawn balls are within the group of 44 numbers you have played. Finally, the wheel size is 154 games.