The Dutch national problem is this problem : I have a sequence of characters x^k (k >= 3) My goal is to transform this sentence into a dutch flag, that is to say :
xxx gives RWB
xxxx gives RWBB
xxxxx gives RWWBB
xxxxxx gives RRWWBB
...
with R <= W <= B <= R+1
I want to design a Turing machine with one ribbon, and a complexity of n.log(n) . The fact is , the standard algorithm is using swaps and I cannot use it, which is not available (not efficient enough) in this kind of Turing machine ....
Do you know how to do it ? :)