Logaritma biner: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
←Membuat halaman berisi 'thumbnail|right|320px|Kurva log<sub>2</sub> ''n'' '''Logaritma biner''' ({{lang-en|binary logarithm}}) dalam matematik...'
 
Tidak ada ringkasan suntingan
Baris 12:
dan seterusnyaq
 
Logaritma biner terkait erat dengan "[[Sistem bilangan biner]]". Dalam sejarahnya, aplikasi pertama logaritme biner adalah dalam [[teori musik]], oleh [[Leonhard Euler]]. Bidang lain yang sering menggunakan logaritme biner termasuk [[teori informasi]], [[:en:combinatorics|combinatorics]], [[:en:computer science|computer science]], [[bioinformatika]], desain turnamen olahraga, dan [[fotografufotografi]].
 
== Sejarah ==
Baris 36:
Dalam matematika, logaritme biner suatu bilangan ''n'' ditulis sebagai log<sub>2</sub>&nbsp;''n'' atau <sup>2</sup>log&nbsp;''n''. Namun, sejumlah notasi lain fungsi ini telah diusulkan dan digunakan dalam berbagai bidang.
 
Sejumlah pengarang menuliskan logaritme biner sebagai '''lg ''n'''''.<ref name="clrs">{{Introduction to Algorithms|pages=34, 53–54|edition=2}}</ref><ref name="sw11">{{citation|title=Algorithms|first1=Robert|last1=Sedgewick|author1-link=Robert Sedgewick (computer scientist)|first2=Kevin Daniel|last2=Wayne|publisher=Addison-Wesley Professional|year=2011|isbn=9780321573513|page=185|url=http://books.google.com/books?id=MTpsAQAAQBAJ&pg=PA185}}.</ref> [[Donald Knuth]] mengungkapkan bahwa notasi ini didapatnya dari usulan [[:en:Edward Reingold|Edward Reingold]],<ref name="knuth">{{citation|title=[[The Art of Computer Programming]], Volume 1: Fundamental Algorithms|first=Donald E.|last=Knuth|authorlink=Donald Knuth|edition=3rd|publisher=Addison-Wesley Professional|year=1997|isbn=9780321635747}}, [http://books.google.com/books?id=x9AsAwAAQBAJ&pg=PA11 p.&nbsp;11]. The same notation was in the 1973 2nd edition of the same book (p.&nbsp;23) but without the credit to Reingold.</ref> tetapi penggunaannya dalam teori informasi maupun sains komputer nampaknya sudah ada sebelum Reingold aktif.<ref>{{citation
| last = Trucco | first = Ernesto
| doi = 10.1007/BF02477836
Baris 114:
[[File:Mouse cdna microarray.jpg|thumb|280px|A [[microarray]] of expression data for approximately 8700 genes. The relative expression rates of these genes are represented using binary logarithms.]]
In the analysis of [[microarray]] data in [[bioinformatics]], expression rates of genes are often compared by using the binary logarithm of the ratio of expression rates. By using base&nbsp;2 for the logarithm, a doubled expression rate can be described by a log ratio of 1, a halved expression rate can be described by a log ratio of &minus;1, and an unchanged expression rate can be described by a log ratio of zero, for instance.<ref>{{citation|title=Microarray Gene Expression Data Analysis: A Beginner's Guide|first1=Helen|last1=Causton|first2=John|last2=Quackenbush|first3=Alvis|last3=Brazma|publisher=John Wiley & Sons|year=2009|isbn=9781444311563|pages=49–50|url=http://books.google.com/books?id=bg6D_7mdG70C&pg=PA49}}.</ref> Data points obtained in this way are often visualized as a [[scatterplot]] in which one or both of the coordinate axes are binary logarithms of intensity ratios, or in visualizations such as the [[MA plot]] and [[RA plot]] which rotate and scale these log ratio scatterplots.<ref>{{citation|title=Computational and Statistical Methods for Protein Quantification by Mass Spectrometry|first1=Ingvar|last1=Eidhammer|first2=Harald|last2=Barsnes|first3=Geir Egil|last3=Eide|first4=Lennart|last4=Martens|publisher=John Wiley & Sons|year=2012|isbn=9781118493786|page=105|url=http://books.google.com/books?id=3Z3VbhLz6pMC&pg=PA105}}.</ref>
-->
=== Teori musik===
InDalam [[musicteori theorymusik]], the [[Interval (musicmusik)|interval]] oratau perceptualperbedaan differencedalam betweenpersepsi twoantara tonesdua isnada determinedditentukan byoleh therasio ratiokedua of[[frekuensi]]nya. theirInterval frequencies.yang Intervalsdatang comingdari fromrasio [[rationalbilangan numberrasional]] ratiosdengan withnumerator smalldan numeratorsdenominator andkecil denominatorsditerima aresebagai perceived as particularlysangat ''euphonius''. TheInterval simplestyang andpaling mostsederhana importantdan ofpaling thesepenting intervals is theadalah [[octaveoktaf]], asuatu frequencyrasio ratio offrekuensi 2:1. The number ofBilangan octavesoktaf bydari whichperbedaan twodua tonesnada differmerupakan islogaritma thebiner binarydari logarithmrasio offrekuensi theirkedua frequencynada ratioitu.<ref name="mga">{{citation|title=The Musician's Guide to Acoustics|first1=Murray|last1=Campbell|first2=Clive|last2=Greated|publisher=Oxford University Press|year=1994|isbn=9780191591679|page=78|url=http://books.google.com/books?id=iiCZwwFG0x0C&pg=PA78}}.</ref>
 
Untuk mempelajari [[tuning system]] dan aspek lain dari teori musik dibutuhkan pembedaan yang lebih peka antara nada-nada, sehingga diperlukan suatu pengukuran besarnya interval yang lebih halus dari suatu oktaf dan dapat ditambah (sebagaimana suatu [[logaritma) bukannya dikalikan (sebagaimana rasio frekuensi). Jadi, jika nada-nada ''x'', ''y'', dan ''z'' membentuk urutan nada-nada yang menaik, maka ukuran interval dari ''x'' ke ''y'' ditambah ukuran interval dari ''y'' ke ''z'' seharusnya sama dengan ukuran interval dari ''x'' ke ''z''. Pengukuran semacam ini dilakukan dengan satuan [[:en:Cent (music)|''cent'']], yang membagi suatu oktaf menjadi 1200 interval yang sama (12 [[semitone]] yang masing-masing terdiri dari 100 ''cent''). Secara matematis, nada-nada dengan frekuensi ''f''<sub>1</sub> dan ''f''<sub>2</sub>, mempunyai jumlah cent dalam interval dari ''x'' ke ''y'' sebesar<ref name="mga"/>
===Music theory===
In [[music theory]], the [[Interval (music)|interval]] or perceptual difference between two tones is determined by the ratio of their frequencies. Intervals coming from [[rational number]] ratios with small numerators and denominators are perceived as particularly euphonius. The simplest and most important of these intervals is the [[octave]], a frequency ratio of 2:1. The number of octaves by which two tones differ is the binary logarithm of their frequency ratio.<ref name="mga">{{citation|title=The Musician's Guide to Acoustics|first1=Murray|last1=Campbell|first2=Clive|last2=Greated|publisher=Oxford University Press|year=1994|isbn=9780191591679|page=78|url=http://books.google.com/books?id=iiCZwwFG0x0C&pg=PA78}}.</ref>
 
In order to study [[tuning system]]s and other aspects of music theory requiring finer distinctions between tones, it is helpful to have a measure of the size of an interval that is finer than an octave and is additive (as logarithms are) rather than multiplicative (as frequency ratios are). That is, if tones ''x'', ''y'', and ''z'' form a rising sequence of tones, then the measure of the interval from ''x'' to ''y'' plus the measure of the interval from ''y'' to ''z'' should equal the measure of the interval from ''x'' to ''z''. Such a measure is given by the [[Cent (music)|cent]], which divides the octave into 1200 equal intervals (12 [[semitone]]s of 100 cents each). Mathematically, given tones with frequencies ''f''<sub>1</sub> and ''f''<sub>2</sub>, the number of cents in the interval from ''x'' to ''y'' is<ref name="mga"/>
:<math>\left|1200\log_2\frac{f_1}{f_2}\right|.</math>
TheIstilah [[:en:millioctave|milioktaf]] isdidefinisikan defineddengan incara theyang same waysama, buttetapi withdengan asuatu ''multiplier of'' 1000 instead ofbukannya ''1200''.
<!--
 
===Sports scheduling===
In competitive games and sports involving two players or teams in each game or match, the binary logarithm indicates the number of rounds necessary in a [[single-elimination tournament]] in order to determine a winner. For example, a tournament of 4 players requires log<sub>2</sub>(4)&nbsp;=&nbsp;2 rounds to determine the winner, a tournament of 32 teams requires log<sub>2</sub>(32)&nbsp;=&nbsp;5 rounds, etc. In this case, for ''n'' players/teams where ''n'' is not a power of 2, log<sub>2</sub>''n'' is rounded up since it will be necessary to have at least one round in which not all remaining competitors play. For example, log<sub>2</sub>(6) is approximately 2.585, rounded up, indicates that a tournament of 6 requires 3 rounds (either 2 teams will sit out the first round, or one team will sit out the second round). The same number of rounds is also necessary to determine a clear winner in a [[Swiss-system tournament]].<ref>{{citation|title=Introduction to Physical Education and Sport Science|first=Robert|last=France|publisher=Cengage Learning|year=2008|isbn=9781418055295|page=282|url=http://books.google.com/books?id=dH2nB1CX2SMC&pg=PA282}}.</ref>
Baris 131:
 
Binary logarithms (expressed as stops) are also used in [[densitometry]], to express the [[dynamic range]] of light-sensitive materials or digital sensors.<ref>{{citation|title=Visual Effects Society Handbook: Workflow and Techniques|first1=Susan|last1=Zwerman|first2=Jeffrey A.|last2=Okun|publisher=CRC Press|year=2012|isbn=9781136136146|page=205|url=http://books.google.com/books?id=3rLpAwAAQBAJ&pg=PA205}}.</ref>
-->
==Kalkulasi==
 
===Konversi dari basis-basis lain ===
==Calculation==
AnSuatu easycara waymudah tountuk calculatemenghitung the log<subsup>2</subsup>log (''n'') onpada [[calculatorkalkulator]]s thatyang dotidak notmempunyai have afungsi log<sub>2</sub>-function isadalah tomenggunakan use thefungsi [[logaritma natural logarithm]] (ln) or theatau [[commonlogaritma logarithmumum]] (log) functions, whichyang arebiasanya foundada onpada mostkebanyakan [[:en:scientific calculator|scientific calculator]]s. The specificRumus [[:en:Logarithm#Change of base|changeperubahan ofbasis logarithm baselogaritma]] [[formulae]] for this areadalah:<ref name="btzs"/><ref>{{citation|title=Secret History: The Story of Cryptology|first=Craig P.|last=Bauer|publisher=CRC Press|year=2013|isbn=9781466561861|page=332|url=http://books.google.com/books?id=EBkEGAOlCDsC&pg=PA332}}.</ref>
[[File:SR-50 early TI calculator.agr.jpg|thumb|180px|[[TI SR-50]] [[scientific calculator]] (1974). The ln and log keys are in the second row; there is no log<sub>2</sub> key.]]
===Conversion from other bases===
An easy way to calculate the log<sub>2</sub>(''n'') on [[calculator]]s that do not have a log<sub>2</sub>-function is to use the [[natural logarithm]] (ln) or the [[common logarithm]] (log) functions, which are found on most [[scientific calculator]]s. The specific [[Logarithm#Change of base|change of logarithm base]] [[formulae]] for this are:<ref name="btzs"/><ref>{{citation|title=Secret History: The Story of Cryptology|first=Craig P.|last=Bauer|publisher=CRC Press|year=2013|isbn=9781466561861|page=332|url=http://books.google.com/books?id=EBkEGAOlCDsC&pg=PA332}}.</ref>
 
:<math>\log_2 n = \frac{\ln n}{\ln 2} = \frac{\log_{10} n}{\log_{10} 2},</math>
or approximately
:<math>\log_2 n \approx 1.442695\ln n \approx 3.321928\log_{10} n.</math>
<!--
 
===Integer rounding===
The binary logarithm can be made into a function from integers and to integers by [[rounding]] it up or down. These two forms of integer binary logarithm are related by this formula:
Baris 198:
| volume = 40
| year = 1991}}.</ref>
--.>
=== Dukungan perpustakaan software ===
Fungsi <code>log2</code> dimasukkan ke dalam [[:En:C mathematical functions|fungsi matematika C]] standar. Versi default fungsi ini mengambil argumen [[double precision]] tetapi varian-variannya mengizinkan argumen dalam bentuk single-precision atau sebagai [[long double]].<ref>{{citation | url=http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf | title=ISO/IEC 9899:1999 specification | page=226| contribution = 7.12.6.10 The log2 functions }}.</ref>