20190523 22:52:38 0500  commented question  RE: This following Question What operating system? How was Sage installed? 
20190521 05:04:01 0500  commented question  Maximum algebraic connectivity from a given collection of graphs @rburing  I had missed that. Indeed the answer there adapts to the question here. 
20190521 04:58:38 0500  commented question  Help with this?:Tried to use Sage's Python which was not yet installed. Would you add an answer to say what solution (or workaround) you used? It might help anyone with the same problem. 
20190521 04:57:30 0500  edited question  Help with this?:Tried to use Sage's Python which was not yet installed. My computer is a MacBook Pro (Late 2013) running macOS High Sierra.
I've downloaded SageMath8.5.app and tried to run it.
I got the following error message in the Unfortunately the advice in the error message seems hard to use: the directories it refers to cannot be found. I have Python 3.4 installed. Any suggestions would be greatly appreciated. My expertise level is "beginner". 
20190521 04:42:05 0500  commented answer  Maximum algebraic connectivity from a given collection of graphs 
20190519 20:04:21 0500  commented question  SageMath Gap Kernel Compatibility What operating system? How was Sage installed? 
20190519 19:04:01 0500  commented answer  Maximum algebraic connectivity from a given collection of graphs Sorry, 
20190519 17:23:51 0500  commented answer  How well print a list of matrices ? @Daniel Krenn  try this instead 
20190519 16:25:35 0500  edited question  Is there any way to plot3d latex package on sagemath? I want to draw a triangle on hyperboloid and put the name of angles and vertices but for example when i want use alpha or beta it doesn't show up? NB i use sagemath. Here is an example of angles drawn on a surface, to illustrate what I want to achieve: 
20190519 16:21:16 0500  edited question  Derivative of a recurrence equation Given: suppose I define a function as How do I take the first order derivative w.r.t. I tried: without any luck. 
20190519 11:34:58 0500  answered a question  Maximum algebraic connectivity from a given collection of graphs [Edited to take comments into account.] Bicyclic graphs with top algebraic connectivityOne can construct the list using Nauty's generator and filtering by the desired conditions. Note that Nauty's generator can already filter by minimum and maximum
number of edges using There are 236 bicyclic graphs on 8 vertices: For a given graph Compute their algebraic connectivity, and the top algebraic connectivity: Extract graphs with top algebraic connectivity: There are three: Their edges: Show them: Documentation of Nauty's graph generatorThe documentation is available via any of the following solutions, which respectively give the documentation in text mode, the full source code in text mode, and the documentation in html mode: The html documentation can also be browsed locally (at least if you installed
from source or from binaries from the Sage download pages) by pointing a browser
to Or see the online SageMath documentation (html or pdf). To avoid storing a long list graphsTo avoid storing all bicyclic graphs on 8 vertices in a list, one could run through them, keeping and updating a current value of the top algebraic connectivity and a current list of graphs achieving it. In the end we get the top algebraic connectivity: and know how many graphs achieve it: and we can show their edges: or visualize them: Note there are other options for visualization, including:
Defining a functionThe code above can be turned into a function of the number of vertices: For 9 vertices this might take something like 10 seconds: For 10 vertices this might take on the order of 30 seconds: For 11 vertices this might take on the order of 2 minutes: And so on... 
20190519 10:35:23 0500  edited question  Maximum algebraic connectivity from a given collection of graphs A connected graph on $n \ge 1$ vertices is cyclic (or unicyclic) if it has $n$ edges, bicyclic if it has $n + 1$ edges. The following code runs through all connected graphs on 8 vertices with 9 edges, and shows each graph as well as the sorted list of its laplacian eigenvalues. How could one get the list of graphs whose algebraic connectivity (i.e. second smallest laplacian eigenvalue) is the maximum among those (the maximum here being $1$)? 
20190515 16:01:54 0500  commented question  plotting complicated function In that branch of mathematics, it's usual to study functions that are defined only almost everywhere. The set of measure zero where they are not defined is just disregarded and "does not matter". Of course, when experimenting with a computer, it can turn out to matter. 
20190515 15:52:22 0500  edited question  Solving an ODE and simplifying the result I'm interested in solving the differential equation $$3 h' + 3 h^2 = c_1,$$ where $c_1$ is a positive real number. The above code works, but it's not solved explicitly for $h$, so This gives something like $$h\left(t\right) = \frac{\sqrt{3} \sqrt{c_{1}} {\left(e^{\left(\frac{2}{3} \, \sqrt{3} C \sqrt{c_{1}} + \frac{2}{3} \, \sqrt{3} \sqrt{c_{1}} t\right)} + 1\right)}}{3 \, {\left(e^{\left(\frac{2}{3} \, \sqrt{3} C \sqrt{c_{1}} + \frac{2}{3} \, \sqrt{3} \sqrt{c_{1}} t\right)}  1\right)}},$$ in sage notation (nonLaTeX) it starts like Question 1: Is there a way to allocate to the solution (i.e. I had to set by hand (it is ease, but it would be nice to automatize the allocation) Then, by simply looking at the solution it is clear that it can be simplified. I tried things like but none of them returns the expected result, which could be obtained from Mathematica's kernel $$ \sqrt{\frac{c_1}{3}} \tanh\left( \sqrt{\frac{c_1}{3}} (t  3 c_2) \right) $$ Question 2: How could the expression 
20190514 20:13:51 0500  edited question  Checking conjugacy of two matrices

