Competitive analysis (online algorithm)

Competitive analysis is a method invented for analyzing online algorithms, in which the performance of an online algorithm (which must satisfy an unpredictable sequence of requests, completing each request without being able to see the future) is compared to the performance of an optimal offline algorithm that can view the sequence of requests in advance. An algorithm is competitive if its competitive ratio—the ratio between its performance and the offline algorithm's performance—is bounded. Unlike traditional worst-case analysis, where the performance of an algorithm is measured only for "hard" inputs, competitive analysis requires that an algorithm perform well both on hard and easy inputs, where "hard" and "easy" are defined by the performance of the optimal offline algorithm.

For many algorithms, performance is dependent not only on the size of the inputs, but also on their values. For example, sorting an array of elements varies in difficulty depending on the initial order. Such data-dependent algorithms are analysed for average-case and worst-case data. Competitive analysis is a way of doing worst case analysis for on-line and randomized algorithms, which are typically data dependent.

In competitive analysis, one imagines an "adversary" which deliberately chooses difficult data, to maximize the ratio of the cost of the algorithm being studied and some optimal algorithm. When considering a randomized algorithm, one must further distinguish between an oblivious adversary, which has no knowledge of the random choices made by the algorithm pitted against it, and an adaptive adversary which has full knowledge of the algorithm's internal state at any point during its execution. (For a deterministic algorithm, there is no difference; either adversary can simply compute what state that algorithm must have at any time in the future, and choose difficult data accordingly.)

For example, the quicksort algorithm chooses one element, called the "pivot", that is, on average, not too far from the center value of the data being sorted. Quicksort then separates the data into two piles, one of which contains all elements with value less than the value of the pivot, and the other containing the rest of the elements. If quicksort chooses the pivot in some deterministic fashion (for instance, always choosing the first element in the list), then it is easy for an adversary to arrange the data beforehand so that quicksort will perform in worst-case time. If, however, quicksort chooses some random element to be the pivot, then an adversary without knowledge of what random numbers are coming up cannot arrange the data to guarantee worst-case execution time for quicksort.

The classic on-line problem first analysed with competitive analysis (Sleator & Tarjan 1985) is the list update problem: Given a list of items and a sequence of requests for the various items, minimize the cost of accessing the list where the elements closer to the front of the list cost less to access. (Typically, the cost of accessing an item is equal to its position in the list.) After an access, the list may be rearranged. Most rearrangements have a cost. The Move-To-Front algorithm simply moves the requested item to the front after the access, at no cost. The Transpose algorithm swaps the accessed item with the item immediately before it, also at no cost. Classical methods of analysis showed that Transpose is optimal in certain contexts. In practice, Move-To-Front performed much better. Competitive analysis was used to show that an adversary can make Transpose perform arbitrarily badly compared to an optimal algorithm, whereas Move-To-Front can never be made to incur more than twice the cost of an optimal algorithm.

In the case of online requests from a server, competitive algorithms are used to overcome uncertainties about the future. That is, the algorithm does not "know" the future, while the imaginary adversary (the "competitor") "knows". Similarly, competitive algorithms were developed for distributed systems, where the algorithm has to react to a request arriving at one location, without "knowing" what has just happened in a remote location. This setting was presented in (Awerbuch, Kutten & Peleg 1992).

See also

References

Read other articles:

Singapore Cruise Centre terletak di HarbourFront, Singapura. Singapore Cruise Centre adalah pelabuhan kapal di Singapura yang terletak di kawasan HarbourFront dan Pelabuhan Keppel. Pelabuhan ini didirikan pada tahun 1991. Destinasi terjadwal Indonesia Tanjung Balai Karimun Pelabuhan Tanjung Balai Karimun Batam Batam Centre Pelabuhan Sekupang Pelabuhan Nongsa Pelabuhan Teluk Senimba Tanjung Pinang Pelabuhan Tanjung Pinang Destinasi akan datang Sumatra Banda Aceh - Pelabuhan Ulee Lheue Medan - ...

 

Lapide commemorativa nell'isola di Procida, in Piazza dei Martiri, luogo delle prime esecuzioni Di seguito si trova un elenco in ordine alfabetico di 122 esponenti della Repubblica Napoletana del 1799 giustiziati in seguito alla repressione borbonica dopo la caduta della repubblica. Tra essi, 119 uomini e tre donne. Le esecuzioni cominciarono già alcuni giorni prima della caduta della Repubblica, a Procida, il 1º giugno del 1799, per concludersi oltre un anno dopo, con l'esecuzione di Luisa...

 

  لمعانٍ أخرى، طالع ريكو (توضيح). هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فضلًا، ساعد بإضافة وصلة إليها في مقالات متعلقة بها. (يوليو 2019) ريكو معلومات شخصية الميلاد 13 أكتوبر 1915[1]  بازل  الوفاة 27 مارس 1972 (56 سنة)   مواطنة سويسرا  الحياة العملية المه

هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فضلًا، ساعد بإضافة وصلة إليها في مقالات متعلقة بها. (أبريل 2019) كريستيان فروست أولسن معلومات شخصية الميلاد 9 فبراير 1989 (34 سنة)[1][2][3]  لندن[4]  الإقامة أودنسه  مواطنة مملكة الدنمارك  الأب مورتن فروس...

 

GPT-4 Parte de OpenAI API Información generalTipo de programa LLMLanzamiento inicial 14 de marzo de 2023Información técnicaProgramado en PythonSerie OpenAI APIChatGPT y GPT-3GPT-4Enlaces Sitio web oficial [editar datos en Wikidata] GPT-4 (Generative Pre-trained Transformer 4) es un modelo de lenguaje grande (LLM) creado por OpenAI. Se lanzó el 14 de marzo de 2023[1]​ y está disponible a través de la API y para los usuarios de ChatGPT Plus.[2]​[3]​[4]​ C...

 

Tank Brigade of the British Army during the Second World War This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: 1st Army Tank Brigade United Kingdom – news · newspapers · books · scholar · JSTOR (January 2017) (Learn how and when to remove this template message) 1st Army Tank BrigadeBrigade insigniaActive3...

ProdriveJenisPrivateIndustriMotorsportAdvanced TechnologyDidirikan1984KantorpusatBanbury, EnglandTokohkunciDavid Richards (founder and chairman)Produkrace and rally car programmes, car design, advanced technologySitus webProdrive.com Prodrive adalah sebuah perusahaan Inggris yang berbasis di Banbury, Oxfordshire. Perusahaan ini merancang, membangun, dan membalap mobil untuk perusahaan dan tim seperti Aston Martin, Bahrain Raid Xtreme, dan Tim X44. Divisi teknologi canggihnya menerapkan pendek...

 

Australian underwater photographer Valerie May TaylorAMBornValerie May Heighes (1935-11-09) 9 November 1935 (age 88)Sydney, AustraliaNationalityAustralianOccupation(s)Professional diver, underwater photographer and cinematographer, author/illustratorSpouse Ron Taylor ​ ​(m. 1963; died 2012)​ Valerie May Taylor AM (born 9 November 1935)[1] is an Australian conservationist, photographer and filmmaker,[2][3] and an inau...

 

2019 Race of Champions Previous 2018 Next 2022 Layout of 2019 Race of Champions The 2019 Race of Champions was the 30th running of the Race of Champions, and took place on 19–20 January 2019 at Foro Sol inside the Autódromo Hermanos Rodríguez in Mexico.[1] The competition saw local rally driver, Benito Guerra Jr. take the top spot in the individual category beating Loïc Duval in the final. The Stadium Super Trucks held their 2018 season finale at the event, racing as a standalone...

German SS non-commissioned officer (1917–2013) Rochus MischMisch as an UnterscharführerBorn29 July 1917Alt Schalkowitz, Province of Silesia, Kingdom of Prussia, German EmpireDied5 September 2013(2013-09-05) (aged 96)Berlin, GermanyAllegiance GermanyService/branch SchutzstaffelYears of service1937–45RankOberscharführerUnitSS-Verfügungstruppe,Leibstandarte SS Adolf Hitler, FührerbegleitkommandoBattles/warsWorld War II Battle of Modlin AwardsIron CrossWound BadgeDRL Sports...

 

British greyhound racing venue Brighton and Hove Greyhound StadiumA view of the grandstand in 2007LocationBrighton and HoveOperatorEntain (Ladbrokes Coral)Opened1928TenantsGreyhound racingWebsiteOfficial website Brighton & Hove Greyhound Stadium is a greyhound racing track located in the Hove Park area of the city of Brighton and Hove, East Sussex.[1] The stadium also has a restaurant and a number of bars and is owned by the Gala Coral Group and race meetings are held every Thursd...

 

Indian yoga teacher (1920–2019) V. NanammalNanammal in 2018Born(1920-02-24)24 February 1920Coimbatore, Madras Presidency, IndiaDied26 October 2019(2019-10-26) (aged 99)Coimbatore, Tamil Nadu, IndiaNationalityIndianOccupationYoga instructorAwardsNari Shakti Puraskar (2016)Yoga Ratna award (2017)Padma Shri award (2018) V. Nanammal (24 February 1920 – 26 October 2019) was India's oldest yoga teacher. She trained one million students over 45 years and taught one hundred students daily. S...

