Data Structures :: Matrices

Home > Technical Aptitude > Data Structures > Matrices > General Questions

NA
SHSTTON
24
Solv. Corr.
21
Solv. In. Corr.
45
Attempted
0 M:0 S
Avg. Time

1 / 16

Choose the correct option.

The complexity of multiplying two matrices of order m*n and n*p is


Amnp

Bmp

Cmn

Dnp

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
23
Solv. Corr.
32
Solv. In. Corr.
55
Attempted
0 M:0 S
Avg. Time

2 / 16

Choose the correct option.

If the address of A[1][1] and A[2][1] are 1000 and 1010 respectively and each element occupies 2 bytes then the array has been stored in _________ order.


Arow major

Bcolumn major

Cmatix major

DNone of these

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
2
Solv. Corr.
2
Solv. In. Corr.
4
Attempted
0 M:0 S
Avg. Time

3 / 16

Choose the correct option.

In what way the Symmetry Sparse Matrix can be stored efficiently?


AAdjacency List

BBinary tree

CHash table

DHeap

 View Answer |  Discuss in Forum |  Workspace | Asked In Societe Generale |

Answer: Option B

Explanation:

Since Symmetry Sparse Matrix arises as the adjacency matrix of the undirected graph. Hence it can be stored efficiently as an adjacency list.

Workspace

NA
SHSTTON
1
Solv. Corr.
4
Solv. In. Corr.
5
Attempted
0 M:0 S
Avg. Time

4 / 16

Choose the correct option.

Which of the following is an advantage of matrices?


AGraph Plotting

BSearching through a matrix is complex

CNot space efficient

DInternal complexity

Answer: Option A

Explanation:

Adjacency and Incidence Matrices are used to store vertices and edges of a graph. It is an advantage to plot graphs easily using matrices. But Time complexity of a matrix is O(n2) and sometimes the internal organization becomes tedious. They are all disadvantages of matrices.

Workspace

NA
SHSTTON
2
Solv. Corr.
3
Solv. In. Corr.
5
Attempted
0 M:0 S
Avg. Time

5 / 16

Choose the correct option.

If column-major order is used, how is the following matrix stored in memory?

matrix_stored_in_memory


Aadgbehcfi

Babcdefghi

Ccfibehadg

Dihgfedcba

 View Answer |  Discuss in Forum |  Workspace | Asked In Societe Generale |

Answer: Option A

Explanation:

It starts with the first element and continues in the same column until the end of column is reached and then proceeds with the next column. Fortran follows column-major order.

Workspace

NA
SHSTTON
2
Solv. Corr.
2
Solv. In. Corr.
4
Attempted
0 M:0 S
Avg. Time

6 / 16

Choose the correct option.

Which of the following is not the method to represent Sparse Matrix?


AHeap

BLinked List

CArray

DDictionary of Keys

Answer: Option A

Explanation:

Heap is not used to represent Sparse Matrix while in Dictionary, rows and column numbers are used as Keys and values as Matrix entries, Linked List is used with each node of Four fields (Row, Column, Value, Next Node) (2D array is used to represent the Sparse Matrix with three fields (Row, Column, Value).

Workspace

NA
SHSTTON
3
Solv. Corr.
0
Solv. In. Corr.
3
Attempted
0 M:0 S
Avg. Time

7 / 16

Choose the correct option.

Is O(n) the Worst case Time Complexity for addition of two Sparse Matrix?


ATRUE

BFALSE

Answer: Option A

Explanation:

In Addition, the matrix is traversed linearly, hence it has the time complexity of O(n) where n is the number of non-zero elements in the largest matrix amongst two.

Workspace

NA
SHSTTON
0
Solv. Corr.
4
Solv. In. Corr.
4
Attempted
0 M:0 S
Avg. Time

8 / 16

Choose the correct option.

Which of the following don’t use matrices?


ASorting numbers

BImage processing

CGraph theory

DIn solving linear equations

Answer: Option A

Explanation:

Numbers uses arrays(1-D) for sorting not matrices(2-D arrays). Solving linear equations is a separate field in Mathematics involving matrices, Image processing stores the pixels in the form of matrices, and the graphs are represented with the help of matrices to indicate the nodes and edges.

Workspace

NA
SHSTTON
2
Solv. Corr.
1
Solv. In. Corr.
3
Attempted
0 M:0 S
Avg. Time

9 / 16

Choose the correct option.

Which one of the following is a Special Sparse Matrix?


AUnit matrix

BSkew Matrix

CNull matrix

DBand Matrix

Answer: Option D

Explanation:

A band matrix is a sparse matrix whose non zero elements are bounded to a diagonal band, comprising the main diagonal and zero or more diagonals on either side.

Workspace

NA
SHSTTON
1
Solv. Corr.
2
Solv. In. Corr.
3
Attempted
0 M:0 S
Avg. Time

10 / 16

Choose the correct option.

Matrix A when multiplied with Matrix C gives the Identity matrix I, what is C?


ATranspose of A

BInverse of A

CSquare of A

DIdentity matrix

Answer: Option B

Explanation:

Any square matrix when multiplied with its inverse gives the identity matrix. Note that non square matrices are not invertible.

Workspace