Combinatorics software

Combinatorics; can be expanded for more than pairs e.g. triplets of
motifs