All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > General
Unsolved (so far) problem (Posted on 2023-05-31) Difficulty: 3 of 5
Regarding the current events in Ukraine:

CEASE*FIRE=AUDIENCE

Solving the above, decode 03952 and comment how the result describes the status.

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 3
clearvars,clc
tic
numSets=perms('0123456789');
lets='ceasfirudn';
w1='cease';
w2='fire';
w3='audience';
for i=1:length(numSets)
   w1n=w1;
   for j=1:10
      w1n=strrep(w1n,lets(j),numSets(i,j));
   end
   w2n=w2;
   for j=1:10
      w2n=strrep(w2n,lets(j),numSets(i,j));
   end
   w3n=w3;
   for j=1:10
      w3n=strrep(w3n,lets(j),numSets(i,j));
   end
   if str2double(w1n)*str2double(w2n)==str2double(w3n)
     disp([w1n ' ' w2n ' ' w3n])
   end
end
toc

finds

16906 5486 92746316 for
cease fire audience

03952 then translates to
snafu


Elapsed time is 312.913938 seconds.

I tried to speed up run time by doing only one translation to numeric instead of three, and then evaluating with the eval( function. 

clearvars,clc
tic
numSets=perms('0123456789');
lets='ceasfirudn';
w1='cease*fire==audience';
for i=1:length(numSets)
   w1n=w1;
   for j=1:10
      w1n=strrep(w1n,lets(j),numSets(i,j));
   end
   cease=w1n(1:5);
   fire=w1n(7:10);
   audience=w1n(13:end);
   if eval(w1n)
     disp(w1n)
   end
end
  toc

But I got

16906*5486==92746316
Elapsed time is 631.021847 seconds.

Just over 10 minutes instead of 5.

  Posted by Charlie on 2023-05-31 10:01:45
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information