- #1
SophieP
- 8
- 0
Hello all,
I'm new, so please go easy on me if this is a silly question.
If I have a source set of characters, say:
This gives me every combination of characters in that set, starting with single character strings, then every pair, then every triplet, up to a limit of 3 characters.
This I can do, and have done, but is there a way to calculate the string that will occur at a given index, without computing the whole set and then taking the string from that?
Edit: It's also worth noting that the set resulted by the computation is, for a set of every combination of this source set of 95 characters, up to 4 letters is of size 95^4 + 95^3 + 95^2 + 95^1.
I hope my question isn't too poorly worded, or breaks any rules, it's not homework, it's a project I'm doing alone.
Many thanks,
Sophie
I'm new, so please go easy on me if this is a silly question.
If I have a source set of characters, say:
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ "
And I compute the Cartesian product of this source set (sort of).This gives me every combination of characters in that set, starting with single character strings, then every pair, then every triplet, up to a limit of 3 characters.
This I can do, and have done, but is there a way to calculate the string that will occur at a given index, without computing the whole set and then taking the string from that?
Edit: It's also worth noting that the set resulted by the computation is, for a set of every combination of this source set of 95 characters, up to 4 letters is of size 95^4 + 95^3 + 95^2 + 95^1.
I hope my question isn't too poorly worded, or breaks any rules, it's not homework, it's a project I'm doing alone.
Many thanks,
Sophie
Last edited: