Problem 3098. Scrabble Scores  13
Solution Stats
Problem Comments

6 Comments
Hello Grant, how 'althea' in 2nd test is scored? I get (1+1*2+1+4+1+1)*2 = 20, but max_score_corr in this test is 44. My code has found 'maltha' for 30 points.
I get the same result with Jan Orwat
In 6th test, case 2 my code has found 'medico' for 28 points instead of 'chez','zaideh' and 'chimed' for 21. Same test, case 1 gives 'haemoid' for 117 points instead of 26 for 'cohead','chimla' and 'gached'. In 4th test, case 2 I've got 16 points for 'iodine', and 16 also for 'endrin', 'indole', 'ironed' and 'linden'.
Jan & Binbin, thank you for your patience and indepth error reporting. I was able to get the test suite and my code fixed to now report the same values that you found. I'm not sure how quickly the rescoring will propagate, so you might want to submit your solutions again. In case you're curious, there were two reasons for these errors. First, I had copied the word cell lists for starting words that had repeated letters (e.g., zoologist) but had failed to change the indices for the repeated letters. Second, my routine counted the multipliers outside of the loop on the starting index, so words with repeated letters that coincided with the tile in the starting word (e.g., a in althea) got their multiplier squares artificially doubled. But, all should be fixed now.
Hi Grant, after solving all your previous problems in this series, I get confused by the very last problem. What’s the score of a word if two different existing letters appear in the same word? Taking the first test case as an example, two existing letters 's' and 'a' (out of the first_word 'start') both appear in the same word 'atheism' (i.e., words{1}{end3} ). When considering 's' as the existing letter, the corresponding multiplier for the word 'atheism' is ' d ' (i.e.,3 spaces + 'd' + 3 spaces, or mult(1, 3:9) ) and the score of 'atheism' calculates to 13. On the other hand, if we consider 'a' as the existing letter, then 'a' becomes the starting letter of 'atheism'. In this case, the multiplier for the word 'atheism' is ' d T' (i.e., 2 spaces + d + 3 spaces + T, or mult(1, 8:14) ) and the score becomes 48. But the reference solution for test case 1 has a max_score_corr = 39, a score smaller than 48. I guess this mismatch is due to the confusion on how to determine the score when different existing letters appear in the same word. Could you please provide some explanations? BTW, Thanks for the nice series of problems!
Thanks for your interest in the problem set. It took a while to construct, so it's nice to see it being used. You seem to have the scoring method down. The hang up here is the possible word sets for each starting letter. Due to the lack of a dictionary, I precompiled all the possible words for each starting letter. For each, the respective starting letter is combined with tray letters (included in the test suites for informational purposes) to preconstruct the possibleword list. For the first test suite, the tray letters are: aethilm. Combined with s (the first startingword letter), you can spell atheism. However, when combined with a (the third startingword letter you reference here), atheism can no longer be spelled, as there is no s in the set of tray letters. So, your scoring is right, but not possible in this case due to the existing tray letters. I formulated the problem so that you don't have to worry about existing tray letters and only need to test against the precompiled word sets (cell arrays) for each startingword letter.
Problem Recent Solvers15
Suggested Problems

1167 Solvers

Project Euler: Problem 2, Sum of even Fibonacci
1664 Solvers

207 Solvers

948 Solvers

342 Solvers
More from this Author139
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!