Talk:Most frequent k chars distance: Difference between revisions

m
(sign comments)
m (→‎Prank Page?: grammar)
Line 26:
::::6. The alternative interpretation (taken by both current implementations) is that the frequencies ''are'' actually summed, and this makes <tt>MostFreqKSDF(str1,str2,2,100) = 83</tt> work, but that breaks <tt>MostFreqKSDF('night','nacht',2,10)=9</tt> (which would be <tt>8</tt>), <tt>MostFreqKSDF('research', 'research',2,10)=8</tt> (would be <tt>6</tt>), <tt>MostFreqKSDF('aaaaabbbb','ababababa',2,10)=1</tt> (would be <tt>-8</tt>), <tt>MostFreqKSDF('significant', 'capabilities', 2, 10)=5</tt> (would be <tt>4</tt>), and the original example, given (implicitly) in the preamble, <tt>MostFreqKSimilarity('r2e2','e2s1',2,10)=8</tt> (would be <tt>6</tt>).
 
::::7. Just to make sure I wasn't crazy, I ran the Java code posted by the original author of the task, and as expected (but for the reasons outlined just above) its outputs disagree with the values given in the test cases (for example, it gives <tt>-8</tt> for the <tt>'aaaaabbbb'</tt> vs <tt>'ababababa'</tt> example, and actually crashes for the <tt>'my'</tt> vs <tt>'a'</tt> example).
 
::: Anyway, unless I'm overlooking something obvious, an implementation can not be consistent with both the pseudocode and the required examples. Anyone care to point me in the right direction?
Anonymous user