1
$\begingroup$

I would like to know cases that an algorithm runs without any data entry.

$\endgroup$
  • $\begingroup$ A cake recipe seems to be a good algorithm without any data entry. $\endgroup$ – styrofoam fly Feb 11 '17 at 8:24
  • $\begingroup$ prime numbers generation. $\endgroup$ – Apiwat Chantawibul Feb 11 '17 at 10:57
  • $\begingroup$ @styrofoamfly Cake recipe is not an algorithm. $\endgroup$ – Ankur Feb 11 '17 at 11:30
3
$\begingroup$

Yes, of course they exist, and they're useful both practically and theoretically.

Any time you write a computer program to solve some specific task that's hard-coded into the program (for example, to compute some value or find solutions to a specific set of equations you're interested in), that's an algorithm with no input.

If you want to prove undecidability of, e.g., the problem of determining whether a Turing machine halts for every input, the first step is to translate a program that uses its input to a program that doesn't use its input and always computes as if it received some specific input. That's another example of an algorithm without an input.

$\endgroup$
1
$\begingroup$

In addition to David Richerby's answer which I find very complete I wanted to add a few specific cases (which actually follow his explanations):

  1. The computation of some irrationals such as $\pi$ or $e$.
  2. The list of prime numbers and other lists (i.e., lists of logarithms and such) which do not require a seed.
  3. Equations in general (but clearly not all as many might require boundary conditions), either algebraic or non-linear. This would also include solving some set of mathematical expressions such as differential equations or integrals.

Hope this helps,

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.