Forgot your password?
typodupeerror
Government Math United States Politics

Algorithm Glitch Voids Outcome of US Green Card Lottery 131

Posted by timothy
from the let's-fudge-us-some-better-numbers dept.
jayminer writes "Results for the United States Diversity Visa Lottery for 2012 were declared void due to a programming glitch in the random selection algorithm. At first, the results were published as promised on May, 1st. Then, on May, 6th, the results were withdrawn with the web site claiming to experience 'technical difficulties.' Today (May, 13th), it is declared that the results are invalid due to an algorithm glitch; the computer program has been fixed and the lottery will be re-run. The final results are expected to be published July 15th."
This discussion has been archived. No new comments can be posted.

Algorithm Glitch Voids Outcome of US Green Card Lottery

Comments Filter:
  • by AEton (654737) on Friday May 13, 2011 @07:19PM (#36123234)

    Picking 90% of the winners from the first two days of applicants is not great, yes.

    Give them credit for owning up to their mistakes, at least. It could be worse -- it's widely believed that the 1969 draft lottery [wikipedia.org] was so un-random that people born in later months were dramatically more likely to be picked for an early draft!

  • by Nexzus (673421) on Friday May 13, 2011 @07:20PM (#36123248)

    Wonder if this was offshored to a country that was eligible to be part of this lottery. Could be ironic, paradoxical or just plain funny.

  • It's real? (Score:5, Funny)

    by Carewolf (581105) on Friday May 13, 2011 @07:21PM (#36123262) Homepage

    Wait, what! The visa lottery is real?? I thought it was just SPAM. This raises so many questions.

    1. Why?
    2. What is purpose of that? Larry Niven style luck evolution?
    3. And why are you spamming people about it?
    4. Really, why is the US sending out thousands of SPAM emails about it.
    5. And last, but not least: WTF?

    • Re:It's real? (Score:5, Informative)

      by QuasiSteve (2042606) on Friday May 13, 2011 @07:27PM (#36123302)

      Is this where we point you to wikipedia?

      1. Wikipedia
      2. Sorta. More like not wanting to be a total dick. The opposite - selectively accepting visas - is already in place. If you're rich, a great sportsman/woman, a world-class academic, etc. you can pretty much get in anyway. The flipside of that would be to turn everybody else away. Although that sounds rather appealing to some, most people understand the unfairness of such a system. Hence a lottery (or other solutions), which is reasonably fair.
      3. they're not - that's usually scam companies trying to make it look like their services will make it more likely for you to BE A WINNER!!!!. There are legit green card lottery companies that make sure you've got all the forms filled out right and such, for a fee, but those tend not to spam.
      4. See 3.
      5. Not sure what you're questioning there... I guess the answer is "See 1-4"?

      • by drinkypoo (153816)

        Hence a lottery (or other solutions), which is reasonably fair.

        What's fair about taking anyone but those you want the most? We're not talking about a political asylum lottery. We'll still extradite a motherfucker.

        • Hence a lottery (or other solutions), which is reasonably fair.

          What's fair about taking anyone but those you want the most? We're not talking about a political asylum lottery. We'll still extradite a motherfucker.

          The problem is that the people selected by the non-lottery process are maybe the people who uou want the most, but they're not necessarily the people you need the most.

      • by Carewolf (581105)

        3. they're not - that's usually scam companies trying to make it look like their services will make it more likely for you to BE A WINNER!!!!. There are legit green card lottery companies that make sure you've got all the forms filled out right and such, for a fee, but those tend not to spam.
        4. See 3.

        So, why are the emails not charging any money and the only links on them direct links to official forms and the official guide to filling out the form on dot-gov addresses?

        They do look like something a 3rd part

    • Yes, there is a lottery.

      But in order to enter, you have to apply and meet certain qualifying criteria.

      Even if you win a lottery place, you don't automatically get a visa.

      Instead you win an invitation to apply for a visa. Even then you can get turned down.
      I'm fairly sure, but if you get turned down the lottery win just disappears: it doesn't mean that someone else then gets a chance.
    • by FRiC (416091)

      I live in Asia, and before the diversity visa lottery was made into

    • Selecting the best would be elitist, and we can't have that.

      Granting green cards to every English-speaking non-muslim would be seen as unconstitutional or something, even if it would be practical and go over rather well.

      We simply can't pick and choose without being politically incorrect, and thus the lottery.

    • by Anonymous Coward

      I think Americans just like lotteries. In San Francisco, if you want to convert a building into condos you have to enter a lottery -- which you have almost no chance of winning for the first seven years. The twist is that if you want to convert a building from condos back to a single family home, that's almost impossible. They don't like creating new condos, they don't like getting rid of old condos... but they like the lottery.

  • ....to use /dev/urandom rather than the built-in rand() function?

    • by HaeMaker (221642)

      Probably not the problem... I imagine there are further requirements regarding percentages of people from certain countries, gender requirements, etc. I would guess it was the weighting that was at fault, not the randomness.

      • by jd (1658)

        Ah, well, to weight correctly, you would create a pool for every possible combination and select randomly the correct number from each pool. At first I took it that they tried to do exactly that but it wouldn't take a month to generate a valid sample with such a method. Which means that they're randomly selecting from everyone and then seeing if the sample meets the criteria. I can think of no other way it can take so long.

        Which means the problem exists between keyboard and IDE.

    • actually, you should use /dev/random. when the entropy runs out (or gets too low), /dev/random will wait for it to go back up, /dev/urandom will REUSE it, seriously impacting the "randomness" of your results. urandom is fine for game data, graphics, etc but to NOT use it for anything important.
      • by Cyberax (705495)

        Actually, /dev/urandom uses cryptographically secure random number generator. If you've used a reliable /dev/random seed then /dev/urandom is secure for all practical purposes.

        • 1) Yes, the same as /dev/random, the difference is that once it runs OUT of "cryptographically secure random numbers", it starts to REUSE the seed values. NOT GOOD.
          2) Even if you can't predict which numbers are coming out, it will most likely make guesses more accurate.
          3) "cryptographically secure" means NOTHING unless you can state the type (with parameters) of the cryptography. rot13 is technically "cryptography", albeit a weak one.
          • by Cyberax (705495)

            1) NO!!!! IT DOES NOT! It uses a PRNG to generate more 'pseudoentropy', mixing in new entropy if it's available.
            2) No, you can't. That's a property of cryptographically secure PRNGs.
            3) It means exactly what it means. RTFM: http://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator [wikipedia.org]

            • A counterpart to /dev/random is /dev/urandom ("unlocked"/non-blocking random source[4]) which reuses the internal pool to produce more pseudo-random bits. This means that the call will not block, but the output may contain less entropy than the corresponding read from /dev/random. While it is still intended as a pseudorandom number generator suitable for most cryptographic purposes, it is not recommended for the generation of long-term cryptographic keys.

              Source: http://en.wikipedia.org/wiki//dev/random#Linux [wikipedia.org]

              A read from the /dev/urandom device will not block waiting for more entropy. As a result, if there is not sufficient entropy in the entropy pool, the returned values are theoretically vulnerable to a cryptographic attack on the algorithms used by the driver. Knowledge of how to do this is not available in the current unclassified literature, but it is theoretically possible that such an attack may exist. If this is a concern in your application, use /dev/random instead.

              source: http://www.kernel.org/doc/man-pages/online/pages/man4/random.4.html [kernel.org]

              • by Cyberax (705495)

                Note the word 'theoretically'. It's used in the same sense as in: "theoretically RSA encryption might be vulnerable if someone solves the problem of fast factorization".

                In practice, there are no serious attacks on PRNG used in Linux.

                • Yeah, I guess it all depends on how "secure" you consider to be secure.
                  • by Cyberax (705495)

                    Let's say that if Linux's PRNG is broken then you'd have other problems, much much much worse.

                    Currently it relies on hashed counters, with mixed-in real entropy.

    • by Gorobei (127755)

      Even with a random source, you still need to write a fair "choose M of N" algorithm. Most people cannot do this.

      • by jd (1658)

        That's so incredibly sad. It should be a requirement that people writing such algorithms read and understand such books as "The Unfinished Game".

    • by darkonc (47285)
      It's pretty hard to do if you're a WIndows programmer... Not everybody uses a Unix-based computer.
  • Technically, the results were indeed random. If you get results based on a bug or glitch in your algorithm, those are obviously the results you weren't expecting. Unexpected results are, by definition, random. Who could have predicted the glitch? The results then were not "random" enough because they weren't the results you were expecting? Give me a break.

    • by Lundse (1036754)

      Unexpected results are, by definition, random.

      Except when the results are expected to be random :-)

      All kidding aside, it is not the particular results that are themselves random or not (once picked, any result has a probability of 1), but rather the method of choosing them. Or to be more precise, as our anonymous friend pointed out, that they had an even chance to be picked before they were even results.

    • by joh (27088) on Friday May 13, 2011 @08:06PM (#36123508)

      Unexpected results are not neccessarily random. You may just have missed some bug that generates very predictable results which were just unexpected because you didn't knew about that bug.

      Still, true randomness is hard. While I don't think this applies here, randomness also includes random clusters. People accept these if the process that generates the randomness is very obvious random, but do the same with a computer or by sieving through large amounts of data and they see patterns and don't accept these as random anymore.

      Example: There have been discussions about clusters of cases of certain kinds of cancer around nuclear reactors. Can't be random, you think. Well, if you look at many different kinds of cancer and check the distribution of those you'll find random clusters for one or more of them. One of those clusters may be found around a reactor. May still be random, but nobody will ever believe you. In fact, if you sieve the data fine enough and have enough reactors and NONE of these clusters coincide with a reactor, the conclusion would be that nuclear reactors PROTECT against cancer. But explain that to people.

      Other example: Apple introduced random playlists on iPods years ago. Now people noticed that some songs got played more than once before all others were played. Can't be random! There's a bug! Well, no. Still, Apple had to modify their software to make the choice actually LESS random (by have no song being played twice) to make it appear "really" random to the users.

      Randomness is hard and can be spooky.

      • by nxtw (866177)

        Other example: Apple introduced random playlists on iPods years ago. Now people noticed that some songs got played more than once before all others were played. Can't be random! There's a bug! Well, no. Still, Apple had to modify their software to make the choice actually LESS random (by have no song being played twice) to make it appear "really" random to the users.

        I've never had an iPod with a random feature. However, it does have a shuffle feature, which implies that each song will be played once (assum

        • My first mp3 player (one of those chunky blue and silver Archos jobbies) had a similar feature, but it was predictable. The first time [after power up] you shuffled a playlist you always got the same order. If you shuffled again you got a different order to the first time, but it was always the same as any other second shuffle.

          I assume the seed was hardcoded on bootup.

      • by dachshund (300733)

        Other example: Apple introduced random playlists on iPods years ago. Now people noticed that some songs got played more than once before all others were played. Can't be random! There's a bug! Well, no. Still, Apple had to modify their software to make the choice actually LESS random (by have no song being played twice) to make it appear "really" random to the users.

        What you are describing is a (pseudo-)random permutation of a playlist. It's still random, just chosen from a different distribution.

        And in th

      • Apple introduced random playlists on iPods years ago. Now people noticed that some songs got played more than once before all others were played. Can't be random! There's a bug!

        Well, that's Apple users for you.

        Still, Apple had to modify their software to make the choice actually LESS random (by have no song being played twice) to make it appear "really" random to the users.

        I wouldn't say it's any less (or more) random. It's like the difference between drawing cards with or without replacement - both stapl

    • by mortonda (5175)

      Unexpected results are, by definition, random.

      Perhaps you should actually look up the definition of random before declaring it?

      1. Having no specific pattern, purpose, or objective: random movements.
      2. Mathematics & Statistics: Of or relating to a type of circumstance or event that is described by a probability distribution.
      3. Of or relating to an event in which all outcomes are equally likely, as in the testing of a blood sample for the presence of a substance.

      The pertinent definition is the mathmatical one, which needs a probability distribution.

      • by artor3 (1344997)

        You're using the mathematical definition. The common usage of the word is far less restrictive. To quote Merriam-Webster's definition: "without definite aim, direction, rule, or method". That certainly applies in cases where an unexpected bug affects the results.

        For example, if I randomly say a string of ones and zeros, it almost certainly won't be random in a mathematical sense, but it will be in the common usage sense: it won't have a definite aim, direction, rule, or method. This is an analogous situ

    • by TapeCutter (624760) on Friday May 13, 2011 @08:34PM (#36123672) Journal

      Technically, the results were indeed random.

      No, technically your conflating two different things, the random glitch, and the non-random output caused by the glitch.

    • Unexpected results are, by definition, random.

      That's so funny it's not even wrong.

      If I toss a coin three times and get snake eyes and the eight of clubs that's random "by definition", is it?

    • by darkonc (47285)
      The method used to choose the applications was 'random' (as in unexpected. The error was kinda random (well, 'stupid') -- but, once you understood the method/error, the results were entirely predictable and, thus not random.
      • by plover (150551) *

        But there were two sources of randomness at play here. The first was the cocked-up algorithm, which turned out to not be "random." However, that source of randomness was not known nor understood by the the applicants. Applications came in essentially at random, too; at least they did not arrive in a way that was able to exploit the failed randomness of the selection algorithm.

        So the first results were actually fair to the applicants. However, since they were not evenly distributed, they did not meet the

    • by Gorobei (127755)

      Unexpected results are, by definition, random.

      That is just not true. The a priori lack of knowledge of an observer has nothing to do with the statistical properties of the thing being observed.

      Even if it were true, it doesn't produce "fair outcomes" as people generally understand "fair." E.g. If a bug causes twins and triplets to always get drafted as a group, no one is going to consider the results "random," and few will consider the results "fair."

  • by nebaz (453974) on Friday May 13, 2011 @07:27PM (#36123300)

    How would you feel if you got a notice saying you got a green card, but then two days later were told "sorry, just kidding."? The second batch of people might not want to celebrate just yet.

  • YAY! My golden ticket to get off the plantation!

    You're a free man now
    No general, I's expensive!

  • by Anonymous Coward

    They had

    if (bribe.amount = 0) application->delete();

    This is why you always put the constant value on the left-hand side.

    • by MavEtJu (241979)

      Crank up the warning level of your compiler and make it warning free.

  • So, what they're saying is that the numbers didn't appear random enough to them. Maybe it selected a few too many undesirables for their liking. Sometimes random numbers can appear not to be random. That's the problem with randomness, you can never be sure.

    Instead they are saying that:
    "A new selection process will be conducted based on the original entries for the 2012 program."

    I'm willing to bet that new selection process certainly won't be random.
    • Or it could be like the first FFXI Mog Lottery, in which all "random" numbers selected for PS2 users followed the pattern "even odd even odd even" meaning it was impossible for anyone on PS2 to win anything, since the (truly random) winning numbers all broke that pattern somehow.
  • Glitch (Score:5, Funny)

    by HaeMaker (221642) on Friday May 13, 2011 @07:54PM (#36123452) Homepage

    Bob Slydell: So we just went ahead and fixed the glitch.
    Bill Lumbergh: Great.
    Dom Portwood: So, uh, Milton has been let go?
    Bob Slydell: Well, just a second there, professor. We, uh, we fixed the *glitch*. So he won't be receiving a paycheck anymore, so it'll just work itself out naturally.
    Bob Porter: We always like to avoid confrontation, whenever possible. Problem is solved from your end.

  • by Anonymous Coward on Friday May 13, 2011 @08:31PM (#36123660)

    My girlfriend was one of the initial winners. I don't have to tell you how furious/disappointed we both are.

      The incompetence demonstrated by the State Department is fucking mind boggling. They have 6 months to draw winners, sample the results -make sure everything is OK. They don't. Instead of drawing 100,000 applicants they draw 22,000 most of which were no randomly drawn, but were among the first to apply. They post the results and after a week shut down the website with no explanation. People email the Kentucky Consular Center to make sure everything is OK before they send in their documents (It can be very expensive for internationally tracked packages, especially from people all around the world-many of whom are not well off.) The KCC emails people telling them everything is fine and to continue sending in documents, even they know at this point that the whole lottery is a clusterfuck. Then they announce that the first drawing was not random and has been disqualified.

    Why wouldn't the State Department at least try to request permission from congress to increase the number of VISAs awarded to 75,000 up from 50,000 or randomly draw another 78,000 names to that 78,000 would be random and the initial 22,000 would be less random.

    It just seems so unfair to announce winners and then revoke that announcement two weeks later, all the while telling people everything is OK.

    Saved the best for last: The State Dept has announced that they will not be taking disciplinary action against anyone involved in the "Incorrect results" being posted. I would like to know of any other job on the planet where you can fuck up 15 million visa applications, blame a computer for what clearly is a persons job to ensure the results are accurate before posting them, and not even receive disciplinary action.

    David Donahue should resign in shame and Hillary Clinton should make a public apology at the very minimum

    • Would you be screaming for heads to be cut off?

      Your girlfriend was selected in an unfair lottery. It wouldn't be right to let all that stand.

      How do you know the KCC was informed the results weren't accurate at the point they were telling people to send in their documents?

      • Re: (Score:2, Informative)

        by Anonymous Coward

        I'm not screaming for heads to be cut off, i'm asking for a little bit of accountability. This is a very avoidable situation which was handled with incompetence and people should resign because of it.

        Two wrongs don't make a right. Even if the initial drawing wasn't "fair or random" (and btw you could not a lot worse than favoring people who were first to apply), telling people they had won and then taking it back is just as unfair.

        The website was taken down for almost a week. People saw this and were concer

      • by AK Marc (707885)

        Your girlfriend was selected in an unfair lottery.

        But the process is a black box to the applicants. -So what's wrong with saying "oops, we'll take the wrongly posted ones and the whole set of rightly posted ones this year."

        • We can't have too many legal immigrants, or we might eat into our slave labor supply of illegal immigrants....

      • I'm not sure what sort of paperwork it takes to apply for a greencard through the lottery system because my wife applied as, well, my wife. That stack of paperwork was about six inches high, and the fees eventually ammounted to just under three thousand dollars. That's not counting the fees for the attorney advising us, nor three trips to cities 400 and 150 miles away to be interviewed and fingerprinted twice. The initial outlay in effort and cash was rather big too, but I'm afraid I can't remember it, as I
      • by dachshund (300733)

        Your girlfriend was selected in an unfair lottery. It wouldn't be right to let all that stand.

        It's really not a zero-sum game, just a simulation of one. The US can afford to admit all of the 22,000 accidental winners and hold a second lottery for the full 100,000 quota.

        This was a monumental fuckup that cost people significant amounts of time and money. Hopefully it was a one time fuckup. Given that the US already hands out a relatively low number of green cards, we can afford to eat an extra 22,000 this

    • I'm just glad I didn't check the results until after the website became inaccessible. I'd rather not go through what you and your girlfriend went through. Will be checking back on July 15th for sure -- but now I have to wonder if their programmers are competent at all.
    • Most people don't understand computers at all, the way we do (slashdotters).  Their feelings about it could be summarized essentially as "Zeus has frowned on us" and that's that.

      Truly a special bummer, but that's life, isn't it?  And I hope your girlfriend gets lucky for real on the next draw.
  • That nobody's made a Debian/OpenSSL joke yet...

  • Obligatory Knuth (Score:5, Insightful)

    by colinrichardday (768814) <colin.day.6@hotmail.com> on Friday May 13, 2011 @09:20PM (#36123888)
    Random numbers should not be generated with a method chosen at random The Art of Computer Programming, Vol 2 (emphasis in original)
  • by Anonymous Coward

    "Hay you want to be a real American? You won! You can has citizenship!"

    Then later..."LOL YHBT UMAD?"

  • Yes, the algorithm for choosing green card recipients is flawed. It should be:

    if (applicant.wanted_for_crime = false) then
        grant_green_card(applicant);
    else
        human_review(applicant)
    end

    On a more serious note, does anyone know what the error was?

    • I agree. I'm personally of the opinion that absolutely anyone who wants to immigrate should be able to, assuming they pass a security check and have a reasonably clean criminal record in their former country. We should be thrilled that people want to move here. Many first world countries are actually losing population and it is very hard on their economies.
      • by larkost (79011)

        What you are missing is the absolute flood of people that open immigration would result in. It would very quickly distort both the economy and social structure.

        I am completely in favor of this lottery for many reasons. Chief among those reasons has to be that my wife came to the US under the program, but I am also in favor of it for purely ideological reasons: we are a nation of immigrants, many of whom fit any resonable definition of "your tired, your poor", and who made a productive life for themselves on

        • by goodmanj (234846)

          What you are missing is the absolute flood of people that open immigration would result in. It would very quickly distort both the economy and social structure.

          Yes, just as immigration distorted the US economy and social structure during the 19th and early 20th century, transforming the US from a backwater agrarian hinterland into the most powerful center of industry and technology the world had ever seen. I fail to see the problem.

          While we can't take the huge tidal wave of people an open policy would brin

      • I wonder what he take of the Australians is on this?
    • Side effect of your algorithm in C would be setting applicant.wanted_for_crime to false>7b>.

      Comes as an outcome of not distinguishing between = and ==

      Now all criminals had better apply :-)

  • by Anonymous Coward

    But how about we just cancel the whole darn thing?

    I'm going to assume that most of you here are Americans. And as such, you probably feel like America kicks butt and that we rock and everyone wants to come here (and you'd be correct). You've probably heard how it's REALLY HARD to come to America legally and probably have some view on illegal immigration. What you probably aren't aware of, because you've probably never tried, is just how difficult it is to immigrate to other countries.

    These same countries

    • Well, the thing is that the smaller european countries have much less space to spare. US is basically an empty land by european standard, so it's much easier to accomodate a big number of immigrants coming in.

      To give a sense of scale, Germany has about 8 times the population density of the US. To put it in a different way: if the US had the same population density as Germany, there would be around 2.5 billions US citizens (twice as much as Chinese!).

      There are of course other reasons (cultural, political an

    • by Anonymous Coward

      What you probably aren't aware of, because you've probably never tried, is just how difficult it is to immigrate to other countries.

      I am an American expatriate. This means that not only have I tried to immigrate abroad, but I have succeeded. I thus certainly do know exactly how difficult it is to emigrate to other countries.

      While, generally speaking, I agree that it is difficult to immigrate to other countries, the level of difficulty varies greatly from country to country, and I find that your broad-brushed stereotyping is every bit as unwarranted as the ignorant American perspective that you so deride. Many countries have more restr

  • And are somehow still able to get work?

The cost of feathers has risen, even down is up!

Working...