Algorithms and Analysis


Two Words Hangman Solver

Description of Approach.

Rationale behind using this approach.

The Wheel of Fortune.

Description of Approach.

Rationale behind using this approach.


Two Words Hangman Solver

Description of Approach

  1. Get the length for the words.
  2. Filter all the words having lengths equal to the lengths of given words to guess. And store them in different sets Word1 and Word2 corresponding to their lengths.
  3. We have made two separate sets for both the words.
  4. Now randomly guess the first word, until we got a hit.
  5. If a hit occurs, note the char and location of hit and note that weather it was word 1 or word 2.
  6. Now filter Word1 and Word2 collection using the data from the hit guess response.
  7. Keep on filtering (DataGenetics, 2020)and guessing, until we run out of moves or we guess both the words.

The distribution for the words of dictionary has been calculated but in case of playing hangman game the user knows the length of the words he is going to guess which allows the developer to refine the search further. The table shown below shows the popularity of the words in dictionary and their groups. In the table, the most popular words are on the top and least popular words on the lower side. The length of the words increases from going left to right. (DataGenetics, 2020)

Rationale Behind Using This Approach

A dictionary of words was available, so instead of guessing alphabets randomly, it is a lot better to use we can use some word eliminations depending on hit response of character. (Roald, 2020)
In order to generalize the two word case i created a new dictionary which is equal to the Cartesian product of current dictionary, etc. the concept of reduction is defined before defining the algorithm for it. In order to guess all the numbers L1, L2, L3 and so on it is important to reduce the size of dictionary in which few smaller words are reduced and few additional letters may also be eliminated.(Roald, 2020)

The Wheel of Fortune

Description of Approach

  1. Get the length for the all the words.
  2. Filter all the words having lengths equal to the lengths of given words to guess. And store them into a collection.
  3. There may be more than two words so we cannot apply filtering technique.
  4. Now randomly guess the first word, until we got a hit. 5. Just make sure that we don't guess the same word again.
  5. Select a random word from collection we have already extracted and then select a random character from that word.
  6. Keep on randomly guessing, until we guess both the words and we run out of moves.

If the dictionary is more than 2^ max number of guess in hangman game then it is impossible unequal probability world. Each word you associate a prior probability (e.g. let's say there is a 0.00001 chance of the word being 'putrescent' and a 0.002 chance of the word being 'hangman'). An answer to a guess will either yield no letters, a single letter, or more than one letter (many possibilities). (Roald, 2020)

Rationale Behind Using This Approach

There are more than two words to guess in wheel of fortune. So, it is quite difficult to guess the correct word using the dictionary filtration and elimination technique because it requires a lot of computation and complexity. And most often results in false predictions. So it is best in this case that we use random guessing after just filtering the words from dictionary base on the lengths of the words.

References for Optimal Algorithm for Winning Hangman

DataGenetics. (2020, October 2). A Better Strategy for Hangman. Retrieved from Data Genetics:

Roald. (2020, October 1st). Optimal Algorithm for Winning Hangman. Retrieved from Stack Overflow:

Remember, at the center of any academic work, lies clarity and evidence. Should you need further assistance, do look up to our Computer Science Assignment Help

Get It Done! Today

Apply Coupon code
  • 1,212,718Orders

  • 4.9/5Rating

  • 5,063Experts


5 Stars to their Experts for my Assignment Assistance.

There experts have good understanding and knowledge of university guidelines. So, its better if you take their Assistance rather than doing the assignments on your own.

What you will benefit from their service -

I saved my Time (which I utilized for my exam studies) & Money, and my grades were HD (better than my last assignments done by me)

What you will lose using this service -

Absolutely nothing.

Unfortunately, i had only 36 hours to complete my assignment when I realized that it's better to focus on exams and pass this to some experts, and then I came across this website.

Kudos Guys!




  • 21 Step Quality Check
  • 2000+ Ph.D Experts
  • Live Expert Sessions
  • Dedicated App
  • Earn while you Learn with us
  • Confidentiality Agreement
  • Money Back Guarantee
  • Customer Feedback

Just Pay for your Assignment

  • Turnitin Report

  • Proofreading and Editing

    $9.00Per Page
  • Consultation with Expert

    $35.00Per Hour
  • Live Session 1-on-1

    $40.00Per 30 min.
  • Quality Check

  • Total

  • Let's Start

500 Words Free
on your assignment today

Browse across 1 Million Assignment Samples for Free

Explore MASS
Order Now

My Assignment Services- Whatsapp Tap to ChatGet instant assignment help

Collect Chat