Talk:Ordered words: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎Knotty problem: Ta to Tim.)
Line 13: Line 13:
:: Is there a public-domain (or, GFDL1.2-compatible, at least) wordlist I could host and have dictionary-dependent tasks draw from? URL preferred; Places I'm looking have weird or tricky copyright restricitons. --[[User:Short Circuit|Michael Mol]] 18:18, 27 November 2010 (UTC)
:: Is there a public-domain (or, GFDL1.2-compatible, at least) wordlist I could host and have dictionary-dependent tasks draw from? URL preferred; Places I'm looking have weird or tricky copyright restricitons. --[[User:Short Circuit|Michael Mol]] 18:18, 27 November 2010 (UTC)
:In the Perl code it was a faulty algorithm that hardwired the number of expected results!?! I fixed the Perl and Perl 6, but someone else can fix the C++. --[[User:TimToady|TimToady]] 18:32, 27 November 2010 (UTC)
:In the Perl code it was a faulty algorithm that hardwired the number of expected results!?! I fixed the Perl and Perl 6, but someone else can fix the C++. --[[User:TimToady|TimToady]] 18:32, 27 November 2010 (UTC)
:::Thanks TimToady. --[[User:Paddy3118|Paddy3118]] 05:42, 28 November 2010 (UTC)

Revision as of 05:42, 28 November 2010

Lexicographical order

Note: This task should probably be modified to be aware (and tolerant) of lexicographical order. --Michael Mol 22:15, 9 November 2010 (UTC)

I think it's probably not important on that particular dictionary; it's all lower case and well-behaved. –Donal Fellows 22:37, 9 November 2010 (UTC)

longest word length

By "longest word length", do you mean "equal to the length of the longest ordered word"? --Michael Mol 22:16, 9 November 2010 (UTC)

Yes. I find the ordered words, find the maximum length of any ordered word, then find all ordered words of that maximum length. --Paddy3118 13:09, 10 November 2010 (UTC)
For contrast, the Tcl code does it in a single pass. (It happened to be more natural to express it that way.) The result is the same though; the words in the result list are such that they are all of the same length, all ordered words, and there is no other ordered word (in the originating dictionary) such that its length is greater than the length of any result word. (Also, every ordered word of that length in the originating dictionary is present in the result.) I can't be bothered to write that mathematically. :-) –Donal Fellows 16:24, 10 November 2010 (UTC)

Knotty problem

I noticed three of the examples written by User talk:Ulrie, C++, Perl and Perl 6; don't have the word knotty mentioned. I don't know if this is due to a faulty copy of the dictionary or a faulty algorithm. (Knotty is still in the dictionary). I will give it a day then I think I should mark them incorrect? --Paddy3118 12:05, 27 November 2010 (UTC)

Or could their algorithms not cope with the double-t in knotty? (But note, The task description does state that the word 'abbey' with a double-b is to be considered ordered. --Paddy3118 16:58, 27 November 2010 (UTC)
Is there a public-domain (or, GFDL1.2-compatible, at least) wordlist I could host and have dictionary-dependent tasks draw from? URL preferred; Places I'm looking have weird or tricky copyright restricitons. --Michael Mol 18:18, 27 November 2010 (UTC)
In the Perl code it was a faulty algorithm that hardwired the number of expected results!?! I fixed the Perl and Perl 6, but someone else can fix the C++. --TimToady 18:32, 27 November 2010 (UTC)
Thanks TimToady. --Paddy3118 05:42, 28 November 2010 (UTC)