Skip to content

This program can calculate the rook polynomial for given coordinates on a board

Notifications You must be signed in to change notification settings

Samyarrahimi/Rook-Polynomial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

"# Rook-Polynomial"

to use this code you don't need to give the board size independently.

this code will get an string from you.

let's say you gave this : 1 1 2 1 3 2 4 1 6 7 then Your coordinates will be like this :

(y,x)

(1,1),(2,1),(3,2),(4,1),(6,7)

in a 6*7 board which just has the coordinates you gave (1) and other coordinates will be zero.

the rook polynomial will be calculated on board with 6*7 size but just with cells that is 1.(which you gave.)

and the rook polynomial will be this : 1+5x^1+7x^2+3x^3.

be careful given coordinates should be positive. (coordinates start from 1 both in x and y directions.)

y direction is down to up and x direction is left to right.

About

This program can calculate the rook polynomial for given coordinates on a board

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages