Items tagged with algorithm algorithm Tagged Items Feed

Hi all

Can anybody suggest an algorithm allowing to detect, that two matrices of the same size can be obtained each from other by permutations of rows and columns? Maybe, such an algorithm there exists in LinearAlgebra package?

Good day everyone, please help in writing finite difference algorithm for these coupled nonlinear ODE. See it here Algorithm.mw 

#page 320 and 322 of book Singular introduction to commutative algebra

it return too many recursion 

 

hilbertseries([a+a*c, a+a*b, a+b+c]);

eq1 := a+a*c;

eq2 := a+a*b;

eq3 := a+b+c;

eq1a := Homogenize(eq1, h);

eq2a := Homogenize(eq2, h);

eq3a := Homogenize(eq3, h);

T3:=lexdeg([a,b,c,h]);

GB := Basis([eq1a,eq2a,eq3a], T3); #a

 

#MonomialHilbertPoincare(LeadingMonomial(GB[1],T3), LeadingMonomial(GB[2],T3), LeadingMonomial(GB[3],T3));

 

with(PolynomialIdeals):

MonomialHilbertPoincare := proc (I3)

#I3:=[LeadingMonomial(GB[1],T3), LeadingMonomial(GB[2],T3), LeadingMonomial(GB[3],T3)];

T2:=lexdeg([h,c,b,a]);

varj := [h,c,b,a];

I2 := InterReduce(I3, T2);

s := nops(I2);

if I2[1] = 0 then return 1 end if:

if I2[1] = 1 then return 0 end if:

if degree(I2[s]) = 1 then return (1-varj[1])^s end if:

lt := LeadingTerm(I2[s],T2);

leadexp := [degree(lt[2],h),degree(lt[2],c),degree(lt[2],b),degree(lt[2],a)];

j := 1;

for z from 1 to nops(leadexp) do

                if leadexp[j] = 0 then

                                j := j + 1;

                end if:

od:

finallist := [];

for z from 1 to nops(GB) do

                finallist := [op(finallist), GB[z]+varj[j]];

od:

quotientlist := Generators(Quotient(GB, varj[j]));

finallist2 := [];

for z from 1 to nops(quotientlist) do

                finallist2 := [op(finallist2), op(z,quotientlist)];

od:

return MonomialHilbertPoincare(finallist) + varj[1]*MonomialHilbertPoincare(finallist2);

end proc;

F:=[LeadingMonomial(GB[1],T3), LeadingMonomial(GB[2],T3), LeadingMonomial(GB[3],T3)];

MonomialHilbertPoincare(F);

 

 Do Hilbert series function classify all or only some type or some form of ideals?

 

Hi

I'm dealing with 2nd order ODE on Maple. By using " infolevel 5" Maple tell me that it use Kovacic's algorithm to find the solution. Could anybody tell me how or at least some idea so that I can go on this my self. Following here my ODE

Thank you so much

Chaimongkol

Hello!

I would like to start with the following set of 9 elements,
A = { E11, E12, E21, E22, E11+E12, E11+E21, E12+E22, E21+E22, E11+E12+E21+E22 }.

I need a procedure that takes each of those elements and creates 3 new ones in the following way: Eij becomes Eij1, Eij2, Eij1+Eij2. So for example, E11 will become: E111, E112, and E111+E112. And for example the fifth element in A (i.e. E11+E12) will become the 3 new elements: E111+E121, E112+E122, and E111+E121 + E112+E122.

Since each of the 9 elements gets triplicated, there will be a new set, call it B, with 27 elements.

B = {E111, E112, E111+E112, E121, E122, E121+E122, ... }

Now I want to repeat this process of triplicating again so that, for example, E111 becomes: E1111, E1112, and E1111+E1112. And so on. This new set C will have 81 elements. Now I want to repeat this one last time. The final set, D, will have 243 (3^5) elements. 

Step 2: 

For every pair of elements x and y in D, I want to compute z:=(x+y)mod2. If z already belongs to D, discard it, otherwise, place z in the set D2. Do this until there are no more elements to add together (note that if x+y is computed then I don't want y+x to be computed also--that's inefficient). Maybe the most efficient way is to perform all possibly combinations of x+y mod 2 to create the set D2 and then just go: D2 setminus D.

Step 3: For x in D and y in D2 perform all possible combinations of z:=(x+y)mod2 and place these in D3 then perform set subtraction again: D3 minus D2 minus D.

Repeat this process again: x in D and y in D3 to create new elements in D4. Repeat again until Dm is empty (that is, D(m-1) will be the last set that contains new elements). I'm expecting around 12 sets... 

The issue with this whole algorithm is that I often run out of memory so I need a clever way to do this, since this algorithm is essentially classifying 2^32 elements into disjoint sets. Thank you! 

Hi,

I have the a code with some parameters including

Nr= 0, 50, 100

Ha=0, 5, 10

EPSILONE= 0, 0.5, 1

Phiavg= 0.02, 0.06, 0.1

0.1<NBT<10

