Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

What is the most useful algorithm ever written?

  1. Feb 11, 2007 #1
    Which algorithm is the most useful and compact that anyone has written?
  2. jcsd
  3. Feb 12, 2007 #2
    Algorithm to add two numbers:



  4. Feb 12, 2007 #3
    nope it's binary negation.
  5. Feb 12, 2007 #4
    Hmm, what about the algorithm to move an integer number from one memory location to another:

  6. Feb 12, 2007 #5


    User Avatar
    Homework Helper

    Constructing data perhaps?: (cons a b)
  7. Feb 12, 2007 #6
    I think the point here is that there is no "most usefule algorithm ever written" since usefulness is based, by definition, on the situation at hand, so the answer to your question would vary dramatically based on the situation that you need to use the algorithm for.

    Tristan Jones
  8. Feb 12, 2007 #7


    User Avatar
    Science Advisor
    Homework Helper

    As any fule kno, the most usefule algorithm ever written was wrote by Adrian Mole, aged 13 1/2 ... :biggrin:
  9. Feb 12, 2007 #8
    It is like saying what is the most useflul theorem in Math? Hard to say since they are all darn important.
  10. Feb 12, 2007 #9


    User Avatar
    Gold Member

    I did one to do permutations on any number of characters and output it to a text file. I'm talking of hours of data crunching and huge huge text files. It even used about 90% of processor power on my lower end machine. This is the best way I've found to use up space on someone's computer :tongue2:
    Last edited: Feb 12, 2007
  11. Feb 12, 2007 #10


    User Avatar

    easy answer is ...

    ...The Pythagorean theorum is the most useful ever devised.
  12. Feb 12, 2007 #11


    User Avatar
    Gold Member

    Well, algorithm doesn't necessarily mean programming, so I'm saying the most useful algorithm ever written is:

    How to Make a Baby

    Virtually everyone alive has made use of it.
  13. Feb 12, 2007 #12
    how about:


    Its a most satisfying algorithm, i found it most useful.
  14. Feb 13, 2007 #13


    User Avatar
    Science Advisor

    The implementation of basic operations such as multiplication/division and even addition at the circuit level often use some interesting algorithms for optimization and speed. I'm not sure if you were being serious or not.
  15. Feb 13, 2007 #14
    This is true of course, since cascading adders are generally not used in today's high speed processors and optimizing synchronous adders can be very tricky, and fine tuned! However, since this is the programming forum, I assumed that the user meant a programming algorithm. In C++, the "algorithm" to add two integers is a=b+c;. And of course, this post wasn't at all serious! ;-)

    Tristan Jones
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook