2023-10-28 02:48:57 +0200 | received badge | ● Notable Question (source) |
2023-10-28 02:48:57 +0200 | received badge | ● Popular Question (source) |
2023-01-06 00:08:11 +0200 | received badge | ● Nice Question (source) |
2022-05-05 07:00:59 +0200 | received badge | ● Famous Question (source) |
2021-06-25 17:46:19 +0200 | received badge | ● Famous Question (source) |
2020-09-04 15:05:34 +0200 | received badge | ● Notable Question (source) |
2020-09-04 15:05:34 +0200 | received badge | ● Popular Question (source) |
2020-09-04 15:04:44 +0200 | received badge | ● Famous Question (source) |
2020-09-02 18:10:13 +0200 | asked a question | solving a matrix equation in the integers. I'm trying to use sage to solve an expression of the form $xS = y$ for a fixed integer matrix $S$ and a fixed integer vector $y$. I need my solution vector $x$ to also have integer coefficients. How I'm currently doing this is by using the mixed integer linear programming tool and my code looks something like this. The issue I have here is that the objective and the constraint are arbitrary and were just picked so that the space that the MixedIntegerLinearProgram function is trying to optimize over has a "feasable solution" (sage's words not mine). Is there a better way to find a solution to $xS = y$ in the integers (i.e a different function or package supported by sage) and if not, is there a way to have my constarint be to make the norm of the vector as small as possible (so that I'm not just artificially picking an entry to optimize my search over)? |
2020-06-01 14:02:30 +0200 | received badge | ● Famous Question (source) |
2019-12-24 15:52:39 +0200 | received badge | ● Notable Question (source) |
2019-12-13 11:38:09 +0200 | received badge | ● Notable Question (source) |
2019-10-29 15:44:32 +0200 | asked a question | qsieve error I'm trying to run the qsieve function in sage (version 8.9) and I'm getting a file or directory error. For example, when I try the code I get the error, OSError: [Errno 2] No such file or directory. I tried looking up if there was an additional library or package I needed to download to make the qsieve function work, but I couldn't find anything. Any advice or insight would be appreciated. |
2019-09-30 21:18:01 +0200 | received badge | ● Popular Question (source) |
2019-05-24 21:22:15 +0200 | commented answer | installing the kohel database Thank you, this worked perfectly once I realized I needed to run this in the sage shell! thanks a ton! |
2019-05-24 19:43:09 +0200 | asked a question | installing the kohel database I'm trying to work with modular polynomials and Hilbert class polynomials in sage, and I would try the code The resulting error is a "LookupError: filename /opt/sagemath-8.6/local/share/kohel/PolMod/Cls/pol.002.dbz does not exist" Okay, no big deal, I just need to download the right database follow the path that sage is looking for the file at and put it there right? The problem is, when I went to download the database, from the sage website (http://ftp.yz.yamagata-u.ac.jp/pub/ma...) I get a strange .gz document, that doesn't let me use the classical modular polynomial database like I need to. I'm I doing this right? If not, where can I download the required package, and if I am, what's the next step to be able to use this database in sage? I'm using version 8.6. |
2019-04-23 00:02:01 +0200 | received badge | ● Popular Question (source) |
2019-04-23 00:02:01 +0200 | received badge | ● Notable Question (source) |
2018-12-10 16:27:29 +0200 | received badge | ● Popular Question (source) |
2018-03-14 02:12:23 +0200 | asked a question | local variable 'Integer' referenced before assignment I'll be honest I have no idea why this error is popping up, and it's really weird! I'm writing code that will generate a closed form solution to the partial sums of integer powers up to n, and this is what I have And when I try to run it I get the most unusual error, it just says to me UnboundLocalError: local variable 'Integer' referenced before assignment. I have never run into this before and have no idea what's wrong with the line. Thanks in advance! |
2018-03-14 01:58:53 +0200 | commented answer | Trouble with mixed integer linear programming Thank you so much! That looks like exactly what I want to do! |
2018-03-14 01:57:56 +0200 | received badge | ● Scholar (source) |
2018-03-10 04:10:04 +0200 | commented question | Trouble with mixed integer linear programming I added the code that's running, besides the construction of the matrix which is 56x34, this is literally all that I'm inputting, and I don't know why sage thinks the feasible set is empty since it at least has the trivial solution. |
2018-03-10 04:07:30 +0200 | received badge | ● Editor (source) |
2018-03-10 02:58:43 +0200 | commented answer | given a prime, finding where it is the list of primes This work! Thanks a ton! |
2018-03-10 02:58:24 +0200 | received badge | ● Supporter (source) |
2018-03-10 01:53:02 +0200 | asked a question | Trouble with mixed integer linear programming I'm having trouble with sage's mixed linear programming tool. I entered the following code trying to maximize a variable with the given constraint that multiplication by a matrix would result in the zero vector. Where spoof_matrix is a 56x34 matrix that has the specific constraints I'm working with. When I use the p.solve() it gives the error in the picture. I know that there is at least one non-trivial solution since the test vector seen in the picture solves the constraints. I don't know why sage isn't solving the optimization problem, and any help would be really great! Also, if it's possible to not only get the maximum value but also obtain the vector that gives the maximum value, that would be really awesome. Thanks!! Edit: People have asked for the code for how spoof matrix is created, using these functions the spoof matrix would be given by the following line. |
2018-02-11 21:47:59 +0200 | received badge | ● Student (source) |
2018-02-11 18:51:42 +0200 | asked a question | given a prime, finding where it is the list of primes I'm writing a program that gives as an output the prime factorization of a number, and then I'm putting the primes into a matrix based on what prime number it is, (i.e 541 is the 100th prime, so if 541^2 divides my integer, then there would be a 2 in the 100th spot of my vector that represents my number) Is there a function that takes as its input a prime and gives as an output where it is in the list of primes. (i.e we want f(541) = 100) Thanks in advance! |