There is a game called "Dobble" (or "Spot It!" in some countries) which implies an interesting problem I couldn't solve. The game consists of some amount of cards $c$, which have $s$ distinguishable symbols on them. For every two cards it is guaranteed that they have exactly one symbol in common. Several other questions have been asked about this game (see https://stackoverflow.com/questions/6240113/what-are-the-mathematical-computational-principles-behind-this-game), but I haven't found my question anywhere. I asked myself:
Given the total number of cards $c$ and the number of symbols $s$ per card, what is the minimum number of distinguishable symbols one has to use in order to fulfill the abovementioned condition?
I wrote an algorithm which can answer this question in a reasonable time for $c < 6$ and $s < 6$ in Java, it can be found here. I'm basically using brute-force to check all possibilities until I can be sure that I've found the optimal one. I used some if-clauses to bail out as early as possible and not generate useless possibiilities, but nevertheless the algorithm isn't fast enough for bigger numbers. If anyone is interested, I would explain the code in more detail (the comments I made are in German).
Here is a table with the values I got so far (extended table can be found here):
+---+---+---+----+----+----+----+
| | 1 | 2 | 3 | 4 | 5 | 6 | <- c
+---+---+---+----+----+----+----+
| 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| 2 | 2 | 3 | 3 | 5 | 6 | 7 |
| 3 | 3 | 5 | 6 | 6 | 7 | 7 |
| 4 | 4 | 7 | 9 | 10 | 10 | 11 |
| 5 | 5 | 9 | 12 | 14 | 15 | 15 |
+---+---+---+----+----+----+----+
^
|
s
If $m(c, s)$ denotes the minimal number of distinguishable symbols, we can write down some (trivial) things:
- $m(1, s) = s$
- $m(2, s) = 2s - 1$
- $m(c, 1) = 1$
- $m(c, s) \le c * (s - 1) + 1$
The last inequality comes from the fact that one can always create the following configuration to meat the criterion:
1 1 1 1 ...
2 4 6 8 ...
3 5 7 9 ...
One column represents one card. This pattern can be applied to any $c$ and $s$ and the amount of different symbols is always $c * (s - 1) + 1$.
Furthermore the columns seem to develop according to $m(c, s + 1) = m(c, s) + c$ for larger $s$ and the rows form according to $m(c + 1, s) = m(c, s) + s - 1$ for larger $c$.
I've also searched the Online Encyclopedia of Integer Sequences for rows and columns of this sequence, but I couldn't find any promising results.
Nevertheless, I have no idea how to develop a formula for such a problem and would be thankful for your help.
p
can be prime or prime power. (and possibly other values, not much is known for bigger composite values). $\endgroup$