Group Abstract Group Abstract

Message Boards Message Boards

"Solving" a word combination lock

Posted 9 years ago
POSTED BY: Alan Joyce
4 Replies
POSTED BY: Marco Thiel

I once did something similar! But then I also used FindShortestTour to move through all of them using the least amount of dial-movements (using periodicity to your advantage).... So in your example the 'distance' between B and p (first dial) would just be two; not 8.

quite a lot of 4 letter words btw!

POSTED BY: Sander Huisman

Another option is to sort words by their frequency of occurrence in the English language using WordFrequencyData:

sortedWords = SortBy[words, -WordFrequencyData[#] &]

This gives the following result:

 Shallow[sortedWords]     
{that,from,were,they,more,will,them,time,some,what,<<833>>}

We can then further say that it is more likely that the word will be a Noun or a Verb, so we can obtain just those using WordData as follows:

nounsAndVerbs=Select[sortedWords,Or@@(MemberQ[{"Noun","Verb"},#]&/@WordData[#][[All,2]])&]

Despite all of this, I would be very surprised if "were" were the most common password used by kids for their bikes

Shallow[nounsAndVerbs]
{were,will,time,like,must,well,work,make,part,long,<<735>>}
POSTED BY: Danny Finn

enter image description here - another post of yours has been selected for the Staff Picks group, congratulations !

We are happy to see you at the top of the "Featured Contributor" board. Thank you for your wonderful contributions, and please keep them coming!

POSTED BY: EDITORIAL BOARD
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard