Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.0

Request #16874 Permutations with repetition
Submitted: 2009-12-05 08:19 UTC
From: ifeghali Assigned:
Status: Open Package: Math_Combinatorics (version 1.0.0)
PHP Version: 5.3.0 OS: NA
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 27 + 44 = ?

 
 [2009-12-05 08:19 UTC] ifeghali (Igor Feghali)
Description: ------------ It would be great to generate permutations with repetitions as well. For example: Given a set = [A, B, C] It's permutation, two by two is: P{2} = [A,B] [A,C] [B,A] [B,C] [C,A] [C,B] I propose a switch (function argument) that would make the output: PR{2} = [A,A] [A,B] [A,C] [B,A] [B,B] [B,C] [C,A] [C,B] [C,C] That would me able to specify a higher subset size. For the above example, currently the highest subset size possible is 3. With repetitions that number can be any positive integer. For example, it makes sense to have: PR{5} = [A,A,A,A,A] [A,A,A,A,B] ...

Comments

 [2009-12-05 08:20 UTC] ifeghali (Igor Feghali)
Typo: "That would allow me to specify a higher subset size as well"