Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in Permutations(n, k) #4213

Closed
sagetrac-anakha mannequin opened this issue Sep 28, 2008 · 3 comments
Closed

Bug in Permutations(n, k) #4213

sagetrac-anakha mannequin opened this issue Sep 28, 2008 · 3 comments

Comments

@sagetrac-anakha
Copy link
Mannequin

sagetrac-anakha mannequin commented Sep 28, 2008

sage: list(Permutations([1,2,3,4,5], 4))

[ ...
 [2, 3, 1, 5],
 [2, 3, 3, 1],
 [2, 3, 3, 4],
 [2, 3, 3, 5],
 [2, 3, 4, 1],
 ...
 [3, 2, 1, 5],
 [3, 2, 2, 1],
 [3, 2, 2, 4],
 [3, 2, 2, 5],
 [3, 2, 4, 1],
 ...
 [4, 2, 1, 5],
 [4, 2, 2, 1],
 [4, 2, 2, 3],
 [4, 2, 2, 5],
 [4, 2, 3, 1],
 ...
 [5, 2, 1, 4],
 [5, 2, 2, 1],
 [5, 2, 2, 3],
 [5, 2, 2, 4],
 [5, 2, 3, 1],

Only the buggy parts are shown.

This does not occur for lists smaller that 5 or when len(n) == k.

CC: @sagetrac-sage-combinat

Component: combinatorics

Issue created by migration from https://trac.sagemath.org/ticket/4213

@sagetrac-anakha sagetrac-anakha mannequin added this to the sage-3.1.3 milestone Sep 28, 2008
@mwhansen
Copy link
Contributor

Attachment: trac_4213.patch.gz

@sagetrac-anakha
Copy link
Mannequin Author

sagetrac-anakha mannequin commented Sep 28, 2008

comment:2

Passes tests and fixes the problem on my end.

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Sep 29, 2008

comment:3

Merged in Sage 3.1.3.alpha2

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Sep 29, 2008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant