Content deleted Content added
Magnolia677 (talk | contribs) Reverted 1 edit by OceanNavigator7 (talk) |
NorthSun2025 (talk | contribs) Copy edits. |
||
Line 57:
==Representations==
Algorithms can be expressed in many kinds of notation, including [[natural languages]], [[pseudocode]], [[flowchart]]s, [[DRAKON|drakon-chart]]s, [[programming languages]] or [[control table]]s (processed by [[Interpreter (computing)|interpreter]]s). Natural language expressions of algorithms tend to be verbose and ambiguous and are rarely used for complex or technical algorithms. Pseudocode, flowcharts, drakon-charts, and control tables are structured expressions of algorithms that avoid common ambiguities of natural language. Programming languages are primarily for expressing algorithms in a computer-executable form
=== Turing machines ===
Line 75:
{{Main|Empirical algorithmics|Profiling (computer programming)|Program optimization}}
The [[analysis of algorithms|analysis, and study of algorithm]]s is a discipline of [[computer science]]. Algorithms are often studied abstractly, without referencing any specific [[programming language]] or implementation. Algorithm analysis resembles other mathematical disciplines as it focuses on the algorithm's properties, not implementation. [[Pseudocode]] is typical for analysis as it is a simple and general representation. Most algorithms are implemented on particular hardware/software platforms and their [[algorithmic efficiency]] is tested using real code. The efficiency of a particular algorithm may be insignificant for many "one-off" problems but it may be critical for algorithms designed for fast interactive, commercial, or long
Empirical testing is useful for uncovering unexpected interactions that affect performance. [[Benchmark (computing)|Benchmark]]s may be used to compare before/after potential improvements to an algorithm after program optimization.
Line 109:
: While many algorithms reach an exact solution, [[approximation algorithm]]s seek an approximation that is close to the true solution. Such algorithms have practical value for many hard problems. For example, the [[Knapsack problem]], where there is a set of items and the goal is to pack the knapsack to get the maximum total value. Each item has some weight and some value. The total weight that can be carried is no more than some fixed number X. So, the solution must consider weights of items as well as their value.<ref>{{Cite book|url=https://www.springer.com/us/book/9783540402862|title=Knapsack Problems {{!}} Hans Kellerer {{!}} Springer|language=en|isbn=978-3-540-40286-2|publisher=Springer|year=2004|doi=10.1007/978-3-540-24777-7|access-date=September 19, 2017|archive-url=https://web.archive.org/web/20171018181055/https://www.springer.com/us/book/9783540402862|archive-date=October 18, 2017|url-status=live|last1=Kellerer|first1=Hans|last2=Pferschy|first2=Ulrich|last3=Pisinger|first3=David|s2cid=28836720 }}</ref>
; Quantum algorithm
: [[Quantum algorithm]]s run on a realistic model of [[quantum computation]]. The term is usually used for those algorithms
=== By design paradigm ===
|