I created a program to solve crossword puzzle given 6 words with 7-letter each and the program will calculate how many total solutions it may have.
In this 3x3 grid, the constraints I set is for every 2nd, 4th, and 6th letter of a word that has the same letter and index as the other word, it can be matched to form a crossword. The 'A','B','C','D','E','F' indicate the row and column in the grid.
This example shows all the even letters are 'E'. The words are BEDEMEN, PETERED, BEMETED, LEVELED, LEVERED, and MESELED. Here is the picture for references: crossword puzzle solver picture
The total combinations that I got are 720 solutions or total possible combinations. The problem is this number might not be correct since I'm using a relational language to interpret and create a knowledge base to calculate the solutions.
I read a few sources in the StackExchange such as (source) but I can't really understand the concepts.
How do I calculate the possible combinations of words without having duplicate solutions so that I can double check with my program by using the formula?
Any helps will be much appreciated.