Elaboration of an algorithm to fill the table (euristic)
Tell me where to think. The table should be filled with algorithms. We need to fill out the necessary cells so that each line(B) is filled with k cells, each column (N) is filled with r cells and that each random couple meets in two (s) lines. All you have is that what's always:
I've just been in hand, with different shifts, but after 3-4 lines, I'm confused. This is an example of the result.
(source: http://joxi.ru/l2ZXYQns6OlgrJ.png )
1. Shahmatic analogy
Sporting analogy is more than appropriate in this case. The picture is completely similar to the chess game. Swiss system B = 15 Participants k / 2 = 2 two colours for N = 10 Game days (one tour per day) r / 2 = 3 Dogs. Additional condition: each participant plays not more than one tour per day. Accordingly, we will approach this issue.
2. Network couples
For each network, s create a mass B - 1 The rest of the networks and make a steaming counter. c = k / 2♪ When a couple of networks are formed, the other network should be removed from their ranges, and the steam counters reduce by one. With the computer's compulsion, drop the relevant mass.
All possible sets of couples for the first network are combinations. B - 1 components of its mass k / 2♪ For subsequent networks, the issue is determined by their vapour masses and enumerators.
3. Linking networks to nodes
For each pair of sequential nodes, create a mass of B network and departing counter c1 = r / 2♪ Once a couple of networks are connected to a couple of knots, we're pulling each knot out of the range and reducing the counter. We'll drop the corresponding mass at the counter.
In parallel with the connection, we're running the table. At the end of the connection, the table will be completed in the required manner.