Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The [ ] is an improvement over the naive approach, but it can still be significantly improved. For example, suppose that the first guess was

image text in transcribedimage text in transcribed

The [ ] is an improvement over the naive approach, but it can still be significantly improved. For example, suppose that the first guess was , and that the word had no in it. In this case, you'd get back the pattern , which seems to provide no useful information. However, the fact that we don't see an in the pattern means the word has no . For the example above, that means that we know that the only possible words are | ), because the other words all have an in them. If we were to count up the letters in these words, we'd get {a=1,c=1,d=1,g=1,1=3,0=4,y=1}. The final guesser you'll write is , where PAGA stands for "Pattern And Guesses Aware". This guesser should take into account the pattern (like your previous guesser), and should also take into account guesses which do not appear in the pattern, e.g. the fact that contains no . [Q Task: Implement the methods in I , including any helper methods. Do not add any additonal instance variables apart from the ones that we have provided; this will cause some integration tests to fail. You'll know you're done when you pass all the tests in | and Warning: Another implication of taking guesses into account can be seen in the pattern . This pattern does not match , because all the 's have been revealed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Database Modeling With Neo4j

Authors: Ajit Singh

2nd Edition

B0BDWT2XLR, 979-8351798783

More Books

Students also viewed these Databases questions