English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

do give simple logic

2006-06-26 19:58:30 · 3 answers · asked by PJ 1 in Computers & Internet Programming & Design

3 answers

First, read about determinants here: http://en.wikipedia.org/wiki/Determinant
Notice how the determinant of the 3x3 matrix may be written in terms of the determinants of the 2x2 matrices (in the second and third rows). The 4x4 determinant may be written in terms of the determinants of the 3x3 matrices it contains (below the top row). This is true in general, so you should develop a recursive algorithm to find the determinant of the nxn matrix.
OK, I know you're still confused. This page has an actual algorithm (but not in C++) for the process:
http://mcraefamily.com/MathHelp/MatrixDeterminant.htm
That's as far as I'm taking it. Good luck!

Oh, wait! There's a typo on the last page I linked. The algorithm says "matrix B = matrix A with row i and column 1 deleted" but it should say "matrix B = matrix A with row 1 and column i deleted". I'm pretty sure that's how it goes. Here's another reference, just in case you're still confused: http://mathworld.wolfram.com/DeterminantExpansionbyMinors.html
Maybe the author of that page was just got his rows and columns mixed up, but this should clear it all up. Good luck!

2006-06-26 20:14:34 · answer #1 · answered by anonymous 7 · 0 0

I trhink you will find example code in the article.

Dr Dobb's
Typelists & C++ Polynomial Meta-Arithmetic
http://www.ddj.com/dept/cpp/184401834

Hope this helps.

2006-06-26 20:31:43 · answer #2 · answered by bgcolbe 2 · 0 0

cout<<"Please give clearer explanation.";
cout<<"Thank You";

2006-06-26 20:03:29 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers