Ask Your Question

VInay Wagh's profile - activity

2023-03-14 00:52:36 +0100 received badge  Notable Question (source)
2023-03-14 00:52:36 +0100 received badge  Popular Question (source)
2023-03-04 21:50:49 +0100 received badge  Notable Question (source)
2022-06-27 16:34:53 +0100 received badge  Notable Question (source)
2021-08-30 13:13:57 +0100 received badge  Popular Question (source)
2017-10-13 03:28:57 +0100 received badge  Popular Question (source)
2013-01-07 13:46:57 +0100 received badge  Taxonomist
2012-01-05 01:36:48 +0100 answered a question Segmentation fault when evaluating 3^3^3^3

I dont know how the "power" algorithm is implemented in sage. But you can use the binary method for power (or repeated squaring method). It goes like this:

To compute a^n, write down binary representation of n say

n = \sum_{i=1}^d a_i 2^i.

Then if a_i = 1, then square, else (i.e. a_i=0) do nothing.

Here is the algorithm:

If a_0 = 0
    set c = 1
else 
    set c = a
set b_0 = a
For each i in 1..d (Note: d = no of digits in bin. rep. of n)
do 
    b_i = b_{i-1}^2
    If a_i == 1
        c = c \cdot b_i
    else
        c = c

This algorithm comes very handy when you want to compute a^n(mod m). I hope this will help you to get rid of these limitation on index.

-- VInay

2012-01-04 07:20:09 +0100 received badge  Good Question (source)
2012-01-02 04:51:54 +0100 received badge  Enlightened (source)
2012-01-02 04:51:54 +0100 received badge  Good Answer (source)
2012-01-01 05:32:06 +0100 commented answer Differentiation of a power series.

Hi Volker, Thanks for the patch. I tried to apply the patch using hg_sage.apply('filename'). It did not give me any error (however gave an irrelevant warning about .sagerc file). But the code sage: T.<a,b> = PowerSeriesRing(ZZ,2) sage: f = a + b + a^2*b sage: f = a + b + a^2*b + T.O(4) sage: f.derivative(a) Gives NotImplementedError Traceback (most recent call last) Do I have to install something more to make this patch work? -- VInay

2011-12-31 12:46:27 +0100 received badge  Nice Answer (source)
2011-12-31 02:00:04 +0100 received badge  Nice Question (source)
2011-12-31 01:58:20 +0100 received badge  Nice Question (source)
2011-12-31 01:56:18 +0100 received badge  Nice Answer (source)
2011-12-30 10:58:08 +0100 answered a question how to run sage as a service

You can put the following command in your $HOME/.profile file.

sage -notebook

This file is executed every time you login.

If you are having multiple simultaneous logins, then you can put some checks whether sage is already running, e.g. using script like

if ps aux | grep 'sage'

then

echo "Sage already Running";

else

 sage -notebook

fi

2011-12-28 05:43:35 +0100 answered a question CLI System Requirements

I guess Shashank is referring to the Live CD option. (Pls correct me Shashank!) Its very portable solution, IMHO, which requires lot of resources, especially more memory.

I was successful (to compile, install and run) with sage on my 7-year old DELL with Celeron 1.3GHz, 256MB RAM, 40GB HDD with Ubuntu 9.04. (I have about 2GB swap).

I downloaded the tarball (sage-4.5)and compiled it using make. It took almost 13/14 hours for the compilation. (Of course I had already taken care of the dependency issues. Make sure about versions of gcc & m4.)

Here is a small tip to speedup the process little bit. (Got them from sage-support mailing list)

$ export SAGE_PARALLEL_SPKG_BUILD=yes

$ export SAGE_CHECK="yes"

$ make

Then after successful compilation, you can try ./sage -testall and wait for few more hours. (I have skipped this step and ran my own code). The only problem with this is it takes too much time and sometimes the process appears to be hanged.

So I am pretty much sure that sage can run your system. Wish you all the best with compilation!

-- VInay

2011-12-26 23:32:33 +0100 asked a question sage-support and ask-sage

As I understand sage-support and ask-sage are both hosted/managed by sagemath. What is the basic difference between these two fora?

Which type of queries one should visit sage-support@google-groups and for which queries one should come here? Or both are for general purpose? Then what is the need for two?

