Post Reply 
[VA] My 2024's very first little teaser
01-22-2024, 03:56 PM
Post: #8
RE: [VA] My 2024's very first little teaser
Here is my solution in 3 BASIC lines and 127 bytes:

20 DESTROY ALL @ OPTION BASE 1 @ DIM U(3),V(3),W(3),M(3,3) @ MAT INPUT U,V,W
40 M(1,2)=W(3) @ M(1,3)=W(2) @ M(2,1)=W(3) @ M(2,3)=W(1) @ M(3,1)=W(2) @ M(3,2)=W(1)
50 MAT V=M*V @ DISP DOT(U,V)


You will notice that there is a '*' sign, but it denotes a matrix multiplication, not an arithmetic operation, so I believe that it is allowed here.

Using the notation

    | a b c |
A = | d e f |
    | g h i |


the code is computing

| 0 i h |   | d |   | ei+fh |
| i 0 g | * | e | = | di+fg |
| h g 0 |   | f |   | dh+eg |


then

| a |   | ei+fh |
| b | . | di+fg | = aei+afh+bdi+bfg+cdh+ceg = per(A)
| c |   | dh+eg |


J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [VA] My 2024's very first little teaser - J-F Garnier - 01-22-2024 03:56 PM



User(s) browsing this thread: 4 Guest(s)