Thomas Feulner
unread,Aug 30, 2012, 3:23:28 AM8/30/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sage-...@googlegroups.com
Hi,
I am working on linear codes and I observed a high memory consumption when constructing codes of large length. I figured out that this problem already appears in the construction of vector spaces:
sage: F.<a> = GF(4)
sage: M = MatrixSpace(F, 8, 10000).random_element()
sage: V = VectorSpace(F, M.ncols())
sage: V.__dict__.keys()
['__reduce_ex__', '_element_class', '_gram_matrix', '_FreeModule_generic__rank', '_FreeModule_generic__is_sparse', '_FreeModule_generic__degree', '_FreeModule_generic__uses_ambient_inner_product']
sage: V.subspace(M)
Vector space of degree 10000 and dimension 8 over Finite Field in a of size 2^2
Basis matrix:
8 x 10000 dense matrix over Finite Field in a of size 2^2
sage: V.__dict__.keys()
['__reduce_ex__', '_element_class', '_gram_matrix', '_FreeModule_generic__rank', '_FreeModule_generic__is_sparse', '_FreeModule_generic__degree', '_FreeModule_ambient__basis', '_FreeModule_generic__uses_ambient_inner_product']
As you can see, the construction of the subspace adds a basis to V ==> sage stores 10000 dense vectors of length 10000!
Doing the same construction over other fields, say F=QQ, does not show this behavior. Is there any
solution in sight for this?