Problem 2650. Kurchan 4x4 - Optimal score
Related to Problem 1646, but bigger. Technically, all you need to do for this Cody problem is input a 4x4 matrix containing the numbers 1-16. However, your score will be the Kurchan value of the matrix, which is defined as the difference between the maximum and minimum of the products for the rows, columns, diagonals, and anti-diagonals of the matrix.
For example: Magic(4) is
16 2 3 13 5 11 10 8 9 7 6 12 4 14 15 1
The row products are:
- 16*2*3*13=1248
- 5*11*10*8=4400
- 9*7*6*12=4536
- 4*14*15*1=840
The column products are:
- 16*9*5*4=2880
- 2*11*7*14=2156
- 3*10*6*15=2700
- 13*8*12*1=1248
The diagonal products are:
- 16*11*6*1=1056
- 2*10*12*4=960
- 3*8*9*14=3024
- 13*5*7*15=6825
The anti-diagonal products are:
- 13*10*7*4=3640
- 3*11*9*1=297
- 2*5*12*15=1800
- 16*8*6*14=10752
The highest value is 10752, while the lowest is 297. Therefore, the score of this matrix is 10455. Your Cody score will be the Kurchan score of your matrix.
Solution Stats
Problem Comments
-
2 Comments
And do we seek to obtain a higher or lower score? what is the goal?
I went for the minimum score that I was able to find at least, and
found 3724. Moreover, I submitted the algorithm and the hardcoded solution.
Solution Comments
Show commentsGroup

Paper-&-pencil Games
- 19 Problems
- 4 Finishers
- Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
- Calculate the area of a triangle between three points
- Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
- Television Screen Dimensions
- Find third Side of a right triangle given hypotenuse and a side. No * - or other functions allowed
- Calculate the area of a triangle between three points
- Are all the three given point in the same line?
- Volume of a Parallelepiped
- Spherical radius given four points
- Angle between Two Vectors
- Is the Point in a Circle?
- What is the distance from point P(x,y) to the line Ax + By + C = 0?
- Covering area
- Clock Hand Angle 1
- Angle between two vectors
- Similar Triangles - find the height of the tree
- Circumscribed circles
- Are you in or are you out?
- Clockwise or Counterclockwise
- Smallest distance between a point and a rectangle
- Great Circle Distance
- Right and wrong
Problem Recent Solvers35
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!