Talk:ABC problem: Difference between revisions

From Rosetta Code
Content added Content deleted
Line 22: Line 22:
: Why not change one of the toy blocks to a   '''(S F)'''?   That is the case for   '''(B O)'''. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 01:42, 9 January 2014 (UTC)
: Why not change one of the toy blocks to a   '''(S F)'''?   That is the case for   '''(B O)'''. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 01:42, 9 January 2014 (UTC)


: Was likely a typo on my part --[[User:Jking|Jking]] ([[User talk:Jking|talk]]) 02:51, 9 January 2014 (UTC)
: There could be duplicate blocks. I didn't mean "set" in the mathematical sense which would be confusing. Collection seems appropriate. --[[User:Jking|Jking]] ([[User talk:Jking|talk]]) 02:55, 9 January 2014 (UTC)

Revision as of 02:55, 9 January 2014

Solution?

Had fun with this one last night after playing with my daughter. Should I include a solution? --Jking (talk) 14:46, 8 January 2014 (UTC)

You probably need to have a solution at hand to write a good task. If you've got it, why not add it as the first example? (I do) --Paddy3118 (talk) 20:34, 8 January 2014 (UTC)

Examples OK?

It appears to me that, given the set of blocks on the page, the result of a test on "BOOK" should be true?

Also it is possible to make a zero-length word with whatever letters you have. In which case shouldn't the results of can_make_word "" be True? --Tikkanz (talk) 19:42, 8 January 2014 (UTC)

Hi, you need one B and two O's but the only blocks with either a B or an O are the two blocks BO and OB - you can't spell three letters with two blocks! --Paddy3118 (talk) 20:30, 8 January 2014 (UTC)
(The difficult null case). I take it as you cannot spell the null string with blocks as no block has a face without any characters. --Paddy3118 (talk) 20:37, 8 January 2014 (UTC)
OK, I was/am confused then about what the rules for using a block are? If a block is chosen, can only one of letters on the block can be used in the word? If so perhaps the following should be added as an additional constraint. "Only one letter can be used from each block chosen".
I guess that is a logical way to explain the null string generating "False", but using no blocks from the collection can also be thought of as "using the given set of blocks". Maybe better specification is required for this case too? --Tikkanz (talk)

Not a set of blocks

The block (F S) appears twice so I changed the description to use the word collection rather than a set of blocks. I have also added a specific example "CONFUSED" that will fail if their is only one (F S) block available. --Paddy3118 (talk) 20:49, 8 January 2014 (UTC)

Why not change one of the toy blocks to a   (S F)?   That is the case for   (B O). -- Gerard Schildberger (talk) 01:42, 9 January 2014 (UTC)
There could be duplicate blocks. I didn't mean "set" in the mathematical sense which would be confusing. Collection seems appropriate. --Jking (talk) 02:55, 9 January 2014 (UTC)