Gauss elimination vs Solution with Inverse

Click For Summary
SUMMARY

The discussion focuses on solving random binary matrices using Gauss elimination and matrix inversion in Octave or Matlab. Users are tasked with generating binary matrices of varying sizes and plotting the time taken for each method. The results indicate that the time complexity differs significantly between the two approaches, with Gauss elimination generally being more efficient than using the inverse of the matrix. The final output should include a comparative graph displaying both methods for clarity.

PREREQUISITES
  • Understanding of matrix operations, specifically Ax=b equations
  • Familiarity with Octave or Matlab for numerical computations
  • Knowledge of Gauss elimination and matrix inversion techniques
  • Basic graph plotting skills in Octave or Matlab
NEXT STEPS
  • Research "Octave matrix operations" for practical implementation details
  • Learn about "time complexity analysis" for algorithm efficiency comparisons
  • Explore "Matlab plotting functions" to enhance data visualization
  • Investigate "numerical stability in matrix inversion" to understand potential pitfalls
USEFUL FOR

Students, educators, and researchers in mathematics or computer science, particularly those focusing on numerical methods and matrix computations.

Pithikos
Messages
55
Reaction score
1

Homework Statement


Using Octave or Matlab solve random binary matrices(with 1s and 0s) of size N and plot them together. Draw a conclusion.


The Attempt at a Solution


[PLAIN]http://img703.imageshack.us/img703/7803/plotm.png

I was just wondering if this looks correct to you. I previously had given to my teacher this
[PLAIN]http://img444.imageshack.us/img444/4943/lab5.png
where x=size of matrix and y=time in seconds and he thought it was wrong. There are two lines there btw, a blue for Gauss elimination and a green for Inverse.
 
Last edited by a moderator:
Physics news on Phys.org
I have no idea what you mean by "solve random binary matrices(with 1s and 0s) of size N and plot them together." Plot what together? What information it that you are plotting? And what do you mean by "solve matrices"? Do you mean solve matrix equations?
 
HallsofIvy said:
I have no idea what you mean by "solve random binary matrices(with 1s and 0s) of size N and plot them together." Plot what together? What information it that you are plotting? And what do you mean by "solve matrices"? Do you mean solve matrix equations?

Sorry for being mystical. I will clarify:

random binary matrix of size 4:
Code:
1 0 1 1
0 0 0 1
1 0 1 0
0 1 0 0

random binary matrix of size 2:
Code:
1 1
0 0

and so on.

So i make random such binary matrices M from size 1 to N. I also make a binary vector b in the same way. Then I try to solve them following Ax=b.

So solving this with Gauss(M/b) in Octave gives different time than with using an Inverse(A^{-1}*b).

Then I just save the data for the different matrix sizes and the time it took for each method. So that's what you see in the graphs. With "plot them together" I mean to have the two method results in the same graph.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
1
Views
5K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 2 ·
Replies
2
Views
8K