|
|
initially let result sequence to be 10* 10* 10* 0* means zero or more zeroes. every time choose two number and if we merge them produce a smaller number then we merge them. the procedure stops until we can't merge to get a smaller number is it correct?? seems to be.. Edited by author 16.11.2017 07:10 we should modify this algo: every time choose right most two number that we merge them can get a smaller number then we merge them,.... we must merge numbers from right to left.... seems to be more correct I've just brute-forced answers for N = 2...500 and found the trick. But how to prove it is always correct or, at least, for the given binary sequences? Yes, there is a proof. Your e-mail, please. Brute force answers for N = 2.. 500 is a vary good hint for this problem ). Thank you. |
|
|