10.09.2013 Views

1. Advanced Data Structure using C++

1. Advanced Data Structure using C++

1. Advanced Data Structure using C++

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

LECTURE NOTES OF ADVANCED DATA STRUCTURE (MT-CSE 110)<br />

(C) TRANSPOSE:‐<br />

The transpose of a m*n matrix A is an n*m matrix B (denoted as A T<br />

) with the property bij = aji (for 0 ≤ i ≤ n‐1 and 0 ≤ j ≤ m‐1).<br />

The transpose of a matrix A is another matrix A T (also written A′) can be created<br />

by any one of the following equivalent actions:<br />

• Write the rows of A as the columns of A T .<br />

• Write the columns of A as the rows of A T .<br />

• Reflect A by its main diagonal (which starts from the top left) to obtain A T<br />

INTRODUCTION OF SPARSE MATRICES<br />

A sparse matrix is a matrix that allows special techniques to take advantage of<br />

the large number of zero elements. This definition helps to define "how many"<br />

zeros a matrix needs in order to be "sparse." The answer is that it depends on<br />

what the structure of the matrix is, and what you want to do with it.<br />

Conceptually, sparsity corresponds to systems which are loosely coupled.<br />

Consider a line of balls connected by springs from one to the next; this is a<br />

sparse system. By contrast, if the same line of balls had springs connecting every<br />

ball to every other ball, the system would be represented by a dense matrix.<br />

Prepared By :­<br />

Er. Harvinder Singh<br />

Assist Prof., CSE, H.C.T.M (Kaithal) Page ‐ 124 ‐

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!