vv

13837 Reputation

20 Badges

9 years, 319 days

MaplePrimes Activity


These are replies submitted by vv

@Chrono1 

For a polyhedron the same method can be used but the formulae for  anew,bnew in doit are more complicated.
Actually even for a non-regular tetrahedron these formulae are much more complicated.

 

@Carl Love 

And it's not so?

@Carl Love 

You are right, LinearAlgebra:-Generic works with GF. I had an error when I have checked but probably I forgot a restart.
So, a conversion is not needed.

@Magma 

LinearAlgebra[Generic] seems to be incompatible with GF.
So, I made some conversions.

I have also changed your example, because it was already in a reduced form and had the rank=3.

restart;
G := GF(2, 4);
p:=2;
ex := G:-extension;
z:=indets(%)[];
poly:=convert(ex,polynom);
#  A := `~`[G:-input](Matrix(3, 6, [[1, 0, 0, 5, 0, 4], [0, 1, 0, 8, 7, 2], [0, 0, 1, 3, 0, 1]]));
A0 := <1, 0, 0, 5, 0, 4; 2, 0, 3, 10, 7, 8; 1, 0, 3, 5, 7, 4>;
A := G:-input~(A0);
AA:=G:-ConvertOut~(A);
with(LinearAlgebra[Generic]):
GG[`0`] := 0:
GG[`1`] := 1:
GG[`=`] := `=`:
GG[`+`] := ()->modp(`+`(args),p):
GG[`-`] := (a,b)->`if`(nargs=1,modp(-a,p),modp(a-b,p)):
GG[`*`] := (a,b)->modp(Rem(a*b,poly,z),p):
GG[`/`] := proc(a,b) local i;
             if b=0 then error "division by zero"; end if;
             Gcdex(b,poly,z,'i') mod p;
             Rem(a*i,poly,z) mod p;
           end proc:
ReducedRowEchelonForm[GG](AA);
G:-ConvertIn~(%);
G:-output~(%);

 

@mmcdara 

Yes, such an m exists. But unfortunately it depends on (a,b,c) which does not make the inequality very interesting.

@mmcdara 

You seem to consider the question as being about uniform distributions.
The solution was just a simple and quick way to obtain the counterexample. The "guess measure" is just a (not very useful) by-product. But I agree that a more natural (not necessarily quicker) and uniform way do generate a,b,c is  sort( ['r()' $3] ).

@Rouben Rostamian  

The problem has much in common with dynamical billiards (see wiki), so, an animation would be also nice.

@Preben Alsholm 

But waiting, we also have a measure of how far was the guess.

@mmcdara 

OK, but I met Olympiad students who know Newton's formulae. It's a good opportunity for the OP to know about them.

@mmcdara 

The standard and straightforward way to solve such problems is via Newton's identities.

s[0]:=3: s[1]:=1: s[2]:=2:    #   s[3]:=3:
for n from 3 to 30 do
s[n]:=s[n-1]+1/2*s[n-2]+1/6*s[n-3] od;

Wasn't this problem clarified in your previous https://www.mapleprimes.com/questions/226681-How-To-Plot-Multiple-Functions-In-One-Plot ?

Note that some of your functions (RootOfs) are discontinuous, and the option discont cannot change this (it only may remove some segments near the "jumps").

@D-V 

I suppose that you want to change the interval from [0,2*Pi]  to  [0,5], so that the period will be 5 (for the periodic extension of the function f restricted to [0,5]).
The formulae for the coefficients must be adapted:

restart;
a := (n,f,t1,t2)   -> 2/(t2-t1)*int(cos(2*Pi*n*t/(t2-t1))*f(t),t=t1..t2);
b := (n,f,t1,t2)   -> 2/(t2-t1)*int(sin(2*Pi*n*t/(t2-t1))*f(t),t=t1..t2);
S := (n,f,t1,t2,t) -> a(0,f,t1,t2)/2 + add(a(k,f,t1,t2)*cos(2*Pi*k*t/(t2-t1)) +
                                           b(k,f,t1,t2)*sin(2*Pi*k*t/(t2-t1)), k=1..n):

f:=t -> t^2;
plot([f(t),S(8,f,0,5,t)], t=0..5);

 

Note also:

periodic_extension := proc(f::procedure, t1, t2)
  proc(t) f(t - floor((t-t1)/(t2-t1))*(t2-t1)) end
end:

plot([periodic_extension(f,0,5)(t),S(8,f,0,5,t)], t=-5..15);

 

Are you an alias of guru kido    ? Same problem, hand written formulae?

There were a couple of replies in this thread (including mine) which you have deleted. Why?

@guru kido 

The problem is an iterative solver for a linear system.
There are many algorithms for this. For one them you already got a working code.
Why don't you present completely the algorithm you are trying to use now?

First 62 63 64 65 66 67 68 Last Page 64 of 176