JOIN
Get Time
forums  Revision History
Search My Post History  |  My Watches  |  User Settings
Forums Algorithm Discussions General Algorithm Discussions Re: Turkish Informatics Olympiad problem Revision History (1 edit)
Re: Turkish Informatics Olympiad problem (response to post by misof)
Memory is still quite big in this N=4 (n=24) case, 2^24 * 24. Will greedy provide optimal solution to this problem ? For example in case of N=3,4 Greedy found these results :
123 231 312 213 132 321 
-> "123121321" : 9

1234 2341 3412 4123 2314 3142 1423 4231

3124 1243 2431 4312 2134 1342 3421 4213

1324 3241 2413 4132 3214 2143 1432 4321

-> "123412314231243121342132413214321" : 33


Edit: Rearrange to better see the pattern used for greedy.
Re: Turkish Informatics Olympiad problem (response to post by misof)
Memory is still quite big in this N=4 (n=24) case, 2^24 * 24. Will greedy provide optimal solution to this problem ? For example in case of N=3,4 Greedy found these results :
123 231 312 213 132 321 
-> "123121321" : 9

1234 2341 3412 4123 2314 3142
1423 4231 3124 1243 2431 4312
2134 1342 3421 4213 1324 3241
2413 4132 3214 2143 1432 4321
-> "123412314231243121342132413214321" : 33