Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

make.q8

Generate sparse constraint matrix for 8-queens problem


Description

Generate sparse constraint matrix for 8-queens problem

Usage

make.q8 ()

Arguments

None.

Details

Sparse constraints come in a three-column matrix or data frame. Each row gives the row number, column number, and value of a particular non-zero entry in the constraint matrix. This function produces the sparse constraint matrix for the 8-queens problem (in which the object is to place eight queens on a chessboard with no two sharing a row, column or diagonal). The resulting sparse representation is 252 x 3, compared to 42 x 64 for the usual representation.

Value

A 252 x 3 numeric matrix. See lp for the complete example.

Author(s)

Sam Buttrey, buttrey@nps.edu

See Also


lpSolve

Interface to 'Lp_solve' v. 5.5 to Solve Linear/Integer Programs

v5.6.15
LGPL-2
Authors
Michel Berkelaar and others
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.