For challenges involving binary matrices. Binary matrices are matrices which only contain boolean (0 or 1) values. Operations on binary matrices are done with boolean algebra.
8
votes
3answers
471 views
Find the rows which make each column have one True (was: Knuth's Algorithm X)
Task
Given a Boolean matrix, find one (or optionally more) subset(s) of rows which have exactly one True in each column. You may use any algorithm, but must support very large matrices, like the last ...
10
votes
3answers
387 views
Print a specific value in the Wythoff matrix modulo 2
The Wythoff matrix is an infinite matrix consisting of the Grundy numbers of each square on a chessboard in Wythoff's game.
Each entry in this matrix is equal to the smallest nonnegative number that ...
14
votes
7answers
332 views
Generate binary matrices which are distinct up to reflections
Here are all the 2x2 binary matrices
#0 #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12 #13 #14 #15
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
00 00 00 00 01 01 01 01 ...
28
votes
53answers
3k views
Construct the Identity Matrix
The challenge is very simple. Given an integer input n, output the n x n identity matrix. The identity matrix is one that has 1s spanning from the top left down to the bottom right. You will write a ...
8
votes
4answers
480 views
Counting orthogonal circulant matrices
Two rows of a matrix are orthogonal if their inner product equals zero. Call a matrix with all rows pairwise orthogonal an orthogonal matrix. A circulant matrix is one where each row vector is rotated ...
9
votes
3answers
832 views
Matrix property X revisited (or the Joy of X)
This challenge is partly an algorithms challenge, partly an optimization challenge and partly simply a fastest code challenge.
A T matrix is fully specified by its first row r and first column c. ...
14
votes
3answers
1k views
Find highest scoring matrix without property X
This challenge is partly an algorithms challenge, partly an optimization challenge and partly simply a fastest code challenge.
A cyclic matrix is fully specified by its first row r. The remaining ...
7
votes
8answers
611 views
Implement bit-wise matrix multiplication
The MMIX architecture is a fairly simple big-endian RISC design. It has a couple of interesting features, one of them is the MXOR instruction, which is what you should implement.
The MXOR instruction ...
14
votes
7answers
632 views
Print a specific value in this generated binary matrix
Suppose we define an infinite matrix M, on N^2 -> {0, 1} (where N starts from 1 instead of 0) in this manner:
M(1, 1) = 0.
For every x > 1, M(x, 1) = 1 if x is prime, and 0 otherwise.
For every ...
3
votes
2answers
257 views
Print a specific value in the infinite Walsh matrix
The Walsh matrix is an interesting fractal matrix with the property that every single value in a Walsh matrix has a value of either -1 or 1. Additionally, the size of a Walsh matrix is always a power ...