4,075 reputation
1352
bio website
location
age
visits member for 2 years, 5 months
seen Jul 21 at 13:51

Sep
19
comment How can I regroup elements in a list into a tree based on their values?
Arbitrarily deep, that's where the trickiness of the problem lies.
Sep
19
comment How can I regroup elements in a list into a tree based on their values?
Yes. The elements in the input list are always in order, and at least they could always be sorted by their first element.
Sep
17
comment How can I build an inline documentation utility?
@LeonidShifrin how might I adapt this to WorkBench and extracting comments for a symbol from a file?
Sep
13
comment How can I build an inline documentation utility?
@LeonidShifrin Nice comment grabber. But I think the project of an general inline documentation utility remains a worthy goal.
Sep
13
comment How can I build an inline documentation utility?
@RolfMertig I can program in either.
Sep
11
comment How to avoid nested With[]?
@MaThEmAtika Exactly.
Sep
10
comment How can I avoid label collisions?
Ok, I did, but my code still isn't code.
Sep
10
comment How can I avoid label collisions?
Weird, I can't upload images. The toolbar is gone! What should I do? I've tried restarting safari.
Aug
29
comment What is the fastest way to count square-free words?
When I run AbsoluteTiming[sf = squareFreeTernaryWordsC[55];] CompiledFunction::cflist: Nontensor object generated; proceeding with uncompiled evaluation. >>
Aug
29
comment What is the fastest way to count square-free words?
For maximal compression, instead of a list of words, we should be using a tree. Does anyone know if there any Internal` tree implementations that are packed and quickly traversable?
Aug
29
comment Help with Permutations
Can you upload the tsv file compressed?
Aug
28
comment Determining all possible traversals of a tree
@LeonidShifrin ok thank you!
Aug
28
comment Determining all possible traversals of a tree
An unranking algorithm constructs the ith object in an underlying list given rank i. Is there a way to extend your solution to generate the ith transversal of the tree?
Aug
28
comment How can I efficiently check if a graph is unit distance?
nice references, thanks @J.M.
Aug
28
comment What is the fastest way to count square-free words?
If you can get past 70 with this method, I'll award the points now.
Aug
28
comment How can I efficiently check if a graph is unit distance?
I prefer the iterative method because of speed but also because you can see the local minima as interesting embeddings in themselves.
Aug
28
comment How can I efficiently check if a graph is unit distance?
Running my original function many times works much faster than this: Quiet@Reap[ Table[i = UnitDistanceQ[m]; If[i =!= Null, Sow[i]], {100}]][[2]] However the coordinates are not exact solutions, is there a way to rederive them?
Aug
27
comment How can I efficiently check if a graph is unit distance?
In my code g is the adj matrix, bad name i guess.
Aug
27
comment How can I efficiently check if a graph is unit distance?
This is a nice approach, but I'm trying want a general approximation algorithm: a function to run on any and all graphs.
Aug
27
comment How can I efficiently check if a graph is unit distance?
It lays out a graph with random vertex positions and then iteratively moves them to decrease the energy functional F which makes every edge become unit distance for instance: Quiet@Reap[ Table[i = UnitDistanceQ[m]; If[i =!= Null, Sow[i]], {100}]][[2]]