5,704 reputation
1140
bio website
location
age
visits member for 2 years, 2 months
seen Apr 11 at 7:41

Jun
20
comment Efficient Generation of Subgraphs (or, unfriend a friend a day)
With 10 people, they each have a choice of 9 unfriendings, giving $9^{10}$ possibilities. The next day there is probably still 10 people with 8 choices, so the total possibilities so far is $9^{10} 8^{10}$. This gets very big, very fast. I don't think you are going to brute force it.
Jun
18
comment StringReplace except some pattern
@HyperGroups Indeed. Have edited to fix.
Jun
5
comment Maintaining map dimensions after using Colorize
Why not {RGBColor[0, 0.33, 0.643], Rectangle[{-6, 41}, {-0.77, 51.5}], White, Rectangle[{-0.77, 41}, {4.47, 51.5}], RGBColor[0.98, 0.235, 0.196], Rectangle[{4.47, 41}, {9.7, 51.5}]}?
May
16
comment How to generate characters by a function which works like the Esc + a + ESC
@Mr.Wizard You're welcome to improve it. It's definitely a bit rough around the edges at the moment.
May
16
comment Generating partitions of a set with a specified size of the parts
Isn't there just one result, given by Partition[myList, 2]?
May
11
comment Prandtl-Meyer function
Looks like you might have use FindRoot to get a numerical solution (M2 -> 3.22983).
Apr
19
comment Determine the Number of Lines in a Text File
As written, the code is reading char by char. Who knows if the underlying implementation is reading in more efficient chunks? I agree that C++ I/O is a bit disappointing (and not the easiest to use either!). I might go buy a solid state drive to compensate.
Apr
18
comment Find point at which equation stops having roots (if it exists)
The help tells you how to go from the generalised incomplete gamma function to the incomplete gamma function. Then you could just evaluate the integral directly to get the rest. Or many pages (such as mathworld) give the identity for integer arguments.
Apr
17
comment Find point at which equation stops having roots (if it exists)
Or more precisely for b > 6.88164.
Apr
17
comment Find point at which equation stops having roots (if it exists)
Actually you can have roots at negative M values for b > 2.
Apr
17
comment Find point at which equation stops having roots (if it exists)
That's the message indicating that there probably isn't a root. Also, I vote for b = 2.
Apr
8
comment Efficiently filling area with disks located at certain points
Using FindMaximum instead of NArgMax seems lots quicker and gives a similar result. Setting the starting radius to halfway to the closest point makes it even quicker.
Mar
13
comment How to calculate a gradient at x=0?
Why do you say it is too high?
Jan
29
comment How can I make the output from Solve look nice?
That polynomial doesn't have nice roots, so I'm not sure what you are expecting. Perhaps Times @@ Roots[...] /. x == r_ -> x - r
Jan
29
comment How can I make the output from Solve look nice?
@GeorgeMills See the edit for what s2 looks like.
Jan
28
comment A Sierpinski-ish structure, via 2D automata
I think removing the r___ in your fruit checking rule should do the trick. Once sorted, the same coordinates should be adjacent in the list. No need to check every possible pair.
Jan
28
comment Finding unit tangent, normal, and binormal vectors for a given r(t)
I can't say I've heard the term 'reper' before. My googling suggests that it's not commonly used at all.
Dec
20
comment _?NumericQ equivalent for lists
How about just: p : {_?NumericQ ..}
Dec
19
comment Drawing a torus not bounding a solid torus
I can't say I'm particularly au fait with stereographic projections, so I'm not sure what you are expecting. But the surface of your knot goes through the origin, so dividing by the norm is going to make things fly off to infinity.
Dec
18
comment Evaluating a Recursive Expression
Making sure than n is an integer makes it a bit safer. Define the function with P[n_Integer, x] := .... But as acl notes, you still can't simplify before you give it a value.