Skip to main content
3 of 4
deleted 14 characters in body
Nathann Cohen
  • 1.7k
  • 1
  • 10
  • 12

I coded that in Sage if you want to use it immediately (see the patch, see the documentation) :

sage: from sage.combinat.designs.block_design import steiner_triple_system
sage: list(steiner_triple_system(7))
[[0, 1, 3], [0, 2, 4], [0, 5, 6], [1, 2, 6], [1, 4, 5], [2, 3, 5], [3, 4, 6]]
sage: list(steiner_triple_system(9))
[[0, 1, 5], [0, 2, 4], [0, 3, 6], [0, 7, 8], [1, 2, 3], [1, 4, 7], [1, 6, 8], [2, 5, 8], [2, 6, 7], [3, 4, 8], [3, 5, 7], [4, 5, 6]]
sage: list(steiner_triple_system(13))
[[0, 1, 6], [0, 2, 5], [0, 3, 7], [0, 4, 8], [0, 9, 11], [0, 10, 12], [1, 2, 7], [1, 3, 4], [1, 5, 9], [1, 8, 10], [1, 11, 12], [2, 3, 6], [2, 4, 12], [2, 8, 9], [2, 10, 11], [3, 5, 12], [3, 8, 11], [3, 9, 10], [4, 5, 10], [4, 6, 9], [4, 7, 11], [5, 6, 11], [5, 7, 8], [6, 7, 10], [6, 8, 12], [7, 9, 12]]

Otherwise, it turns out the proof of their existence is highly constructive -- just check the given constructions are valid -- which makes it really easy to implement (see the ebook A short course in Combinatorial Designs, by Ian Anderson and Iiro Honkala).

Nathann

Nathann Cohen
  • 1.7k
  • 1
  • 10
  • 12