Simple recursive tool for finding Rook Polynomial
Be aware that recursion is not efficient enough, and it's using random choices. So maybe it gets slow for large numbers.
Just clone the project:
$ git clone https://github.com/itsamirhn/RookPoly.git
$ cd RookPoly
Run the main program:
$ python3 main.py
For example, for a board like this:
Use the following input to find the rook polynomial:
Enter numberEnter number of rows: 5
00001
01010
01100
10010
00000
0
: Rook can be placed in this place1
: Rook can't be placed here
Sample output for this example:
24X^5 + 164X^4 + 226X^3 + 104X^2 + 18X + 1
Tests, instructions for running them and test report can be found in tests folder.