Questions tagged [binary-matrix]

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.

Filter by
Sorted by
Tagged with
18
votes
1answer
608 views

Advent Challenge 1: Help Santa unlock his present vault!

Next >> Descriptive Keywords (for searching): Make Two Matrices Equivalent, Overlap, Array, Find Challenge Santa has had a history of elves stealing presents from his vault in the past, so this ...
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 ...
54
votes
9answers
4k views

Which tetromino is this?

Given an unsigned 16-bit integer N, your task is to determine whether its binary representation mapped inside a 4x4 matrix is matching a tetromino shape, and if so, which shape it is. Matrix Each ...
44
votes
84answers
5k 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 <...
46
votes
12answers
2k views

Braille graphics

Cut a boolean matrix in 4x2 blocks and render them as Braille characters U+2800...U+28FF. ...
20
votes
13answers
1k views

The Binary Square Diagonal Sequence

The binary-square-diagonal-sequence is constructed as follows: Take the sequence of positive natural numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ... Convert each number to ...
29
votes
16answers
6k views

To find islands of 1 and 0 in matrix

Given a two dimensional matrix of 0 and 1s. Find the number of island for 1s and 0s where neighbours are only in the horizontal and vertical. ...
11
votes
3answers
975 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 ...
13
votes
8answers
601 views

Minimal taxicab distance map

Challenge description In taxicab metric, a distance between two points is defined as: Consider a matrix with only zeros and ones: ...
13
votes
16answers
2k views

Trim that distracting background off!

Isn't it annoying when you're taking a picture, but the background detracts from the actual substance of the image? I'd say it is. I need to know how much I should crop so that I get rid of this ...
10
votes
3answers
782 views

Binary Puzzle Solver

Introduction Rules of the puzzle: The puzzle Binary (also known as Takuzu or Subiku) is very simple to understand, and has only a few rules: Since the name of the game is binary it's pretty obvious, ...
21
votes
9answers
2k views

How much is my dice matrix worth?

Input A non-empty binary matrix consisting of 3x3 sub-matrices put side by side. Task Your task is to identify valid dice patterns (as described below) among the 3x3 sub-matrices. Each valid ...
14
votes
7answers
666 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 ...
11
votes
3answers
495 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 ...
11
votes
2answers
445 views

Make a Bit Continent

Let's imagine we have a matrix of bits (which contains at least one 1): ...
4
votes
4answers
377 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 ...