Message Boards Message Boards

1
|
21555 Views
|
4 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Solve a Bike Lock problem with 4 dials and 10 letters on each dial?

Posted 5 years ago

I have a WordLock bike lock with 4 dials and 10 letters on each dial. I saw a post (https://community.wolfram.com/groups/-/m/t/926136) that someone used this program to find the correct lock combination. I don't know how to use this program, so if someone can tell me the possible combinations that would be great!

Dial 1 Letters: S P H M T W D L F B Dial 2 Letters: L E Y H N R U O A I Dial 3 Letters: E N M L R T A O S K Dial 4 Letters: D S N M P Y L K T E

POSTED BY: Justin Henry
4 Replies

It is exactly the same as the one that was posted:

letters = "S P H M T W D L F B
  L E Y H N R U O A I
  E N M L R T A O S K
  D S N M P Y L K T E ";

dials = (ToLowerCase /@ StringSplit[#]) & /@ 
  StringSplit[letters, "\n"];

tup = Tuples[dials];
strings = StringJoin /@ tup;

words = Select[strings, DictionaryWordQ];

That list contains 859 words. Here's the first bit:

enter image description here

If this was for a lock it might be true that more frequent words are chosen with a higher probability. Here are the 50 most frequent words that are possible:

(Reverse@SortBy[wordsfreqs, Last])[[1 ;; 50]]

enter image description here

Perhaps people would not use stop words. Here's a way to do that:

stopwordlist = 
  Complement[DictionaryLookup[], DeleteStopwords[DictionaryLookup[]]];

TableForm[
 Partition[
  Select[(Reverse@SortBy[wordsfreqs, Last]), ! 
       MemberQ[stopwordlist, #[[1]]] &][[1 ;; 200]][[All, 1]], 10]]

enter image description here

Cheers,

Marco

POSTED BY: Marco Thiel
Posted 5 years ago

Hi Marco,

I have the exact same lock (same letters on the same dials, in the same order) as OP, and am spinning my wheels trying to figure out how to use the handy-dandy code you helpfully shared from the other post.

It would be super helpful if you shared the complete list of 859 words -- I can confirm the word I'm looking for is not one the the 173 you already shared, and I'm quite certain I'll recognize the darn word when I see it.

Thanks in advance!

POSTED BY: Dave Rose
Posted 1 year ago

Could someone run this code for me and provide the complete list of 859 words or explain to me how to run the code myself? Thanks!

POSTED BY: Jim Natale

i am trying to run the code while on a trial version of mathematica. I copied the code and only replaced the letters for the lock that I have. How do I run the software? When I click run file, it downloads something and says I have no app to run it. Do I need to download mathematica for this code to work? thank you!

letters = "K L M N O P Q R S T
A B C D E F G H I J
A E I O R S T L N K
A B C D E F G H I J ";

dials = (ToLowerCase /@ StringSplit[#]) & /@ 
  StringSplit[letters, "\n"];

tup = Tuples[dials];
strings = StringJoin /@ tup;

words = Select[strings, DictionaryWordQ];
POSTED BY: Ray Hutchinson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract