Main
Main
Artwork
Artwork
Books
Books
Donate
Donate
Licenses
Licenses
Shorts
Shorts
Software
Software
Source
Source

Scrambler - A Free Word Jumble Solver Written in Javascript

Scrambler is a collection of javascript functions. They compare a list of characters to entries in a database (dictionary). If the string can be arranged into items in the database, Scrambler adds the item to a list. The list is printed once similar items from the database are examined. A user can specify the quantity of words to make from a string and the quantity of characters in each word.

Scrambler is useful for people who are attempting to finish a jumble from their local newspaper or from a puzzle book. Obviously, the purpose of a jumble is to challenge a person's working memory. But sometimes, people get stuck. It happens! Scrambler was written for occasions in which a person gets stuck solving a jumble and they can't find time to finish.

A note regarding Scrambler's "dictionary": The dictionary used by Scrambler is adapted from the spell check dictionary for Apache Open Office 4.1.1. Apache Open Office is a free, scientific replacement for socialist office suites like Microsoft Office. It is released under the conditions of the Apache License 2.0. You can obtain copies of Apache Open Office and the Apache License from http://openoffice.org/

Use Scrambler: scrambler.html
GNU GPL: COPYING.txt
GNU Declaration: readme.txt

Some interesting facts about Scrambler. Arranging strings into three words or more is a bit tedious. Only words that are the length requested that contain letters in requested strings are retrieved from the dictionary for each word. For each word requested, a list for the proceeding word is generated (a collection of permutations). For example:

for(dictionary = [a.txt, b.txt, c.txt, d.txt, e.txt])
{
  a.txt = ["a", "ab", "ac", "ad", "ae", "abc", "acd", "ade", "abcd", "acde", "abcde"];
  b.txt = ["b", "bc", "bd", "be", "bac", "bad", "bcd", "bde", "bacd", "bcde", "bacde"];
  c.txt = ["c", "cb", "ca", "cd", "ce", "cbd", "cab", "cde", "cabd", "cbde", "cabde"];
  d.txt = ["d", "db", "da", "dc", "de", "dbc", "dab", "dce", "dabe", "dbce", "dabce"];
  e.txt = ["e", "ea", "eb", "ec", "eab", "eac", "ebc", "ecd", "eac", "eabc", "ebcd", "eabcd"];
}

if(requested words == 2 && word 1 length == 3 && word 2 length == 2 && requested string == "abcde")
{
  word 1 [0] = ["abc", "acd", "ade"];
  word 1 [1] = ["bac", "bad", "bcd", "bde"];
  word 1 [2] = ["cbd", "cab", "cde"];
  word 1 [3] = ["dbc", "dab", "dce"];
  word 1 [4] = ["eab", "eac", "ebc", "ecd"];

  word 2 [0] = ["ab", "ac", "ad", "ae"];
  word 2 [1] = ["bc", "bd", "be"];
  word 2 [2] = ["cb", "ca", "cd", "ce"];
  word 2 [3] = ["db", "da", "dc", "de"];
  word 2 [4] = ["ea", "eb", "ec"];
}

Now, the following types of combinations must be analyzed to see if word 2 is possible when word 1 is set:

response  [0] = ["abc", "ab"];
response  [1] = ["abc", "ac"];
response  [2] = ["abc", "ad"];
response  [3] = ["abc", "ae"];
response  [4] = ["abc", "bc"];
response  [5] = ["abc", "bd"];
response  [6] = ["abc", "be"];
response  [7] = ["abc", "cb"];
response  [8] = ["abc", "ca"];
response  [9] = ["abc", "cd"];
response [10] = ["abc", "ce"];
response [11] = ["abc", "db"];
response [12] = ["abc", "da"];
response [13] = ["abc", "dc"];
response [14] = ["abc", "de"];
response [15] = ["abc", "ea"];
response [16] = ["abc", "eb"];
response [17] = ["abc", "ec"];

response [18] = ["acd", "ab"];
response [19] = ["acd", "ac"];
response [20] = ["acd", "ad"];
response [21] = ["acd", "ae"];
response [22] = ["acd", "bc"];
response [23] = ["acd", "bd"];
response [24] = ["acd", "be"];
response [25] = ["acd", "cb"];
response [26] = ["acd", "ca"];
response [27] = ["acd", "cd"];
response [28] = ["acd", "ce"];
response [29] = ["acd", "db"];
response [30] = ["acd", "da"];
response [31] = ["acd", "dc"];
response [32] = ["acd", "de"];
response [33] = ["acd", "ea"];
response [34] = ["acd", "eb"];
response [35] = ["acd", "ec"];

Those are just the "abc" and "acd" combinations! As you can imagine, this becomes tedious very quickly. This algorithm grows exponentially. Exponential growth is the fastest type of growth possible in group theory. Thus, Scrambler can easily overwhelm most web browsers because they are poorly designed and not equipped to handle real problems. The behavior of the most common web browsers is bizarre and unpredictable. The behavior of Google Chrome (one of the most poorly designed applications in the history of software) seems to change with every release. Some releases will stop running Javascript code every five to ten seconds and ask the user if they want to continue running it (highly annoying). Other times, the browser will crash or stop running entirely. This is not a reflection of Scrambler itself. This is a reflection of the fact that modern web browsers are not designed to translate their own platform (Javascript) properly! And, that's just pitiful.

The solution? An *authentic* Javascript translator (there isn't one, yet) designed to migrate across a network (a super computer) would be more successful at translating Scrambler correctly. The next issue a developer would run into would be buffering the output properly. In other words, the output would need to be paged. Otherwise, a video card displaying the output would likely run out of memory to store all the strings Scrambler generates. Also, it would be best to use every memory card on a network to store the output.

Another tidbit about Scrambler is related to the dictionary. It does not contain every tense of every word that is possible in the English language. It does not contain a lot of things! And, it probably never will. A lot of time has been spent adding alternate tenses of words to the dictionary. But, there is a lot more that needs to be done. Also, word jumbles sometimes contain nonsense words. For example, a solution to a question at the end of a puzzle could be "sense-ible" or something similar. But, the blanks are printed this way: "_ _ _ _ _ - _ _ _ _". There will never be an entry for "ible", "senseible", or "sense-ible" in the Scrambler database. Scrambler's algorithms are not the proper method for solving this problem. This is an entirely new type of problem! Therefore, Scrambler cannot solve it... yet.

Back

______________________________________________

Random Fact: Insanely Witty Stupidity's icon (the "Oracle") is mysterious and perplexing. The more a person stares at it-- the more bizarre it appears. In reality, the logo is merely three letters inside of a yellow circle. Weird, huh?

html revised 2024-12-20 by Michael Atkins.

The maintainer of insanelywittystupidity.com does not care if people duplicate this page or any part of it-- as long as this notice remains intact.