Carl Love

Carl Love

28055 Reputation

25 Badges

13 years, 0 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@Christopher2222 

I don't see how that it's possible that the spam accounts are not being included in the count. Most spam is deleted without being marked as spam. If it's not marked as spam, how could it be subtracted from the total count? I estimate that there's 15 spam per night (Eastern Time), 6 days per week (they seem to take Sunday off). That's about 5000 accounts per year. There's probably also spam that occurs during my day time that is deleted before I see it.

@mahmood180 

Sigh. I guess that you're using an older Maple and that it doesn't allow the transposing of Arrays. Change the code to

restart;

t_f:= 1:  M:= 3:  N:= 4:
B:= convert(
     Array(
          (1..N, 0..M-1),
          (n,m)-> piecewise(s < (n-1)/N*t_f, 0, s < n/N*t_f, (N*s-(n-1)*t_f)^m, 0),
          order= C_order
     ),
     Vector
):
J:= int(diff~(B,s).B, s= 0..t):
simplify(%);

@Thomas Richard 

Is the Build ID incremented when there are updates to only the library and not to the kernel? Or is it only incremented when the kernel is recompiled?

@vv

Your procedure does indeed return a list of indices which can be used to transform L1 to L2---and that may be all that the OP really needs---but it's not a permutation of the indices. 

@Markiyan: I was working in Maple 18, where group isn't deprecated, so I didn't notice that it was deprecated. That being said, I wasn't using group for any group-theoretic purpose; I was only using it to multiply and invert permutations. The procedure below does the same job using only GroupTheory

@sikjw1305: The only reason that I forbade nondistinct elements was that they made the error checking more complicated. You could just cut out the error checking and the procedure above would work with nondistinct elements; or you can use this procedure, which forgoes the error checking and uses the newer GroupTheory package. To do an error check, simply check whether L1[P] = L2, where is the returned permutation. This procedure returns its result in permlist form. For disjoint cycle form, use convert(..., disjcyc).

Perm1to2:= (L1::list, L2::list)->
     map2(
          GroupTheory:-PermApply,
          GroupTheory:-PermLeftQuotient((Perm@sort)~([L2,L1], 'output'= 'permutation')[]),
          [$1..nops(L1)]
     )
:

@Rouben Rostamian  

I did the problem by my own techniques and using my own interpretations for that which was vague (specifically, that B is a row vector), and then I compared with your Answer. I got the same final result as you did.

restart;
t_f:= 1:  M:= 3:  N:= 4:
B:= convert(
     Array(
          (1..N, 0..M-1),
          (n,m)-> piecewise(s < (n-1)/N*t_f, 0, s < n/N*t_f, (N*s-(n-1)*t_f)^m, 0)
     )^+,
     Vector
):
J:= int(diff~(B,s).B, s= 0..t):
simplify(%);

@Rouben Rostamian 

Rouben: Note that each function b[n,m] is given a piecewise definition such that the function's value is 0 outside of its primary interval. So each of these functions is defined for all real numbers. So b[n1,m1](t) + b[n2,m2](t) makes sense for any real t and any integers 1 <= (n1,n2)<= N, 0 <= (m1,m2) <= M-1.

Mahmood: There seems to be something missing in your formulation. Where you have the integral, did you mean to have an equation involving the integral? Also, your integral doesn't involve f or any of the c. That seems strange because there was no point in you mentioning f and the cs unless the integral depends on them.

@tomleslie The function REv(-1) is most definitely a problem for isolate. This is confirmed by

isolate(f + f(-1) = 0, f);
Error, (in isolate) unable to isolate f


@MDD Yes, I suggest that you try assuming. You may need to resort to assume, which is a bit stronger. But if assuming does the job, I'd definitely use it instead. I think that it's a bit unusual to use assume inside a procedure because (I think) it has global effects.

@MDD Can you do what you want with assuming rather than assume (see my Answer)? An assuming clause only lasts for the duration of the command to which it's applied, and there are no ~. If you do need to change an interface setting from inside a procedure, you should change it back at the end:

save_showassumed:= interface(showassumed= 0);

... rest of procedure ...

interface(showassumed= save_showassumed);

...

end proc;

@MDD The ~ is there to show that the variable has assumptions on it, i.e., that it has been declared in an assume command. If you don't want to see the ~, you can give the command interface(showassumed= 0).

[This is a Question, not a Post, so I changed it to a Question.]

You say "obviously, it can be simplified," but it isn't so obvious to me. What exactly did you have in mind? One option is full expansion of the numerator. That could followed by collection with respect to any or all of the variables. Another option is simplify(..., size). None of these produces a significantly shorter expression.

@Qruze Is the new exercise randomly generated also? Then you can begin your "dovundet" with the commands

restart;
randomize():

and use the !!! button.

Your code looks right to me. I don't know why you say that you're "drawing a complete blank" when you've actually written correct code.

@KarryWC You should post, here on MaplePrimes, the exact steps that you took to get to this error message. Usually (not always), the person who tells you how to correct an error needs to be able to first reproduce the error on their own computer. Thus, they need to know the steps that you took to get to the error.

For example: "I entered the equation x=y+1; and pressed Enter. Then I right clicked on the output to get the context menu. I selected Manipulate Equation. The Equation Manipulator loaded without error."

First 453 454 455 456 457 458 459 Last Page 455 of 709