https://github.com/cvxgrp/n-queens

https://github.com/cvxgrp/n-queens

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.3%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: cvxgrp
  • Language: Python
  • Default Branch: main
  • Size: 26.7 MB
Statistics
  • Stars: 2
  • Watchers: 3
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 4 years ago · Last pushed over 1 year ago
Metadata Files
Readme

README.md

$n$-Queens Constant

This repo accompanies the paper Computing Tighter Bounds on the n-Queens Constant via Newton's Method.

To get started with the code, clone this repo, and run src/compute_upper_bound.py and src/compute_lower_bound.py to reproduce the results from the paper. The code requires that scipy and numpy are installed.

Both scripts can be called as:

compute_upper_bound.py <n> [--write_sol]
compute_lower_bound.py <n> [--write_sol]

Where <n> is a mandatory argument specifying the size of the chessboard used to construct the problem. By default compute_upper_bound.py solves n=1024 and compute_lower_bound.py solves n=2048. The --write_sol flag will write an .npz file containing the witnesses for the generated solution to the working directory.

To verify the closed-form expressions used for the integrals, see src/problem_formulations/generate_closed_form_xqueenon_integral.sage. You will need Sage Math to generate the expressions.

We also provide witnesses for the bounds given in the paper, at src/witnesses. For the upper bound problem, we provide the x for which f(x) = U_1024. For the lower bound problem, we provide the v for which L(v) = L_2048. To generate bounds from the witnesses run src/upper_bound_from_witness.py and src/lower_bound_from_witness.py.

To test the scripts against your own witnesses they can be called as follows:

upper_bound_from_witness.py <path/to/witness.npz> <n>
lower_bound_from_witness.py <path/to/witness.npz> <n>

Where <n> is the size of the chessboard used to generate the witness file.

Owner

  • Name: Stanford University Convex Optimization Group
  • Login: cvxgrp
  • Kind: organization
  • Location: Stanford, CA

GitHub Events

Total
  • Push event: 1
  • Create event: 1
Last Year
  • Push event: 1
  • Create event: 1

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels