#8955: random_matrix(GF(2),2,1) always returns all 1 matrix
-------------------------------+--------------------------------------------
Reporter: malb | Owner: jason, was
Type: defect | Status: new
Priority: critical | Milestone: sage-4.4.2
Component: linear algebra | Keywords:
Author: Martin Albrecht | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-------------------------------+--------------------------------------------
Reported by Roberto Nóbrega on [sage-devel]:
{{{
Hello, all!
After running
random_matrix(GF(2), 2, 1)
I always get the same matrix, [[1][1]].
Also, the following code
freq = {}
for _ in range(1000):
M = random_matrix(GF(2), 2, 2)
M.set_immutable()
if M not in freq:
freq[M] = 1
else:
freq[M] += 1
show(freq)
gives a very different result from the uniform distribution that I was
expecting. For example, the all-ones 2x2 matrix is the more probable,
and matrices with a full-zero-row does not appear, although matrices
with a full-zero-column does. In general, I noticed that the more
"1's" the matrix has, the more probable it is.
Am I missing something?
Regards,
Roberto.
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8955>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.