What is the most useful algorithm ever written?

  • Thread starter verdigris
  • Start date
  • Tags
    Algorithm
In summary, the conversation discusses the concept of the most useful and compact algorithm ever written. One user suggests binary negation, while another suggests an algorithm for moving an integer from one memory location to another. However, it is concluded that there is no clear answer to this question as usefulness is subjective and dependent on the situation at hand. Other users jokingly suggest algorithms for making babies or performing basic operations at the circuit level. Ultimately, it is acknowledged that different algorithms may be useful in different contexts and that optimizing algorithms is important in programming.
  • #1
verdigris
119
0
Which algorithm is the most useful and compact that anyone has written?
 
Technology news on Phys.org
  • #2
Algorithm to add two numbers:

c=a+b;

:biggrin:

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

a=b;
 
  • #5
Constructing data perhaps?: (cons a b)
 
  • #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.

Regards,
Tristan Jones
 
  • #7
TristanJ said:
... there is no "most usefule algorithm ever written" ...

As any fule kno, the most usefule algorithm ever written was wrote by Adrian Mole, aged 13 1/2 ... :biggrin:
 
  • #8
It is like saying what is the most useflul theorem in Math? Hard to say since they are all darn important.
 
  • #9
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:
  • #10
easy answer is ...

verdigris said:
Which algorithm is the most useful and compact that anyone has written?

...The Pythagorean theorum is the most useful ever devised.
 
  • #11
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.
 
  • #12
how about:

(B^M)->(P)

Its a most satisfying algorithm, i found it most useful.
 
  • #13
TristanJ said:
Algorithm to add two numbers:

c=a+b;

:biggrin:

Tristan

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.
 
  • #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! ;-)

Regards,
Tristan Jones
 

1. What is an algorithm?

An algorithm is a step-by-step procedure or set of instructions that is followed to solve a problem or complete a task.

2. How do you determine the usefulness of an algorithm?

The usefulness of an algorithm is determined by its efficiency, accuracy, and applicability to solving a variety of problems. A useful algorithm should also be easy to understand and implement.

3. What makes an algorithm the most useful?

The most useful algorithm is one that can efficiently solve a wide range of problems and can be applied in various fields such as computer science, mathematics, and engineering. It should also have a significant impact on improving processes and making tasks more manageable.

4. Is there a specific algorithm that is considered the most useful?

There is no definitive answer to this question as the usefulness of an algorithm can vary depending on the context and problem it is being applied to. However, some commonly cited examples of highly useful algorithms include the Fast Fourier Transform, Dijkstra's algorithm, and the PageRank algorithm.

5. Can an algorithm become obsolete or less useful over time?

Yes, as technology and problem-solving methods evolve, an algorithm may become less useful or even obsolete. This is why it is essential for scientists and researchers to continually develop and improve algorithms to keep up with the changing needs and advancements in various fields.

Similar threads

  • Programming and Computer Science
Replies
22
Views
2K
  • Programming and Computer Science
Replies
8
Views
1K
  • Programming and Computer Science
Replies
6
Views
970
  • Programming and Computer Science
Replies
1
Views
938
  • Programming and Computer Science
Replies
2
Views
888
Replies
9
Views
1K
  • Programming and Computer Science
Replies
9
Views
1K
  • Programming and Computer Science
Replies
14
Views
2K
  • Programming and Computer Science
Replies
30
Views
4K
  • Programming and Computer Science
Replies
31
Views
3K
Back
Top