Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • There's a very old joke about Mathematicians v. Engineers and prime numbers:
    Two students, a math major and an engineering major, are asked to generate a sequence of prime numbers.

    The math major draws out a sieve of Eratosthenes and slowly gets the sequence 2 3 5 7...

    The engineering major calculates the first few primes and extrapolates the rest: 2 3 5 7 9 11 13 15...

    • The way I heard it, there was also a physicist, who piped up between the mathematician and the engineer. Her sequence went:

      2 is prime
      3 is prime
      5 is prime
      7 is prime
      9 is, erm, an experimental error
      11 is prime...
  • SICP is a terrific book - lav it !

    By the way, what you said about cosmic radiation is correct, and probabilistic primality testing algorithms are indeed used in practice. However, I believe there's some refinement of Fermat's theorem that suceeds on Carmichael's - maybe by detecting them, I don't quite remember.

    • You are correct. There is a refinement that handles Carmichaels correctly, but I don't recall what it is and I don't have the book handy. And yes, SICP is fantastic. Fortunately, everyone can visit the link I provided above and download a free copy :)

      • And there is also a series of lectures on video based on the first edition of the book. Very interesting stuff.
        "Perl users are the Greatful Dead fans of computer science." --slashdot comment
      • There's a number of prime-tests based on Fermat's first theorem. Miller-Rabin test is a Monte Carlo algorithm that has a very high probability of finding the correct answer if you test maybe 10 or so witnesses (which is a fairly cheap operation). But then, for very large numbers this test (AFAIR) assumes that Riemann's assumption, that has been unproved for almost 150 years, is true.

        The other one is the Agrawal-Kayal-Saxena test which is deterministic and avoids the Riemann assumption. With O(log^10.5 n) i
    • Speaking of SICP and elements of physics like cosmic radiation, I just have to mention SICM []. :-)
  • Computer Science is about Math and Engineering, but software development is mostly about... Sociology.
  • The probalistic primality tests are more practically useful than the Fermat Small Theorem. They are used to find prime numbers for public-key algorithms like RSA in a reasonable amount of time. One interesting thing about them is that it possible to reduce the probablity of finding a composite as prime by doing more tests.
  • The analogy as it is misses a fundamental point: it's not a mathematician's job to get things done. It skips over the fact that without past mathematicians' relentless pursuit for correctness, the engineers of today wouldn't have any better tools than those their ancestors worked with.

    There is a divide between those building solutions and those crafting tools. You should know which camp you are in, or you're going to be ineffective. An engineer's methodology is as inappropriate for a mathematician as vice

    • It's also worth noting that good engineers *know* that their solutions may not be perfect, but they still find it useful to have an idea of how imperfect they are. If only to justify their shortcuts to their bosses.