Rob Y
Reputation
231
Top tag
Next privilege 250 Rep.
1 9
Impact
~2k people reached

• 0 posts edited

65 Actions

 Sep24 awarded Autobiographer Jul2 awarded Curious Apr15 awarded Teacher Apr14 answered Does a 15-puzzle always have a solution Mar21 awarded Yearling Sep19 comment Is there an numeric arithmetic with a single operator? I've finally gotten around to coding this. I found a funny consequence of this approach. I started to render expressions in Reverse Polish Notation, but they looked like this: $\circ \circ y x 0$ ... in other words, expressions using this operator boil down to a sequence of operands! $y x 0$ lol! Well, I thought that was funny. Thanks again -- I'm enjoying playing around with this. Sep14 comment How to efficiently generate a sequence of random integers that adds up to 1? FYI the origin of this is that I was writing a silly little "plot generator" program, where each step in the plot was + for a step up for the protagonist, and - was a setback. +2 or -2 for a big plot turn! But of course, I wanted the hero to come out ahead in the end, so after 10 chapters (or pages or whatever), I wanted the total to add to 1. Win for our hero! Another example where a mechanism became more interesting than the original effort. Thank you!!!! Sep14 revised How to efficiently generate a sequence of random integers that adds up to 1? deleted 432 characters in body Sep14 accepted How to efficiently generate a sequence of random integers that adds up to 1? Sep10 answered How to efficiently generate a sequence of random integers that adds up to 1? Sep10 revised How to efficiently generate a sequence of random integers that adds up to 1? deleted 531 characters in body Sep10 revised How to efficiently generate a sequence of random integers that adds up to 1? added 6 characters in body Sep10 revised How to efficiently generate a sequence of random integers that adds up to 1? "randomly generate" instead of "generate random" Sep10 comment How to efficiently generate a sequence of random integers that adds up to 1? @Martin I still think I can short-circut the combinitorial process of generating all the sequences (or sets) and randomly drive down to a single one. Sep10 revised How to efficiently generate a sequence of random integers that adds up to 1? added 319 characters in body Sep10 comment How to efficiently generate a sequence of random integers that adds up to 1? @Anthony_Carapetis I think you're on the right track... I'm thinking of how you'd generate the finite list of possible solutions, and how to add randomization. I'll ponder on that. Sep10 comment How to efficiently generate a sequence of random integers that adds up to 1? @Jp McCarthy if I just picked one, then it would be arbitrary, not random! I'd settle for pseudo-random, though. Sep10 comment How to efficiently generate a sequence of random integers that adds up to 1? I removed the "uniform" restriction from the members of the sequence, because @gammatester has a point... they aren't purely uniform because there's an additional constraint. Beyond that, it's not important if all possible sequences are represented fairly. Sep10 revised How to efficiently generate a sequence of random integers that adds up to 1? remove uniform restriction on the members of the sequence Sep10 revised How to efficiently generate a sequence of random integers that adds up to 1? make it efficient