gregr:: Discussion #3 Message : 2004-10-28 22.12.42 peter [Changes]   [Calendar]   [Search]   [Index]   
  [Back to discussion: Word Count]  

Discussion #3 Message: 2004-10-28 22.12.42 peter

Ok, it will move through 25 caesar shifted ciphertexts of length 58 in 21060 comparisons. The problem is now in strings with several words inside. I added a bit of stats-generating code to the program and got this:

0 words in a string gives an average of 385 comparisons.
1 words in a string gives an average of 537 comparisons.
2 words in a string gives an average of 626 comparisons.
3 words in a string gives an average of 1374 comparisons.
4 words in a string gives an average of 3310 comparisons.
7 words in a string gives an average of 13800 comparisons.

Yeah. I think the problem is based in the idea that I want to count the absolute maximum number of words in each string. This doesn't seem to be really necessary at all, and it's terribly inefficient, so I'm going to look into a workaround.

(last modified 2004-10-28)       [Login]
(No back references.)