Fix the error "division by zero" in maple - math

I have three equations and three unknowns. When I run it in Maple, I get the error "division by zero". What should I do to fix this error?Do you know the reason for this, please?
This is the Maple code
restart;
r := 32*(6*m^2*xi + m^2 + 1)*(alpha*m^2 - 4*xi*sqrt(m^2/xi) + alpha)^2/(m^2*(alpha*m^2 - 16*xi*sqrt(m^2/xi) + alpha)^2*xi);
ns := -((m^2 + 1)*alpha*(alpha^2*(1/6 + xi)*m^6 + ((2*xi + 1/2)*alpha^2 - 3500*xi^2 - (1750*xi)/3)*m^4 + ((xi + 1/2)*alpha^2 - 8*xi^2 - (1762*xi)/3)*m^2 + alpha^2/6 - 4*xi)*sqrt(m^2/xi) - (2*alpha^2*(1/6 + xi)*m^8)/3 + (((2*xi)/3 + 1/3)*alpha^2 - 16*xi^2 - (8*xi)/3)*m^6 + (((10*xi)/3 + 5/3)*alpha^2 + (8*xi)/3)*m^4 + ((2*xi + 17/9)*alpha^2 + (16*xi)/3)*m^2 + (2*alpha^2)/3)/(2*sqrt(m^2/xi)*m^2*(6*m^2*xi + m^2 + 1)*xi*(alpha*m^2 - 4*xi*sqrt(m^2/xi) + alpha));
nt := -((alpha*m^2 - 4*xi*sqrt(m^2/xi) + alpha)*(alpha*(m^2 + 1)*sqrt(m^2/xi) - 4*m^2))/(12*sqrt(m^2/xi)*xi*m^2);
solve([0.9605 <= ns and ns <= 0.9693, 0 < r and r < 0.056, -0.76 < nt and nt < 0.52], {alpha, m, xi});
I tried to use help maple and use the command it wrote. But either I don't know how to write the command or this command is not correct to use.
here is the link to some pictures of my work:command in help maple
error in program

Related

Solve multi-objective optimization problem with R package rmoo

The documentation to this packages is available here, but for me it is impossible to transfer my real-valued 3 objective function to a form that it works.
I'm trying to solve it with the nsga2 function - and I think nsga3 should work the same way?!
My objective functions, which I want to minimize, are:
f1 <- 1640.2823 + 2.3573285*x[1] + 2.3220035*x[2] +4.5688768*x[3] + 7.7213633*x[4] + 4.4559504*x[5]
f2 <- 6.5856 + 1.15*x[1] - 1.0427*x[2] + 0.9738*x[3] + 0.8364*x[4] - 0.3695*x[1]*x[4] + 0.0861*x[1]*x[5] + 0.3628*x[2]*x[4] - 0.1106*x[1]^2 - 0.3437*x[3]^2 + 0.1764*x[4]^2
f3 <- -0.0551 + 0.0181*x[1] + 0.1024*x[2] + 0.0421*x[3] - 0.0073*x[1]*x[2] + 0.024*x[2]*x[3] - 0.0118*x[2]*x[4] - 0.0204*x[3]*x[4] - 0.008*x[3]*x[5] - 0.0241*x[2]^2 + 0.0109*x[4]^2
And x has to be between one and three (these are the constraints)
1 <= x[i] <= 3
I appreciate any hints... so many thanks in advance!

Prove recursion: Show that M(n) >= 1/2 (n + 1) lg(n + 1)

