0% found this document useful (0 votes)
59 views2 pages

Time Complexity of Matrix Transpose Algorithm Using Identity Matrix As Reference Matrix

1. This document presents the time complexity of a matrix transpose algorithm that uses an identity matrix as a reference matrix. 2. The algorithm computes each element of the transposed matrix by multiplying corresponding elements of the input and reference matrices and summing the results. 3. With an identity matrix as the reference, each multiplication takes constant time O(1) since most elements are zero. Therefore, the overall time complexity is O(mn) to transpose an m×n matrix.

Uploaded by

Prateek Yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views2 pages

Time Complexity of Matrix Transpose Algorithm Using Identity Matrix As Reference Matrix

1. This document presents the time complexity of a matrix transpose algorithm that uses an identity matrix as a reference matrix. 2. The algorithm computes each element of the transposed matrix by multiplying corresponding elements of the input and reference matrices and summing the results. 3. With an identity matrix as the reference, each multiplication takes constant time O(1) since most elements are zero. Therefore, the overall time complexity is O(mn) to transpose an m×n matrix.

Uploaded by

Prateek Yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Sanil Shanker KP et al, / (IJCSIT) International Journal of Computer Science and Information Technologies, Vol.

7 (5) , 2016, 2347-2348

Time Complexity of Matrix Transpose Algorithm using


Identity Matrix as Reference Matrix
Sanil Shanker KP1 , Mohammed Shameer MC2
1,2
Dept. of Computer Science
Farook College, Kozhikode,
India.

Abstract- This paper presents the time complexity of II. TIME COMPLEXITY
matrix transpose algorithm using identity matrix as Let A(m x n) and B (m x m) be the input matrix of order (m x n )
reference matrix. We computed the time complexity of
the algorithm as O(mn). and the reference matrix of order (m x m) respectively.
The value of c11 can be computed from the Figure- 1, as c11
Keywords: Identity matrix, Reference matrix, Sanil’s := ( a11 * b11) + ( a21 * b21) + (a31 * b31).
Matrix Transpose.

A(m x n) B(m x m)
I. INTRODUCTION
Transpose of the matrix can be obtained by combining the
a11 a12 a13 a14 . b11 b12 b13
a21 a22 a23 a24 . b21 b22 b23
characteristics of logical AND (˄) with logical OR (˅)
a31 a32 a33 a34 . b31 b32 b33
operations [1, 2]. In Sanil’s matrix transpose algorithm, the
↓↓↓
identity matrix acts as the kernel of the transformation [3].
For example, let the matrix A(3 x 4) be c11 c12 c13
c21 c22 c23
17 2 13 7 c31 c32 c33
41 11 29 19 c41 c42 c43
19 3 23 11
T
Fig. 1 A(n x m) := C(n x m)
The transformation can computed as:

Input: A(3 x 4) logical AND I3 To compute one cell value, there exists ‘m’ multiplications
and ‘m-1’ additions. For the transformation, cnm  amn, the
17 2 13 7 ˄ 1 0 0 computational time is O(m). If there exists ‘m’ rows, time
41 11 29 19 ˄ 0 1 0
19 3 23 11 ˄ 0 0 1 will be O(m) + O(m) +……..m times = O(m2). For ‘n’
↓ ↓ ↓ columns, the computational time is O(nm2).

17 41 19
2 11 3 In the case of identity matrix as reference matrix, ( a i =
13 29 23 m, j = n * Ii = ) exists and other will be zero (Figure- 2)
m, j = m

7 19 11 [2]. This implies the time for one multiplication operation


will be O(1). If there exists ‘ m’ rows, time
will be O(1) +............m times = O(m). In general, for ‘n’
Output: AT(4 x 3)
columns, time = O(mn).
Here, identity matrix acts as the kernel to fin the
transpose. d

www.ijcsit.com 1
A(m x n) I(i = m, j= m) III. SUMMARY
a11 a12 a13 I11 0 The computational time of matrix transpose algorithm
a14 . 0
a21 a22 a23 a24 . 0 I22 0 using identity matrix as reference matrix is O(mn).
a31 a32 a33 a34 . 0 0 I33 Suppose, if the given matrix is a square matrix, the running
↓ ↓ ↓ time will be O(n2).
REFERENCES
c11 c12 c13 [1] Sanil Shanker KP, An Algorithm to Transpose Zero- One
c21 c22 c23 Matrix. Int. Journal of Com. Sci. and Inf. Tech, Vol. 7 (4), 2016
, 1960- 1961.
c31 c32 c33 [2] Sanil Shanker KP, Will the reference Matrix act as the Kernel of
c41 c42 c43 Matrix Transformation?, Int. Journal of Math. Tre. and Tech, Vol.
36 (1), 2016, 80- 81.
T [3] Mohammed Shameer. MC, Sanil Shanker. K. P, Java
Fig. 2 A(n x m) := C(n x m)
Implementation of Sanil’s Matrix Transpose, Int. Journal of Com.
Sci. and Inf. Tech. Vol. 7(5), 2016, 2145- 2146.

You might also like