The Implementation of Recursive Algorithm to Determine the Determinant of n x n Matrix Using Cofactor Expansion
This research examines the algorithm to determine the Determinant of n x n matrix using cofactor expansion and the implementation using recursive algorithm. Random function is added as an option to generate large matrix. To identified singular matrix and to avoid unnecessary further process, the algorithm searches for rows that are multiples of integer from another row, or columns that are multiples of integer from another column, then returns 0 as a Determinant value. In order to minimize the number of iterations and computations, the algorithm searches for rows or columns having the highest number of zero elements to be expanded. The program will not expand zero element and immediately returns a value of zero for those cofactor. Finally the program calculates the number of iterations performed each time the cofactor expands to calculate the Determinant of 2 x 2 matrix.In conclusion, the data shows that the use of recursice algorithm to iteratively expand cofactor considering the row and column having highest number of zero, will reduce the number of iteration and computation.
Copyright (c) 2019 Rahmat Hidayat, Seto Rahardyanto, Pahlevi Wahyu Hardjita
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.