0
$\begingroup$

After calculation of the cost of the steps of the LU decomposition, and we come to the end result:

$(2/3)n^3 - (2/3)n$ and we say the total cost is then $(2/3)n^3$ (ignoring the term $(-2/3)n$), could we conclude (or say) that the cost of the LU decomposition = $O(n^3)$? or is it $O( (2/3)n^3)$ and we HAVE to write the cost = $O( (2/3)n^3 )$?

$\endgroup$
0
$\begingroup$

You ignore the constant in big-O notation. It would be $O(n^3)$.

$\endgroup$
  • $\begingroup$ Okay. So if I am asked about the total cost of the LU decomposition on an (n*n) Matrix, the right answer would be: O(n^3). Right? $\endgroup$ – ZelelB Jun 20 '18 at 18:35
  • $\begingroup$ Based on what you said above, yes. $\endgroup$ – BDN Jun 20 '18 at 19:11
  • $\begingroup$ Okay, perfect! Thank you for the help! $\endgroup$ – ZelelB Jun 20 '18 at 20:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.