Lotto Ticket Coverage From Algorithm Design Manual?

In the example

  • n = 5 - the numbers from the psychic
  • j = 3 - the number of winning numbers from n
  • k = 3 - the number of slots on the ticket
  • l = 2 - the number of matches needed to get a prized

What makes this case simple is the fact that all the numbers on the ticket must be between 1..5. This is because j=k, meaning the number of winning numbers falling between 1 and 5 matches the number of slots on the ticket.

So take the tickets {1, 2, 3} and {1, 4, 5}. That does indeed mean you're missing the match {3, 5} but if the numbers {3, 5} are on the ticket then the other number on the ticket must be from the set {1, 2, 4}. If its the 1 then the match 3 has been picket up by the first ticket, if its the 2 then then same, if its the 5 then the second ticket catches it.


In figure 1.11 the number of slots on each ticket is 3. So there are 3 winning numbers. With two tickets {1,2,3} and {1,4,5}, you are guaranteed to have at least 2 out of the 3 winning numbers.

Tags:

Algorithm