2021-03-01 17:36:11 +0100 | commented answer | Finding isomorphic lists in a big list Another question: Is there a command to obtain all the lists L_i in W up to equivalence (and their number up to equivale |

2021-03-01 17:19:06 +0100 | marked best answer | Finding isomorphic lists in a big list I have a big list W of lists L_i obtained in GAP that looks as follows for example: So an entry L_i of this list W is a list that looks for example as follows: An element of this list L_i is again a list that looks like [ 1, [ 0, 3 ] ] for example. Now two lists L_i and L_j are said to be isomorphic if they contain the same elements up to a permutation of entries. My question is whether there is a quick method (the big list W might be alot bigger for larger examples) to check with Sage whether the big list W contains two isomorphic lists L_i and L_j? edit: Using the suggestion of Max Alekseyev, here is the code how to do it with Sage in that example: display(U) display(L[1]) display(L[5]) |

2021-03-01 17:19:02 +0100 | edited question | Finding isomorphic lists in a big list Finding isomorphic lists in a big list I have a big list W of lists L_i obtained in GAP that looks as follows for exampl |

2021-03-01 17:16:05 +0100 | commented answer | Finding isomorphic lists in a big list Thank you very much. I added in an edit to my answer how I made it with Sage using your suggestion. |

2021-03-01 14:06:27 +0100 | commented answer | Finding isomorphic lists in a big list Thank you, I will try that. But the lists L_i might have the same elements several times, so one should have equality of |

2021-03-01 13:18:42 +0100 | edited question | Finding isomorphic lists in a big list Finding isomorphic lists in a big list I have a big list W of lists L_i obtained in GAP that looks as follows for exampl |

2021-03-01 13:17:03 +0100 | asked a question | Finding isomorphic lists in a big list Finding isomorphic lists in a big list I have a big list W of lists L_i obtained in GAP that looks as follows for exampl |

2021-02-10 18:25:12 +0100 | received badge | ● Nice Question (source) |

2021-02-09 17:08:27 +0100 | commented answer | Finding an involution with Sage Thank you very much! It seems your code is not using the involution G (at least as an input). By property 3. F needs to have the property that restricted to the map LL1->LL2 it is equal to the involution G. Or do I have a thinking error? Also is there a way to obtain all F which have properties 1, 2 and 3 and count the number of such involutions? By the way, is there an easy method with sage to turn every bracket of the form ( into a bracket of the form [ in your output? |

2021-02-09 17:05:45 +0100 | received badge | ● Enthusiast |

2021-02-08 11:13:39 +0100 | asked a question | Finding an involution with Sage I have four lists L1,LL1 and L2, LL2 and a bijection G from LL1 to LL2. LL1 is a sublist of L1 and LL2 a sublist of L2. For example they look like this: and The bijection G looks like this: Thus an element in such a list is a tuple of the form [ [ 2, 2, 2, 1 ], 4 ] where [2,2,2,1] correponds to some algebraic object and the second entry is number. L1 and L2 will always have the same number of elements and LL1 and LL2 will have the same number of elements. The bijection G is given also as a list, where an entry such as means of course that G maps [ [ 2, 2, 2, 1 ], 4 ] to [ [ 4, 3, 2, 1 ], 4 ] . Im searching for bijections F between L1 and L2 that satisfy the following three conditions: F is an involution, that is $F^2=id$. F preserves the number. F restricted to LL1 maps to LL2 via the given involution G.
In the above example F is uniquely given as follows: Here is another example where the lists are larger: There might be many F satisfying the three conditions. Thus my question: Is there an easy method to find all such bijections F satisfying the three conditions when L1,LL1,L2,LL2 and G are given? |

2021-01-09 12:12:22 +0100 | commented answer | Translating quiver in QPA to Sage Thank you very much again. I found the missing option using your suggestion, but sadly for large quivers the displayed directed graph looks terrible despite trying some options to fix that. But this might be also a problem of tikz and Im not sure anymore whether Sage is the right thing to use for that. I therefore also posted the question in https://tex.stackexchange.com/questio... . |

2021-01-08 22:07:14 +0100 | commented answer | Translating quiver in QPA to Sage Thank you very much again! Is there a way to obtain the digraph as an object in sage so that one can obtain its latex code for example (and not just plot it)? For example like this one can obtain the latex code of the digraph without the edge labelings: Is there an easy way to obtain it with edge labelings? |

2021-01-08 20:46:32 +0100 | commented answer | Translating quiver in QPA to Sage Thank you very much! Here is how I entered it into the sage online cell: This is very surprising that it works so easily. But there are two small problems: Loops are displayed very strange. (this is not a very big problem since loops appear rarely) The arrows have no names.
Is there an easy way to fix this? |

2021-01-08 19:09:19 +0100 | asked a question | Translating quiver in QPA to Sage QPA is a GAP-package that deals with quiver algebras. A quiver is just another word for directed graph. My question is whether there is a quick way to translate the QPA-output of a quiver into a directed graph (with the same names for vertices and arrows) for Sage. For example a quiver in QPA looks as follows: or as follows: So the first list of the form are the names of the vertices, together with the information where they start and end. So for example |

2020-12-28 18:13:29 +0100 | commented answer | Translating a GAP-output for Sage Thank you very much for this detailed answer! |

2020-12-28 00:33:04 +0100 | asked a question | Translating a GAP-output for Sage I made the following code in GAP to generate all monic irreducible polynomials of degree n with coefficients 1,-1 or 0 and non-zero constant term: Now I wanted to use the resulting list WW in Sage to do operations only Sage can do. But how do I get WW now in Sage? It seems very complicated and using https://sagecell.sagemath.org/ (where the language is set to "GAP") produces no output, while the output is displayed without any problems when I use a terminal for GAP. Is there an easy solution for my problem? (other than programming it in Sage, which would also be interesting but it seems it is easier to deal with the generation of polynomials via GAP) |

2020-12-27 19:11:04 +0100 | asked a question | Translating a list of polynomials using sage I have a list of polynomials in Sage as follows: Now I want to have the list of all such polynomials as polynomials in My question is:
Is there an easy way to translate the above list W so that Sage views every polynomial in that list as a polynomial in |

2020-12-27 19:08:48 +0100 | commented answer | Finding absolute values of roots of polynomials with Sage Thank you very much! Do you have a realistic expectation what to use to get a fast and correct result that is correct up to 7 decimals? For example is PolynomialRing(ComplexField(100)) good enough for that? |

2020-12-27 18:45:01 +0100 | commented answer | Finding absolute values of roots of polynomials with Sage Thank you but this is not very precise. For example: this polynomial has only the zero -1 (it is equal to (x+1)^7). But the approximated zeros are too imprecise. Is there a better way to get zeros that are correct at least until the 5. or 6. decimal place? |

2020-12-26 23:43:31 +0100 | received badge | ● Famous Question (source) |

2020-12-26 23:43:31 +0100 | received badge | ● Notable Question (source) |

2020-12-26 20:20:00 +0100 | asked a question | Finding absolute values of roots of polynomials with Sage Given a monic integer polynomial $p(x)$ in one variable $x$. Is it possible using Sage to obtain all absolute values of the roots of $p(x)$ in a list? (Or at least all absolute values of roots that have absolute value (say) at most 2, if there general case is not possible and one needs a (small) bound.) In my work there appear polynomials with large degree up to 40-50 so Im not sure whether such a thing is quickly possible for nowadays computers. But a solution would also be interesting even when it works only for degrees up to 20 or so. The solution should give the correct answer for the absolute value of the roots for 5 or 6 decimal places. |

2020-12-26 20:17:04 +0100 | commented answer | Finding certain partitions using Sage Thank you very much. Sorry, there was a mistake in my formula. In the sum there is an n and not a k. |

2020-12-16 13:29:35 +0100 | received badge | ● Popular Question (source) |

2020-12-11 18:27:56 +0100 | edited question | Finding certain partitions using Sage ## ContextA partition of is a nonempty list $p = [p_1, p_2, ..., p_n]$ of positive integers (called the parts), of length $n \ge 1$. The list is considered sorted in nondecreasing order: $p_1 \le p_2 \le ... \le p_n$. Consider an integer $d \ge 1$. The partition $p$ is called $d$-admissible if each part $p_i$ is at least $2$ and inverses of the parts sum to $n - d - 1$. In formulas: $2 \le p_1$ and $n - d - 1 = \sum \limits_{i=1}^{n} {\frac{1}{p_i}}$. ## QuestionIs there a quick way to filter all partitions using Sage to find all $d$-admissible partitions for a fixed $d \ge 1$? Note that the assumptions imply $n \le 2(d+1)$ but the individual terms $p_i$ might get quite large (for $d=2$ the largest is already 42), which makes it very complicated to obtain a program that is quick and works for large $d$. For example for $d=1$ there are four 1-admissible partitions, namely: [2,2,2,2], [3,3,3] ,[2,4,4] and [2,3,6]. For $d=2$ there are eighteen 2-admissible partitions. |

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.