2021 British television series DeceitGenreCrime dramaThrillerWritten byEmilia di GirolamoDirected byNiall MacCormickStarring Niamh Algar Eddie Marsan Harry Treadaway Sion Daniel Young Country of originUnited KingdomOriginal languageEnglishNo. of series1No. of episodes4ProductionProducerAdo Yoshizaki CassutoCinematographyJan JonaeusRunning time48 minutesOriginal releaseNetworkChannel 4Release13 August (2021-08-13) –3 September 2021 (2021-09-03) Deceit is a British four-part te...

 

Жан-Рене-Констан Куафр. Jean René Constant Quoy Дата рождения 10 ноября 1790(1790-11-10) Место рождения Майе (Вандея) Дата смерти 4 июля 1869(1869-07-04) (78 лет) Место смерти Рошфор Страна Франция Альма-матер Школа военно-морской медицины в Рошфоре[d] Награды и премии  Медиафайлы на Викисклад...

 

Archeologisch park San Agustin Werelderfgoed cultuur Jaguarman Land Colombia Coördinaten 1° 54′ NB, 76° 17′ WL UNESCO-regio Latijns-Amerika en Caraïben Criteria iii Inschrijvingsverloop UNESCO-volgnr. 744 Inschrijving 1995 (19e sessie) Kaart UNESCO-werelderfgoedlijst Portaal    Colombia Archeologie De indiaanse San Agustín cultuur (3300 v.Chr. – 1550 n.Chr.) is een van de bekendste van de precolumbiaanse beschavingen die zich in het gebied van het huidige Colombia...

Fossil bed in the Interior of British Columbia 50°47.831′N 121°8.469′W / 50.797183°N 121.141150°W / 50.797183; -121.141150 McAbee Fossil Beds viewed from the Highway. Heritage status sign The McAbee Fossil Beds is a Heritage Site that protects an Eocene Epoch fossil locality east of Cache Creek, British Columbia, Canada, just north of and visible from Provincial Highway 97 / the Trans-Canada Highway (Highway 1). The McAbee Fossil Beds, comprising 548.23 hectare...

 

Artikel ini tidak memiliki referensi atau sumber tepercaya sehingga isinya tidak bisa dipastikan. Tolong bantu perbaiki artikel ini dengan menambahkan referensi yang layak. Tulisan tanpa sumber dapat dipertanyakan dan dihapus sewaktu-waktu.Cari sumber: Lambang Nusa Tenggara Barat – berita · surat kabar · buku · cendekiawan · JSTOR Lambang Nusa Tenggara BaratDetailMustakaBintang segi lima emasPerisaiPer fess biru muda dan hijau, gunung berapi mengeluark...

 

Udang-merah sulawesi Status konservasi Hampir Terancam (IUCN 3.1)[1] Klasifikasi ilmiah Kerajaan: Animalia Filum: Chordata Kelas: Aves Ordo: Coraciiformes Famili: Alcedinidae Genus: Ceyx Spesies: C. fallax Nama binomial Ceyx fallax(Schlegel, 1866) Udang-merah sulawesi (Ceyx fallax) adalah spesies burung raja-udang dalam famili Alcedinidae. Burung ini endemik di pulau Sulawesi dan kepulauan Sangihe. Deskripsi Panjang tubuh sekitar 12 cm. Paruh berwarna merah, mahkota ber...

Regional unit in East Macedonia and Thrace, GreeceDrama Περιφερειακή ΕνότηταΔράμαςRegional unitMunicipalities of DramaDrama within GreeceCoordinates: 41°15′N 24°10′E / 41.250°N 24.167°E / 41.250; 24.167CountryGreeceRegionEast Macedonia and ThraceCapitalDramaArea • Total3,468 km2 (1,339 sq mi)Population (2021) • Total86,621 • Density25/km2 (65/sq mi)Time zoneUTC+2 • ...

 

1988 visual novel directed by Hideo Kojima 1988 video gameSnatcherPC-8801 cover artDeveloper(s)KonamiPublisher(s)KonamiDirector(s)Naoki MatsuiDesigner(s)Hideo KojimaProgrammer(s)Toshiya AdachiArtist(s)Yoshihiko OtaTomiharu KinoshitaWriter(s)Hideo KojimaComposer(s)Masahiro IkarikoPlatform(s)PC-8801, MSX2, PC Engine, Sega CD, PlayStation, Sega SaturnRelease NEC PC-8801 JP: November 26, 1988 MSX2 JP: December 13, 1988 PC-Engine Super CD-ROM² JP: October 23, 1992 Sega CD/Mega CD EU: December 15,...

 

Strategi Solo vs Squad di Free Fire: Cara Menang Mudah!