Talk:Combinations with repetitions: Difference between revisions

From Rosetta Code
Content added Content deleted
mNo edit summary
(→‎Task definition: example not accurate?)
Line 22: Line 22:


I wrote an example about the task! [[User:Pelci|Pelci]] 19:44, 18 November 2010 (UTC)
I wrote an example about the task! [[User:Pelci|Pelci]] 19:44, 18 November 2010 (UTC)

:The written example in the task description seems to describe sampling with replacement rather than sampling with repetitions. Which does the task attempt to describe? Given the set n= ('a,a,b,c,d'), k=3; (a,a,a) would be a valid answer if sampling with replacement, however would not be valid if sampling with repetition - which from the wikipedia page I understand to mean that some items may occur more than once in the population to be sampled.--[[User:Tikkanz|Tikkanz]] 21:52, 18 November 2010 (UTC)

Revision as of 21:52, 18 November 2010

Original implementations needed; the linked site does not indicate any license or copyright notice, which leads it to default (at least where Rosetta Code is based out of) to a default of "all rights reserved." The task can likely go to non-draft once it's slightly cleaned up, and original implementations are provided. --Michael Mol 19:39, 16 November 2010 (UTC)

Suggestion: It is OK. We can remove the Java solution. The other solutions are original implementation. Do I must remove it, or do you do it? Pelci 19:18, 18 November 2010 (UTC)

I pulled it myself. However, I don't mind if others want to pull them first, particularly in cases of clear copyright issues. --Michael Mol 19:20, 18 November 2010 (UTC)
So we can put back the task into the tasks... Pelci 19:40, 18 November 2010 (UTC)
I'd still want to see some cleanup of the task description. Mostly for en-us (or en-anything) grammar and spelling corrections. It might make more sense to wait until we have a few more implementations; as people attempt to implement it, they often find non-obvious problems we need to fix. --Michael Mol 19:43, 18 November 2010 (UTC)

Task definition

At this stage, it's very hard for me to work out exactly what is to be implemented; the task gives very little guidance over what a “k-combination with repetition” is exactly (it's not the clearest of wikipedia pages that is linked to). At the very least, I'd expect it to use a simple small example (with as few elements as possible) to show exactly what is meant and how things differ from a standard combination-enumerator; it could then ask for the generation of the combinations for a larger input set. –Donal Fellows 23:31, 16 November 2010 (UTC)

Ditto on the lack of clarity.
What would be the result of:
   n=(1,2,3), k=2; 
   n=(1,1,2,3), k=2
   n=(1,1,1,2,3), k=2
And how do you compute the result in the general case? --Paddy3118 00:01, 17 November 2010 (UTC)
n=(1,2,3), k=1 would have the same result as n=(1,1,2,3), k=1. Similarly, (1,1,2,3), k=2 would be the same result as (1,1,1,2,3), k=2. One way of expressing the result would be: calculate all the possibilities and then eliminate the duplicate results. --Rdm 15:18, 17 November 2010 (UTC)

I wrote an example about the task! Pelci 19:44, 18 November 2010 (UTC)

The written example in the task description seems to describe sampling with replacement rather than sampling with repetitions. Which does the task attempt to describe? Given the set n= ('a,a,b,c,d'), k=3; (a,a,a) would be a valid answer if sampling with replacement, however would not be valid if sampling with repetition - which from the wikipedia page I understand to mean that some items may occur more than once in the population to be sampled.--Tikkanz 21:52, 18 November 2010 (UTC)