algoritma - tulisankuniha.files.wordpress.com  · web viewoptimization algorithms. ... genetic...

17

Click here to load reader

Upload: duongdan

Post on 26-Aug-2018

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Algoritma - tulisankuniha.files.wordpress.com  · Web viewOptimization algorithms. ... Genetic algorithms. Particle swarm. Tabu search. Local search. Digital signal processing

AlgoritmaDari Wikipedia bahasa Indonesia

Diagram Alur sering digunakan untuk menggambarkan sebuah algoritma.

Dalam matematika dan komputasi, algoritma merupakan kumpulan perintah untuk menyelesaikan suatu masalah. Perintah-perintah ini dapat diterjemahkan secara bertahap dari awal hingga akhir. Masalah tersebut dapat berupa apa saja, dengan catatan untuk setiap masalah, ada kriteria kondisi awal yang harus dipenuhi sebelum menjalankan algoritma. Algoritma akan dapat selalu berakhir untuk semua kondisi awal yang memenuhi kriteria, dalam hal ini berbeda dengan heuristik. Algoritma sering mempunyai langkah pengulangan (iterasi) atau memerlukan keputusan (logika Boolean dan perbandingan) sampai tugasnya selesai.

Desain dan analisis algoritma adalah suatu cabang khusus dalam ilmu komputer yang mempelajari karakteristik dan performa dari suatu algoritma dalam menyelesaikan masalah, terlepas dari implementasi algoritma tersebut. Dalam cabang disiplin ini algoritma dipelajari secara abstrak, terlepas dari sistem komputer atau bahasa pemrograman yang digunakan. Algoritma yang berbeda dapat diterapkan pada suatu masalah dengan kriteria yang sama.

Page 2: Algoritma - tulisankuniha.files.wordpress.com  · Web viewOptimization algorithms. ... Genetic algorithms. Particle swarm. Tabu search. Local search. Digital signal processing

Kompleksitas dari suatu algoritma merupakan ukuran seberapa banyak komputasi yang dibutuhkan algoritma tersebut untuk menyelesaikan masalah. Secara informal, algoritma yang dapat menyelesaikan suatu permasalahan dalam waktu yang singkat memiliki kompleksitas yang rendah, sementara algoritma yang membutuhkan waktu lama untuk menyelesaikan masalahnya mempunyai kompleksitas yang tinggi.

Sejarah istilah "algoritma"Kata algoritma berasal dari latinisasi nama seorang ahli matematika dari Uzbekistan Al Khawārizmi (hidup sekitar abad ke-9), sebagaimana tercantum pada terjemahan karyanya dalam bahasa latin dari abad ke-12 "Algorithmi de numero Indorum" atau "Khwarizmi concerning the Hindu art of reckoning

Nama lengkap Khwarizmi adalah Muhammad ibn Musa al-Khwarizmi.

algorisma adalah istilah yang merujuk kepada aturan-aturan aritmetis untuk menyelesaikan persoalan dengan menggunakan bilangan numerik arab (sebenarnya dari India, seperti tertulis pada judul di atas). Pada abad ke-18, istilah ini berkembang menjadi algoritma, yang mencakup semua prosedur atau urutan langkah yang jelas dan diperlukan untuk menyelesaikan suatu permasalahan.

Jenis-jenis AlgoritmaTerdapat beragam klasifikasi algoritma dan setiap klasifikasi mempunyai alasan tersendiri. Salah satu cara untuk melakukan klasifikasi jenis-jenis algoritma adalah dengan memperhatikan paradigma dan metode yang digunakan untuk mendesain algoritma tersebut. Beberapa paradigma yang digunakan dalam menyusun suatu algoritma akan dipaparkan dibagian ini. Masing-masing paradigma dapat digunakan dalam banyak algoritma yang berbeda.

Divide and Conquer , paradigma untuk membagi suatu permasalahan besar menjadi permasalahan-permasalahan yang lebih kecil. Pembagian masalah ini dilakukan terus menerus sampai ditemukan bagian masalah kecil yang mudah untuk dipecahkan. Singkatnya menyelesaikan keseluruhan masalah dengan membagi masalah besar dan kemudian memecahkan permasalahan-permasalahan kecil yang terbentuk.

