python - How to calculate the different combinations of an NxM grid with 3-valid values - Stack Overflow
combinatorics - A formula for the number of possible combinations of a $i\times j$ rectangle in a $m\times n$ grid such that they don't overlap? - Mathematics Stack Exchange
How to Calculate Permutations: 8 Steps (with Pictures) - wikiHow
Combinations Formula With Solved Example Questions
Combination Formula | How to Calculate Combinations - Video & Lesson Transcript | Study.com