20190514 17:21:35 0500  edited question  plotting complicated function I would like to approximate the sum $$h(a,x) = \frac{2}{n} \sum_{n=0}^{n1} logT_a^n(x) $$ where $n$ is large like $n= 1000  5000$ and for a fixed $a$ $$T_a(x) = \Big\frac{1}{x}\Big  \Big\lfloor{\Big\frac{1}{x}\Big  1 +a}\Big\rfloor$$ where $x \in (0,1).$ By fixing $x$ to be a value $x_0 \in (0,1)$, e.g. $x_0 = 1/\pi$, $$h(a, x_0) = h(a, 1/\pi)$$ a function of one variable, and I want to plot a 2D graph of point $(a, h(a, 1/\pi))$, by fixing $n = 2000$, for $a \in [0,1].$ I figure how to calculate the value at one given $a$ using SageMath, for example, when $a = 1$, Then $\frac{2}{1000}s$ give the approximation for the sum when $x = 0.79$, $n = 1000$, $a = 1$. But for plotting, I think I need to define the function $h(a, x)$ which is a summation over composition of functions. I tried to use Any help how to achieve this please? 
20190514 17:18:21 0500  commented question  plotting complicated function @Masacroso: it means the function $T_a$ is applied $n$ times. For example, $T_a^2(x) = T_a(T_a(x))$. 
20190514 17:11:57 0500  answered a question  How to combine 3d and 2d plots? If I understand correctly, the goal is to produce a 3d plot of a function of two variables, with some partial functions plotted on top of it. The partial plots, or plots of the partial functions, are supposed to be inserted vertically at the relevant x or y values; in other words we want to visualize the intersections of the 3d plot with some vertical planes corresponding to a few particular values of x, and of y. Here is one way this can be achieved. Pick a function Pick the xrange and the yrange: Define the 3dplot with partial opacity. To plot partial functions of Define a new graphics object View the result (choices for the viewer include 'jmol', 'tachyon', 'threejs'): 
20190514 16:12:49 0500  commented answer  Plot points in loglog This should definitely be fixed. Maybe as part of 
20190513 10:14:37 0500  received badge  ● Nice Answer (source) 
20190512 06:05:36 0500  commented question  Chevie on Windows Also if you want to keep working on Windows but can upgrade to Windows 10, then you can use the "Windows Subsystem for Linux" which lets you run Linux "inside Windows". 
20190512 05:42:28 0500  commented question  How to implement pairings on MNT curves? A quick websearch reveals a number of introductory texts. Maybe it can help clarify the background and the question. 
20190511 15:53:10 0500  answered a question  Infinite polynomial ring with several index One workaround would be to use an infinite polynomial ring in $x$ and $y$, with $x_i y_j$ standing for $x_{i, j}$. 
20190511 15:34:11 0500  commented question  Plot boxes have jumpy xy ranges in log scale Possibly related: 
20190511 15:32:52 0500  answered a question  Plot points in loglog It would seem plots in log scale use a sampling done in the nonlog scale... Since plots only 200 plot points by default, the sampling in nonlog scale means that for a logscale plot, most plot points are near the end, and they are very scarce in the first 3/4 of the plot. A workaround, as suggested in @Iguananaut's answer, is to use more plot points. Using 800 plot points already gives a much smoother curve here: There was a problem I thought looked similar: the xrange and yrange for a plot are chosen slightly wider than the actual range of xvalues and yvalues that occur in the plot, and sometimes in log scale it looks like this "slightly wider" is chosen in nonlog scale, giving a wrong aspect. See 
20190509 09:40:23 0500  received badge  ● Nice Answer (source) 
20190509 02:44:36 0500  commented question  Chevie on Windows @Erratis  installing Linux is always a good idea. Note that you can try it out with Sage Debian Live which ships a Debian installation (bootable from a usb drive) with lots of free software including a very complete Sage installation. 
20190508 07:06:57 0500  edited answer  What does the 'a' and x^254 in code means? When defining a finite field of nonprime order, it is useful to give a name to the generator. Likewise, when defining a polynomial ring, it is useful to give a name to the polynomial variable. In the example, And So For more, read the documentation or/and the source code for and for Note that 
20190506 16:58:54 0500  commented question  How to print the numeric part of a symbolic expression with arbitrary precision? It would be interesting to get some Sage commands that allow to create this matrix. If not the original commands, then at least one way to get hold of this matrix. To share the matrix but not the original way it was produced, you could run and if that works you could copy and paste what it produces, which will give a way for others to define the same matrix and try things out on it. 
20190506 16:55:37 0500  answered a question  How to print the numeric part of a symbolic expression with arbitrary precision? It seems your matrix was defined with entries in Sage's symbolic ring. Elements in the symbolic ring are symbolic expressions, which don't get automatically simplified. One way to make the matrix more readable would be to think of it
as a matrix whose entries are rational functions in Try this: If that does not work, then maybe rational functions in the (floatingpoint) "reals". Maybe the matrix was the following? in which case rational functions over and rational functions over Using a version of floatingpoint numbers with less bits (only 20 instead of the usual 53): Going down to 12 bits gives roughly three decimal digits as required in the question: 
20190506 16:45:59 0500  edited question  How to print the numeric part of a symbolic expression with arbitrary precision? How to print the numeric part of a symbolic expression with arbitrary precision? I have a matrix 
20190506 02:10:27 0500  received badge  ● Good Answer (source) 
20190506 02:09:31 0500  received badge  ● Nice Answer (source) 
20190506 01:52:24 0500  received badge  ● Nice Answer (source) 
20190506 01:51:41 0500  received badge  ● Necromancer (source) 
20190505 18:19:24 0500  edited question  How does one install Sage in windows? Can someone help me with the process? I downloaded a .ova and a .vmdk file from the mirror Now what? 
20190505 18:19:08 0500  edited answer  How does one install Sage in windows? (Edited). A SageMath installer for 64bit Windows is in the works. It is now is in alpha testing [...]. It should work with Windows 7 and up. [...] Update (20190506). The SageMath installer for Windows has been stable for some time now, and can be downloaded from the SageMath download page or from 
20190505 17:43:51 0500  commented question  Constructing graphs using permutation or symmetric groups Please provide some code to let others reproduce the problem easily. This dramatically increases the chances of an answer, the speed of getting an answer, and the accuracy with which the answers target the problem. 