jumble word permute

February 03 2012 by brian bovril 324
false
Maple

2


Hello

I need a procedure to unjumble a series of 9 letters into discernable 4 to 9 letter words. each letter can only be used once and it needs to include a given letter in each word. eg IOCMRELAE, and include R in each word

Acer did a similar thing a while back, but in this case it needs to tell it to permute 9 letters, then 8,....,then 4 (each including letter R).

 >with(StringTools): with(PatternDictionary):
>bid:= Create(`builtin`):
> words:= [seq](Get(bid,i),i=1..Size(bid)-1):
> Anagrams("nru",words);
                          "run", "urn"

> Anagrams("aterapse",words);
                           "separate"

 
Loading Comments & Answers

You must be logged into your MaplePrimes account in order to post a comment. If you don't have an account, you can create an account here.

     

Forgot Your Password? Create an Account