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.
14
votes
7answers
319 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
455 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 ...
7
votes
3answers
660 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
599 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
577 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 ...
3
votes
2answers
248 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 ...