2021-11-02 15:15:08 +0100 received badge ● Popular Question (source) 2021-08-17 19:59:08 +0100 received badge ● Popular Question (source) 2021-01-25 18:04:36 +0100 commented answer Arithmetic operation is not working in finite field GF(4091^2)? @ tmonteil What is the solution then? 2021-01-25 14:31:08 +0100 asked a question Arithmetic operation is not working in finite field GF(4091^2)? I am facing problem during arithmetic operation in $GF(4091^2)$. But everything working fine in $GF(13^2)$ as Var('x') F. = GF(13^2) a=F.fetch_int(150)+F.fetch_int(97) print a  How can I fix this? 2021-01-25 13:35:17 +0100 asked a question How to do arithmetic operation of elements in finite field? Let us consider an example: Var('x') F. = GF(13^2)  We consider two elements 2*x + 11, 3*x + 2 corresponding to the integers 37 and 41 respectively. Now we can operate them as a=F.fetch_int(37)+F.fetch_int(41) m=F.fetch_int(37)*F.fetch_int(41)  We have a=4*x + 10 , m= 4*x + 10 In reverse way we can get the corresponding integers as : ai=a.integer_representation() mi=m.integer_representation()  That is, ai=65, mi=62 How can I do the same for the field GF(251) using the same function? 2021-01-25 09:02:29 +0100 received badge ● Associate Editor (source) 2021-01-25 03:23:09 +0100 asked a question Solve system of equations in a finite field I would like to generate and solve a system of equations in both GF(251) and GF(13^2) using the same function. Let us illustrate it in $GF(251)~ [or~ GF(13^2)]$, Equation construction part: $\phi(x)=a_0+a_1x+a_2x^2$, where $a_0,a_1,a_2\in GF(251) ~[or~ GF(13^2)]$. Solve system of equations: $a_0+a_1.\alpha_1++a_2.\alpha_1^2=\phi(\alpha_1)$ $a_0+a_1.\alpha_2++a_2.\alpha_2^2=\phi(\alpha_2)$ $a_0+a_1.\alpha_3++a_2.\alpha_3^2=\phi(\alpha_3)$ where $\alpha_1,\alpha_2,\alpha_3\in GF(251) ~[or~ GF(13^2)]$. MWE: Case -I : $GF(251)$ Choose $(a_0,a_1,a_2)=(5,123,49)\in GF(251)$. $(\alpha_1,\alpha_2,\alpha_3)=(1,2,3)\in GF(251)$. Then $\phi(x)=5+123x+49x^2$, and the system of equations becomes $a_0+a_1.1++a_2.1^2=\phi(1)=177$ $a_0+a_1.2++a_2.2^2=\phi(2)=196$ $a_0+a_1.3++a_2.3^2=\phi(3)=62$ Case -II : $GF(13^2)$ Choose $(a_0,a_1,a_2)=(5,123,49)=(5, 9x + 6, 3x + 10) \in GF(13^2)$. $(\alpha_1,\alpha_2,\alpha_3)=(1,2,3)\in GF(13^2)$. Then $\phi(x)=5+(9x + 6)x+(3x + 10)x^2$ and the system of equations becomes $a_0+a_1.1++a_2.1^2=\phi(1)=12x + 8$ $a_0+a_1.2++a_2.2^2=\phi(2)=4x + 5$ $a_0+a_1.3++a_2.3^2=\phi(2)=2*x + 9$ How can I do the above using the same function for the both filed $GF(251)$ and $GF(13^2)$? 2021-01-20 10:52:20 +0100 asked a question How to index all elements of a finite field? I would like to assign an integer corresponding to element of a finite field $GF(p^m)$, where $p^m\in[ {13^2,3^5, 131,137,139,251}]$ MWE:  F. = GF(3^5, impl='givaro')  THe elements of GF(3^5) are 0,1,2,x,x^2 etc, we would like to indexing each element such as $0-->0, 1-->1,2-->2,x-->3, x^2--4$ etc. Not only that, if I call any element for example if I call x^2 it should rerun 4 and conversely. This process should work for the field order prime $p^m, m=1$ also. How can I do this? 2020-11-30 10:58:41 +0100 commented answer Error: No module named 'sagenb' @ JohnPalmieri I did according to you, but shows access denied: Access to the file was deniedThe file at file:///home/mks/.local/share/jupyter/runtime/nbserver-9493-open.html is not readable. It may have been removed, moved, or file permissions may be preventing access. ERR_ACCESS_DENIED 2020-11-30 04:22:19 +0100 commented answer Error: No module named 'sagenb' @ EmmanuelCharpentier BUt it does not solve my problem how to fix it? 2020-11-29 12:24:26 +0100 asked a question Error: No module named 'sagenb' SageMath is not working on Ubuntu 20.04. When I am going to open notebook interface it show the following errors: https://imgur.com/a/aQQkUSQ How can I fix this? 2020-10-30 12:02:16 +0100 commented answer Crash with polynomial over "Givaro" finite field @ tmonteil Is there any package instead of "givaro" which has no bug? 2020-10-02 01:48:21 +0100 asked a question Crash with polynomial over "Givaro" finite field I would like to solve a system of equations in a finite field of prime order $p$ (illustrated below with $p = 229$). The system consists in four equations and has four unknowns $a_0$, $a_1$, $a_2$, $a_3$. It depends on parameters $\alpha_i$, $b_i$, all in $F(p)$, for $i = 1, 2, 3, 4$. The four equations are $$a_0 + a_1 \alpha_1 + a_2 \alpha_1^2 + a_3 \alpha_1^3 = b_1$$ $$a_0 + a_1 \alpha_2 + a_2 \alpha_2^2 + a_3 \alpha_2^3 = b_2$$ $$a_0 + a_1 \alpha_3 + a_2 \alpha_3^2 + a_3 \alpha_3^3 = b_3$$ $$a_0 + a_1 \alpha_4 + a_2 \alpha_4^2 + a_3 \alpha_4^3 = b_4$$ To do this I have tried with the following examples: pm = 229 bp = 229 F. = GF(pm, impl='givaro') R. = PolynomialRing(F) def NP(a): return F(ZZ(a).digits(bp)) # integer to polynomial eqns = [a0 + a1*NP(2) + a2*NP(2)^2 + a3*NP(2)^3 - NP(78), a0 + a1*NP(3) + a2*NP(3)^2 + a3*NP(3)^3 - NP(136), a0 + a1*NP(4) + a2*NP(4)^2 + a3*NP(4)^3 - NP(179), a0 + a1*NP(5) + a2*NP(5)^2 + a3*NP(5)^3 - NP(166)] A = matrix(F, [[eqn.coefficient(b) for b in R.gens()] for eqn in eqns]) b = vector(F, [-eqn.constant_coefficient() for eqn in eqns]) X = A.solve_right(b) print(X)  But it shows erros: Unhandled SIGSEGV: A segmentation fault occurred. This probably occurred because a *compiled* module has a bug in it and is not properly wrapped with sig_on(), sig_off(). Python will now terminate. ------------------------------------------------------------------------ /usr/share/sagemath/bin/sage-python: line 2: 7655 Segmentation fault (core dumped) sage -python "$@"  How can I fix this? 2020-09-19 13:40:31 +0100 received badge ● Scholar (source) 2020-09-19 13:40:25 +0100 received badge ● Supporter (source) 2020-09-19 12:34:11 +0100 asked a question How to express elements in a field of prime order and power of a prime order using the same function? When field size is of the form$p^m$, where$p$is a prime and$m>1$is a positive integer, there is no problem. For example F. = GF(5^2) print F.fetch_int(4)  It outputs : 4. But if we take field size is in the form$p^1$, then the above code does not working. For example F. = GF(5^1) print F.fetch_int(4)  It gives errors. How can I fix this using the same function in both the cases? 2020-03-04 05:34:20 +0100 asked a question Wrong solution: system of equation by symbolic operator I would like to solve the following system of equations over$\mathrm{GF}(17^2)$: var('x') F. = GF(17^2, name='x', modulus=x^2 + x + 1) R. = PolynomialRing(F) eqns = [a0+a1*x^2 - 7, a0+a1*x^3 - (7*x+14)] A = matrix(F, [[eqn.coefficient(b) for b in R.gens()] for eqn in eqns]) b = vector(F, [-eqn.constant_coefficient() for eqn in eqns]) Y=A.solve_right(b) print Y  It produces : (16x + 15, 8x + 16) But the correct solution is (3x+10,7x+7). How can I fix this problem? 2019-08-02 07:11:45 +0100 received badge ● Popular Question (source) 2019-02-03 14:31:32 +0100 asked a question How to plot a diagram of a circle obtained by section of a sphere by a plane A circle is a section of a sphere by a plane, the equation \begin{equation} x^2+y^2+z^2+2gx+2fy+2hz+d=0\tag{1} \end{equation} and \begin{equation} ax+by+cz=p\tag{2} \end{equation} together represent a circle. How do I plot like these diagram for given$g,f,h,a,b,c,p$. How to input by using @interact for the parameter$a,b,c,p\$ to move the plane through the sphere ? 