-
-
Notifications
You must be signed in to change notification settings - Fork 673
Open
Labels
Description
Steps To Reproduce
sage: Matrix().permanent()
0
Expected Behavior
Should be 1
as the formula for the permanent here contains one term (indexed by the empty permutation), which is the empty product with value is 1
.
Explicit implementation of the permanent definition:
sage: myperm = lambda M: sum( prod(M[i,p[i]] for i in range(M.nrows())) for p in Permutations(M.nrows()) )
sage: myperm( Matrix() )
1
Actual Behavior
Wrong value 0
is returned.
Additional Information
Determinant of the empty matrix is computed correctly:
sage: Matrix().det()
1
Environment
- OS: Ubuntu 24.04.3 LTS
- Sage Version: 10.8.beta4
Checklist
- I have searched the existing issues for a bug report that matches the one I want to file, without success.
- I have read the documentation and troubleshoot guide