Skip to content

Recursive tool for calculating rook polynomial

Notifications You must be signed in to change notification settings

itsamirhn/RookPoly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RookPoly

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.

Install

Just clone the project:

$ git clone https://github.com/itsamirhn/RookPoly.git

$ cd RookPoly

Usage

Run the main program:

$ python3 main.py

For example, for a board like this:

Sample Board

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 place
  • 1: Rook can't be placed here

Sample output for this example:

24X^5 + 164X^4 + 226X^3 + 104X^2 + 18X + 1

Tests

Tests, instructions for running them and test report can be found in tests folder.

About

Recursive tool for calculating rook polynomial

Topics

Resources

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •