3000 Reputation

16 Badges

5 years, 187 days

MaplePrimes Activity

These are replies submitted by mmcdara

Just a simple reply, @acer will probably give you a more substantial answer.
Meanhile you can find here mathml_overscripts.htm the basic elements of MathML language.
A list of MathML codes can be found here special_ascii_characters.

the command nprintf(`"%1.3e", p) enables a fine control of the display of the number p, but p is not displayed as a number (default Times font) but as a name (Times italic font).
nprintf(`#mn(\"%1.3e\");` , p) is the way to avoid the italic font.
Note that nprintf(`#mi(\"%1.3e\");` , p) forces the italic font and its eqivalent, in this case, to nprintf(`"%1.3e", p).

A few simple examples are given in the attached file.


Without any aditional constraint MMA's answer {1, 2, 3, 4, 7, 8} is not "better" than any of the other answers Tom provided.
Things could be different if edges (or vertices) had weights and if you wanted to find, among all equivalent vertex cuts, assuming there are many, the one (the ones?) wich minimizes (minimize) some weight loss.

An illustration is provided here


I had the same naive idea... whose main limitation is that the number of possibilities to examine is V!/C!/(V-C)! (V= number of vertices, C= connectivity number [28 for graph G2]).
Nonetheless I vote up.


Thank you acer. 

It hadn't occurred to me to remove the alias.


It's perfect.
If I understand correctly the key was to use the neutral Diff instead of diff in the definition of kin?

So I generalized what you said to a more complex problem which consists in buiding a single dof (degree of freedom) system equivalent, in a given sense, to a 2 dof system.

There still remain a little problem for more complex expressions of phi. as illustrated below

value(eval((Diff(Phi, t, t), Phi=psi))
                         / d  / d   \\
                       k |--- |--- X||
                         \ dt \ dt  //
value(eval(Diff(Phi, t, t), Phi=psi))
            /                              2    \
            |/ d  / d   \\          / d   \     |
            ||--- |--- X|| cos(X) - |--- X|  psi|
            \\ dt \ dt  //          \ dt  /     /

How can I get rid of psi and have sin(X) instead?

Thanks again.


Great !


I vote up!

Years ago, I coded the Winding Number method in Fortran. It was a nightmare because of the definition of the trigonometric functions and the precision of the calculations.
I'm stunned that it is (almost) that simple in Maple.

PS : I didn't tested your code but I imagine it could be caught off guard in some complex cases (possible examples: a crossed polygon, a polygonal domain whose boundary is traveled by turning alternately clockwise and counterclockwise, an edge aligned with the point whose position is checked)?

@Carl Love 

I always wondered why PolyhedralSets does not accept floating point coordinates?
Every time I use it, I have to convert the list of points to a list of rationals.
Is there an algorithmic reason for this? 

@Ronan answer and an a posteriori proof to @Carl Love claim

t1 := taylor(sin(x), x = 0, 10):
t2 := taylor(sin(x)*cos(x), x = 0, 10):

ratios := coeff~(t1, x, [seq(1..10, 2)]) /~ coeff~(t2, x, [seq(1..10, 2)])
                      [   1  1   1    1 ]
          ratios :=   [1, -, --, --, ---]
                      [   4  16  64  256]

# recurrence of the consecutive ratios:

genfunc:-rgf_findrecur(1, ratios, ratio, n);
                   ratio(n) = - ratio(n - 1)


@Carl Love 

Thanks, intersting remarks.

  • About the "continuity correction": you're right, I wrote my answer too quickly.
    I've planned to complete the test by a gaussian (or an exponential) approximation but it appeared that even for large values of n Probability seems to work correctly and that there is no need (?) to do something more.
  • Is "my" test "exact and simple"?
    In R the implementation of the binomial test is termed "exact", but the "exact" estimation of the confidence interval comes from a more complex formula binom.test.html.
    See also Binomial_proportion_confidence_interval (Clopper-Pearson interval, we can interpret from a bayesian point of view).
  • Finally "A lack of sufficient evidence for a hypothesis ..."
    I completely agree with what you say and I sacrificed to the "convention" to return only an accepted/rejected message. Wich is too simple a way to correctly describe what the test says.
    Far more convenient forms (And I suspect it's what you have in mind) are "the test doesn't provide enough evidence to reject the null hypothesis" and "the test provides strong evidence to reject the null hypothesis".
    Similarly, I had thought of returning a p-value, but there are actually so many misinterpretations about it that I decided not to do so.

PS: I wasn't aware of the name "binomial test" befor the OP asxed his question.
More generally, given a Binomial(n, p) random variable X and two probabilities alpha and beta such that 0 <= alpha < beta <= 1, it's just the problem of building the dispersion interval (not the confidence interval!) Quantile(X, alpha)..Quantile(X, beta) and look where some given value k is is situated with regard to this interval
Ignoring this could lead us to introduce as many test names as there are different distributions: geometric test, Pooisson test, unifotm test, ...


I suggest that you modify the procedure as follows

  lb   := floor(Quantile(B, beta)):
  ub   := ceil(Quantile(B, 1-beta));
  printf("Range of accepted values = %d..%d\n", lb, ub):

This reminds me of a problem I faced years ago. I believe the answer from the hotline was that plosetup (as some other commands) was not supported by the maple/cmaple online command

I am waiting for a more substantial answer from a more experienced member.

PS: Same error with Maple2015.2  on Mac OSX  (maple command)




I agree that the uniqueness of the linear combination makes the family free.
What is curious is that French Math Courses (FMC) generally present the things this way:

  1. definition of a free family f={v1, ...vN}
  2. definition of a generating family (every vector is a linear combination of elements if F [note there is no uniqueness here])
  3. definition of a basis : a free generating family.

But it's more seldom to read (FMC) that a basis is defined by "each vector is a unique combination ...).

If I'm not mistaken, I think I understood that you know a little French? I allow myself to give you this reference
Définition d'une base
A family of vectors of E is a basis of E if it is both a generating family of E and a free family. Equivalently a family is a basis of E when every vector of E is a unique linear combination of the vectors of this basis.

Are there "pathological" situations that could justify this 3 stage definition of a basis instead of the the one underlined above?

1 2 3 4 5 6 7 Last Page 1 of 80