![]() |
May 2017
There is a new Ibm puzzle:
[url]https://www.research.ibm.com/haifa/ponderthis/challenges/May2017.html[/url] |
Brute force seems to run out of steam at around n=15. Not sure what to do next.
|
I wrote program that gives me thousands of valid answers, but how to translate it into a formula escapes me...
Edit: I wrote the program with embedded loops, hoping that once I found a valid string, I could create a formula, but alas, I can't get there from there... |
[QUOTE=EdH;458022]I wrote program that gives me thousands of valid answers, but how to translate it into a formula escapes me...
Edit: I wrote the program with embedded loops, hoping that once I found a valid string, I could create a formula, but alas, I can't get there from there...[/QUOTE] You are brave doing that many embedded loops. I chose recursion. |
Without the 53 character limit, it would be trivial to come up with a solution, just line them up.:smile:
With the restriction however the brute force will require astronomical execution times to come up with a solution if such solutions are rare. Perhaps someone can do the number of atoms comparison here. I think running the brute force intelligently is the best approach. Running the brute force from large strings to lower should yield results faster (there are other similar improvement possible). Another improvement would be stop executing inner loops as soon as a conflict is found. But with 26 nested loops, it is a pain to code. I have tried but can't afford to invest enough time to optimize the code. |
[QUOTE=EdH;458022]
Edit: I wrote the program with embedded loops, hoping that once I found a valid string, I could create a formula, but alas, I can't get there from there...[/QUOTE] What formula? You need to find a valid string with no more than 53 characters... (it is likely it'll be a meaningless word). And send it with description how you found it (optionally with a code). |
If the solutions are abundant enough, then a random search might find a solution faster than an organized brute force.
|
[QUOTE=R. Gerbicz;458027]What formula? You need to find a valid string with no more than 53 characters... (it is likely it'll be a meaningless word). And send it with description how you found it (optionally with a code).[/QUOTE]
If a program is all that's needed, I'll clean up the code and submit it. Right now it generates 54 character strings, but the 54th character is an "*" instead of a valid character. The first 53 characters are valid. In 10 seconds on my machine the C++ code writes over 500 valid strings. This, of course, assumes that I am not mistaken in my understanding. Can I post one of the stings here for review or would that share too much info for the challenge? |
[QUOTE=EdH;458034]If a program is all that's needed, I'll clean up the code and submit it. Right now it generates 54 character strings, but the 54th character is an "*" instead of a valid character. The first 53 characters are valid. In 10 seconds on my machine the C++ code writes over 500 valid strings. This, of course, assumes that I am not mistaken in my understanding.[/QUOTE]
I'm not the puzzlemaster, but I think that he needs a valid string + description your method. The code is really optional (in some cases I don't email that, if that is not very nice/short). It could be possible that he accepts valid string + code also. [QUOTE=EdH;458034] Can I post one of the stings here for review or would that share too much info for the challenge?[/QUOTE] Here do not post full/partial solutions. You can do that only after the contest, when the official solution appears. |
[QUOTE=R. Gerbicz;458036]I'm not the puzzlemaster, but I think that he needs a valid string + description your method. The code is really optional (in some cases I don't email that, if that is not very nice/short). It could be possible that he accepts valid string + code also.
Here do not post full/partial solutions. You can do that only after the contest, when the official solution appears.[/QUOTE] Thanks. I'll construct an email and send it. Then I'll know more. |
[QUOTE=EdH;458038]Thanks. I'll construct an email and send it. Then I'll know more.[/QUOTE]
OK, it is not a very complicated process. Furthermore what I generally follow is that if you use a special program (say Maple/Mathematica/Matlab) or even a free program then submit also the screen output. You don't need it for c/c++/Pari-Gp code because it is so general, he can even run it easily if he wants it. |
| All times are UTC. The time now is 03:50. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.