That method does work as long as you guarantee the uniqueness of the random numbers--in other words, a tie shouldn't mean leaving elements in place, but rather repeating the algorithm on each subset of the list where the random numbers came up equal.
If the range of numbers is sufficiently large (as should be typically the case when generating pseudo random numbers in the [0,1) range) then the probability of two numbers being the same is small enough to be statistically negligible.
It was clearly stated in TFA that in this case, it's likely not Microsoft evilness, but just a bad programmer. And yes, this shouldn't have happened in Apache either.
Sure, a simple, obvious typo in the actual testing code would be much more fatal than a simple, obvious typo in the description. That's because compilers are not intelligent and won't (and shouldn't) recognize the obvious typo as such.
The will have it installed before they switched it on the first time? I doubt so. They will have it installed before using the Internet the first time? Possible, but unlikely: Where will they get the browser from? Most likely they downloadf it from the net. For this, they'll most likely try to open the browser's download page with IE, which leads them directly to this screen.
Of course, a legitimate implementation of quicksort could start with
if (length > 1 && first element < second element && second element < first element)
for(;;);
Now, I don't see why anyone would do so, but it would give an accurate quicksort for any correct ordering, but an infinite loop with manifestly non-zero probability for the random result (25% per execution of those lines).
Spending the extra programmer time and effort to turn a "99.99% random" process into a "100% random"
I don't know what you consider "99.99% random", but the difference between 20% (probability of IE turning up last in a real random shuffle) and ca. 50% (probability of IE showing up last in the implemented "random shuffle") is certainly significant enough that you can't call it 99.99% random." You might argue that it is "random enough for this," but that's of course a matter of opinion, and therefore debatable (there's no objective definition of "random enough").
i'm trying to figure out why they went to the trouble of screwing things up as bad as they did, a trivial decrementing for loop pulling randomInt(1,i) and placing it in slot 5-i would be the obvious off the top of the head solution, and it would work.
No, it wouldn't work. Here's a possible run of that algorithm:
Initial: a = ----- Step 1: randomInt(1,5) -> 3 a = ----3 Step 2: randomInt(1,4) -> 1 a = ---13 Step 3: randomInt(1,3) -> 2 a = --213 Step 4: randomInt(1,2) -> 1 a = -1213 Step 5: randomInt(1,1) -> 1 a = 11213
Doesn't look like a random shuffle. Indeed, it doesn't even look like a shuffle at all.
Indeed, your algorithm has the following properties:
always a[0] == 1
the only possible result where all 5 numbers occur (i.e. the only result where the result is a permutation of the numbers from 1 to 5) is a == {1, 2, 3, 4, 5}
I'd like to see my neighboor get into my wired network.
It's easy to get your wish granted. Just invite him to your flat, tell him to bring his laptop with him, and then offer him a cable to connect. Make sure you watch him while he gets into your wired network, because if you don't, you'll probably not see it.
In an ideal world, you could freely share it. In the real world, it just opens up yourself to litigation if someone does something illegal over your network. After all, from the outside view it's your IP from which the illegal stuff originated.
Actually, there's even some truth to it: DRM costs extra energy, and therefore contributes to global warming. Pirated material is DRM-free, and therefore contributes less to global warming.
So if I bith write and use OSS, I'm a communistic pirate? But what does it mean to be a communistic pirate? Entering ships, but then instead of just taking everything from it, you share with the other ship?
He didn't suggest downloading a game to be installed locally. He suggested a common set of textures to be locally installed.
To make a comparison: About every web site uses text. Now in principle, every web site could send its own font to your browser. However, instead the typical way it is done is that you install a certain set of fonts locally on your computer, and the web site just uses that. Replace web site with game, and font with texture, and you get what he meant.
For example, there could be standard textures for the most common materials, say wood, steel, cloth, water, ice, snow, concrete, brick, soil. Then any game which wants to use any of those materials could just access the standard textures. Of course it could use its own textures as well if the game author doesn't like the standard ones, but that would now be just the decision of the game author.
Because you're including aleph-null and the rest of the alephs?
That's the definition of the cardinal numbers, yes.
I wonder who would ask you, please give me a random finite or transfinite value.
That's not the question. The question is whether it is possible to define probabilty distributions on them.
Even asking for a random finite integer is stupid if the integer merely has to be within aleph null. You'll get a number with log(infinity) digits.
Not necessarily. For example, a perfectly fine probability distribution on the positive integers is p(n) = 2^-n. The probability to get a number greater than 10 is less than 0.1%.
Also the most common probabilty distribution on the real numbers, the normal distribution or Gauss distribution, covers the full range of real numbers from minus infinity to plus infinity.
So a priori I see no reason why it shouldn't be possible to define probabilty distributions on larger sets or even true classes, such as e.g. the cardinal numbers, beyond the trivial extension that your probabilty distribution is zero everywhere except for a subset isomorphic to the integers or reals. I don't actually know if it is, but unless you can give a good reason why it cannot, you have to expect that it can.
(Well, with the set of cardinals, one may get additional problems with the restrictions for true classes; but in that case you can just take instead the example of a regular set larger than the set of real numbers; say, the set of infinite sequences of real numbers, or the set of real functions.)
Google has the additional "problem" (if you will) of Android being open-source.
Which they could have easily solved by using the Android trademark: Allow everyone to make derived versions, but reserve the name "Android" to versions approved by Google. If your version is too incompatible, you just may not use the magic "Android" name.
Why can 0 and 1 not both be valid prefix codes? They don't have any common initial sequence. Indeed, if you apply Huffman coding (which AFAIK produces a prefix code) to just two symbols, you get exactly that.
But your post led me to the ultimate incompressible string: The empty string. And yes, I'm 100% sure that this time I'm right:-)
Everything glows when sufficiently heated. Well, unless it disintegrates before it reaches glowing temperature :-)
OK, I wasn't aware that this screen is also shown on Windows installations already in use. I thought it only applied to newly installed Windows.
If the range of numbers is sufficiently large (as should be typically the case when generating pseudo random numbers in the [0,1) range) then the probability of two numbers being the same is small enough to be statistically negligible.
It was clearly stated in TFA that in this case, it's likely not Microsoft evilness, but just a bad programmer.
And yes, this shouldn't have happened in Apache either.
Sorry, but that function is buggy. I just tested with my totally fair die, and I got a 3, not a 4. So the return value should definitively be 3.
Sure, a simple, obvious typo in the actual testing code would be much more fatal than a simple, obvious typo in the description. That's because compilers are not intelligent and won't (and shouldn't) recognize the obvious typo as such.
The will have it installed before they switched it on the first time? I doubt so.
They will have it installed before using the Internet the first time? Possible, but unlikely: Where will they get the browser from? Most likely they downloadf it from the net. For this, they'll most likely try to open the browser's download page with IE, which leads them directly to this screen.
Of course, a legitimate implementation of quicksort could start with
Now, I don't see why anyone would do so, but it would give an accurate quicksort for any correct ordering, but an infinite loop with manifestly non-zero probability for the random result (25% per execution of those lines).
I don't know what you consider "99.99% random", but the difference between 20% (probability of IE turning up last in a real random shuffle) and ca. 50% (probability of IE showing up last in the implemented "random shuffle") is certainly significant enough that you can't call it 99.99% random." You might argue that it is "random enough for this," but that's of course a matter of opinion, and therefore debatable (there's no objective definition of "random enough").
i'm trying to figure out why they went to the trouble of screwing things up as bad as they did, a trivial decrementing for loop pulling randomInt(1,i) and placing it in slot 5-i would be the obvious off the top of the head solution, and it would work.
No, it wouldn't work. Here's a possible run of that algorithm:
Initial:
a = -----
Step 1: randomInt(1,5) -> 3
a = ----3
Step 2: randomInt(1,4) -> 1
a = ---13
Step 3: randomInt(1,3) -> 2
a = --213
Step 4: randomInt(1,2) -> 1
a = -1213
Step 5: randomInt(1,1) -> 1
a = 11213
Doesn't look like a random shuffle. Indeed, it doesn't even look like a shuffle at all.
Indeed, your algorithm has the following properties:
Given that this is Slashdot, the most likely form of revolution would be a cyber revolution. No need to leave your basement for that. :-)
Can you redirect from a https site to a http site if you don't have the SSL certificate for the https address?
I'd like to see my neighboor get into my wired network.
It's easy to get your wish granted. Just invite him to your flat, tell him to bring his laptop with him, and then offer him a cable to connect. Make sure you watch him while he gets into your wired network, because if you don't, you'll probably not see it.
In an ideal world, you could freely share it. In the real world, it just opens up yourself to litigation if someone does something illegal over your network. After all, from the outside view it's your IP from which the illegal stuff originated.
Well, it might attract some actual pirate. You don't want to attract people who might cause you to get sued by the **AA.
I think "get off my WLAN" sounds better.
Note that WLAN is an anagram of LAWN.
Actually, there's even some truth to it: DRM costs extra energy, and therefore contributes to global warming. Pirated material is DRM-free, and therefore contributes less to global warming.
So if I bith write and use OSS, I'm a communistic pirate?
But what does it mean to be a communistic pirate? Entering ships, but then instead of just taking everything from it, you share with the other ship?
Patent it.
Actually, many of us would be running Linux, just as we do today. Just that we would use the command line exclusively.
He didn't suggest downloading a game to be installed locally. He suggested a common set of textures to be locally installed.
To make a comparison: About every web site uses text. Now in principle, every web site could send its own font to your browser. However, instead the typical way it is done is that you install a certain set of fonts locally on your computer, and the web site just uses that. Replace web site with game, and font with texture, and you get what he meant.
For example, there could be standard textures for the most common materials, say wood, steel, cloth, water, ice, snow, concrete, brick, soil. Then any game which wants to use any of those materials could just access the standard textures. Of course it could use its own textures as well if the game author doesn't like the standard ones, but that would now be just the decision of the game author.
You mean, it will get a government bailout?
That's the definition of the cardinal numbers, yes.
That's not the question. The question is whether it is possible to define probabilty distributions on them.
Not necessarily. For example, a perfectly fine probability distribution on the positive integers is p(n) = 2^-n. The probability to get a number greater than 10 is less than 0.1%.
Also the most common probabilty distribution on the real numbers, the normal distribution or Gauss distribution, covers the full range of real numbers from minus infinity to plus infinity.
So a priori I see no reason why it shouldn't be possible to define probabilty distributions on larger sets or even true classes, such as e.g. the cardinal numbers, beyond the trivial extension that your probabilty distribution is zero everywhere except for a subset isomorphic to the integers or reals. I don't actually know if it is, but unless you can give a good reason why it cannot, you have to expect that it can.
(Well, with the set of cardinals, one may get additional problems with the restrictions for true classes; but in that case you can just take instead the example of a regular set larger than the set of real numbers; say, the set of infinite sequences of real numbers, or the set of real functions.)
Which they could have easily solved by using the Android trademark: Allow everyone to make derived versions, but reserve the name "Android" to versions approved by Google. If your version is too incompatible, you just may not use the magic "Android" name.
Why can 0 and 1 not both be valid prefix codes? They don't have any common initial sequence. Indeed, if you apply Huffman coding (which AFAIK produces a prefix code) to just two symbols, you get exactly that.
But your post led me to the ultimate incompressible string: The empty string. :-)
And yes, I'm 100% sure that this time I'm right