I want to show that the recursion of quicksort run on best time time on n log n.
i got this recursion formula
M(0) = 1
M(1) = 1
M(n) = min (0 <= k <= n-1) {M(K) + M(n - k - 1)} + n
show that M(n) >= 1/2 (n + 1) lg(n + 1)
what i have got so far:
By induction hyposes
M(n) <= min {M(k) + M(n - k - 1} + n
focusing on the inner expresison i got:
1/2(k + 1)lg(k + 1) + 1/2(n - k)lg(n - k)
1/2lg(k + 1)^(k + 1) + 1/2lg(n - k)^(n - k)
1/2(lg(k + 1)^(k + 1) + lg(n - k)^(n - k)
1/2(lg((k + 1)^(k + 1) . (n - k)^(n - k))
But i think im doing something wrong. i think the "k" should be gonne but i cant see how this equation would cancel out all the "k". So, probably, im doing something wrong
You indeed want to get rid of k. To do this, you want to find the lower bound on the minimum of M(k) + M(n - k - 1). In general it can be arbitrarily tricky, but in this case the standard approach works: take derivative by k.
((k+1) ln(k+1) + (n-k) ln(n-k))' =
ln(k+1) + (k+1)/(k+1) - ln(n-k) - (n-k)/(n-k) =
ln((k+1) / (n-k))
We want the derivative to be 0, so
ln((k+1) / (n-k)) = 0 <=>
(k+1) / (n-k) = 1 <=>
k + 1 = n - k <=>
k = (n-1) / 2
You can check that it's indeed a local minimum.
Therefore, the best lower bound on M(k) + M(n - k - 1) (which we can get from the inductive hypothesis) is reached for k=(n-1)/2. Now you can just substitute this value instead of k, and n will be your only remaining variable.

Defining a particular polynomial ring in some CAS (Computer Algebra System)

I'm interested in defining the following polynomial quotient ring in some CAS (Singular, GAP, Sage, etc.):
R = GF(256)[x] / (x^4 + 1)
Specifically, R is the set of all polynomials of degree at most 3, whose coefficients belong to GF(256). Two examples include:
p(x) = {03}x^3 + {01}x^2 + {01}x + {02}
q(x) = {0B}x^3 + {0D}x^2 + {09}x + {0E}
Addition and multiplication are defined as the per ring laws. Here, I mention them for emphasis:
Addition: The corresponding coefficients are XOR-ed (the addition law in GF(256)):
p(x) + q(x) = {08}x^3 + {0C}x^2 + {08}x + {0C}
Multiplication: The polynomials are multiplicated (coefficients are added and multiplicated in GF(256)). The result is computed modulo x^4 + 1:
p(x) * q(x) = ({03}*{0B}x^6 + ... + {02}*{0E}) mod (x^4 + 1)
= ({03}*{0B}x^6 + ... + {02}*{0E}) mod (x^4 + 1)
= ({1D}x^6 + {1C}x^5 + {1D}x^4 + {00}x^3 + {1D}x^2 + {1C}x + {1C}) mod (x^4 + 1)
= {01}
Please tell me how to define R = GF(256)[x] / (x^4 + 1) in a CAS of your choice, and show how to implement the above addition and multiplication between p(x) and q(x).

what is the right answer in infix to postfix convertion

I have the next infix expression:
(i730 + ssg2LQ) + ((+ G0 /(3064 + 68324.06)) / 28)
and I try to convert it to postfix notation, for this I used some on-line converters and all of them gave me the answer
1730 sg2LQ + G0 3064 68324.06 + / + 28 / +
but someone told me that the answer was
i730 sg2LQ + G0 + 3064 68324.06 + / 28 / +
and now I am confused, who is right? who is wrong? how is this expression properly converted?
The second answer
i730 sg2LQ + G0 + 3064 68324.06 + / 28 / +
is definitely wrong because it will first compute (i730 + ssg2LQ) + G0.
Perhaps this answer was obtained by a tool that was confused by unary +.

Solving maximum weighted matching with capacity > 1 in GLPK

When solving a regular maximum weighted matching problem in GLPK, one would provide a DIMACS file and call glp_asnprob_lp with GLP_ASN_MMP. However, this will set all the constrains to <= 1, for example
Subject To
r_1: + x(1,9) + x(1,10) + x(1,12) <= 1
r_2: + x(2,10) + x(2,12) + x(2,13) <= 1
r_3: + x(3,11) + x(3,13) <= 1
r_4: + x(4,9) + x(4,12) + x(4,14) <= 1
I want each node to have a higher capacity (say 10), hence the constrains would be:
Subject To
r_1: + x(1,9) + x(1,10) + x(1,12) <= 10
r_2: + x(2,10) + x(2,12) + x(2,13) <= 10
r_3: + x(3,11) + x(3,13) <= 10
r_4: + x(4,9) + x(4,12) + x(4,14) <= 10
How do I go about it? I really don't want to have to build my own matrix.

Resources