Gerd

40 Reputation

One Badge

4 years, 151 days

MaplePrimes Activity


These are questions asked by Gerd

How can the Cartesian Product of sets be implemented recursively in Maple?
Let k be a positive integer and Si , i=1,...k be nonempty finite sets.
How can Mk:=S1 x S2 x ...x Sk be constructed with Maple by recursion?

From
with(numtheory):
msolve(x^2=-1,5);                                I get
                        {x = 2}, {x = 3}
But I need the integers 2 and 3. Who can help me?

Hallo;
the following MAPLE code generates 2-vectors. To collect them into a set K unfortunately does not work. K contains vectors two-fold etc. So K is not a set which I hoped to get. What is wrong?

restart:m:=5;#m Module
with(LinearAlgebra[Modular]):
K:={};
M:=Matrix([[3, 4*168], [4,3]]);
L:=Matrix([[3],[4]]);
#with(LinearAlgebra[Modular]):
for s from 0 to 10 do
a:=Mod(m,(M^s).L,integer);
K:=K union {a};
od:
K:=K;

Gerd

Page 1 of 1