Reputation
2,651
Top tag
Next privilege 3,000 Rep.
Cast close and reopen votes
Badges
7 21
Newest
 Nice Answer
Impact
~18k people reached

9h
revised How can I calculate the maximum number of grid layout possibilities?
added 514 characters in body
10h
revised How can I calculate the maximum number of grid layout possibilities?
edited body
10h
answered How can I calculate the maximum number of grid layout possibilities?
10h
comment How can I calculate the maximum number of grid layout possibilities?
Is your grid a Cartesian grid? Is your distance metric Euclidean, or for instance a Manhattan metric?
10h
comment How to set the Y coordinates for a Graph with defined X coordinates to prevent overlap of nodes?
Ignore explicit values of y coordinate first, and instead just track order of nodes/edges (along y axis) on every value of x with a node. Construct set of simple constraining inequalities (joining edge y values need to be equal, non-joining unequal, and no pair of edges must change order in their x interval intersections) to be reduced (or for decision of graph planarity). After this edges are guaranteed to be conceptually non-intersecting, and values of y can be computed on basis of sizes of nodes. Well, this is easier said than done, but I believe that's the most practical approach.
14h
comment Finding the period of an array of integers
Are you sure you want to use .. instead of ...? If p has only one partial repeat, above construct doesn't quite get it.
Apr
9
comment Find value of x such that x! less than or equal to 1000
@I.K. Correcting my first comment above: "If you want a numerical approximation of the resulting for the maximized value, you should use FullSimplify (for value of 1000) or N, or similar." should have been "If you want a simplified precise maximized value, you should use FullSimplify (for value of 1000) or N for an approximate value (expressed as 1000. in Mathematica."
Apr
9
comment Find value of x such that x! less than or equal to 1000
@I.K. If you are unaware of several types of numbers Mathematica sees as different kinds of entities, I suggest reading tutorial/NumbersOverview in the documentation.
Apr
9
comment Find value of x such that x! less than or equal to 1000
@I.K. Log2 is a bit special case because x is 2^1000 and Log2 of it is precisely 1000. In this case value of maximization is also known, but since simplification in general is non-trivial, not much simplification is done by default. To force more (in this case enough) FullSimplify produces precise answer. Your expression with N[..., 5] requests precisely five digits of precision; so that's what (1000.0) you get.
Apr
9
comment Find value of x such that x! less than or equal to 1000
Also, you can do things like Floor[InverseFunction[LogGamma][Log[10] (10^7)] - 1] (* 1723507 *) for numbers up to at least 10^(10^7), like in this case.
Apr
9
comment Find value of x such that x! less than or equal to 1000
One can also use relation of Factorial and Gamma functions for something like: Floor[InverseFunction[Gamma][10^100] - 1] (* 69 *)
Apr
9
comment Find value of x such that x! less than or equal to 1000
@I.K. So, for simplification, see Maximize[{Log2[x], Log2[x] <= 1000}, x, Integers] // FullSimplify.
Apr
9
comment Find value of x such that x! less than or equal to 1000
@I.K. Actually, it does work. It provides a symbolic result. It's providing you an exact integer assignment for x (or at least it does for me on v10.1). If you want a numerical approximation of the resulting for the maximized value, you should use FullSimplify (for value of 1000) or N, or similar.
Apr
9
answered Find value of x such that x! less than or equal to 1000
Apr
9
comment How calculate linear conversion based on an input and output range?
@Nasser InterpolationFunction does extrapolate this function correctly with the provided dataset (with a warning), but now as an afterthought Interpolation is probably not the solution being sought, although given the example values, I rather do it this way than tediously construct it manually. Also, one could use Clip with Rescale.
Apr
9
comment How calculate linear conversion based on an input and output range?
@Nasser Hmm, the question is a bit ambigious. And to be closed.
Apr
9
comment How calculate linear conversion based on an input and output range?
@Nasser Because the mapping is not linear?
Apr
9
comment How calculate linear conversion based on an input and output range?
@belisarius Uh... noticed it only after answering!
Apr
9
answered How calculate linear conversion based on an input and output range?
Apr
5
revised How to sort the list of all possible 3-tuples of elements from list constrained by a condition?
added 236 characters in body