1
$\begingroup$

Compare these two questions.

Question 4011197 4009941
title Why is there a difference between MATLAB and manual calculation for eigenvectors Linear Programming in R using lpSolve dismisses constrains
status open closed
sample problem compute eigenvectors of $\begin{bmatrix}1&2&2\\0&1&2\\0&0&2\end{bmatrix}$ $\max A + B + C + D$
subject to $A + 2B + 3C + 4D = 10$
$A, B, C, D \in \{0,1\}$.
theoretical result $\lambda_1 = 1, v_1 = (1,0,0)^T$, $\lambda_2 = 2, v_2 = (6,2,1)^T$ $A=B=C=D=1$
procedures A = [… ; … ; …]; [P D] = eig(A) library(lpSolve)
f.obj <- c(1,1,1,1)

lp("max", f.obj, f.con, f.dir, f.rhs, binary.vec = 1:4, all.bin=TRUE)
computed results {(1,0,0), (-1,0,0)} for eigenvalue of 1;
{(640/683, 640/2049, 320/2049)} eigenvector for eigenvalue of 2.
A=1, B=1, C=0, D=1

Both questions ask for the reason for the error. Why do we allow one question open while another one is closed?

P.S. Credits to @MartinSleziak for his table

$\endgroup$
2
  • 4
    $\begingroup$ I haven't taken a very close look, but the one that is closed (at the moment) is about using lpSolve or another method for computing. That is definitely off-topic, I haven't looked at the other one. But if that other one is literally about the choice of library to use, that's off-topic. $\endgroup$ – Asaf Karagila Feb 4 at 15:05
  • $\begingroup$ @AsafKaragila The OP of the closed question asks for an algorithm (say, simplex algorithm), which is language-independent and should be on-topic here. The open questions concerns the eig method, which is a core part in MATLAB, which means "matrix lab". However, judging from whether it belongs to the core syntax or not seems absurd, as software components evolve from time to time. One module can get included or kicked out from the core part in an update. I'm still puzzled why we leave another one open. $\endgroup$ – GNUSupporter 8964民主女神 地下教會 Feb 4 at 15:47
3
$\begingroup$

Regarding the closed question, which I voted to close, the guy specifically asks about a code problem with R, which has nothing to do here. Maybe the question could be rephrased to be on topic, but as is, it's not. That he asks for another algorithm is only tangential, his main problem, is with code, and his question "Can anyone understand why this is so?" is about this code, and we can't do much about this because it's likely a bug or an obscure feature. And we can't help either to find another program to handle this problem, it's not the purpose of MSE to give software advice.

The question about eigenvectors in Matlab looks loosely similar, but the outcome is different: the output is correct in the sense that 1) since the matrix is defective, there is no way to find three independent eigenvectors anyway and 2) it is documented that for defective $n\times n$ matrix $A$, Matlab returns an $n\times n$ matrix $V$ and a diagonal matrix $D$ such that $AV=VD$. It's a mathematical question, and we can explain this, and it's even likely to help other readers.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .