Ask Your Question

Dianbin Bao's profile - activity

2020-12-29 18:10:44 +0100 received badge  Popular Question (source)
2020-04-20 01:43:56 +0100 received badge  Nice Question (source)
2017-11-12 20:58:08 +0100 commented question Home and End Key

Thank you so much. It saves my day!!!!!!

2017-11-10 21:43:35 +0100 asked a question Home and End Key

Hi all,

I am using Sage on my mac terminal. The mac keyboard does not have home or end key. I check out several combinations and they does not work in Sage terminal platform, but works on Rstudio. How do I recover the home and end key?

Thanks.

2017-09-21 20:19:26 +0100 asked a question Stochastic block model

Hi all,

I would like to draw a random graph by Sage. The general stochastic model is the following: The graph contains $n$ vertices and the n vertices are divided into $r$ communities $C_1\cdots,C_r$. For two vertices within the same community, there is a probability $P_r$ that they are connected directly by an edge. How do I plot such a graph in Sage? References appreciated.

2017-07-19 22:32:12 +0100 received badge  Popular Question (source)
2016-09-26 17:26:37 +0100 received badge  Popular Question (source)
2016-04-13 19:22:24 +0100 asked a question approximate real numbers by algebraic numbers

Hi

suppose I have a real number x in decimal digits, how do I find an approximate polynomial f(x) \in ZZ[x] with x a root?

2016-04-13 16:43:19 +0100 asked a question numerical computation of Petersson inner product

Hi

I would like to compute Petersson Inner product of two Hecke eigenforms by Sage. What command can Sage do that?

2016-02-11 22:35:09 +0100 received badge  Supporter (source)
2016-02-11 22:35:01 +0100 commented answer Evaluate a list

Thanks very much, T,monteil. You save me the day!

2016-02-11 20:57:56 +0100 asked a question Evaluate a list

Hi,

Suppose for example E =[x,x^2,x+1] is a list of elements in ZZ[x]. Let K be a number field defined in Sage

K.<a> = NumberField(f(x))

for some irreducible polynomial $f(x)$. Then how can one evaluate the list E by setting $x=a$ and $x=\sigma(a)$ (conjugate of a) in Sage?

2016-02-11 16:48:26 +0100 commented question Define a big matrix in Sage

To people who has similar problems: One can unravel multidimensional list to one dimensional list and then input Sage.

2016-02-11 16:43:57 +0100 commented answer Define different embedding of a number field

This is exactly what I want. Thank you very much, Tmonteil!

2016-02-11 16:43:00 +0100 received badge  Scholar (source)
2016-02-10 02:21:24 +0100 asked a question Define different embedding of a number field

Hi,

Let f(x) be an irreducible polynomial over $ZZ[x]$. We can define a number field

K.<a>= NumberField(f(x))

My question is how does one define all the embedding of K into the real or complex in Sage?

2016-02-08 03:36:16 +0100 asked a question write output of for loop in pari to file

Hi all,

I would like to write the output of a for loop in Pari to a file named 'foo', However the output of a for loop has no numbering contrast with other output. If I look at the numbers labeling the outputs before and after the for loop and use that number in the following command

\w n foo

Then what I get in foo is 0. What happened and how can this be fixed?

2016-02-08 00:04:39 +0100 asked a question Number field arithmetic in Pari/gp

Hi all,

I would like to do number field arithmetic in Pari. To be more precise, I would like let Pari do the following job as Sage does,

K.<a> = NumberField(f(x))
L.<b> = NumberField(g(x))

where f(x), g(x) are irreducible polynomials over the rational. I would like to do arithmetic with a,b. This is easily done in Sage. How can I do this by Pari?

Thanks

2016-02-07 00:45:34 +0100 received badge  Student (source)
2016-02-06 20:47:22 +0100 asked a question Define a big matrix in Sage

Hi all,

I would like to define a big matrix E (130$\times$ 30) with entries being a list like E[11,1] = [x, [1,-2]];

E[14,1] = [x, [1,-1,-2,1]]; or 0. These entries are stored in a separate file which is readable by Pari but not Sage.

How do I define it by Sage?

2016-02-06 18:32:09 +0100 commented question cannot exit pari

This happens for Sage installed on my laptop and also that installed on my university's server. I type %gp in Sage to run Pari, but I can not exit using the usual command \q, I tried quit, then it reports PARI/GP interpreter crashed -- automatically restarting again and again.

2016-02-05 22:34:25 +0100 asked a question save gp object to sage readable sobj

Hi all,

I am doing computation with a Pari readable table. Since I am a beginner to Pari, I would like to know that after defining a number field for example $K=nfinit(x^2-76)$, how do I play around with the generator $x$? This is super easy in Sage and may be silly question for people familiar with Pari. It also solve my problem if you know how to save a big matrix defined in Pari to an object readable by Sage.

2016-02-05 22:20:23 +0100 commented question How to load gp file in Sage terminal and list all its content

Dear vdelecroix,

I am doing computation with Stein's tables at [http://wstein.org/Tables/an.html], William Stein says it is readable by Pari. However when I failed to load it by the Pari kernel installed in Sage. But it is OK now once I installed Pari on my laptop and load the database there. The bug may be due to the fact that Pari is not embedded in Sage perfectly.

2016-02-04 19:06:01 +0100 asked a question cannot exit pari

Hi all, I meet the following problem when exiting pari:

It reports that PARI/GP interpreter crashed -- automatically restarting.

I clicked control+C for a couple times, it can exit but no if I do nothing. Is this a bug? Sage is installed on a ubuntu system.

2016-02-04 16:28:57 +0100 received badge  Editor (source)
2016-02-04 16:28:49 +0100 asked a question load gp file by Sage

Hi all, I am doing computation of cusp eigenforms and would like to use William Stein's data at his website, which is in .gp file. How do I load this in Linux Sage terminal and see what is inside?

2016-02-04 16:28:49 +0100 asked a question How to load gp file in Sage terminal and list all its content

Hi all, I am doing computation of cusp eigenforms and would like to use the William Stein's data at his website, which is .gp file. How do I load this in Linux Sage terminal and see what is inside?