Thanks, David,
I think that the problem is with the operation "+" I have using Profiler
and when the matrix has dimensios, 12 x 19 these are the times
9.932s -- line 15: v = (particular_soln + homogeneous_soln)
0.004s -- line 17: print len(v.nonzero_positions())
Maybe there is some way to sum p
On Sun, Feb 25, 2018 at 4:11 PM, Juan Grados wrote:
> How can I improve the time for the next code?. Basically, I want to solve a
> large undetermined binary linear system and then I need to calculate its
> hamming weight.
>
> A = random_matrix(GF(2), 10, 12, density=0.55)
> b = random_vector(GF(2
Why don't you just work with the quotientring of a polynmial ring?
sage: Rx.=RR[]
sage: K.=Rx.quo(x^6+1)
sage: j=a^4
sage: i=a^3
sage: j^3
1.00
sage: i^2
-1.00
sage: (1+j+j^2) * j
a^4 - a^2 + 1.00
sage: (1+j+j^2)
a^4 - a^2 + 1.00
--
To po
Hi,
Thanks for the help!
Now all I need it to tell Sage that j^3=1 and that i^4=1 and i^2=-1, so that
Sage knows for example that
(1+j+j^2) * j = (1+j+j^2)
sage: var('j')
sage: function('V',x)
V(x)
sage: V_2(p,e)=-V(p-e)-e
sage: V_2
(p, e) |--> -e - V(-e + p)
sage: V_3(p,e)=j/(3)*(V_2(p,e)+V
On Oct 14, 8:41 am, Christian Burisch wrote:
> Sorry to bug you again. Is there a kind soul who would get me started on this?
> Thanks.
>
>
I don't think we have native functionality for this. Could you just
use completely symbolic variables and functions for now? The
expanding and simplific