[sage-support] Re: Grobner basis for linear codes

2016-12-07 Thread Simon King
Hi Nitin,

On 2016-12-06, David Joyner  wrote:
>> code's) length, but while finding parity check matrix of this linear
>> code(using command H=C.check_mat()), I am not getting the output or
>> sometimes I get the output as string index out of range...

Now that's strange. If your matrices are large than you may see
something like this:
  sage: random_matrix(ZZ,1000,1000)
  1000 x 1000 dense matrix over Integer Ring (use the '.str()' method to
  see the entries)

So, the matrix wouldn't be directly shown but it would tell you how you
can *see* the entries. Of course, seeing the entries is not the same as
accessing them. This could be done (if M is your matrix) by M[10,12] for
a single entry, or M[10:20,50:60] for a 10 by 10 submatrix, or by
M.list() to get a flat list of all entries of the matrix, or by M[121]
for a single row (as a vector).

And certainly you will never get the *output* as string index out of
range. You may of course get an IndexError when accessing an element out
of range:
  sage: random_matrix(ZZ,1000,1000)[1000,1000]
  Traceback (most recent call last):
  ...
  IndexError: matrix index out of range

>> Does it mean that
>> size of matrix which is 29x35 is too large for sage to show its output.

It is large enough that most people do not want to see the full output
by default. That's why there is the possibility to do
  sage: print M.str()
to show the output for those who really want to see it. And there are
all the above mentioned ways to actually access the content (rather than
just seeing it).

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.


[sage-support] Re: Grobner basis for linear codes

2016-12-07 Thread Simon King
Hi,

On 2016-12-06, David Joyner  wrote:
> On Tue, Dec 6, 2016 at 12:21 PM, NITIN DARKUNDE  
> wrote:
>> Respected Sir,
>> Yes sir, I am supposed to calculate Grobner basis for an
>> ideal in a polynomial ring in 35 variables with coefficients from GF(2).
>>
>
> Why don't you try it first using a code of length <10?

I can tell from my own experience that computing the Gröbner basis for
a system of >30,000 nonhomogeneous polynomials of degree 3 with 42
variables may turn out to be feasible.

But I can also tell from my own experience that computing the Gröbner
basis for a system of a ~10 polynomials of degree 5 with 7 variables may
turn out to be unfeasible. After all, computing a Gröbner basis has
double exponential worst case complexity.

Thus, it all depends on your example. It is very well possible that you
are lucky and it just works.

Or that your are almost lucky and it becomes solvable by, say, choosing
a different monomial ordering resp. doing some manual preprocessing.

Or that you are halfways lucky and some software can solve it while other
can't: In my 42 variable example, Singular worked, Magma didn't; in other
examples, Magma worked, Singular didn't.

Or that you are just unlucky and the problem is too difficult. Working
in GF(2) certainly helps.

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.