Some limit distributions in analysis of algorithms for problems on trace languages