I can give the solution for higher values of 5<NBT<10 and there is no problem. However, As I reduce the values of NBT, the convergence of the problem is hard. for some values of parameters I cannot find the solution. for example:

Nr=Ha=0

EPSILONE=1

Phiavg=0.06

NBT=0.3

 

I would be most grateful if you can tel me how change the algorithm to find the solution in the range of all parameters.

Many thanks for your attentions in advance

The code has been attached

code_7-8-2014_(1).mw

 

Amir

I'm interested in doing some experimental mathematics using the PSLQ integer relation algorithm.  The only third-party program for doing PSLQ problems I've been able to find is a GNU C++ program with a less-than-user-friendly command-line interface.  I've heard that Maple implements PSLQ and I like the symbolic input and presentation it offers as a CAS, but I can't find any information on which alternative types of Maple 18 make the PSLQ algorithm available.

about quicksort...

June 01 2014 taro 110

Dear people in Mapleprimes,

I calculated the following Quick Sort algorithm.

 

restart;
quicksort:=proc(A::array(1,numeric),
m::integer, n::integer) 
local partition, p;

partition:=proc(m,n)
i:=m;
j:=n;
x:=A[j];
while i<j do
if A[i]>x then
A[j]:=A[i];
j:=j-1;
A[i]:=A[j];
else
i:=i+1;
end if;
end do;
A[j]:=x;
p:=j;

end proc:

if m<n then
p:=partition(m,n);
quicksort(A,m,p-1);
quicksort(A,p+1,n);
end if;
eval(A);
end proc:

trace(quicksort);

a:=array([2,4,1,5,3]);

quicksort(a,1,5);

 

Then, in the answer, there was a sentence that

{--> enter , quicksort, , args = , a, , , 2, , , 2

........................

{--> enter , quicksort, , args = , a, , , 4, , , 5

I could understand the reason of the "{--> enter , quicksort, , args = , a, , , 2, , , 2," 

but, I could not understand why 4, , , 5 could appear here. I think there is no reason why n that is the number at 5 

increased from 2 to 5. I thought n continues to be 2.

I hope you will give me some hint for this understanding.

 

I thought it with a lot of time. And, I don't know whether this place is an appropriate place to ask this question.

But, I will be very glad if you teach me some of this.

 

Best wishes.

 

taro

 

 

 

 

 

if there is a set of identities, such as a+b = b+a, a^2 = 2*a + 1

and one input or a few input,

how to make use of these identities to derive some output?

any algorithm can do this?

we use modern computer algebra books

i) computer the GSO of (22,11,5),(13,6,3),(-5,-2,-1) belong to R^3.

ii)trace algorithm 16.10 on computer a reduced basis of the lattice in Z^3 spanned by the vectors form(i).

trace also the values of the d_i and of D, and compare the number of exchange steps to the theoretical upper bound from section 16.3

 

we use Modern Computer Algebra book  

trace algorithm 15.2 on factoring f=30x^5+39x^4+35x^3+25x^2+9x+2 belong to Z[x].choose the prime p=5003 in step.

I have recently written a maple program to deconvolute gamma-ray spectra using the Richardson-Lucy algrithm. Although this method works well I would prefer to use a method based on the Maximum Entropy algorithm, and would like to know if anyone has tried to write a Maple program to deconvolute 1 dimensional data?

Greetings to all.

At the following Math.Stackexchange Discussion a certain constant was computed in relation to a Master Theorem Type recurrence being solved. This prompted me to try to identify it by the use of the eponymous command. What follows is the content of the Maple session. You may want to read the post in order to get an understanding of what the constant means and how its exact value is calculated.

> fsolve(2/2^a+1/4^a=1, a);
                                   1.271553303

> identify(%);
                                   1.271553303

> identify(%,all);
                                 1/2    1/2
                              2 2      3
                      arcsech(------ + ---- - 1/6 Zeta(5))
                                7       6

> evalf(log[2](1+sqrt(2)));
                                   1.271553303

My questions/observations are:

  • Why does the algorithm fail to spot as simple a constant as the one above or am I just not invoking it correctly?
  • If that last formula were true the author of this code would certainly win a prize for calculating a closed form expression for an odd integer zeta function value! (To be fair here I did notice that the spurious identification disappears when the number of working digits is increased and I do understand that the identification depends critically on the number of digits.)

In concluding I would like to say, why the complicated formula and not the simple one? Let me congratulate you just the same on providing this very useful command. I have worked on pandigital approximations which are slightly related and I understand that adding an operation like the logarithm to an integer base up to some max base value can dramatically increase the search space and may not always be feasible.

Best regards,

Marko Riedel

Trace  on computing the distinct-degree decomposition of the squarefree polynomial
f=x^17+2x^15+4x^13+x^12+2x^11+2x^10+3x^9+4x^4+3x^3+2x^2+4x belong to F_5[x].tell from the output only how many irreducible factors of degree i the polynomial f has, for all i.

 

1 2 3 4 Page 1 of 4