-- VInay

2011-12-26 02:24:31 +0100 commented answer What is broken on this site

Its been more than a year that this is reported. The Privacy page and About page are still empty/useless.

2011-12-26 02:24:31 +0100 commented answer What is broken on this site

Its been more than a year that this is reported. The Privacy page and About page are still empty/useless.

2011-12-26 01:40:55 +0100 received badge  Autobiographer
2011-12-24 02:25:42 +0100 answered a question A simple question on modules.

Hi Benjamin,

Thanks for the reference. I had already gone through that, however it does not define the module when you know the generators. (The explicit way Singular does.)

The only workaround I could think within sage (mainly from the pages you mentioned), was to define the homomorphism into the free module. (Something like we do for computing resolution.) But that of course is very tedious as you know.

Do let me know if there is any better way!

Thanks and regards

VInay

2011-12-23 20:32:37 +0100 received badge  Student (source)
2011-12-23 03:05:48 +0100 answered a question sqaure root type

By the way there is one more place to get basics of sage: You can logon to the sagenb.org and view the published sheets.

e.g. Here is an example of one by William Stein

There are many other... Keep exploring...

-- VInay

2011-12-23 01:44:13 +0100 asked a question A simple question on modules.

Sorry to ask such simple question, but I am not able to find appropriate reference in the manual for this.

I have a power series ring (or polynomial ring) in multi-variables, say

R = k[X_1,\cdots, X_n] or k[[X_1,\cdots, X_n]].

I need to define a module over R, generated by

f_1,f_2,\cdots,f_r.

e.g. in Singular one can define it using

module M = f_1,\cdots,f_r.

(Of course not verbatim)

Also I would appreciate if one can redirect me to the corresponding section in the reference manual. Thanks in advance.

-- VInay

2011-12-21 08:06:20 +0100 received badge  Teacher (source)
2011-12-21 07:41:17 +0100 answered a question sqaure root type

If you want a very basic stuff, then go for the sage tour.

For the documentation I guess "How do I..." manual and the tutorial section are really important to get an overview of the basics in a particular area.

Further you can start writing small codes in an area of your choice, by taking help from reference manual. (IMHO, the reference manual is quite complicated to understand for a person who is newbie to sage or python.)

Lastly, this forum plus the mailing list on google groups are quite useful places...

Hope this helps...

With best wishes,

VInay

2011-10-08 03:32:31 +0100 received badge  Supporter (source)
2011-10-08 03:32:02 +0100 answered a question reducing ideal wrt another ideal

Thanks marco, It works!

-- VInay

2011-09-26 21:32:26 +0100 asked a question reducing ideal wrt another ideal

I have two ideals I & J in k[X_1,\cdots,x_n], where k is a field. How do I reduce an ideal I wrt ideal J.

e.g. Singular provides me a command

reduce(I,std(J));

Without moving back and forth to Singular, is it possible to implement this in sage?

Thanks and regards

-- VInay Wagh

2011-09-21 02:38:17 +0100 answered a question Quotient of ideals in powerseries ring

I precisely mean to take R as a Power Series Ring. Is it that the same algorithm (as that for Polynomials) does not work for Power Series? In that case where is the problem?

-- VInay

2011-09-20 09:07:06 +0100 asked a question Differentiation of a power series.

I wonder whether it is too hard to implement the derivative function for multivariate Power Series Ring. Since it is already implemented for one variable, is it not possible to implement it for multivariable, by treating the ring in one var over the ring in other vars.

e.g.

QQ[[x,y,z]] = QQ[[x,y]][z]]

Thanks and regards

--VInay

2011-09-20 07:56:05 +0100 received badge  Editor (source)
2011-09-20 04:17:26 +0100 asked a question Quotient of ideals in powerseries ring

Is it possible to take quotient (colon) of two ideals in a multivariable powerseries ring over a field?

e.g. the following code gives me error(s):

sage: R.<x,y,z> = PolynomialRing(QQ,3)
sage: I = Ideal([x^2+x*y*z,y^2-z^3*y,z^3+y^5*x*z])
sage: J = Ideal([x])
sage: Q = I.quotient(J)

Thanks and regards

--VInay