2021-04-09 05:38:26 +0200 | marked best answer | "Ratio" of two elements in a ring Suppose I have a $\mathbb{Q}$-algebra R, and I have two elements x and y in R. I happen to know that x is a scalar multiple of y. Is there a way to figure out what the scalar is? In other words, I want to identify the $\mathbb{Q}$-span of y with 1-dimensional vector space, choose an isomorphism of this vector space with $\mathbb{Q}$ (sending y to 1), and see where x goes. The general context is that R is a finite-dimensional graded $\mathbb{Q}$-algebra (given as a quotient of a polynomial ring), and the top degree piece has dimension 1. I have an isomorphism of this top degree piece with $\mathbb{Q}$ (defined by sending a certain element to 1), and I want to be able to compute what it does to other elements. An example of such a ring: let $A = \mathbb{Q}[x_1, x_2, x_3, x_4]$. Let $I_1 = (x_1x_3, x_2x_4)$. Let $I_2 = (x_1 + x_3, x_2 + x_4)$. Let $R = A/(I_1 + I_2)$. (Note that $R$ is the Stanley-Reisner ring of simplicial complex (a triangulation of the circle) modulo a linear system of parameters. So it is graded by degree, and as the simplicial complex is a circle, the degree 2 is a 1-dimensional vector space.) Let $y = x_1 x_2$, and let $x = (x_1 + x_4)(x_2 + x_3)$. Then x is a scalar multiple of y (as they are both in degree 2), and I would like to know what the scalar is. (In this case, x = 2y.) Later edit: fixed typo |

2021-04-09 05:38:19 +0200 | edited question | "Ratio" of two elements in a ring "Ratio" of two elements in a ring Suppose I have a $\mathbb{Q}$-algebra R, and I have two elements x and y in R. I happe |

2021-04-09 05:37:55 +0200 | edited question | "Ratio" of two elements in a ring "Ratio" of two elements in a ring Suppose I have a $\mathbb{Q}$-algebra R, and I have two elements x and y in R. I happe |

2021-04-08 19:38:27 +0200 | edited question | "Ratio" of two elements in a ring "Ratio" of two elements in a ring Suppose I have a $\mathbb{Q}$-algebra R, and I have two elements x and y in R. I happe |

2021-04-08 04:40:24 +0200 | asked a question | "Ratio" of two elements in a ring |

2021-04-08 03:54:01 +0200 | received badge | ● Popular Question (source) |

2021-04-08 03:52:41 +0200 | received badge | ● Famous Question (source) |

2021-04-06 10:34:23 +0200 | received badge | ● Famous Question (source) |

2020-11-30 04:46:52 +0200 | received badge | ● Famous Question (source) |

2020-01-07 18:16:16 +0200 | received badge | ● Notable Question (source) |

2019-11-07 07:06:02 +0200 | received badge | ● Notable Question (source) |

2019-01-02 22:08:29 +0200 | received badge | ● Notable Question (source) |

2018-12-25 12:46:51 +0200 | received badge | ● Nice Question (source) |

2018-12-24 17:29:23 +0200 | asked a question | Computing heights of large degree algebraic numbers I have an irreducible polynomial of large degree (I would like to go up to degree ~1000), and I would like to compute the height of its roots. Currently I am doing this: This is rather slow because I have to construct the number field. Is there a way to find the height without constructing the number field? I tried to use the functionality with general algebraic numbers, but there doesn't seem to be a way to define an arbitrary root of a polynomial in QQbar. It also looks like computing the height of something in QQbar works by computing a number field, so this wouldn't be any faster. |

2018-09-25 13:23:54 +0200 | received badge | ● Popular Question (source) |

2018-07-25 23:00:44 +0200 | asked a question | Elements of the Stanley-Reisner ring I have a simplicial complex, and I'm trying to manipulate the Stanley-Reisner ring of that simplicial complex. This is just a quotient of a polynomial ring. The generators of the quotient ring are called (according to R.gens()) x0bar, x1bar, x2bar, x3bar. However, when I try to refer to elements of the ring in this way (for example, to create an ideal containing certain elements), I get an error. For example: This gives me the following error: |

2018-04-05 10:45:16 +0200 | received badge | ● Notable Question (source) |

2018-02-02 18:15:05 +0200 | received badge | ● Popular Question (source) |

2017-12-18 23:54:44 +0200 | received badge | ● Popular Question (source) |

2017-08-21 05:11:49 +0200 | asked a question | Changing the weights in a graph Suppose I have a weighted graph G, and I want to change the weights of some of the edges. One way to do this is to output the weighted adjacency matrix, modify it, and then recreate the graph. Is there a more efficient way? |

