Maybe someone could give me a tip in how to solve a problem.
Assuming I have following string: John,Paul,George,Ringo
Also assuming I have following synonyms
- John = Piano, Guitar
- Paul = Piano, Guitar, Vocals
- George = Guitar
- Ringo = Drums
As a result, I want to have now all possible combinations, means:
John,Paul,George,Ringo
Piano,Paul,George,Ringo
Guitar,Paul,George,Ringo
John,Piano,George,Ringo
John,Guitar,George,Ringo
John,Vocals,George,Ringo
Piano,Piano,George,Ringo
Piano,Guitar,George,Ringo
Piano,Vocals,George,Ringo
Guitar,Piano,George,Ringo
Guitar,Guitar,George,Ringo
Guitar,Vocals,George,Ringo
John,Paul,Guitar,Ringo
Piano,Paul,Guitar,Ringo
...
The number of entries in my string is between 1 and 5.
The number of variations of string entries (the names) is something around 20.
The number of synonyms for each is between 1 and 4
I'm aware that the number of combinations gets large
![Wink ;-)](./images/smilies/icon_e_wink.gif)
To be honest, I'm not searching for a complete code (not saying no ...) but more for ideas how to create such a list
Any ideas are welcome.
Btw, the sequence of the list does not matter as long as the sequence of each list entry(name1 - n) does not change.