Algoritma: Béda antarrépisi

Konten dihapus Konten ditambahkan
m Ngarapihkeun éjahan, replaced: nyaeta → nyaéta (2), make → maké (3), rea → réa (4), ea → éa (26), eo → éo, kabeh → kabéh using AWB
Ilhambot (obrolan | kontribusi)
m Ngarapihkeun éjahan, replaced: beda → béda, model → modél (2), gede → gedé
Baris ka-3:
'''Algoritma''' nyaéta susunan paréntah, nu jumlahna kawates, pikeun ngolah sababaraha paréntah nu, sakumpulan data asupanana, bakal ngahasilkeun sarupaning bentuk ahir nu bisa dipikawanoh; sabalikna ti [[heuristik]]. Konsép algoritma mindeng digambarkeun ku conto hiji [[resép]], sanajan loba algoritma kacida ruwetna; algoritma sering miboga léngkah-léngkah anu malikan ([[iterasi]]) atawa merlukeun kaputusan (saperti [[logika Boolean|logika]] atawa [[kahenteusaruaan|perbandingan]]) nepi ka tugas diréngsékeunnana.
{{Tarjamahkeun|Inggris}}
sababaraha alogaritma bisa anggeus ku pagawéan nu sarua maké susunan parentah nu bedabéda in more or less time, space, or effort than others. For example, given two different recipes for making potato salad, one may have ''peel the potato'' before ''boil the potato'' while the other presents the steps in the reverse order, yet they both call for these steps to be repéated for all potatoes and end when the potato salad is réady to be éaten. <!-- poor example .. who would boil each potato separately? and making a salad in general requires no cooking ... -->
 
Correctly performing an algorithm will not solve a problem if the algorithm is flawed or not appropriate to the problem. For example, performing the potato salad algorithm will fail if there are no potatoes present, even if all the motions of preparing the salad are performed as if the potatoes were there.
Baris ka-35:
Di dieu aya conto sederhana dina algoritma.
 
Bayangkeun anjeun mibanda wilangan random dina daptar nu teu kasortir. Tujuan ahirna keur manggihkeun wilangan panggedenapanggedéna tina éta daptar. Lengkah mimiti nyaéta kudu nempo kana sakabéh nilai nu aya dina deret. Lengkah saterusna nyaéta nempo kana éta nilai ngan sakali. Asupkeun kana itungan, algoritma basajan ngeunaan hal éta saperti di handap ieu:
# Pretend the first number in the list is the largest number.
# Look at the next number, and compare it with this largest number.
Baris ka-69:
The first case of an algorithm written for a [[computer]] was [[Ada Lovelace|Ada Byron]]'s [[Ada Byron's notes on the analytical engine|notes on the analytical engine]] written in [[1842]], for which she is considered by many to be the world's first [[programmer]]. However, since [[Charles Babbage]] never completed his [[analytical engine]] the algorithm was never implemented on it.
 
The lack of [[mathematical rigor]] in the "well-defined procedure" definition of algorithms posed some difficulties for mathematicians and [[logic]]ians of the [[19th century|19th]] and éarly [[20th century|20th centuries]]. This problem was largely solved with the description of the [[Turing machine]], an abstract modelmodél of a [[computer]] formulated by [[Alan Turing]], and the demonstration that every method yet found for describing "well-defined procedures" advanced by other mathematicians could be emulated on a Turing machine (a statement known as the [[Church-Turing thesis]]).
 
Nowadays, a formal criterion for an algorithm is that it is a procedure that can be implemented on a completely-specified Turing machine or one of the equivalent [[formalism]]s. Turing's initial interest was in the [[halting problem]]: deciding when an algorithm describes a terminating procedure. In practical terms [[computational complexity theory]] matters more: it includes the puzzling problem of the algorithms called [[NP-complete]], which are generally presumed to take more than polynomial time.
Baris ka-81:
* The greedy method. A [[greedy algorithm]] is similar to a [[Dynamic programming|dynamic programming algorithm]], but the difference is that at éach stage you don't have to have the solutions to the subproblems, you can maké a "greedy" choice of what looks best for the moment.
* Linéar programming. When you solve a problem using [[linear programming]] you put the program into a number of [[Linear algebra|linear]] [[Inequality|inequalities]] and then try to maximize (or minimize) the inputs. Many problems (such as the [[maximum flow]] for directed [[Graph (mathematics)|graphs]]) can be stated in a linéar programming way, and then be solved by a 'generic' algorithm such as the [[Simplex algorithm]].
* Séarch and enumeration. Many problems (such as playing [[chess]]) can be modelledmodélled as problems on [[graph theory|graphs]]. A [[graph exploration algorithm]] specifies rules for moving around a graph and is useful for such problems. This category also includes the [[search algorithm]]s and [[backtracking]].
* The probabilistic and heuristic paradigm. Algorithms belonging to this class fit the definition of an algorithm more loosely. [[Probabilistic algorithm]]s are those that maké some choices randomly (or pseudo-randomly); for some problems, it can in fact be proved that the fastest solutions must involve some randomness. [[Genetic algorithm]]s attempt to find solutions to problems by mimicking biological [[evolution]]ary processes, with a cycle of random mutations yielding successive generations of 'solutions'. Thus, they emulate reproduction and "survival of the fittest". In [[genetic programming]], this approach is extended to algorithms, by regarding the algorithm itself as a 'solution' to a problem. Also there are [[heuristic]] algorithms, whose general purpose is not to find a final solution, but an approximate solution where the time or resources to find a perfect solution are not practical. An example of this would be [[simulated annealing]] algorithms, a class of [[heuristic]] [[probabilistic algorithm]]s that vary the solution of a problem by a random amount. The name 'simulated annéaling' alludes to the metallurgic term méaning the héating and cooling of metal to achieve freedom from defects. The purpose of the random variance is to find close to globally optimal solutions rather than simply locally optimal ones, the idéa being that the random element will be decréased as the algorithm settles down to a solution.