2017-08-19 00:56:20 +0200 | received badge | ● Popular Question (source) |

2017-08-05 10:50:47 +0200 | received badge | ● Self-Learner (source) |

2017-08-05 10:50:47 +0200 | received badge | ● Teacher (source) |

2017-08-01 04:42:07 +0200 | answered a question | Paths beginning with a certain vertex I'm not sure if this is the most efficient, but I did find a way. If you want the the path to begin with (v1, v2), then you can use: |

2017-08-01 00:09:40 +0200 | asked a question | Paths beginning with a certain vertex So I have a graph $G$ and a distinguished vertex, labeled with $0$ say. I would like to create a list of all paths of length $k$ that start with $0$. One way I see how to do this with subgraph_search is to change $0$ into a large clique (larger than the clique number of $G$) and then use subgraph_search_iterator to find all subgraphs with a large clique connected to a path of length $k-1$. However, this seems pretty inefficient. Is there a better way? |

2017-06-29 20:46:35 +0200 | asked a question | Using the small group library in Sage notebook Is there any way to import groups from the GAP small group library into Sage notebook? I've tried importing the library using the terminal, but I haven't been able to. When I run while running sage in the terminal, I get an invalid syntax error. I am running Mac OS X 10.12.5 When I run |

2016-11-23 21:13:05 +0200 | asked a question | Evaluating characters of linear algebraic group How would I evaluate the characters on $SL_2(\mathbb{F}_q)$ on some conjugacy class (which I know one element of). I think I will have to use the port to GAP, as constructing characters of non-permutation groups doesn't seem to implemented. I could construct the character table, but that is maybe inefficient. |

2016-09-26 23:01:48 +0200 | asked a question | Generating all elements of $SL_2(\mathbb{F}_q)$ What is the fastest way to create a set with all elements of $SL_2(\mathbb{F}_q)$ for $q$ some prime power of size about $50$? One way to do it is to find a representative for each conjugacy class and then use the ConjugacyClass method, but this seems inefficient. Is there a better way? |

2016-09-04 23:25:14 +0200 | commented answer | Finding the maximum on an interval and find root scipy is giving me the wrong answer. Also, I am looking for the x-value of the giant spike that occurs at about 5.56, not the maximum on [0, 2pi]. (There are many local maximum around there, so find local maximum doesn't work.) |

2016-09-03 21:26:33 +0200 | asked a question | Finding the maximum on an interval and find root I have a function f that is the truncation of the fourier transform of a sequence (i.e. f = sum( cos(a*x) for a in sequence), where sequence has 10,000 terms). I want to find the absolute maximum on an interval. The documentation suggest getting the maximum of the plot, which works. I would like to know where this maximum occurs, though. As the maximum is 3272.9689885743473, f - 3200 should have a root, but find_root doesn't find a root. I guess this is technically a bug, but not very surprising given the definition of f. My main question is, how do I find out where this maximum occurs? I can squint at the plot, but this isn't accurate enough. (more) |

2016-08-30 14:47:55 +0200 | commented question | No speed gain with parallel? @krisman that is how @parallel is used in the documentation. It is also giving me correct results a no errors, and it seems like it would give me errors if it was that wrong. Doing computation(10^5) gives me no speedup over not using parallel, and doing computation(a) (when a is a list, but not putting the list) does it instantly, so it is not actually doing the computation (it gives me a generator object if I try to retrieve it). |

2016-08-30 04:28:24 +0200 | received badge | ● Editor (source) |

2016-08-30 04:24:53 +0200 | asked a question | No speed gain with parallel? I'm doing a computation that seems ripe for parallelization (I am doing almost same computation over and over again independently), but it doesn't seem to be working. Rather than going 4 times faster, it takes 4 times longer! (I have 4 cores). It is giving me (seemingly correct) results. Perhaps someone more familiar with parallel can tell me what I am doing wrong. EDIT: I tried it again and the parallel version was much faster. I don't know what was happening before. |

2016-08-09 23:29:29 +0200 | received badge | ● Nice Question (source) |

2016-08-07 23:29:01 +0200 | marked best answer | Memory leak somewhere? My code is using massive amounts of memory (eventually), which I don't think should be the case. The memory use slowly increases until my computer runs out of memory. I tried enabling garbage collection, but that didn't help (or didn't help enough). I don't see any reason why this should use more and more memory. It takes somewhere between 5 and 10 hours for this program to use up my 16 GB of memory, but that memory user is increasing is clear quickly. |

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.