Maximum value of the determinant formed from the matrix of 0 and n

Revision en1, by Sangar, 2017-02-23 09:50:41

Given a number k , a number n We have to form a K*K square matrix using just the numbers 0 and n such that it has maximum possible determinant We have to write a program that returns such determinant for given values of k and n

for example if k = 3 and n = 13

13 13 0

0 13 13

13 0 13

ie for k = 3 and any non negative value of n required matrix is

n n 0

0 n n

n 0 n

Tags maths, matrix, algorithms

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Sangar 2017-02-23 09:50:41 463 Initial revision (published)