GCHQ puzzle for IET readers October 2017, any one with same results?
1 次查看(过去 30 天)
显示 更早的评论
Hi
The Institute of Engineering and Technology (IET www.theiet./org ) publication October 2017 attachment Early Careers has challenged readers with the following puzzle:
.
.
Even with Texas Instruments TINA Spice simulator building the simple blocks was taking too long. The efficient way to obtain the equivalent resistor values in rational expression is with pen an paper.
The puzzle is also published here
.
So far what I've done
.
clear all;clc;close all
A=['RRELUVXYDPXOR';
'VHEAZXNETPZZO';
'LTAUMXOTWHEAX';
'GIYGEQTAPXDGX';
'WDWODELPSOTNY';
'XDVXENGIAFUXN';
'DHMRXZMDDOTIS';
'OQUATXVRBTRXL';
'DWP?RNDXFODLA';
'XGANXKIS?ILJX';
'TGEAMADKINXSZ';
'GLAALLEMXTDNX';
'SDXTHDELNXAPH';]
[szA1 szA2]=size(A);
% column 1 : n1
% column 2 : n2
% column 3 : dim 1 numeral horizontal pointing at columns,
% 2 numeral vertical pointing at rows
% column 4 : reverse, 0 no 1 yes
T=[4 3 11 2 8 1 5 10 7 7 7 1 7 3 11 7 5 6 13 3 8 3 2 6 2 1 5 3 7 10 4 2 4 5 1 5;
9 4 13 5 13 3 2 9 11 4 13 4 10 7 8 12 12 7 11 8 5 10 3 11 7 5 9 11 9 11 5 9 7 6 2 11;
1 1 1 1 2 2 2 2 1 1 1 1 2 2 2 2 1 1 1 1 1 2 2 2 2 2 1 1 1 1 1 2 2 2 2 2;
1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0;];
T=T'
[sz1t sz2t]=size(T)
S='/';
for k=1:1:sz1t
T0=T(k,:);
n1=T0(1);n2=T0(2);
S=[S A(n1,n2)];
end
S(1)=[]
U=[num2str(T(:,1)) repmat(' / ',36,1) num2str(T(:,2)) repmat(' = ',36,1) S' ]
nt=[];
for k=1:1:36
L1=U(k,:)
if regexp(L1,'T')
nt=[nt k];
end
end
nt
U(nt,:)
St='/';
for k=1:1:sz1t
T0=T(k,:);
n1=T0(1);n2=T0(2);
St=[St A(n2,n1)];
end
St(1)=[]
flip(St)
% =
% 'MVERWONDERWHATAPUZZLERMIGETDOZLLDAY?' % same as % St=St([end:-1:1])
% for k=1:1:sz1t
% T0=T(k,:);
% n1=T0(1);n2=T0(2);
% dim=T0(3);rev=T0(4);
%
% % A=swline(A,n1,n2,dim,rev);
%
% if rev==1
% n1=abs(szA1-n1+1);n2=abs(szA2-n2+1);
% end
%
% % MATLAB circshift dim 1 numerals are vertical, point at rows,
% % but here dim 1 means numerals are horizontal, pointing at columns
% if dim==1
% L1=A(:,n2);
% A(:,n2)=A(:,n1);
% A(:,n1)=L1;
% end
%
% if dim==2
% L2=A(n2,:);
% A(n2,:)=A(n1,:);
% A(n1,:)=L2;
%
% end
%
% end
% 01:
% taking into account circuit direction by reversing according to circuit direction
% taking into account whether circuit along vertical or horizontal
% 02:
% T=[4 3 13 5 8 1 4 10 7 5 5 1 5 3 11 7 12 6 1 3 8 3 2 6 1 1 5 3 9 10 5 2 4 1 1 7;
% 9 4 6 4 13 3 11 9 11 4 13 4 8 7 8 12 5 7 7 8 5 10 3 11 5 5 9 11 7 11 4 9 7 5 2 13;
% 1 1 1 1 2 2 2 2 1 1 1 1 2 2 2 2 1 1 1 1 1 2 2 2 2 2 1 1 1 1 1 2 2 2 2 2;
% 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ;];
% 03:
% T=[4 3 13 5 8 1 4 10 7 5 5 1 5 3 11 7 12 6 1 3 8 3 2 6 1 1 5 3 9 10 5 2 4 1 1 7;
% 9 4 6 4 13 3 11 9 11 4 13 4 8 7 8 12 5 7 7 8 5 10 3 11 5 5 9 11 7 11 4 9 7 5 2 13;
% 1 1 1 1 2 2 2 2 1 1 1 1 2 2 2 2 1 1 1 1 1 2 2 2 2 2 1 1 1 1 1 2 2 2 2 2;
% zeros(1,36) ;];
% 04:
% T=[4 3 13 5 8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12 5 7 7 8 5 10 3 11 5 5 9 11 7 11 4 9 7 5 2 13;
% 2 2 2 2 1 1 1 1 2 2 2 2 1 1 1 1 2 2 2 2 2 1 1 1 1 1 2 2 2 2 2 1 1 1 1 1 ;
% ones(1,36);];
% 08:
% T=[4 3 13 5 8 1 4 10 7 5 5 1 5 3 11 7 12 6 1 3 8 3 2 6 1 1 5 3 9 10 5 2 4 1 1 7;
% 9 4 6 4 13 3 11 9 11 4 13 4 8 7 8 12 5 7 7 8 5 10 3 11 5 5 9 11 7 11 4 9 7 5 2 13;
% 2 2 2 2 1 1 1 1 2 2 2 2 1 1 1 1 2 2 2 2 2 1 1 1 1 1 2 2 2 2 2 1 1 1 1 1 ;
% zeros(1,36);];
% 09:
% checking again equivalent resistors, correcting errors
% S =
% 'PUZZLED?TRSLOOKINGATTHEUNUSEDLETTERT'
% ' 4 / 9 = P'
% ' 3 / 4 = U'
% '11 / 13 = Z'
% ' 2 / 5 = Z'
% ' 8 / 13 = L'
% ' 1 / 3 = E'
% ' 5 / 2 = D'
% '10 / 9 = ?'
% ' 7 / 11 = T'
% ' 7 / 4 = R'
% ' 7 / 13 = S'
% ' 1 / 4 = L'
% ' 7 / 10 = O'
% ' 3 / 7 = O'
% '11 / 8 = K'
% ' 7 / 12 = I'
% ' 5 / 12 = N'
% ' 6 / 7 = G'
% '13 / 11 = A'
% ' 3 / 8 = T'
% ' 8 / 5 = T'
% ' 3 / 10 = H'
% ' 2 / 3 = E'
% ' 6 / 11 = U'
% ' 2 / 7 = N'
% ' 1 / 5 = U'
% ' 5 / 9 = S'
% ' 3 / 11 = E'
% ' 7 / 9 = D'
% '10 / 11 = L'
% ' 4 / 5 = E'
% ' 2 / 9 = T'
% ' 4 / 7 = T'
% ' 5 / 6 = E'
% ' 1 / 2 = R'
% ' 5 / 11 = T'
% 10:
% reverse n1
% 11:
% reverse n2
% 12:
% reverse both n1 and n2
% 10:
% S2='/';
% for k=1:1:sz1t
% T0=T(k,:);
% n1=T0(1);n2=T0(2);
% n1=abs(13-n1)+1;
% S2=[S2 A(n1,n2)];
%
% end
% S2(1)=[]
%
% S2t='/';
% for k=1:1:sz1t
% T0=T(k,:);
% n1=T0(1);n2=T0(2);
% n1=abs(13-n1)+1;
% S2t=[S2t A(n2,n1)];
%
% end
% S2t(1)=[]
%
% % 11:
% S3='/';
% for k=1:1:sz1t
% T0=T(k,:);
% n1=T0(1);n2=T0(2);
% n2=abs(13-n2)+1;
% S3=[S3 A(n1,n2)];
%
% end
% S3(1)=[]
%
% S3t='/';
% for k=1:1:sz1t
% T0=T(k,:);
% n1=T0(1);n2=T0(2);
% n2=abs(13-n2)+1;
% S3t=[S3t A(n2,n1)];
%
% end
% S3t(1)=[]
%
% % 12:
% S4='/';
% for k=1:1:sz1t
% T0=T(k,:);
% n1=T0(1);n2=T0(2);
% n1=abs(13-n1)+1;
% n2=abs(13-n2)+1;
% S4=[S4 A(n1,n2)];
%
% end
% S3(1)=[]
%
% S4t='/';
% for k=1:1:sz1t
% T0=T(k,:);
% n1=T0(1);n2=T0(2);
% n1=abs(13-n1)+1;
% n2=abs(13-n2)+1;
% S4t=[S4t A(n2,n1)];
%
% end
% S4t(1)=[]
.
The forward answer seems to be
S =
'PUZZLED?TRSLOOKINGATTHEUNUSEDLETTERT'
.
and the reverse answer seems to be
.
flip(St)
=
'MVERWONDERWHATAPUZZLERMIGETDOZLLDAY?' % same as % St=St([end:-1:1])
Ignore
T(3,:)
T(4,:)
I built those additional lines because I started considering it was a 2D Rubik cube so started shifting lines
Not anywhere near to anything critical like the French launch codes anyway.
As expected, like the IT crowd, lawyers and politicians, spooks will never ever tell you anything you already know ( unless they work for you, and pray they don't go Ryan Air pilots mode), but they will fool everyone else to thinking they have just revealed the most critical bit of information, ever.
Any one with same results?
2 个评论
James Guy
2017-10-14
Got very similar and I suspect you can see where your inaccuracies are. Any progress with the next step?
回答(0 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!