5
votes
1answer
224 views

More efficient Omnibus number determination?

Amusing myself with concepts from "Omnibus Sequences, Coupon Collection, and Missing Word Counts", in particular the sequences. To paraphrase the concept, a string is k-Omni over some alphabet a if ...
0
votes
0answers
39 views

Hashing by Equals instead of SameQ

I have some numerical code involving complex numbers representing points on a plane. Some of these are equal but not identical, ie ...
4
votes
1answer
135 views

Selecting expressions from a sequence that are not subexpressions of earlier elements

I have a While loop that generates and prints an expression on each iteration (there can be thousands of iterations). UPDATE: Some expressions are generated in ...
27
votes
0answers
449 views

Why is StringExpression faster than RegularExpression?

Edit: as noted by Albert Retey the performance difference is only seen when sub expression extraction is performed. If this test is used below the timings are similar: ...
6
votes
2answers
244 views

Fastest way to test if a numerical array has complex elements

I am looking for the fastest way to test whether an n-dimensional numerical (NumericQ) array (in the ArrayQ sense) is complex or ...
17
votes
6answers
698 views

Split a string at specific positions

Given a string of alphanumerical characters, how to split it simply and quickly at the center of continuous letter-substrings? Is there an elegant and fast solutions out there in the "computational ...
8
votes
2answers
681 views

Mathematica rule substitution memory

First I present the specific programming question, and then I provide further background details. Given an expression in Mathematica, say f=3x+7y, there are two ...
23
votes
2answers
430 views

How can I ensure that I am constructing patterns in the most efficient way possible?

Inspired by this answer, I am interested to know if there are best practices or rules of thumb for constructing patterns, for example for use in function definitions (...
46
votes
4answers
1k views