Re: [sage-support] Size reduced of a basis

2021-04-20 Thread Santanu Sarkar
sion! > M = GSO.Mat(B, float_type="mpfr") > M.update_gso() > L = LLL.Reduction(M) > L.size_reduction() > C = B.to_matrix(matrix(ZZ, 10, 10)) # back to Sage's format > #+end_src > > HNF is pretty bad for precision, so it’s an extreme example. > > Cheers, > Martin

Re: [sage-support] Size reduced of a basis

2021-03-19 Thread Santanu Sarkar
gt; [ -1 1 0 0 0 0 0 0 0 -7] > [ -1 0 1 0 0 0 0 0 1 -14] > [ -1 -1 -1 1 0 0 0 0 0 -6] > [ -1 0 0 0 1 0 0 0 0 -3] > [ 0 0 0 -1 0 1 0 0 0 -18] > [ 0 0 0 0 0 0 1 0 1 1] > [ 0

[sage-support] Size reduced of a basis

2021-03-16 Thread Santanu Sarkar
Dear all, In Sagemath, is it possible to change a basis of a lattice which is size reduced? That is my interest is only on 1st condition of LLL basis. Kind regards, Santanu -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe

[sage-support] Linear complexity profile of a binary sequence

2020-11-11 Thread Santanu Sarkar
Dear all, I have a binary sequence {0,1,1,1,1,0,0,0,1,1,0,1,0,1,0,0,1,0,1,1,1,0,0,0,1,1,0,1,0,1}. I want to find its Linear complexity profile using SageMath. Any idea? Regards, Santanu -- You received this message because you are subscribed to the Google Groups "sage-support" group. To

[sage-support] Unimodular transformation matrix of LLL algorithm

2020-09-27 Thread Santanu Sarkar
Dear all, I have a matrix M1 with integer entries with 90 rows and 6 columns. After applying LLL algorithm of M1, I get M2=M1.LLL(). I want to get corresponding unimodular transformation matrix T such that T*M1=M2. We can find T by T=M2*M1.pseudoinverse() or T== M1.solve_left(M2), but

[sage-support] Reduction over Ideal

2020-08-05 Thread Santanu Sarkar
Dear all, Consider ideal I= over the binary field GF(2). Then (x2).reduce(I) gives x2. I want it to be x0*x1. In fact , I want this kind of reduction always should give quadratic polynomial (I know that this is possible for my problems). -- You received this message because you are

[sage-support] Installation problem

2020-04-21 Thread Santanu Sarkar
Dear all, I am trying to install Sage 9.0. But I am getting error. I have upgraded from Ubuntu 14.04 to Ubuntu 18.04. I am getting this: (base) santanu@Santanu-Laptop:~/Documents/sage-9.0-Ubuntu_18.04-i686/SageMath$ make ... . make[1]: ***

[sage-support] Problem to install Cryptominisat

2020-04-19 Thread Santanu Sarkar
Hi all, When I am trying to install Cryptominisat, I am getting following error. (base) santanu@Santanu-Laptop:~/Desktop/sage-8.9-Ubuntu_18.04-i686/SageMath$ ./sage -i cryptominisat *** Error building Sage. The following package(s)

[sage-support] LLL algorithm in infinity norm

2019-11-01 Thread Santanu Sarkar
Dear all, I want run LLL algorithm in infinity norm (max norm). Is it possible in Sage? My lattice is generated by row vectors of a square matrix. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop

[sage-support] Solve inequality in Sage

2019-10-20 Thread Santanu Sarkar
Hi, I have inequalities like these: 3 x1 + 5 x2 + 2 x3 + 5 x4 + 7 x5 <= 28 2 x1 + 0 x2 + 0 x3 + 8 x4 <= 14 4 x4 + 5 x5 <= 22 3 x2 <= 2 3 x4 >= 1 I want to get a solution. Values of x's are either 0 or 1. -- You received this message because you are subscribed to the Google Groups

Re: [sage-support] Re: How to find one element of residue field as a vector over base field

2019-05-15 Thread Santanu Sarkar
On Wed, 15 May 2019 at 17:03, Kwankyu wrote: > Hi Chandra, > > What is Place (x^2 + x + 1, x*y + 1)? Is it ideal generated by >> >> (x^2 + x + 1, x*y + 1). >> >> > No. Place (x^2 + x + 1, x*y + 1) is the unique place of the function field > > at which both functions x^2 + x +1, x*y + 1 vanish. >

Re: [sage-support] Function Field

2019-05-13 Thread Santanu Sarkar
me and I obtain > > [Place (1/x, y), Place (1/x, y + 1), Place (x, x*y)] > > Could you describe the SageMath version you are using? > > Vincent > > Le 13/05/2019 à 10:10, Santanu Sarkar a écrit : > > Hi, > >This code works well. > > > > K. = FunctionFie

[sage-support] Function Field

2019-05-13 Thread Santanu Sarkar
Hi, This code works well. K. = FunctionField(GF(2)) R. = K[] f=y^2 + y + 1/x L. = K.extension(f) print L.places(1) But if I take f=y^2 + y + 1/x, it is giving error. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this

Re: [sage-support] Re: How to define variables over integer

2019-05-09 Thread Santanu Sarkar
Dear friends, Thank you so much for your help. It is working now. Regards, Santanu On Thu, 9 May 2019 at 15:19, Simon King wrote: > Hi Santanu, > > Am Mittwoch, 8. Mai 2019 15:15:06 UTC+2 schrieb Santanu: >> >> I know how to define variables over BooleanPolynomialRing. >> This is as

[sage-support] How to define variables over integer

2019-05-08 Thread Santanu Sarkar
I know how to define variables over BooleanPolynomialRing. This is as follows. n=4 V=BooleanPolynomialRing(n+1,['z%d'%(i) for i in range(n+1)] ) V.inject_variables() Can we define similar code over integers (ZZ) or rationals (QQ)? Also I want to store variables in an array like Z=[z0,z1,z2,z3]

Re: [sage-support] Re: How to find solution

2017-10-18 Thread Santanu Sarkar
Dear Simon, Thank you so much. Regards, Santanu On 15 October 2017 at 13:30, Simon King wrote: > On 2017-10-14, Simon King wrote: > > First, define a variable `a`. I don't know if one really needs > > to declare its domain to solve the

[sage-support] How to find solution

2017-10-14 Thread Santanu Sarkar
In Sage, is it possible to find a such that \int_{a}^{\infty} e^(-x^2/2) dx=2^(-20) -- 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

Re: [sage-support] Re: Division in non-Integral domain

2017-02-27 Thread Santanu Sarkar
Dear Simon, Thank you very much for your help. Regards, Santanu On 26 February 2017 at 00:03, Simon King <simon.k...@uni-jena.de> wrote: > Hi Santanu, > > I am sorry that your question was unanswered for so long. > > On 2017-02-24, Santanu Sarkar <sarkar.santanu@g

[sage-support] Division in non-Integral domain

2017-02-23 Thread Santanu Sarkar
Hi, How to check $x+4 \in <1+x+x^2+2x^3>$ in the ring $\mathbb{Z}_8[x]$, where <1+x+x^2+2x^3> is the ideal generated by 1+x+x^2+2x^3? If yes, how to find $g(x)$ so that $g(x) (1+x+x^2+2x^3)=x+4$? -- You received this message because you are subscribed to the Google Groups "sage-support"

Re: [sage-support] Re: Lattice reduction over polynomial lattice

2017-02-23 Thread Santanu Sarkar
Dear all, Thanks a lot for your kind help. On 22 February 2017 at 13:49, Johan S. R. Nielsen wrote: > Indeed, Sage has row_reduced_form for a polynomial matrix. The row reduced > form is sufficient to find a vector in the row space which has minimal > degree. > > The

[sage-support] Re: Lattice reduction over polynomial lattice

2017-02-20 Thread Santanu Sarkar
Dear all, I am searching lattice reduction for polynomial matrices in Sage. Kindly help me. T. Mulders and A. Storjohann. On lattice reduction for polynomial matrices. Journal of Symbolic Computation, 35(4):377 – 401, 2003 On 20 February 2017 at 21:19, Santanu Sarkar <sarkar.sant

[sage-support] Lattice reduction over polynomial lattice

2017-02-20 Thread Santanu Sarkar
Dear all, I have polynomial lattice over a finite field. So each component of the vectors v_1, v_2, v_3 are polynomials over a finite field say F_11. Hence v_1=(f_1(x), f_2(x), f_3(x)), v_2=(g_1(x), g_2(x), g_3(x)) and v_3=(h_1(x), h_2(x), h_3(x)). Here norm is the maximum degree of each

[sage-support] Sage Crash Report

2017-01-12 Thread Santanu Sarkar
I am getting these. Please help me. santanu@Math-Sans:~/SageMath$ ./sage ┌┐ │ SageMath Version 7.1, Release Date: 2016-03-20 │ │ Type "notebook()" for the browser-based notebook interface.│ │ Type

[sage-support] Save 3D plot

2015-08-29 Thread Santanu Sarkar
How to save 3D plot in eps format? L=line3d([( 3 , 2 , 1 ), ( 4 , 3 , 2 )],color='red') L=list_plot3d([[ 3 , 2 , 1 ], [ 4 , 3 , 2 ]],color='red') -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving

[sage-support] Interpolation in Sage

2015-07-22 Thread Santanu Sarkar
Hello, I want to find a polynomial f(x_1,x_2,x_3,x_4) explicitly by interpolation. I know that the degree of f is 2. I have enough data points. How can I do this in Sage? -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from

[sage-support] Array

2015-02-26 Thread Santanu Sarkar
Dear all, How to define 3D array like in C language double A[10][10][10]; For 1D array I use A=[0]*10 and for 2D array I use matrix A=matrix(RR,10,10, range(10*10)) in Sage Best, Santanu -- You received this message because you are subscribed to the Google Groups sage-support group. To

[sage-support] Find real root

2015-01-09 Thread Santanu Sarkar
Dear all, I have one polynomial f_x(y) =y^3 +f_1(x) y^2 +f_2(x) y + f_3(x). Since it is a cubic polynomial, it has atleast one real root. I want to find that real root as a function of x. I know that x \in [a,b]. -- You received this message because you are subscribed to the Google Groups

Re: [sage-support] Re: Coefficient of Boolean Polynomial

2014-11-18 Thread Santanu Sarkar
Thank you so much. On 18 November 2014 00:02, slelievre samuel.lelie...@gmail.com wrote: Santanu wrote: R.v1, v2, v3=BooleanPolynomialRing(3) f=v1*v2+v1*v3+v1 print f.coefficient(v1) I am getting Traceback (click to the left of this block for traceback) ... AttributeError:

[sage-support] Coefficient of Boolean Polynomial

2014-11-17 Thread Santanu Sarkar
In my Sage code, R.v1, v2, v3=BooleanPolynomialRing(3) f=v1*v2+v1*v3+v1 print f.coefficient(v1) I am getting Traceback (click to the left of this block for traceback) ... AttributeError: 'sage.rings.polynomial.pbori.BooleanPolynomial' object has no attribute 'coefficient' Answer should be

Re: [sage-support] How to handle file in Sage

2014-10-28 Thread Santanu Sarkar
Thank you so much. On 28 October 2014 02:00, William Stein wst...@gmail.com wrote: On Mon, Oct 27, 2014 at 1:24 PM, slelievre samuel.lelie...@gmail.com wrote: 'load' is expecting filenames with extension among .py, .sage, .sobj and maybe a few others. If the file name does

Re: [sage-support] How to handle file in Sage

2014-10-27 Thread Santanu Sarkar
Thanks a lot. But I am getting these errors: A1=load(./Documents/program21.txt) Traceback (most recent call last): File stdin, line 1, in module File _sage_input_4.py, line 10, in module exec compile(u'open(___code___.py,w).write(# -*- coding: utf-8 -*-\\n +

Re: [sage-support] Re: How to extract value from array

2014-02-23 Thread Santanu Sarkar
Yes, this was the question. Thanks a lot for detailed explanation. On 23 February 2014 15:41, Dominique Laurain dominique.laurai...@orange.frwrote: type() is one very helpful function in SAGE to know about data kinds print type(T) returns type 'list' so T is not strictly an array but

[sage-support] How to extract value from array

2014-02-22 Thread Santanu Sarkar
Following code I want to assign a value. var('a,t,x') T=[t==1, a==2] Now I want to make x=t which is 1 in this case. That is x will be 1. -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails

[sage-support] Error

2014-01-01 Thread Santanu Sarkar
Suddenly I get the following error. sage: notebook() --- UnpicklingError Traceback (most recent call last) ipython-input-1-3728cb3d7c7d in module() 1 notebook()

[sage-support] Integration

2013-12-09 Thread Santanu Sarkar
I want to find the following integration. I=integral_{t=x}^y I_{x=y}t, where I_{x=y} is the indicator function whose value is 1 when x=y, else 0. So, value of I=(y^2-x^2)/2 if x=y =0 if xy Does Sage provide this kind of symbolic integration? -- You received

[sage-support] Install cryptominisat-2.9.5 in Ubuntu 13.10

2013-11-18 Thread Santanu Sarkar
Dear all, I am trying to install cryptominisat in my Ubuntu 13.10. But I have the following error. sage: B = BooleanPolynomialRing(10,'x') sage: I = Ideal(B.random_element() for _ in range(10)) sage: import sage.sat.boolean_polynomials sage: sage.sat.boolean_polynomials.solve(I.gens())

[sage-support] Re: Install cryptominisat-2.9.5 in Ubuntu 13.10

2013-11-18 Thread Santanu Sarkar
Installed it. Is there any updated version of cryptominisat-2.9.5? On 18 November 2013 15:48, Santanu Sarkar sarkar.santanu@gmail.comwrote: Dear all, I am trying to install cryptominisat in my Ubuntu 13.10. But I have the following error. sage: B = BooleanPolynomialRing(10,'x

Re: [sage-support] Re: Sage Install Matrix Problem

2013-11-14 Thread Santanu Sarkar
Thanks a lot. My version was Ubuntu 12.04. Now I can fix the problem. On 9 October 2013 15:56, Dima Pasechnik dimp...@gmail.com wrote: On 2013-10-09, Santanu Sarkar sarkar.santanu@gmail.com wrote: I have installed sage 5.11 in the following way. santanu@santanu-Compaq-Presario-C700

[sage-support] Sage Install Matrix Problem

2013-10-09 Thread Santanu Sarkar
I have installed sage 5.11 in the following way. santanu@santanu-Compaq-Presario-C700-Notebook-PC:~/Desktop/sage-5.11-linux-32bit-ubuntu_13.04-i686-Linux$ ./sage notebook() Some functions work perfectly, but when I write M=matrix(ZZ,2,2,[1,2,3,4]) I have the following: Traceback (most

[sage-support] Convolution Polynomial Ring

2013-08-22 Thread Santanu Sarkar
Dear all, Is convolution polynomial ring implemented in Sage? I want to implement NTRU public key cryptosystem. Hence I need modular inverse of a polynomial also in the ring. With regards, Santanu -- You received this message because you are subscribed to the Google Groups sage-support

[sage-support] Re: Convolution Polynomial Ring

2013-08-22 Thread Santanu Sarkar
How to define polynomial ring like Z[x]/(x^10-1) Z_5[x]/(x^10-1) in Sage? On 22 August 2013 12:37, Santanu Sarkar sarkar.santanu@gmail.comwrote: Dear all, Is convolution polynomial ring implemented in Sage? I want to implement NTRU public key cryptosystem. Hence I need modular

Re: [sage-support] Re: Convolution Polynomial Ring

2013-08-22 Thread Santanu Sarkar
Thanks. But in this ring, I can not find gcd. N=7 p=3 R2.b = PolynomialRing(GF(p)) S.x = R2.quotient(b^N - 1) f=x^6-x^4+x^3+x^2-1 g=x^6+x^4-x^2-x print gcd(f,g),xgcd(f,g) Traceback (click to the left of this block for traceback) ... TypeError: unable to find gcd On 23 August 2013 03:10,

[sage-support] Roots af a polynomial

2013-07-18 Thread Santanu Sarkar
What algorithm is used in Sage to calculate the roots of a polynomial f(x)? Corresponding Sage function is f.roots() -- 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

Re: [sage-support] Roots af a polynomial

2013-07-18 Thread Santanu Sarkar
Over integer. On 18 July 2013 15:50, William Stein wst...@gmail.com wrote: On Thu, Jul 18, 2013 at 11:54 AM, Santanu Sarkar sarkar.santanu@gmail.com wrote: What algorithm is used in Sage to calculate the roots of a polynomial f(x)? Corresponding Sage function is f.roots() What

Re: [sage-support] Roots af a polynomial

2013-07-18 Thread Santanu Sarkar
Thank you. On 18 July 2013 16:09, William Stein wst...@gmail.com wrote: On Thu, Jul 18, 2013 at 12:53 PM, Santanu Sarkar sarkar.santanu@gmail.com wrote: Over integer. I did R.x = QQ[x] f = x*(x^3+1)*(x-17) then looked at f.roots?? which says it uses f.factor. So I looked

[sage-support] Coefficient of Boolean Polynomial

2013-05-27 Thread Santanu Sarkar
Dear all, In the following code, although the coefficient of x0 is 1+x1*x2, it returns 1. from sage.crypto.boolean_function import BooleanFunction R.x0,x1,x2,x3,x4,x5=BooleanPolynomialRing(6) f=(1+x1*x2)*x0+x4*x5 print f.monomial_coefficient(x0) -- You received this message because you are

[sage-support] Array in Sage

2013-05-19 Thread Santanu Sarkar
Is the any way to write four dimensional array in Sage like C int M[10][10][10][10]? For two dimensional case I use Matrix. -- 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

Re: [sage-support] Conjunctive Normal Form

2013-04-21 Thread Santanu Sarkar
sage.sat.solvers.dimacs import DIMACS sage: solver = DIMACS() sage: ce = CNFEncoder(solver, B) sage: ce([f]) [None, a, b, c] sage: solver.clauses() [((-2, -3, 1), False, None), ((3, -1), False, None), ((2, -1), False, None)] On Saturday 20 Apr 2013, Santanu Sarkar wrote: Dear all, I want to convert

[sage-support] Conjunctive Normal Form

2013-04-20 Thread Santanu Sarkar
Dear all, I want to convert the polynomial f into Conjunctive Normal Form (CNF) in Sage. How can I do this? B.a,b,c = BooleanPolynomialRing() f=a+b*c -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop

[sage-support] Boolean Function

2013-04-18 Thread Santanu Sarkar
Dear all, I have a Boolean polynomial f with huge degree variables. Also it has huge number of monomials. I want to delete all monomials from f with degree greater than 20. For that I have written the following approach. V=BooleanPolynomialRing(4,['r%d'%(i) for i in range(4)])

[sage-support] Problem in Sat Solver

2013-04-04 Thread Santanu Sarkar
When I run the following code, I have Traceback (click to the left of this block for traceback) ... AssertionError from sage.crypto.boolean_function import BooleanFunction R.x0, x1, x2, x3, x4, x5=BooleanPolynomialRing(6) C=[x0, x0 + x1, x1 + x2, x3, x2 + 1, x4 +x5] tt=cputime() I =

[sage-support] Extract only some elements from a set

2013-02-26 Thread Santanu Sarkar
Dear all, I have a set non linear equations over Boolean variables x_1,..., x_{1}. Sat solver gives I=[{x1: 0, x100: 1, .}]. I am interested to see only the values of x1,.., x100. Will you kindly help me ? -- You received this message because you are subscribed to the Google Groups

Re: [sage-support] Re: Extract only some elements from a set

2013-02-26 Thread Santanu Sarkar
Sorry, I can not understand the approach. Let I=[{x0:1, x1: 0, y0: 1}]. Suppose I want to find only x0 and x1. How is it possible? On 26 February 2013 16:37, akhil lalwani.ak...@gmail.com wrote: On Tuesday, February 26, 2013 1:40:26 PM UTC+5:30, Santanu wrote: Dear all, I have a set

Re: [sage-support] Re: Extract only some elements from a set

2013-02-26 Thread Santanu Sarkar
][x0]. Hoping that this will help you. Best regards. Christophe. 2013/2/26 Santanu Sarkar sarkar.santanu@gmail.com Sorry, I can not understand the approach. Let I=[{x0:1, x1: 0, y0: 1}]. Suppose I want to find only x0 and x1. How is it possible? On 26 February 2013 16:37, akhil

[sage-support] Arrays of Boolean variables

2013-02-26 Thread Santanu Sarkar
Dear all, I need two arrays of Boolean variables. So I have written R=BooleanPolynomialRing(2,['x%d'%(i+1) for i in range (1)]+,['y%d'%(i+1) for i in range (1)] ) R.inject_variables() Now in one array A, I want to store x1,..,x1 and in another array B want to store

[sage-support] Re: Arrays of Boolean variables

2013-02-26 Thread Santanu Sarkar
Dear all, Using R.variable(), I can solve the first problem. On 27 February 2013 07:20, Santanu Sarkar sarkar.santanu@gmail.comwrote: Dear all, I need two arrays of Boolean variables. So I have written R=BooleanPolynomialRing(2,['x%d'%(i+1) for i in range (1)]+,['y%d'%(i+1

[sage-support] Re: Error when type notebook()

2013-02-19 Thread Santanu Sarkar
My version is sage-5.6-linux-32bit-ubuntu_12.04.1_lts-i686-Linux. On 19 February 2013 08:46, Santanu Sarkar sarkar.santanu@gmail.comwrote: Dear all, when I type notebook(), I get the following error. Will you kindly help me? sage: notebook

Re: [sage-support] Error when type notebook()

2013-02-19 Thread Santanu Sarkar
2013 05:16, Santanu Sarkar sarkar.santanu@gmail.comwrote: Dear all, when I type notebook(), I get the following error. Will you kindly help me? sage: notebook() --- EOFError

Re: [sage-support] Re: Boolean Variables

2013-02-18 Thread Santanu Sarkar
Thank you very much. On 16 February 2013 21:50, akhil lalwani.ak...@gmail.com wrote: On Saturday, February 16, 2013 9:38:14 AM UTC+5:30, Santanu wrote: Dear all, I have the following problem. I am working with Boolean variables. So I call the following. from

[sage-support] Error when type notebook()

2013-02-18 Thread Santanu Sarkar
Dear all, when I type notebook(), I get the following error. Will you kindly help me? sage: notebook() --- EOFError Traceback (most recent call last) /home/a/.sage/ipython console in

[sage-support] Boolean Variables

2013-02-15 Thread Santanu Sarkar
Dear all, I have the following problem. I am working with Boolean variables. So I call the following. from sage.crypto.boolean_function import BooleanFunction R.x0,x1,x2,x3,x4,x5,x6,x7,x8,x9=BooleanPolynomialRing(10) Suppose during run time of my code, I get three polynomials x1*x2+x3+x4,

[sage-support] Solve polynomial over ring

2013-01-30 Thread Santanu Sarkar
I want to solve a polynomial over ring. However my code does not work. N=8 R.x=Integers(N)[] f=x^2-1 print f.roots() In my case, N is always a power of 2. -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop

Re: [sage-support] Solve polynomial over ring

2013-01-30 Thread Santanu Sarkar
Thank you. On 30 January 2013 10:17, Charles Bouillaguet charles.bouillag...@gmail.com wrote: On Jan 30, 2013, at 3:20 PM, Santanu Sarkar wrote: N=8 R.x=Integers(N)[] f=x^2-1 print f.roots() Try : sage: print f.roots(multiplicities=False) [1, 3, 5, 7] It's a start

[sage-support] Polynomial Ring

2013-01-23 Thread Santanu Sarkar
I have written following code: R=Integers(30)['X'] f1=X-10 f2=X-30 print f1*f2 This gives X^2-40*X+300 However I want coefficients to be modulo 30 i.e., 40 =10 , 300=0 in R. -- You received this message because you are subscribed to the Google Groups sage-support group. To post to this

Re: [sage-support] Sat Solver

2012-12-24 Thread Santanu Sarkar
. * ** ** sage: from sage.sat.solvers import SatSolver sage: On Monday 24 Dec 2012, Santanu Sarkar wrote: Dear all, To solve a SAT problem, when I have written the following, I got error. from

[sage-support] Sat Solver

2012-12-23 Thread Santanu Sarkar
Dear all, To solve a SAT problem, when I have written the following, I got error. from sage.structure.sequence import Sequence from sage.rings.infinity import PlusInfinity from sage.sat.solvers import SatSolver from sage.sat.converters import ANF2CNFConverter Traceback (click to the left of

[sage-support] Symbolic Calculation in Sage

2012-12-14 Thread Santanu Sarkar
Is there any function in Sage by which this kind of symbolic calculation is possible? s=0 for i=1 to m if(ia+t) s=s+2i else s=s+t m,a,t are non negative integers. -- You received this message because you are subscribed to the Google Groups sage-support

Re: [sage-support] Solve system of non linear equations

2012-12-12 Thread Santanu Sarkar
Thank you very much for your help. On 9 December 2012 12:18, Georgi Guninski gunin...@guninski.com wrote: On Sat, Dec 08, 2012 at 11:44:19AM +0530, Santanu Sarkar wrote: Dear all, I have a system of non linear equations over GF(2). How to solve them in Sage? If you need to solve

[sage-support] Groebner Basis over finite field

2012-12-12 Thread Santanu Sarkar
I have a set of non-linear equations over a prime field. I want to solve them using Groebner basis technique. When I want to calculate Groebner basis, I have following error. verbose 0 (3292: multi_polynomial_ideal.py, groebner_basis) Warning: falling back to very slow toy implementation.

Re: [sage-support] Re: Solve system of non linear equations

2012-12-08 Thread Santanu Sarkar
Thank you. But when I try to solve f1=x1 + x2 + x4 + x10 + x31 + x43 + x56 , f2=x2 + x3 + x5 + x11 + x32 +x44 + x57, it becomes very slow. Is there any faster approach like F4 algorithm available in Sage? On 8 December 2012 17:25, Martin Albrecht martinralbre...@googlemail.comwrote: Or

[sage-support] Solve system of non linear equations

2012-12-07 Thread Santanu Sarkar
Dear all, I have a system of non linear equations over GF(2). How to solve them in Sage? -- You received this message because you are subscribed to the Google Groups sage-support group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send

[sage-support] Array of Arrays

2012-10-01 Thread Santanu Sarkar
I have written the following: T=[0]*2 S=[] l=2 for i in range(l): T[0]=i T[1]=i+1 print T S.append(T) Now S becomes [[1, 2], [1, 2]] instead of [[0,1],[1,2]]. In my situation, length l of S is not fixed. Is there any method to solve this problem? -- You received this message

[sage-support] Matrix

2012-08-06 Thread Santanu Sarkar
When I want to write a matrix, I have the following error. sage: matrix(ZZ,2,2,[1,2,3,4]) --- AttributeErrorTraceback (most recent call last)

[sage-support] Double Integral

2012-05-21 Thread Santanu Sarkar
When I use the following code it returns 0. var('x y') def f1(x,y): if(x+y 5): return x+y else: return 0 integral(integral(f1(x,y), x, 0,1), y, 0, 1) whereas integral(integral(x+y, x, 0,1), y, 0, 1) returns 1. Can any one point out the reason for this discrepancy

[sage-support] Normal Distribution

2012-02-17 Thread Santanu Sarkar
How to generate 1000 random integers which follow normal distribution with mean 0 and variance 0.1? -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at

Re: [sage-support] Normal Distribution

2012-02-17 Thread Santanu Sarkar
Thanks for the help. On 17 February 2012 16:00, Vegard Lima vegard.l...@gmail.com wrote: On Fri, Feb 17, 2012 at 10:52 AM, Santanu Sarkar sarkar.santanu@gmail.com wrote: How to generate 1000 random integers which follow normal distribution with mean 0 and variance 0.1? You can do

[sage-support] Fastest Lattice Reduction

2012-02-17 Thread Santanu Sarkar
I need to reduce a lattice of dimension 200 with its entries sizes are of size like 3000 bit. I use LLL(algorithm=fpLLL:fast) for faster lattice reduction. But it seems there is a problem in the function. Reduction is very bad. Is there any way to reduce this size of matrix efficiently? -- To

[sage-support]

2012-02-16 Thread Santanu Sarkar
Hi all, I have used the function E,N1=M2.hermite_form(transformation=True) to compute the Hermite Normal Form and observed that it is very slow. Is there any better function? -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to

Re: [sage-support]

2012-02-16 Thread Santanu Sarkar
M2 is a (50, 50) matrix. Its entries are large (2048 bit). On 16 February 2012 09:32, William Stein wst...@gmail.com wrote: On Thu, Feb 16, 2012 at 9:23 AM, Santanu Sarkar sarkar.santanu@gmail.com wrote: Hi all,  I have used the function  E,N1=M2.hermite_form(transformation=True

Re: [sage-support]

2012-02-16 Thread Santanu Sarkar
No, that I do not know. I run my code half an hour. But still donot get result. On 16/02/2012, William Stein wst...@gmail.com wrote: On Thu, Feb 16, 2012 at 9:53 AM, Santanu Sarkar sarkar.santanu@gmail.com wrote: M2 is a (50, 50) matrix. Its entries are large (2048 bit). On 16 February

[sage-support] Area of a plot

2012-02-12 Thread Santanu Sarkar
Daer all, Is there any function in Sage by which we can calculate the area of a plot? Actually I have many intersecting circles. I want to find the area covered by them. Note that here total area is not sum of area of each circle. -- To post to this group, send email to

Re: [sage-support] Order of a cyclic group

2012-01-21 Thread Santanu Sarkar
Thanks for the help. On 21 January 2012 07:27, Maarten Derickx m.derickx.stud...@gmail.com wrote: Well the way I first tried is as follows: age: F.x=GF(2)[] sage: G.a=F.quotient(x^6 + x^4 + x^2 + x + 1) sage: a.multiplicative_order()

Re: [sage-support] Order of a cyclic group

2012-01-20 Thread Santanu Sarkar
Yes, exactly that we mean. On 19 January 2012 20:13, John Cremona john.crem...@gmail.com wrote: On 19 January 2012 15:39, Santanu Sarkar sarkar.santanu@gmail.com wrote: Consider a polynomial f(x) over GF(2)[x]. How is it possible to find the order of the cyclic group generated by f(x

[sage-support] Period of a sequence

2012-01-20 Thread Santanu Sarkar
I have a sequence of 0 and 1. I know that period is small. Is there any function in Sage by which I can find the period? Or, can we find the period efficiently? For example {0,1,0,1,0,1} has period of length 2. -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe

Re: [sage-support] Period of a sequence

2012-01-20 Thread Santanu Sarkar
Thank you very much. On 20 January 2012 20:57, David Joyner wdjoy...@gmail.com wrote: On Fri, Jan 20, 2012 at 9:56 AM, Santanu Sarkar sarkar.santanu@gmail.com wrote: I have a sequence of 0 and 1. I know that period is small. Is there any function in Sage by which I can find the period

[sage-support] Order of a cyclic group

2012-01-19 Thread Santanu Sarkar
Consider a polynomial f(x) over GF(2)[x]. How is it possible to find the order of the cyclic group generated by f(x)? -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options,

Re: [sage-support] Factors of an integer

2012-01-17 Thread Santanu Sarkar
Sorry. I get the function. On 17 January 2012 18:58, Santanu Sarkar sarkar.santanu@gmail.com wrote: Thanks. But this function gives only prime factors. Is there any function which gives all divisor? On 17 January 2012 00:39, Renan Birck Pinheiro renan.ee.u...@gmail.com wrote: 2012/1

[sage-support] Factors of an integer

2012-01-16 Thread Santanu Sarkar
Is there any function in Sage by which I can get the number of prime factors, number of factors of a positive ineger? -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options,

[sage-support] Probability of a Boolean Function

2011-12-15 Thread Santanu Sarkar
I have a Boolean Function f which I know is not balanced. In fact f=0 with probability 1/4. If I use the function f.is_balanced() it tells me that the function is not balanced, which is fine. But is there a function which will tell me the what the probability of a Boolean function being zero is ?

[sage-support] Boolean function

2011-12-11 Thread Santanu Sarkar
I have a set of Boolean functions like A[0]=x1*x2+x3*x4 A[1]=x3+x7+x10 A[2]=x19*x36+x43*x45*x50 over variables x_1,.. x_50. But each function contains at most 10 variables. I want to calculate the balancedness of each function. I have done the following: from sage.crypto.boolean_function import

[sage-support] Re: Boolean function

2011-12-11 Thread Santanu Sarkar
Sorry I meant to write But it does not work apologies for the typo On 12 December 2011 07:49, Santanu Sarkar sarkar.santanu@gmail.com wrote: I have a set of Boolean functions like A[0]=x1*x2+x3*x4 A[1]=x3+x7+x10 A[2]=x19*x36+x43*x45*x50 over variables x_1,.. x_50. But each function

[sage-support] Dependence set of a symbolic expression

2011-12-01 Thread Santanu Sarkar
Hello, Let S be a symbolic expression of a certain number of variables taken from a particular set of variables. How do I find out the list of the distinct variables that S depends on? Suppose {x0,x1,x2,x3,x4,x5,x6,x7,x8,x9} is a set of unknowns and S = x1 + x3*x4 + x5*x7*x9. I need to find the

Re: [sage-support] Chinese Remainder Theorem

2011-09-23 Thread Santanu Sarkar
Thank you. On 23 September 2011 10:38, D. S. McNeil dsm...@gmail.com wrote: On Fri, Sep 23, 2011 at 12:39 AM, Santanu Sarkar sarkar.santanu@gmail.com wrote: I want to find integer such that x= 1 mod 3 x=2 mod 5 x=3 mod 7 like this system of congruences using Chinese Remainder

[sage-support] Chinese Remainder Theorem

2011-09-22 Thread Santanu Sarkar
I want to find integer such that x= 1 mod 3 x=2 mod 5 x=3 mod 7 like this system of congruences using Chinese Remainder Theorem. In Sage, crt() function takes only 4 argument. -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to

[sage-support] How to write Sage code to cython code

2011-09-17 Thread Santanu Sarkar
Hi all, I want to use cython. The following code does not work %cython cdef P P = next_prime(ZZ.random_element(2^(100-1),2^100)) -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For

Re: [sage-support] How to write Sage code to cython code

2011-09-17 Thread Santanu Sarkar
It always returns 101, not a random prime of 100 bit integer. On 17 September 2011 18:04, Rajeev Singh rajs2...@gmail.com wrote: On Sat, Sep 17, 2011 at 5:46 PM, Santanu Sarkar sarkar.santanu@gmail.com wrote: Hi all, I want to use cython. The following code does not work

Re: [sage-support] How to write Sage code to cython code

2011-09-17 Thread Santanu Sarkar
Thank you. Is there any function in Python for inverse modulo of an integer? Corresponding Sage function is A=15.inverse_mod(17). Also is there any function like ''.join(str(i) for i in A) in Python for an array A? On 17 September 2011 19:36, D. S. McNeil dsm...@gmail.com wrote: It always

Re: [sage-support] Re: Need to Express integers as 6 bit

2011-09-01 Thread Santanu Sarkar
Dear Maarten, Sorry for delay. Version of my Chrome is 5.0.375.70. I have written programs in SAGE 4.2 over Linux Ubuntu 8.04 on a computer with Dual CORE Intel(R) Pentium(R). With regards, Santanu On 26 August 2011 13:46, Maarten Derickx m.derickx.stud...@gmail.comwrote: Dear Santanu, I

Re: [sage-support] Re: Need to Express integers as 6 bit

2011-09-01 Thread Santanu Sarkar
For mozilla firefox, it is perfect. I dont known about other browsers. On 1 September 2011 15:30, Maarten Derickx m.derickx.stud...@gmail.comwrote: Maybe it's time to install a newer version of sage. 4.2 is quite old now, the latest stable release is now 4.7.1. Could you please, still also

[sage-support] Inverse of a polynomial

2011-08-25 Thread Santanu Sarkar
How to calculate inverse of a polynomial f(x) modulo g(x) in the finite field GF(2^10)? -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at

  1   2   >