Questions tagged [linear-algebra]
265 questions
22
votes
4 answers
Automated optimization of 0-1 matrix vector multiplication
Question:
Is there established procedure or theory for generating code that efficiently applies a matrix-vector multiplication, when the matrix is dense and filled with only zeros and ones? Ideally, the optimized code would make systematic use of…
Nick Alger
- 1,049
- 7
- 18
15
votes
6 answers
What parts of linear algebra are used in computer science?
I've been reading Linear Algebra and its Applications to help understand computer science material (mainly machine learning), but I'm concerned that a lot of the information isn't useful to CS. For example, knowing how to efficiently solve systems…
Kelmikra
- 726
- 9
- 16
14
votes
1 answer
Alternatives to SVD for rank factorization
I have rank-deficient matrix $M \in \mathbb{R}^{n\times m}$ with $\text{rank}(M) = k$ and I want to find a rank factorization $M = PQ$ with $P \in \mathbb{R}^{n \times k}$ and $Q \in \mathbb{R}^{k \times m}$.
A popular approach is to compute the…
Artem Kaznatcheev
- 4,872
- 2
- 28
- 57
14
votes
1 answer
Complexity of finding the pseudoinverse matrix
How many arithmetic operations are required to find a Moore–Penrose
pseudoinverse
matrix of a arbitrary field?
If the matrix is invertible and complex valued, then it's just the inverse. Finding the inverse takes $O(n^\omega)$ time, where…
Chao Xu
- 3,103
- 19
- 34
13
votes
2 answers
Matrix chain multiplication and exponentiation
If I have two matrices $A$ and $B$, of dimensions $1000\times2$ and $2\times1000$, respectively, and want to compute $(AB)^{5000}$, it's more efficient to first rewrite the expression as $A(BA)^{4999}B$ and only then evaluate numerically, because…
isekaijin
- 405
- 2
- 9
13
votes
1 answer
Inverting a band matrix
I have a band matrix -- a sparse, square, symmetric $N \times N$ matrix whose structure looks like the following:
Here, the area under the blue stripes is the non-zero elements; everything else is zero
Is there an algorithm to invert this kind of…
rnels12
- 231
- 2
- 3
12
votes
4 answers
Fastest way to solve a system of linear equations
I have to solve a system of up to 10000 equations with 10000 unknowns as fast as possible (preferably within a few seconds). I know that Gaussian elimination is too slow for that, so what algorithm is suitable for this task?
All coefficients and…
tmwilliamlin168
- 325
- 1
- 2
- 7
11
votes
1 answer
What algorithms exist for solving natural number linear systems?
I'm looking at the following problem:
Given $n$-dimensional vectors of natural numbers $v_1, \ldots, v_m$ and some input vector $u$, is $u$ a linear combination of the $v_i$'s with natural number coefficients?
i.e. are there some $t_1, \ldots, t_m…
Joey Eremondi
- 30,277
- 5
- 67
- 122
11
votes
1 answer
Short and slick proof of the strong duality theorem for linear programming
Consider the linear programs
\begin{array}{|ccc|}
\hline
Primal: & A\vec{x} \leq \vec{b} \hspace{.5cm} &
\max \vec{c}^T\vec{x} \\
\hline
\end{array}
\begin{array}{|ccc|}
\hline
Dual: & \vec{c} \leq \vec{y}^TA \hspace{.5cm} &
\min \vec{y}^T\vec{b}…
Kaveh
- 22,661
- 4
- 53
- 113
10
votes
1 answer
Minimal basis for set of binary vectors using XOR
I would be surprised if this isn't a well-studied problem, but I'm not sure what else to search for at this point: you're given a set of binary $n$-vectors $S \subset \{0,1\}^n$. The problem is to find another set of binary $n$-vectors $B \subset…
Martin Ender
- 663
- 6
- 16
10
votes
1 answer
Why is the probability of a false positive not 0 for Freivald's Algorithm?
Freivald's algorithm (see the wiki) is a randomized algorithm for verifying whether the product of two $n \times n$-matrices $A$ and $B$ yields a given matrix $C$ (i.e. $AB = C$). The way this task is accomplished is to introduce a random vector…
Alex B.
- 103
- 6
9
votes
1 answer
Does spectral graph theory say anything about graph isomorphism
Is there research or are there results that discuss graph isomorphism in the context of spectral graph theory?
Two known theorems of spectral graph theory are:
Two graphs are called isospectral or cospectral if the adjacency matrices of the graphs…
user13675
- 1,684
- 12
- 19
8
votes
2 answers
Could a quantum computer perform linear algebra faster than a classical computer?
Supposing we had a quantum computer with a sufficient number of qubits, could we use it to do linear algebra faster than we could with a classical computer? What sort of speedup could we expect? Has anyone created a quantum algorithm for linear…
Alecto
- 564
- 4
- 13
8
votes
2 answers
Solving systems of linear equations over semirings
So I have come across an issue where it would be very nice to solve systems of linear equations over semirings but I have no clue how to do that. Over a field I would use Gaussian elimination but I'm at a loss of how to find solution spaces to even…
Jake
- 3,810
- 21
- 35
8
votes
1 answer
Generate algorithmically all grid points inside a hypercube
$\def\R{\mathbb{R}}\def\Z{\mathbb{Z}}\def\n#1{\|#1\|_\infty}$The problem comes directly from computational mathematics, and can be stated as follows:
Given a regular matrix $M\in\R^{d\times d}$, find effectively all vectors $v\in\Z^d$ such that…
yo'
- 311
- 1
- 10