Skip to main content

Questions tagged [matrix]

This tag is for challenges involving matrices. A matrix, also known as a 2D array, is a list of numbers arranged in a rectangle with rows and columns.

12 votes
7 answers
2k views

Do Not Find the Fox is a non-game where you repeat the following up to 16 times: Pick an empty square in a 4×4 grid Draw a tile from a bag – there are 5 Fs, 6 Os and 5 Xs at first – and place it in ...
Parcly Taxel's user avatar
  • 4,749
2 votes
4 answers
301 views

This is about \$n\$ by \$n\$ binary matrices. Call a pair of rows unfriendly if the Hamming distance between the two rows is larger than the number ones they have in common positions. Let us call a ...
Simd's user avatar
  • 3,167
15 votes
19 answers
3k views

Hadamard matrices is a square matrix whose entries are either +1 or −1 and whose rows are mutually orthogonal. In other words, it means that each pair of rows has matching entries in exactly half of ...
Fmbalbuena's user avatar
  • 5,085
12 votes
7 answers
2k views

Introduction Tensor contraction is an operation that can be performed on a tensor. It is a generalization of the idea of the trace of a matrix. For example, if we have a rank-2 tensor (a matrix) and ...
Tbw's user avatar
  • 3,023
9 votes
5 answers
1k views

There have already been challenges about computing the exponential of a matrix , as well as computing the natural logarithm of a number. This challenge is about finding the (natural) logarithm of ...
bsoelch's user avatar
  • 6,095
26 votes
41 answers
2k views

Diagonalize a vector into a matrix. Input A vector, list, array, etc. of integers \$\mathbf{v}\$ of length \$n\$. Output A \$n \times n\$ matrix, 2D array, etc. \$A\$ such that for each element \$a_i \...
bigyihsuan's user avatar
  • 11.4k
1 vote
0 answers
139 views

I am working on a code to print all semimagic squares [1] of a given size. I am working with the following definition: An \$n\times n\$ consists of numbers \$1,2,\cdots, n^2\$. All numbers must be ...
ananta's user avatar
  • 111
11 votes
6 answers
1k views

Given an \$m \times n\$ matrix of integers A, there exist a \$m \times m\$ matrix P, an \$m \times n\$ matrix D, and an \$n \times n\$ matrix Q such that: \$A = P D Q\$. P and Q are unimodular ...
Daniel Schepler's user avatar

15 30 50 per page
1
2 3 4 5
21