answersLogoWhite

0


Best Answer

#include<stdio.h> #include<unistd.h> #define SIZE 3000; void main() { int a[5][5],row,columns,i,j; printf("Enter the order of the matrix(5*5)"); scanf("%d %d",&row,&columns); printf("Enter the element of the matrix\n"); for(i=0;i<row;i++) for(j=0;j<columns;j++) { scanf("%d", &a[i][j]); } printf("3-tuple representation"); for(i=0;i<row;i++) for(j=0;j<columns;j++) { if(a[i][j]!=0) { printf("%d %d %d", (i+1),(j+1),a[i][j]); } } getchar(); }

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Using three tuple representation of a sparse matrix?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How is sparse matrix stored in the memory of a computer?

A sparse matrix contains many (often mostly) zero entries. The basic idea when storing sparse matrices is to only store the non-zero entries as opposed to storing all entries. Depending on the number and distribution of the non-zero entries, different data structures can be used and yield huge savings in memory when compared to a na&iuml;ve approach. One example of such a sparse matrix format is the (old) Yale Sparse Matrix Format [1]. It stores an initial sparse N&times;N matrix M in row form using three arrays, A, IA, JA. NZ denotes the number of nonzero entries in matrix M. The array Athen is of length NZ and holds all nonzero entries of M. The array IA stores at IA(i) the position of the first element of row i in the sparse array A. The length of row i is determined by IA(i+1) - IA(i). Therefore IA needs to be of length N + 1. In array JA, the column index of the element A(j) is stored. JA is of length NZ. Another possibility is to use quadtrees


How do you solve 3 dimensional equations?

You can solve the system of equations with three variables using the substitute method, or using matrix operations.


How many matrix films are there?

There were three live action films and one collection of anime shorts. The Matrix (1999) The Matrix: Reloaded (2003) The Matrix: Revolutions (2003) The Animatrix (2003)


What are the matrix movies?

There are three Matrix movies: The Matrix, The Matrix Reloaded, and The Matrix Revolutions. There are also a series of short animated films called The Animatrix.


Which representation of earth would have any distortions?

A three-dimensional representation


What is the order of the matrix films?

There are three Matrix movies: The Matrix, The Matrix Reloaded, and The Matrix Revolutions. There are also a series of short animated films called The Animatrix. All movies on TopRater: toprater.com/en/movies/objects/2867535-the-matrix-1999


How many Matrix films have been created so far?

There are three Matrix movies: The Matrix, The Matrix Reloaded, and The Matrix Revolutions. There are also a series of short animated films called The Animatrix.


Types of population and different properties of population?

Population can be described as dense, sparse or even. The population of a given area can be described using three parameters namely the area, time and the individuals or species.


What is the meaning of determinant of a matrix?

for a 3x3 matrix, it can be interpreted as the volume of the hexahedron formed by three vectors (each row of the matrix as one vector).


What is the matrix's in oder?

Restate the question: "What is the order of a matrix?" The order of a matrix tells the number of rows and columns in the matrix. For instance, a matrix with 3 rows and 4 columns is a 3x4 matrix ("three by four"). A square matrix has the same number of rows and columns: 2x2


Determinant of four-by-three matrix?

undefined


What is the physical meaning of determinant of a matrix?

for a 3x3 matrix, it can be interpreted as the volume of the hexahedron formed by three vectors (each row of the matrix as one vector).