in reply to Re^2: interleaved lists check
in thread interleaved lists check

Sounds like the guy you're working for may have an XY problem, too... (Does that mean you have an X^2Y^2 problem? Or would it be an X^2 + 2XY + Y^2 problem?)

If you already have the means to generate all the permutations of a list, then I suspect that generating all permutations of each source list and then interleaving each pair of those would be much faster, much simpler, and much less memory-intensive than generating all permutations of the combined source lists and filtering out those which aren't interleaved.

Replies are listed 'Best First'.
Re^4: interleaved lists check
by Anonymous Monk on Jun 19, 2006 at 11:21 UTC
    thanks for you help guys

    this sounds like the easy way to do it i new was staring me in the face all along

    i've also had a bit of a better chat with him about why its needed etc and i think there are multiple powers of xy problem involved here

    basically its all to do with how easy different lists of symbols (generally letters) are to remember due to factors like whether or not the letters sound the same and the probability of them occuring together in the native language

    he wants all the permutations because once he has them he's going to have me remove any that contain well known acronyms and then sort them into subsets according to these transitional probabilities (and yes i'm well aware we are talking about very large numbers of permutations), the interleaving thing was for mixing sets of confusable (sound the same) and nonconfusable letters

    the thing is for the time being he wants each letter to occupy each place an equal number of times in his set of lists - a latin square which i could have easily done anyway so yes xy^3 sorry (i will still need to do this permute and interleave though)