2023-03-03 19:45:15 +0100 | received badge | ● Famous Question (source) |
2022-02-22 13:27:49 +0100 | received badge | ● Notable Question (source) |
2022-01-31 14:36:52 +0100 | received badge | ● Popular Question (source) |
2022-01-27 20:14:38 +0100 | received badge | ● Popular Question (source) |
2021-11-23 23:19:02 +0100 | received badge | ● Notable Question (source) |
2021-03-13 15:24:28 +0100 | received badge | ● Popular Question (source) |
2021-02-25 00:11:26 +0100 | received badge | ● Nice Question (source) |
2021-02-24 15:17:19 +0100 | asked a question | How one can find a matrix with given condition? I found the following recreational mathematics problem too hard for me. Can anyone give me hints how to find a solution? Consider a $4\times 4$ matrix with integer coefficients. Let its elements be $a_{i,j}$ for $1\leq i,j\leq 4$. Now form four sets $A_1$, $A_2$, $A_3$, $A_4$. Say that $A_1$ is the set of elements $a_{i,j}$. Also, $A_2$ is the set of elements $a_{i,j}+a_{i+1,j}+a_{i,j+1}+a_{i+1,j+1}$ i.e. the set of sums of elements of $2\times 2$-subsquares of the matrix. Similarly, denote by $A_3$ the set of sums of $3\times 3$-submatrices and $A_4$ the set containing the sum of all elements of the given $4\times 4$-matrix. Now, I heard a rumor that one can give an example of 16 integers $a_{i,j}$ such that all integers from 1 to 25 belong to $A_1 \cup A_2 \cup A_3 \cup A_4$. How can one find such an example? It is easy to see that at least some of the elements $a_{i,j}$ must satisfy $1\leq a_{i,j}\leq 25$ but there are still so many elements that finding such a matrix by brute force seems impossible. I was wondering if genetic algorithms or simulated annealing work for such a problem but I don't have enough experience to implement that. The best I know is that getting all integers from 1 to 24 is possible, for instance using the matrix: |
2020-05-17 18:49:47 +0100 | received badge | ● Popular Question (source) |
2019-11-13 18:44:45 +0100 | commented question | How to collect number with minimal number of rounds? Yes. My efforts are in https://stackoverflow.com/questions/5... . It looks they takes too much memory or time. |
2019-11-11 22:05:03 +0100 | asked a question | How to collect number with minimal number of rounds? Has someone an idea how to solve the following problem? Take the numbers 1,...,100000 and permute them in some way. At first you can make a swap of two numbers. Then you have to compute how many rounds it would take to collect numbers in ascending order. You have to collect numbers by every round by going left to right. In how many ways you can swap two numbers at the beginning to collect numbers in ascending order with minimum number of rounds? For example, if numbers are from one to five and those at the beginning in order 3, 1, 5, 4, 2, then you can collect them in three rounds: On first round you collect 1, 2, on the second round 3, 4 and finally 5. But you can do one swap in three different ways to collect numbers in two rounds, namely Five number sequence can be solved easily by brute force and I found an algorithm to collect 1000 numbers, but 100000 numbers needs maybe some kind of trick to compute fast how a specific swap at the beginning affects how many rounds it takes to collect numbers. |
2019-08-08 15:48:23 +0100 | asked a question | The shortest string containing all given substrings I found a problem from https://www.ohjelmointiputka.net/post... . An English translation goes like this: A person wants to learn playing tuba. His neigbours get angry for the noise so he tries to find a song that contains as few tunes as possible that he is able to play all four or less tune combinations. The tunes are c, d, e, f, g, a, and h. Output the minimal song. I tried a code from https://artofproblemsolving.com/commu... . But the validator on the site says that hccc is missing. So, how can I use Sagemath to solve the problem that if a set contains letters a, c, d, e, f, g, h, how to find the shortest string containing all one to four letter long substrings? |
2019-05-14 20:26:16 +0100 | commented question | A goat in a tether Actually it was not homework. I just wanted to learn Sagemath to do numerical integration. |
2019-05-01 09:21:40 +0100 | asked a question | A goat in a tether I would like to solve the following goat problem in sage. A goat is on the tether on the boundary of the circle with radius 10. What is the radius of the tether is the goat manages to eat half of the grass? I managed to solve it by Python when I derived the equation. But I was wondering if this can be solved by sage such that I make equations for circle with center (0,0) and radius 10 and circle with center (0,1) and radius x_1, compute the intersections numerically, find the area between curves numerically and iterate this for different radius x_n until the suitable accuracy is found. The problem, I found is that I don't know how to fund numerically the coordinates of the intersections of two circles and pass them to the numerical integrator. |
2019-04-23 00:08:51 +0100 | received badge | ● Famous Question (source) |
2018-12-14 19:49:22 +0100 | received badge | ● Famous Question (source) |
2018-03-27 10:47:55 +0100 | received badge | ● Notable Question (source) |
2018-03-27 10:47:55 +0100 | received badge | ● Popular Question (source) |
2017-01-23 23:45:40 +0100 | received badge | ● Famous Question (source) |
2017-01-09 16:49:07 +0100 | received badge | ● Notable Question (source) |
2016-10-24 14:35:26 +0100 | received badge | ● Popular Question (source) |
2016-10-22 04:59:14 +0100 | received badge | ● Nice Question (source) |
2016-10-11 10:09:00 +0100 | asked a question | How to find a polynomial identity to evaluate sum of fifth powers? I saw the following problem on a book of mine: Let $a,b,c\in \mathbb C$ satisfies $a+b+c=3,a^2+b^2+c^2=5, a^3+b^3+c^3=7$. Compute $a^5+b^5+c^5$. How one can do it by Sage? I found a mathematician who was able to find the identity that solves the problem. But can I use Sage to find the correct identity? |
2016-02-21 03:17:04 +0100 | received badge | ● Notable Question (source) |
2015-03-27 04:12:26 +0100 | marked best answer | Can I parse CSV data separated by \t to vectors I have a CSV data as follows: Is it possible to read that to vectors? I tried the following: What I would like to have is vectors of the form without those tabulators. |
2015-03-27 04:12:21 +0100 | marked best answer | Polynomials as a sum of squares Is it possible find a decomposition of a polynomial as a sum of squares in Sage if such representation is possible? For example, if I want to prove that $x^6 - x^5 + x^4 - x^3 + x^2 - x + 2/5>0$ for all $x\in\mathbb{R}$ then Sage would return for example $$\left (x^2\left (x - \frac{1}{2}\right)\right )^2+\left (\frac{\sqrt{3}x}{2}\left (x - \frac{2}{3}\right)\right )^2+\left (\sqrt{\frac{2}{3}}\left(x - \frac{3}{4}\right )\right )^2+\sqrt{\frac{1}{40}}^2$$ |
2015-03-27 04:09:09 +0100 | marked best answer | Computing permutations Is there a way to solve the following question is Sage? I have symmetric group $S_8$ and its elements $a=(x_1 x_2)(x_3 x_4),b=(x_5 x_6), c=(x_7 x_8)(x_9 x_{10})(x_{11} x_{12})(x_{13} x_{14})$ Here of course we might have $x_i=x_j$ if $i\ne j$. Is some given $(y_1 y_2)\in \langle a,b,c\rangle$? |
2015-03-27 04:08:56 +0100 | marked best answer | Reading a table to vectors I have a csv-file and I have read this in R code This outputs the data like Is there an easy way to split that data to vectors? Like A <- c(11, 34, 3.29, ..., 34), B <- c(22.33, 64, 1.150, ..., 123),...,E <- c(23.43, 0.236, 24.9655, ..., 23.344) I'm not sure if R-code output can be used as sage-code input, do formatting by Python and then convert code back to R. Edit. Sorry, I forgot to say that I read the data as in R-mode. |
2015-03-27 04:08:54 +0100 | marked best answer | Numerical and graphical summaries of data I have been given the following data: (more) |
2015-03-27 04:08:47 +0100 | marked best answer | Pearson correlation Is there a method in Sage to compute Pearson correlation of a finite set? I have data points $(x_1,y_1),\ldots,(x_6,y_6)$ and wondering if there is a shorter way to do it than just write one long expression. |
2015-03-16 23:50:10 +0100 | received badge | ● Notable Question (source) |
2015-03-16 23:50:10 +0100 | received badge | ● Popular Question (source) |
2015-03-16 23:49:20 +0100 | received badge | ● Popular Question (source) |
2015-02-01 16:31:43 +0100 | received badge | ● Notable Question (source) |