I have written an algorithm that seems to work with the unjumbling of the words in c++.... My only problem is it seems to process really really slow! I have written something basically the same in VB.Net but it also seems to work slow!

So I'm not sure exactly how to go about speeding up the process of the comparison between words, without posting my code. So was wondering if maybe someone can give me a hint as in what I may be doing wrong, if maybe you have come across the same issue.

You don't have to post your code here ( but then again if it does not work it wouldn't be a big spoiler), on the other side I don't think it would be a problem describing how your algorithm works. Otherwise I doubt you could get help about your own method.

Just my wild guess are you using some kind of word permutation? If used incorrectly it could lead to some wasted time although I can't tell how much that would possibly be.

Gatito wrote:You don't have to post your code here ( but then again if it does not work it wouldn't be a big spoiler), on the other side I don't think it would be a problem describing how your algorithm works. Otherwise I doubt you could get help about your own method.

Just my wild guess are you using some kind of word permutation? If used incorrectly it could lead to some wasted time although I can't tell how much that would possibly be.

Sup man, thanks for the reply.

I would reckon it is a spoiler because it DOES work, the only problem is that it works very slowly... And yes I am using permutation...

Instead of going about it how you're doing it, you could try an operation on both the scrambled word and each word from the wordlist that would return the same result if the two words are scrambled versions of one another.

There are a total of 1275±1 words in the list made of:685 6-letter words T=1.4 s385 7-letter words T=13.4 s204 8-letter words T=141.0 sjust a 9-letter word T=15.6 s (and that being "phurivdli" but later about it).

You ask what T is? For example you want to find the unscrambled version of "vedser" which is made of 6 letters. In that case :T = [Time recursion needs to find all permutations for 6 character long string] X [Number of 6-letter words in the list].So basically T is the worst time my PC needs for finding the answer for a word without including the time needed for reading through the list and comparing the strings which isn't that much anyways.

And Probability Theory tells us the average time for unscrambling 10 words is more than 2 minutes (if words are picked randomly). So recursion is too time-costly for this challenge, you have to find some other algorithm (see post above).

HERE ARE THE FUN FACTS:

What is phurivdli anyways? A search with google wielded some funny results, every link pointed to a site/forum which had to do with this very challenge, lol.