Re: [sage-support] Re: Matrix of operations after gaussian elimination

2017-06-10 Thread Johan S . H . Rosenkilde
Hi Juan

You can just compute it from the result:

sage: H = random_matrix(GF(2), 15, 20)
sage: S = H.echelon_form(transformation=True)
sage: full_rank_submatrix = H.matrix_from_columns(S.pivots())
sage: U = full_rank_submatrix.inverse()
sage: U*H == S
True

Note: this only works if m has full row rank (which it should have if
your input is a parity check matrix). Otherwise, one has to do slightly
more work.

Best,
Johan


Juan Grados writes:

> More specifically, I need transform a partity check matrix into a
> systematic form, but I need the transform matrix
>
> 2017-06-10 7:06 GMT-03:00 Juan Grados :
>
>> I need an implementaton to perfom a Gaussian elimination on a matrix with
>> entries in GF(2). This implementation should return a transformation matrix
>> and the result of the gassual elimination.
>>
>> 2017-06-10 6:51 GMT-03:00 Simon King :
>>
>>> Hi Juan,
>>>
>>> On 2017-06-10, Juan Grados  wrote:
>>> > Thank by I get
>>> >
>>> > ValueError: too many values to unpack
>>> >
>>> > I think because my matrix has entries in GF(2).
>>>
>>> You are right. According to the documentation:
>>>* "transformation" -- boolean. Whether to also return the
>>>  transformation matrix. Some matrix backends do not provide this
>>>  information, in which case this option is ignored.
>>>
>>> So, unfortunately, it doesn't give the desired transformation
>>> matrix.
>>>
>>> Depending on your application, it could be that LU decomposition
>>> does what you need.
>>>
>>> Best regards,
>>> Simon
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "sage-support" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to sage-support+unsubscr...@googlegroups.com.
>>> To post to this group, send email to sage-support@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/sage-support.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> -
>> MSc. Juan del Carmen Grados Vásquez
>> Laboratório Nacional de Computação Científica
>> Tel: +55 21 97633 3228 <(21)%2097633-3228>
>> (http://www.lncc.br/)
>> http://juaninf.blogspot.com
>> -
>>
>
>
>
> -- 
> -
> MSc. Juan del Carmen Grados Vásquez
> Laboratório Nacional de Computação Científica
> Tel: +55 21 97633 3228
> (http://www.lncc.br/)
> http://juaninf.blogspot.com
> -

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: Matrix of operations after gaussian elimination

2017-06-10 Thread Juan Grados
More specifically, I need transform a partity check matrix into a
systematic form, but I need the transform matrix

2017-06-10 7:06 GMT-03:00 Juan Grados :

> I need an implementaton to perfom a Gaussian elimination on a matrix with
> entries in GF(2). This implementation should return a transformation matrix
> and the result of the gassual elimination.
>
> 2017-06-10 6:51 GMT-03:00 Simon King :
>
>> Hi Juan,
>>
>> On 2017-06-10, Juan Grados  wrote:
>> > Thank by I get
>> >
>> > ValueError: too many values to unpack
>> >
>> > I think because my matrix has entries in GF(2).
>>
>> You are right. According to the documentation:
>>* "transformation" -- boolean. Whether to also return the
>>  transformation matrix. Some matrix backends do not provide this
>>  information, in which case this option is ignored.
>>
>> So, unfortunately, it doesn't give the desired transformation
>> matrix.
>>
>> Depending on your application, it could be that LU decomposition
>> does what you need.
>>
>> Best regards,
>> Simon
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "sage-support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to sage-support+unsubscr...@googlegroups.com.
>> To post to this group, send email to sage-support@googlegroups.com.
>> Visit this group at https://groups.google.com/group/sage-support.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> -
> MSc. Juan del Carmen Grados Vásquez
> Laboratório Nacional de Computação Científica
> Tel: +55 21 97633 3228 <(21)%2097633-3228>
> (http://www.lncc.br/)
> http://juaninf.blogspot.com
> -
>



-- 
-
MSc. Juan del Carmen Grados Vásquez
Laboratório Nacional de Computação Científica
Tel: +55 21 97633 3228
(http://www.lncc.br/)
http://juaninf.blogspot.com
-

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: Matrix of operations after gaussian elimination

2017-06-10 Thread Juan Grados
I need an implementaton to perfom a Gaussian elimination on a matrix with
entries in GF(2). This implementation should return a transformation matrix
and the result of the gassual elimination.

2017-06-10 6:51 GMT-03:00 Simon King :

> Hi Juan,
>
> On 2017-06-10, Juan Grados  wrote:
> > Thank by I get
> >
> > ValueError: too many values to unpack
> >
> > I think because my matrix has entries in GF(2).
>
> You are right. According to the documentation:
>* "transformation" -- boolean. Whether to also return the
>  transformation matrix. Some matrix backends do not provide this
>  information, in which case this option is ignored.
>
> So, unfortunately, it doesn't give the desired transformation
> matrix.
>
> Depending on your application, it could be that LU decomposition
> does what you need.
>
> Best regards,
> Simon
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-support@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-
MSc. Juan del Carmen Grados Vásquez
Laboratório Nacional de Computação Científica
Tel: +55 21 97633 3228
(http://www.lncc.br/)
http://juaninf.blogspot.com
-

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: Matrix of operations after gaussian elimination

2017-06-09 Thread Juan Grados
Thank by I get

ValueError: too many values to unpack

I think because my matrix has entries in GF(2).


2017-06-09 4:01 GMT-03:00 Kwankyu :

> Is this what you want?
>
> sage: m = matrix(2,[1,2,3,4])
> sage: H,U = m.echelon_form(transformation=True)
> sage: H
> [1 0]
> [0 2]
> sage: U
> [-2 1]
> [ 3 -1]
> sage: U * m == H
> True
>
>> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-support@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-
MSc. Juan del Carmen Grados Vásquez
Laboratório Nacional de Computação Científica
Tel: +55 21 97633 3228
(http://www.lncc.br/)
http://juaninf.blogspot.com
-

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.