10,581 reputation
11558
bio website
location
age
visits member for 2 years, 7 months
seen 2 hours ago

Aug
8
comment Removing some data and replacing them with new ones
BTW, see Differences reference.wolfram.com/language/ref/Differences.html
Aug
8
comment Removing some data and replacing them with new ones
"remove the ones which are higher than a specific number"? Remove the differences? Or remove some elements? Or substitute some elements with new ones? Or add new elements?
Jul
11
revised Random numbers that sum up to specific value
analysis added
Jul
11
revised Random numbers that sum up to specific value
edited body
Jul
11
comment Random numbers that sum up to specific value
george2079, Now I understand. Thanks for noting (and explaining).
Jul
10
comment Random numbers that sum up to specific value
@george2079 I'm unsure what you mean by "at the ends". RandomSample[Range[0, 5], 5 - 1] will often generate zero among the elements (at any position).
Jul
10
revised Random numbers that sum up to specific value
added 19 characters in body
Jul
10
comment Random numbers that sum up to specific value
Strange about disfavoring zeros. Zeros occur due to the repetition of "cuts".
Jul
10
comment Random numbers that sum up to specific value
Oops. Parameter name change at last minute.... Fixed.
Jul
10
revised Random numbers that sum up to specific value
correction
Jul
10
revised Random numbers that sum up to specific value
link to video
Jul
10
answered Random numbers that sum up to specific value
Jul
10
comment Random numbers that sum up to specific value
@Szabolcs, The constraint that the set sums to s seems to violate the normal sense of randomness that your reasoning appears to rely on. Assuming that the elements are understood to be non-negative, then the generation of each positive element further constrains the domain from which subsequent elements may be chosen. Of course, that doesn't justify using any method. One might approach the challenge by generating 4 random whole numbers between 0 and sum that would be used as 'cuts', in Dedekind's sense. The differences would be used as the random numbers.
Jul
10
comment Random numbers that sum up to specific value
Related: codegolf.stackexchange.com/questions/8574/…
Jul
10
comment Random numbers that sum up to specific value
+1 Nice and clean. You should perhaps wrap the function in RandomSample to avoid necessarily sorting from largest to smallest.
Jul
2
awarded  Curious
Jun
8
comment Graphing a network with state transition flows (of varying size)
BTW, I for one am disappointed that Wolfram Blog doesn't make the source code available and easily accessible, contrary to its earlier practice.
Jun
8
comment Graphing a network with state transition flows (of varying size)
Take a look also at GraphLayout (CircularEmbedding) reference.wolfram.com/mathematica/ref/GraphLayout.html and also at EdgeShapeFunction reference.wolfram.com/mathematica/ref/EdgeShapeFunction.html
Jun
2
awarded  Popular Question
Jun
1
awarded  Nice Answer