0
votes
1answer
35 views

Speeding up ReplaceRepeated while truncating to desired order

I need to program in an algorithm that recursively makes algebraic replacements which leads to an utterly complicated algebraic function of $x$, but whose final result is only needed at fixed order in ...
4
votes
1answer
245 views

Bresenham's line algorithm

Bresenham's line algorithm is producing discretized line for given two points for purpose of plotting for example. Like that: I have to stress that I'm interested in positions, not a plot. ...
5
votes
2answers
194 views

Parallelizing or optimizing a script for calculating the size of all pairwise intersections between collections of sets

I need to speed up or parallelize an operation that looks essentially like this: ...
5
votes
1answer
321 views

Random number generation with specific distribution

I am writing a program for solving the shortest path in travelling salesman problem, with a twist that there are multiple salesmen who partition the cities among themselves, thus creating two part ...
14
votes
2answers
540 views

How can I speed up the classic GA for graph coloring?

I'm trying to compute the chromatic number of this graph (which is 28): g = Import@"http://www.info.univ-angers.fr/pub/porumbel/graphs/dsjc250.5.col"; My genetic ...
20
votes
2answers
948 views

How to quickly calculate intersections of filled curves?

I am trying to quickly calculate the intersection of polygons with more than 6,000 points. A compiled solution would be preferable. Here is one example of the problem: ...