vv

12453 Reputation

19 Badges

9 years, 317 days

MaplePrimes Activity


These are replies submitted by vv

@Axel Vogt 

Ok, but what about symmetry?

If you want the coeffs expanded use:

sort(collect(p,N,expand));

 

I suggest to use the D1-math. Note that I used N instead of Nu (during the conversion D2-Math tio D1-Math).

You may of course write

% = 0

if you want.

@sunflower 

It is not that hard.
a)
k is the length of the largest number in the Pascal triangle. For example, if n=6, the largest number is binomial(6,3)=20, so k=2.

b) Each number in the triangle will be printed in a field of length 2k.

c) You shoud look at ?printf
E.g.
printf("   %4d%4d%4d\n", 5,10,200);


prints
      5  10 200
(notice the number of spaces; \n is for the newline).


 

 

 

Unfortunately both solutions may not work if det<=0; in John's, the symmetry is distroyed by RowOperation and in Carl's the determinant could be -2 (if n is even). So, RandomMatrix should be repeted until det>0. [the case det=0 is anyway "improbable"].
Another solution would be to start with an arbitrary nxn matrix B and compute const.B.Transpose(B) ; but in this case the result is not quite random, the matrix being nonnegative.

 

@Markiyan Hirnyk 

What general case? I have already said that all the cases are isomorphic, so one is enough.
Ok, I will stop here.

@Markiyan Hirnyk 

I told you the answer. My code was similar to kitonium's.
Do you mean that you cant modify that line in the code to obrain the answer 13? I do not beleve it because I know that you are a very good Maple programmer.

@Markiyan Hirnyk 

I know, and I answered to both versions. But you did not answer to my question.

@Markiyan Hirnyk 

You will have to alter a single line to obtain the other version of the problem.
But I suspect that you know this, so that I do not understand your intention with this problem. Was it a test for us? You should have mentioned this.

@Markiyan Hirnyk 

Why use DS for that?

Since you are interested only in the number of configurations, you may take any special case for the lines e.g. the displayed ones.

I wrote some "dirty" code and found that the number of configurations is 13 (or 9 if the points are not allowed in the same region).
I have not the patience to verify and clean the code, so I do not post it.

@Markiyan Hirnyk 

That is because the problem was not clear enough. If more than one point is permited in the same region, simply allow equal points in step 3 (so, 11^4 cases instead of binomial(11,4)).

@Markiyan Hirnyk 

The answer contains the algorithm. It is not difficult to program it in Maple.
Only the first step may need a little help from the simplex package if a complete automation is wanted.

@acer 

My point was: if in the Physics package `*` is redefined and the system is not affected, the why should we reject the same thing for `+`?

Of course, I also feel more comfortable if such basic operators are not redefined!

@acer 

Note also that the Physics package redefines `*`
So, as in your example, the conversion

convert([1,2,3], `*`);

will fail. Probably not a big loss.

 

There is a whole theory related to this sequence, see:

https://en.wikipedia.org/wiki/Logistic_map

 

@Mac Dude 

Yes, it would be nice to be ensured that a+b-b+c  is not going to be interpreted as a+c+c.

First 158 159 160 161 162 163 164 Page 160 of 166