Dynamic programming , paradigma pemrograman dinamik akan sesuai jika digunakan pada suatu masalah yang mengandung sub-struktur yang optimal (, dan mengandung beberapa bagian permasalahan yang tumpang tindih . Paradigma ini sekilas terlihat mirip dengan paradigma Divide and Conquer, sama-sama mencoba untuk membagi permasalahan menjadi sub permasalahan yang lebih kecil, tapi secara intrinsik ada perbedaan dari karakter permasalahan yang dihadapi.

Page 3: Algoritma - tulisankuniha.files.wordpress.com  · Web viewOptimization algorithms. ... Genetic algorithms. Particle swarm. Tabu search. Local search. Digital signal processing

Metode serakah. Sebuah algoritma serakah mirip dengan sebuah Pemrograman dinamik, bedanya jawaban dari submasalah tidak perlu diketahui dalam setiap tahap; dan menggunakan pilihan "serakah" apa yang dilihat terbaik pada saat itu.

Daftar algoritma Berikut adalah daftar algoritma.

Lihat juga daftar struktur data, daftar topik umum algoritma, dan daftar istilah yang berhubungan dengan algoritma dan struktur data

1. Algoritma kombinatorial

Algoritma kombinatorial umum

Algoritma pencari-siklus Floyd : iterasi untuk mencari siklus dalam barisan/sekuens

(uniformly distributed) Pseudorandom number generators: o Blum Blum Shub o Mersenne twister

Robinson-Schensted algorithm : generates permutations from pairs of Young tableaux

Algoritma graph

Artikel utama untuk bagian ini adalah: Teori graph

Algoritma Bellman-Ford : menghitung jarak terpendek pada graf berbobot, di mana sisi bisa memiliki bobot negatif

Algoritma Dijkstra : menghitung jarak terpendek pada graf berbobot, tanpa sisi berbobot negatif.

Algoritma Floyd-Warshall : menghitung solusi jarak terpendek untuk semua pasang titik pada sebuah graf berarah dan berbobot

Algoritma Kruskal : mencari pohon rentang minimum pada sebuah graf Algoritma Prim : mencari pohon rentang minimum pada sebuah graf Algoritma Boruvka : mencari pohon rentang minimum pada sebuah graf Algoritma Ford-Fulkerson : computes the maximum flow in a graph Algoritma Edmonds-Karp : implementation of Ford-Fulkerson Nonblocking Minimal Spanning Switch say, for a telephone exchange Spring based algorithm : algorithm for graph drawing Topological sort Algoritma Hungaria : algorithm for finding a perfect matching

Page 4: Algoritma - tulisankuniha.files.wordpress.com  · Web viewOptimization algorithms. ... Genetic algorithms. Particle swarm. Tabu search. Local search. Digital signal processing

Algoritma pencarian

Pencarian linear : mencari sebuah item pada sebuah list tak berurut Algoritma seleksi : mencari item ke-k pada sebuah list Pencarian biner : menemukan sebuah item pada sebuah list terurut Pohon Pencarian Biner Pencarian Breadth-first : menelusuri sebuah graf tingkatan demi tingkatan Pencarian Depth-first : menelusuri sebuah graf cabang demi cabang Pencarian Best-first : menelusuri sebuah graf dengan urutan sesuai kepentingan

dengan menggunakan antrian prioritas Pencarian pohon A* : kasus khusus dari pencarian best-first Pencarian Prediktif : pencarian mirip biner dengan faktor pada magnitudo dari

syarat pencarian terhadap nilai atas dan bawah dalam pencarian. Kadang-kadang disebut pencarian kamus atau pencarian interpolasi.

Tabel Hash : mencari sebuah item dalam sebuah kumpulan tak berurut dalam waktu O(1).

Algoritma string

Pencarian

Algoritma brute force Algoritma Aho-Corasick Algoritma Bitap Algoritma Boyer-Moore Algoritma Knuth-Morris-Pratt Algoritma Karp-Rabin

Approximate matching

Levenshtein edit distance

Algoritma penyusunan

Binary tree sort Bogosort Bubble sort : for each pair of indices, swap the items if out of order Bucket sort Comb sort Cocktail sort Counting sort Gnome sort Heapsort : convert the list into a heap, keep removing the largest element from the

heap and adding it to the end of the list Insertion sort : determine where the current item belongs in the list of sorted ones,

and insert it there

Page 5: Algoritma - tulisankuniha.files.wordpress.com  · Web viewOptimization algorithms. ... Genetic algorithms. Particle swarm. Tabu search. Local search. Digital signal processing

Merge sort : sort the first and second half of the list separately, then merge the sorted lists

Pancake sorting Pigeonhole sort Quicksort : divide list into two, with all items on the first list coming before all

items on the second list.; then sort the two lists. Often the method of choice Radix sort : sorts strings letter by letter Selection sort : pick the smallest of the remaining elements, add it to the end of the

sorted list Shell sort : an attempt to improve insertion sort Smoothsort Stupid sort Topological sort

2. Compression algorithms

Lossless compression algorithms

Burrows-Wheeler transform : preprocessing useful for improving lossless compression

DEFLATE : lossless data compression Delta encoding : aid to compression of data in which sequential data occurs

frequently Incremental encoding : delta encoding applied to sequences of strings LZW : lossless data compression (Lempel-Ziv-Welch) LZ77 (algorithm) : LZ77 and LZ78 are the names for the two lossless data

compression algorithms LZMA : short for Lempel-Ziv-Markov chain-Algorithm LZO : data compression algorithm that is focused on speed PPM compression algorithm Shannon-Fano coding Truncated binary encoding Run-length encoding : lossless data compression taking advantage of strings of

repeated characters SEQUITUR algorithm : lossless compression by incremental grammar inference

on a string EZW (Embedded Zerotree Wavelet) Entropy encoding : coding scheme that assigns codes to symbols so as to match

code lengths with the probabilities of the symbols o Huffman coding : simple lossless compression taking advantage of relative

character frequencies Adaptive Huffman coding : adaptive coding technique based on

Huffman codingo Arithmetic coding : advanced entropy codingo Range encoding : data compression method that is believed to approach the

compression ratio of arithmetic coding

Page 6: Algoritma - tulisankuniha.files.wordpress.com  · Web viewOptimization algorithms. ... Genetic algorithms. Particle swarm. Tabu search. Local search. Digital signal processing

Entropy coding with known entropy characteristics o Unary coding : code that represents a number n with n ones followed by a

zeroo Elias delta|gamma|omega coding: universal code encoding the positive

integerso Fibonacci coding : universal code which encodes positive integers into

binary code wordso Golomb coding : form of entropy coding that is optimal for alphabets

following geometric distributionso Rice coding : form of entropy coding that is optimal for alphabets

following geometric distributions

Lossy compression algorithms

Linear predictive coding : lossy compression by representing the spectral envelope of a digital signal of speech in compressed form

A-law algorithm : standard companding algorithm Mu-law algorithm : standard analog signal compression or companding algorithm Fractal compression : method used to compress images using fractals Transform coding : type of data compression for "natural" data like audio signals

or photographic images Vector quantization : technique often used in lossy data compression Wavelet compression : form of data compression well suited for image

compression (sometimes also video compression and audio compression)

3. Computational geometry Gift wrapping algorithm : determining the convex hull of a set of points Graham scan determining the convex hull of a set of points in the plane Point in polygon : tests whether a given point lies within a given polygon

4. Grafik komputer Bresenham's line algorithm : plots points of a 2-dimensional array to form a

straight line between 2 specified points (uses decision variables) DDA line algorithm : plots points of a 2-dimensional array to form a straight line

between 2 specified points (uses floating-point math) Flood fill : fills a connected region of a multi-dimensional array with a specified

symbol Painter's algorithm : detects visible parts of a 3-dimensional scenery Ray tracing : realistic image rendering

5. Algoritma KriptografiLihat juga Topik dalam kriptografi

Page 7: Algoritma - tulisankuniha.files.wordpress.com  · Web viewOptimization algorithms. ... Genetic algorithms. Particle swarm. Tabu search. Local search. Digital signal processing

Symmetric (secret key) encryption : o Advanced Encryption Standard (AES), winner of NIST competitiono Blowfish o Data Encryption Standard (DES), sometimes DE Algorithm, winner of

NBS selection competition, replaced by AES for most purposeso IDEA o RC4 (cipher)

Asymmetric (public key) encryption or digital signature: o DSA o ElGamal o RSA o Diffie-Hellman key exchange o NTRUEncrypt

Cryptographic Message digest functions: o MD5 – Note that there is now a method of generating collisions for MD5o RIPEMD-160 o SHA-1 o HMAC : keyed-hash message authentication

Cryptographically secure pseudo-random number generators o Blum Blum Shub - based on the hardness of factorizationo Yarrow algorithm o Fortuna , allegedly an improvement on Yarrow

Other o Diffie-Hellman : key exchange

6. Algoritma Distributed systems Lamport ordering : a partial ordering of events based on the happened-before

relation Snapshot algorithm : a snapshot is the process of recording the global state of a

system Vector ordering : a total ordering of events

7. Algoritma NumericalSee also main article numerical analysis and list of numerical analysis topics

Algoritma De Boor : computes splines. Algoritma De Casteljau : computes Bezier curves False position method : approximates roots of a function Gauss-Jordan elimination : solves systems of linear equations Algoritma Gauss-Legendre : computes the digits of pi Gauss-Newton algorithm : find minimum of function of several variables Kahan summation algorithm : a more accurate method of summing floating-point

numbers

Page 8: Algoritma - tulisankuniha.files.wordpress.com  · Web viewOptimization algorithms. ... Genetic algorithms. Particle swarm. Tabu search. Local search. Digital signal processing

Levenberg-Marquardt algorithm : find minimum of function of several variables MISER algorithm : Monte Carlo simulation, numerical integration Newton's method : finds zeros of functions with calculus Bracketing Methods : Rounding functions : the classic ways to round numbers Secant method : approximates roots of a function Shifting nth-root algorithm : digit by digit root extraction Square root : approximates the square root of a number Strassen algorithm

Optimization algorithms

Simplex algorithm : An algorithm for solving the linear programming problem Branch and bound Simulated annealing Genetic algorithms Particle swarm Tabu search Local search

Digital signal processing

CORDIC : Fast trigonometric function computation technique. Fast Fourier transform : determines the frequencies contained in a (segment of a)

signal o Cooley-Tukey FFT algorithm

Rainflow-counting algorithm : Reduces a complex stress history to a count of elementary stress-reversals for use in fatigue analysis

Osem : algorithm for processing of medical images Goertzel algorithm Can be used for DTMF digit decoding. Discrete Fourier transform

o Rader's FFT algorithm o Bluestein's FFT algorithm

8. Number theoretic algorithms Discrete logarithm :

o Baby-step giant-step o Pollard's rho algorithm for logarithms o Pohlig-Hellman algorithm o Index calculus algorithm

Euclidean algorithm : computes the greatest common divisor Integer factorization : breaking an integer into its prime factors

o Trial division o Lenstra elliptic curve factorization

Page 9: Algoritma - tulisankuniha.files.wordpress.com  · Web viewOptimization algorithms. ... Genetic algorithms. Particle swarm. Tabu search. Local search. Digital signal processing

o Pollard's rho algorithm o Pollard's p-1 algorithm o Congruence of squares o Quadratic sieve o Special number field sieve o General number field sieve o Jones's period proxy algorithm

Multiplication algorithms : fast multiplication of two numbers Primality tests : determining whether a given number is prime

o AKS primality test o Miller-Rabin primality test o Sieve of Eratosthenes o Sieve of Atkin

9. Numerical algebra Buchberger's algorithm : finds a Gröbner basis Eigenvalue algorithm Exponentiating by squaring : quickly computes powers of numbers and matrices Gram-Schmidt process : orthogonalizes a set of vectors Knuth-Bendix completion algorithm : for rewriting rule systems Multivariate division algorithm : for polynomials in several indeterminates

10. Parsing Recursive descent parser : A top-down parser suitable for LL(k) grammars LL parser : A relatively simple linear time parsing algorithm for a limited class of

context-free grammars LR parser : A more complex linear time parsing algorithm for a larger class of

context-free grammars. Variants: o Operator-precedence parser o SLR (Simple LR) parser o LALR (Look-ahead LR) parser o Canonical LR parser

Packrat parser : A linear time parsing algorithm supporting some context-free grammars and parsing expression grammars

CYK algorithm : An O(n3) algorithm for parsing any context-free grammar Earley's algorithm : Another O(n3) algorithm for parsing any context-free grammar

11. Teknik perangkat lunak Algorithms for Recovery and Isolation Exploiting Semantics : recovery Unicode Collation Algorithm CHS conversion : Converting between disk addressing systems

Page 10: Algoritma - tulisankuniha.files.wordpress.com  · Web viewOptimization algorithms. ... Genetic algorithms. Particle swarm. Tabu search. Local search. Digital signal processing

Cyclic redundancy check : calculation of a check word Parity : Simple/fast error detection technique. Is a number even or odd? Diff : compare two sequences. An example of Dynamic programming (dynamic

refers to the property that the optimal solution can be constructed by combining optimal solutions to sub-problems e.g. quicksort).

12. Algoritma kuantumApplication of quantum computation to various categories of problems and algorithms

Grover's algorithm : provides quadratic speedup for many search problems Shor's algorithm : provides exponential speedup for factorizing a number Deutsch-Jozsa algorithm : criterion of balance for Boolean function

13. Algoritma medis Medical algorithm Texas Medication Algorithm Project

14. Lainnya Astronomical algorithms Banker's algorithm Baum-Welch algorithm Doomsday algorithm : day of the week Levenberg-Marquardt nonlinear least squares fitting algorithm Marzullo's algorithm : distributed clock synchronization Page replacement algorithms Risch algorithm Schreier-Sims algorithm Todd-Coxeter algorithm Viterbi algorithm Xor swap algorithm : menukar nilai 2 variabel tanpa menggunakan buffer

tambahan

How ancient Sinhala Brahmi numerals were invented

by Brigadier (Retd) B. Munasinghe

Man made an attempt to count on their fingers or the use of pebbles and then invented words for numbers and later devised a system of symbols to record them. The people of

Page 11: Algoritma - tulisankuniha.files.wordpress.com  · Web viewOptimization algorithms. ... Genetic algorithms. Particle swarm. Tabu search. Local search. Digital signal processing

this Island can be proud that some of these attempts of the ancient Sinhala is preserved on various rock inscriptions.

The inscriptions that record almost all our ancient Sinhala numerals is at the Dhakkina Vihare rock inscription in Anuradhapura. The inscription is a record of donations of land to this Tisa maha stupa during the period of King Sirinaga (195-214 AD).

These ancient numerals of the Sinhala, have a close resemblance to the numerals preserved in most other ancient states in the Indian subcontinent. They all appear to have evolved from a common source. The earliest known specimen is of King Asoka of the third Cent BC, where the numerals 1, 2, 4, 6, 7 and 9, are preserved on at inscription near Bombay in Nanaghat as:

The next important trace of these numerals, are of the second Cent AD at Nasik, India. The numerals are

similar to those at Dakkhini Vihare and are of the same period.

The scan of best preserved of the numerals used by the Sinhala, the 3, 4, 5, 6, 8, 9, from Dhakkina Vihare (2 Cent AD) and numeral 2 from Kasimotti (1 Cent AD) and numeral 7 from Baki-ala (1 Cent AD), to complete the list is shown below. A vivid description of these symbols is found in samskrti cultural quarterly No. 17 No. 3 of 1984 by Dr. Abaya Aryasinghe.

As per the book `The History of Mathematics by David M Burton' which traces the origin of the present universally accepted numerals, it was Al-Khowarizmi the famous Arab mathematician who introduced these numerals in his book Algorithmi de numero indorum in 830 AD. Here he described the use of these nine numeral and zero as a place holder in the Indians mathematics. This knowledge was taken to Spain by the moors and the oldest dated European manuscript preserved is the Cordex Vigilanus (976 AD).

The Italian Leonardo of Pisa (Fabonacci) the greatest mathematician of the middle ages in his book liber Abaci (Book of counting) was the first to suggest the advantages of these numerals over the Roman numerals. The Portuguese or the Dutch re-exported these numerals back to the island.

The symbols for ancient Sinhala numerals for 3, 4, 5, 6, 7, 8, 9, 40, 50, 70, 100 and 1000 are all recorded at the Dhakkina Vihare ( inscription of Ceylon volume II part II No. 100)- Dr.

Page 12: Algoritma - tulisankuniha.files.wordpress.com  · Web viewOptimization algorithms. ... Genetic algorithms. Particle swarm. Tabu search. Local search. Digital signal processing

S. Paranavithana. These are on 17 slabs marked from I to XVII in the same book. These numerals appear with the symbol for the then Sinhala standard measure of land, the Kariha. For the convenience of visitors to this site, a description where to look in the slabs at Dhakkina Vihare is given below along with the scans of the slabs.

The scans of inscription shown above are those at Baki - Ala and Kariamottai. These are described in inscriptions of Ceylon volume II part I -Dr. S. Paranavitana.

Dhakkina Vihare - 2 Cent AD

a. Slab No. V: line 1 ninth letter is the sign for the Karisa (KA) followed numeral 100 and 6 then the KA symbol followed by numeral 3. (Fig i)

b. Slab No. VII: line 2 ; tenth letter is KA followed by numeral 100 and 4, then KA symbol followed by numeral 70 and 7.

c. Slab No. IX: line 7; numeral 100 and numeral 9, the KA symbol and numeral 4. (Fig ii)

d. Slab XI: line 5; numeral 50 Ka symbol then numeral 5. (Fig iii)

e. Slab XII: line 4; first letter numeral 100 and 4 followed by KA symbol and numeral 20. (Fig v)

f. Slab XIII: line 6: third symbol is KA followed by numerals 1000 then KA followed by numeral 100. (Fig v)

g. Slab XIV: line 7 first symbol KA followed by numeral 50 (Fig vi) the letter eighteen KA and 50.

Line 8; first symbol is KA followed by numeral 8. Second symbol first line from bottom (Fig vi) Line 9; first symbol is KA symbol followed by numeral 40.

sumber dari :

1. id.wikipedia.org 2. members.tripod.com/~khorasan/TajikPersonalities/Khwarizmi.htm 3. http://www-groups.dcs.st-and.ac.uk/~history/Miscellaneous/Pearce/Lectures/

Ch8_3.html