poulson
Joined 13 years ago
Karma
218
Submissions
51
Member since
Jul 26
Joined 13 years ago
Long story short, after a few minutes of awkward chit chat where they repeatedly try to determine whether I "believed in absolutes", they let me know that, yes, they were "professional interrogators". They then all immediately got up and left for what they claimed was their flight to Minneapolis.
Almost nothing about the solver would need to change in order to support computation over GF(p), which suggests that someone should create a version of Lights Out / Inverter which cycles through a prime number of colors rather than just off/on.
function M = Inverter(nx,ny)
A=eye(nx*ny,nx*ny);
for x=1:nx, for y=1:ny,
i=x+(y-1)*nx;
if( x ~= 1 ), A(i,i-1)=1; end;
if( x ~= nx ), A(i,i+1)=1; end;
if( y ~= 1 ), A(i,i-nx)=1; end;
if( y ~= ny ), A(i,i+nx)=1; end;
end; end;
b=ones(nx*ny,1);
s=gflineq(A,b);
M=zeros(ny,nx);
for x=1:nx, for y=1:ny, M(x,y)=s(x+(y-1)*nx); end; end;
returnWith that said, an example of efficiently transposing dense matrices was one of the CUDA examples five years ago...