Carl Love

Carl Love

21698 Reputation

24 Badges

8 years, 353 days
Natick, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity

These are replies submitted by Carl Love

First, let's make sure that I've correctly guessed the package structure. You have a package that you didn't give a name to. I'll call it P. Are and both exports of P? Is a module with a ModuleApply procedure?

Can you write in such a way that it doesn't use any of P's module locals?

Is there a close relationship between a graph's crossing number and the least complicated surface (such as a torus) on which the graph can be embedded?

If you'd like, I could mark your account as a "spammer", which would delete (but not totally purge) everything related to your account (including this thread) and block the account's ability to make any future posts (thus, it'd be nearly impossible for a hacker to hijack the account and post in your name). I am by no means suggesting that you are a spammer! I only mention the possibility because it's something that I have the power to do. It'd only take about 20 seconds on my part, and you wouldn't need to do anything. So, if you'd like for me to do that, let me know.

@Christian Wolinski 

Your T is reminiscent to me of constructing a *sub*basis (rather than a basis) for a topology S.

[The next few definitions may already be familiar to you. If so, I include them for the benefit of other readers.] Let X be a set, and let S be a subset of the powerset of X containing at least the empty set and X itself. (For convenience, we define an intersection with zero operands to be X, which conforms with the usual rule that an associative operator applied to zero operands equals the identity for that operator.)

1. Definition of topology: Suppose that S contains (as elements) 1.1) all pairwise intersections of its elements and 1.2) all unions (not necessarily pairwise) of its subsets. Then S is called a topology on X and the elements of S are called the open sets. Note that 1.1 implies that S contains all intersections of its finite subsets.

2. Definition of basis (base is also commonly used) of a topology: Let S be a topology on X. Let B be a subset of S such every element of S (i.e., every open set of X) is a union of a subset of B. Then B is called a basis for S.

3. Definition of subbasis (or subbase) of a topology: Let S be a topology on X and let C be a subset of S such that every element of S is a union (not necessarily of a finite number of opetands) of intersections of finite subsets of C. Then C is called a subbasis for S.

Quick examples (that should be familiar to almost all readers): Let R be the real numbers. Let's declare a subset A of R to be open if for all x in A there is a d > 0 such that the open interval (x-d, x+d) is a subset of A. Then the set of all such A is a topology on R (indeed it's the standard topology). The set of all open intervals is a basis for that topology. The set of all open intervals that are unbounded at one end is a subbasis for that topology. (These things require some proof, which is essy, the subbasis part being trivial once the topology and basis are verified).

A place where this analogy between topology and your S and T breaks down is that the elements of a topological subbasis are not necessarily pairwise disjoint. However, it may be worthwhile to restrict your attention to cases where the union of S (in other words, X) is finite. 

@ehorta As far as I know, there is no mechanism for completely deleting an account. Whatever you did yesterday was sufficient to delete the personal info that you just mentioned. All that remains is the name "ehorta", the date that you joined, and (I guess) a password (not that I can see that part).

The only data associated to your account that I can see is the Question above. It looks like you've never posted anything else. Since you haven't acquired any reputation points, you don't even appear in the Users list.

Are you implying (and it may well be true, I don't know) that given S there is a unique satisfying those conditions?

It is not necessary to transform it into a first-order system. The dsolve command does that automatically in the background (in a way that's transparent to the user). The transformation is unique in this case. If it weren't unique, you'd get an error message from dsolve.

Unfortunately, we also need to consider infinity as a parameter which is given a finite value. I'll guess that you're trying to duplicate numeric results from a paper where those results were obtained with RK4 and shooting. To exactly duplicate the results, you'll need to know what finite value the author used for infinity. I've seen some papers on boundary-layer problems (which this happens to be) where that detail unfortunately hasn't been included in the final paper. If that's the case, let me know, because that situation can still be handled.

Your handwriting is highly stylized but seems more suitable for artistic rather than mathematical work.

@ogunmiloro All 14 can be plotted with a single odeplot command like this:

    `[]`~(T, [indets(sys, typefunc(identical(T), Not(mathfunc)))[]]), 
    T= 0..12, 
    color= [seq]([red, blue, black, purple][1+irem(k,4)], k= 1..14)


A slightly more sophisticated approach, just as efficient, is as follows:

get:= module()
    ST:= table((parse@lhs=rhs)~(S)),
    ModuleApply:= (index, field::name)-> ST[index][field]
end module
get(206, mu);

In all three methods that I've presented:

  1. The table is only created once, yet can be accessed multiple times.
  2. If a Record is changed, that change will be automatically reflected in the table. This is due to the mutability of Records; it's not a feature that I explicitly added.
  3. Unlike Search, lookup times are not proportional to the number of records; the lookup times are *much* less than that.
  4. The quotation marks are not needed.
  5. There's no need to ever be aware of the position within the list of a particular record.

I don't understand what you don't like about my solution. Would you like it better if it were named get rather than ST?

get:= table((parse@lhs=rhs)~(S)):
get[206]:-mu, get[206]:-sigma;
                       508.001018040, 125.002863204708

Note that the above eliminates the need to use the quotation marks. That's what the parse does.

The repeated use of ListTools:-Search on the same list is very inefficient compared to creating a table. If you only wanted to look up one or two records (which seems unlikely), then Search might be worthwhile.

@Carl Love My final simplification above is superfluous. It says nothing more than h''(x) < 0. 

@brian bovril Don't associate my name with this ridiculous piece of crap:

  • rhs(ST[ListTools:-Search(2, lhs~(ST))]):-mu;

There's no point in using Search together with a table.

@Kitonum The first year has an atypically low growth rate. The growth factor for the second and all subsequent years, to the nearest integer, is round((3/2)^12) = 130.

This remains true if we start with any number of females greater than 2 and round down any fractional results, as in

u:= rsolve(
    {u(k)= u(k-1) + trunc(3/4*u(k-2)), u(-1)=0, u(0)=3}, u(k),


@schzan Your only example only used multiplication and exponentiation. My code does not "fail"; it intentionally reports the presence of unexpected input. So, how complicated can these expressions be? Would there ever be division by an indexed variable? Would a function such as abs or sin ever be used applied to an indexed variable? Would exponents other than positive integers ever be used? Should x*u[2] + y*u[2] count as two 2s? Or should it be one 2 because that's the same thing as (x+y)*u[2]. Is it only one base name (such as u) in each expression that can be indexed? Can other non-name expressions be indexed (note that Maple allows almost anything to be indexed, such as (x+y)[3]7[2], etc.)? Can the indices themselves contain further indexed names, such as u[1, u[1,2]]? Are the expressions always algebraic, or might they also contain lists, sets, vectors, etc.? It was you who "failed" to provide these necessary details. 

Note that mmcdara's code will ignore multiple occurences of the same indexed variable within an expression. Is that what you want?

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