2 ms·
> a formula (another word for algorithm) Huh? Some differences: - A formula says nothing about evaluation order, sometimes not even about evaluation (example:
by Someone 4y ago
> a formula (another word for algorithm)
Huh? Some differences:
- A formula says nothing about evaluation order, sometimes not even about evaluation (example: where’s the algorithm in e^(iπ) -1 = 0?)
- the computations that an algorithm makes cannot always be expressed in a closed-form expression (example: what’s the formula for quicksort?)
A formula is “a concise way of expressing information symbolically” (https://en.wikipedia.org/wiki/Formula https://en.wikipedia.org/wiki/Formula)
- quchen 4y ago(Derailing this troll-initiated thread a bit with a serious answer) > what’s the formula for quicksort That is expressible! It’s what one would write in a proof assistant or powerful type system such as Coq, Agda, Idris. The formula is the algorithm, the type is the theorem (quicksort has type any-list and maps it to sorted-list, or in code – literally – `quicksort : Ordering(A) -> List(A) -> SortedList(A)`).