Share to: share facebook share twitter share wa share telegram print page

Iteration

Iteration is the repetition of a process in order to generate a (possibly unbounded) sequence of outcomes. Each repetition of the process is a single iteration, and the outcome of each iteration is then the starting point of the next iteration.

In mathematics and computer science, iteration (along with the related technique of recursion) is a standard element of algorithms.

Mathematics

In mathematics, iteration may refer to the process of iterating a function, i.e. applying a function repeatedly, using the output from one iteration as the input to the next. Iteration of apparently simple functions can produce complex behaviors and difficult problems – for examples, see the Collatz conjecture and juggler sequences.

Another use of iteration in mathematics is in iterative methods which are used to produce approximate numerical solutions to certain mathematical problems. Newton's method is an example of an iterative method. Manual calculation of a number's square root is a common use and a well-known example.

Computing

In computing, iteration is the technique marking out of a block of statements within a computer program for a defined number of repetitions. That block of statements is said to be iterated; a computer scientist might also refer to that block of statements as an "iteration".

Implementations

Loops constitute the most common language constructs for performing iterations. The following pseudocode "iterates" three times the line of code between begin & end through a for loop, and uses the values of i as increments.

a := 0
for i := 1 to 3 do       { loop three times }
begin
    a := a + i;          { add the current value of i to a }
end;
print(a);                { the number 6 is printed (0 + 1; 1 + 2; 3 + 3) }

It is permissible, and often necessary, to use values from other parts of the program outside the bracketed block of statements, to perform the desired function.

Iterators constitute alternative language constructs to loops, which ensure consistent iterations over specific data structures. They can eventually save time and effort in later coding attempts. In particular, an iterator allows one to repeat the same kind of operation at each node of such a data structure, often in some pre-defined order.

Iteratees are purely functional language constructs, which accept or reject data during the iterations.

Relation with recursion

Recursions and iterations have different algorithmic definitions, even though they can generate identical effects/results. The primary difference is that recursion can be employed as a solution without prior knowledge as to how many times the action will have to repeat, while a successful iteration requires that foreknowledge.

Some types of programming languages, known as functional programming languages, are designed such that they do not set up a block of statements for explicit repetition, as with the for loop. Instead, those programming languages exclusively use recursion. Rather than call out a block of code to be repeated a pre-defined number of times, the executing code block instead "divides" the work to be done into a number of separate pieces, after which the code block executes itself on each individual piece. Each piece of work will be divided repeatedly until the "amount" of work is as small as it can possibly be, at which point the algorithm will do that work very quickly. The algorithm then "reverses" and reassembles the pieces into a complete whole.

The classic example of recursion is in list-sorting algorithms, such as merge sort. The merge sort recursive algorithm will first repeatedly divide the list into consecutive pairs; each pair is then ordered, then each consecutive pair of pairs, and so forth until the elements of the list are in the desired order.

The code below is an example of a recursive algorithm in the Scheme programming language that will output the same result as the pseudocode under the previous heading.

(let iterate ((i 1) (a 0))
  (if (<= i 3)
    (iterate (+ i 1) (+ a i))
    (display a)))

Education

In some schools of pedagogy, iterations are used to describe the process of teaching or guiding students to repeat experiments, assessments, or projects, until more accurate results are found, or the student has mastered the technical skill. This idea is found in the old adage, "Practice makes perfect." In particular, "iterative" is defined as the "process of learning and development that involves cyclical inquiry, enabling multiple opportunities for people to revisit ideas and critically reflect on their implication."[1]

Unlike computing and math, educational iterations are not predetermined; instead, the task is repeated until success according to some external criteria (often a test) is achieved.

See also

References

  1. ^ Helen Timperley; Aaron Wilson; Heather Barrar; Irene Fung. "Teacher Professional Learning and Development: Best Evidence Synthesis Iteration [BES]" (PDF). OECD. p. 238. Archived from the original (PDF) on 26 June 2013. Retrieved 4 April 2013.

Read other articles:

Public high school in Klein, , Texas, United StatesKlein High SchoolAddress16715 Stuebner Airline Rd.Klein, (Harris County), Texas 77379-7376United StatesCoordinates30°01′08″N 95°31′27″W / 30.018958°N 95.524129°W / 30.018958; -95.524129InformationTypePublic high schoolMottoTogether, We Make the Difference.Established1938; 85 years ago (1938)School districtKlein Independent School DistrictPrincipalBrandon BakerTeaching staff199.36 FTEs (2020-2…

Greco antico †Ἑλληνική (Hellēnikḕ)Parlato inAntica GreciaAnatolia (colonie varie)Tracia (colonie varie)Sicilia (colonie siceliote)Italia meridionale (colonie italiote)Illiria (colonie varie)Antica Libia (colonie costituenti la Pentapoli cirenaica)Gallia Narbonense e Hispania (colonia di Massalia e sue relative sottocolonie)Corsica (colonia di Alalia)Egitto tolemaico (lingua ufficiale e di corte)Monte Athos (lingua ufficiale) PeriodoIX-IV secolo a.C. LocutoriClassificaestinta Altre …

  Gran Premio de Catalunya de 2017Detalles de carrera 7.ª prueba de 18de la Temporada 2017 del Campeonato. Datos generalesFecha 11 de junio de 2017Sede Circuito de Barcelona-Cataluña, MontmelóCircuitoTipo ylongitud Instalaciones permanentes4,655 km / 2,875 miMotoGP Pole position Vuelta rápida Dani Pedrosa1:43.870 Jonas Folger1:45.969 Podio Andrea Dovizioso Marc Márquez Dani Pedrosa Moto2 Pole position Vuelta rápida Álex Márquez1:49.408 Álex Márquez1:49.712 Podio Álex M

‹ 2009 2015 › Pemilihan umum Knesset ke-19 23 Januari 2013 (2013-01-23) Partai Ketua Suara % Kursi +/– Likud Yisrael Beiteinu Benjamin Netanyahu 884.631 23,32% 31  -11 Yesh Atid Yair Lapid 543.280 14,32% 19  +19 Partai Buruh Shelly Yachimovich 432.083 11,39% 15  +7 The Jewish Home Naftali Bennett 345.935 9,12% 12  +7 Shas Eli Yishai 331.800 8,75% 11  +1 Taurat Yudaisme Bersatu Yaakov Litzman 196.038 5,17% 7  +2 Hatnua Tzipi Livni 189.168 4,99% 6…

Тукціялат. Tuccia Країна Стародавній РимДіяльність весталка  Медіафайли у Вікісховищі Тукція (лат. Tuccia) — давньоримська весталка, імовірно жила в III столітті до н. е. Джованні Баттіста Мороні«Діва-весталка Тукція», біля 1555 Присвячену Тукції історію включив в свою прац…

Gedung Dwi WarnaNama sebagaimana tercantum dalamSistem Registrasi Nasional Cagar BudayaGedung Dwi Warna Cagar budaya IndonesiaPeringkatNasionalKategoriBangunanNo. RegnasCB.952LokasikeberadaanBandung Wetan, Bandung, Jawa BaratNo. SKSK Menteri No.PM.04/PW.007/MKP/2010SK Menteri No.184/M/2017Tanggal SK8 Januari 20106 Juli 2017PemilikKementerian Keuangan Republik IndonesiaPengelolaKementerian Keuangan Republik IndonesiaKoordinat6°54′02″S 107°37′15″E / 6.900566°S 107.620759…

قرية عينه السفلى  - قرية -  تقسيم إداري البلد  اليمن المحافظة محافظة البيضاء المديرية مديرية السوادية العزلة عزلة ال منصور بني وهب السكان التعداد السكاني 2004 السكان 242   • الذكور 113   • الإناث 129   • عدد الأسر 22   • عدد المساكن 19 معلومات أخرى التوقيت توقيت

This article is about the Talking Heads album. For the Australian brewery, see Little Creatures Brewery. 1985 studio album by Talking HeadsLittle CreaturesStudio album by Talking HeadsReleasedJune 10, 1985RecordedOctober 1984 – March 1985StudioSigma Sound (New York City)Genre New wave pop rock Length38:38LabelSireProducerTalking HeadsTalking Heads chronology Stop Making Sense(1984) Little Creatures(1985) True Stories(1986) Singles from Little Creatures The Lady Don't MindReleased:…

Swimming competition Men's 100 metre breaststroke at the 2021 FINA World Swimming Championships (25 m)VenueEtihad ArenaLocationAbu Dhabi, United Arab EmiratesDates16 December (heats and semifinals)17 December (final)Competitors62 from 56 nationsWinning time55.70 CRMedalists  Ilya Shymanovich   Belarus Nicolò Martinenghi   Italy Nic Fink   United States← 20182022 → 2021 FINA World Swimming ChampionshipsFr…

Untuk permainan panggung, lihat Incendies (permainan panggung) IncendiesPoster teatrikalSutradara Denis Villeneuve Produser Luc Déry Kim McCraw Ditulis oleh Denis Villeneuve Valérie Beaugrand-Champagne SkenarioDenis VilleneuveValérie Beaugrand-ChampagneBerdasarkanIncendiesoleh Wajdi MouawadPemeranLubna AzabalMélissa Désormeaux-PoulinMaxim GaudetteRémy GirardAllen AltmanPenata musikGrégoire HetzelSinematograferAndré TurpinPenyuntingMonique DartonnePerusahaanproduksimicro_scope[1…

1925 train robbery in Kakori (now in Uttar Pradesh, India) 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: Kakori conspiracy – news · newspapers · books · scholar · JSTOR (February 2018) (Learn how and when to remove this template message) The Kakori Train Action was a train robbery that took place at Kakori, a…

American telecommunications company This article is about the current subsidiary of AT&T, Inc which was originally known as American Telephone and Telegraph Company. For the 2005 company that resulted from the acquisition by SBC, see AT&T. AT&T CorporationThe AT&T logo since 2015550 Madison Avenue, the AT&T Corporation headquarters in New York City prior to 2005FormerlyAmerican Telephone and Telegraph Company (1885–1994)TypeSubsidiaryIndustryTelecommunicationsPredecessorAme…

Stasiun Nishi-Kiga西気賀駅Stasiun Nishi-Kiga pada Maret 2006LokasiHorie-cho, Kiga, Kita-ku, Hamamatsu-shi, Shizuoka-ken 431-1305JepangKoordinat34°48′09″N 137°37′19″E / 34.80250°N 137.62194°E / 34.80250; 137.62194Koordinat: 34°48′09″N 137°37′19″E / 34.80250°N 137.62194°E / 34.80250; 137.62194PengelolaTenryū Hamanako RailroadJalur■ Tenryū Hamanako LineLetak dari pangkal47.7 kilometer dari KakegawaJumlah peron2 peron sa…

Pour les articles homonymes, voir Jean de Thourotte (homonymie). Jean II de Thourotte Blason de la Maison de Thourotte(d’or au lion de sable lampassé de gueules.) Titre Châtelain de Thourotte et de Noyon (vers 1177 - avant 1237) Prédécesseur Jean Ier de Thourotte Successeur Jean III de Thourotte Allégeance Comté de Champagne Biographie Dynastie Maison de Thourotte Naissance c. 1165 Décès avant 1237 Père Jean Ier de Thourotte Mère Alix de Dreux Conjoint Odette de D…

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: Parasuramalingeswarar Temple – news · newspapers · books · scholar · JSTOR (August 2018) (Learn how and when to remove this template message) Hindu temple in Tamil Nadu, India Parasuramalingeswarar TempleShri Parasuramalingeswarar Temple @ AyanavaramReligionAffili…

Turkic language of the Turkish people This article is about the Turkish language. For the language family it belongs to, see Turkic languages. TurkishTürkçe (noun, adverb) Türk dili (noun)PronunciationTürkçe: [ˈtyɾctʃe] ⓘ Türk dili: Turkish pronunciation: [ˈtyɾc ˈdili]Native to Turkey (official) Northern Cyprus (official) Cyprus (official) Azerbaijan Iraq Syria Lebanon Greece Bulgaria Romania Kosovo North Macedonia Bosnia and Herzegovina RegionAnatolia, Balkans…

Indian politician Y. N. Sukthankar6th Governor of OdishaIn office31 July 1957 – 15 September 1962Preceded byBhim Sen SacharSucceeded byAjudhia Nath Khosla2nd Cabinet Secretary of IndiaIn office1953–1957Prime MinisterJawaharlal NehruPreceded byN. R. PillaiSucceeded byM. K. Vellodi Personal detailsNationalityIndian Yashwant Narayan Sukthankar, CIE (24 August 1897– 16 June1973)[1] was an Indian civil servant, the second Cabinet Secretary of India and a former Governor…

2004 Trafford Metropolitan Borough Council election ← 2003 10 June 2004 (2004-06-10) 2006 → 63 of 63 seats to Trafford Metropolitan Borough Council32 seats needed for a majority   First party Second party Third party   Leader Susan Fildes David Acton Ray Bowker Party Conservative Labour Liberal Democrats Leader's seat Altrincham Gorse Hill Village Last election 10 seats,45.9% 10 seats,35.7% 1 seats,13.5% Seats before 28 31 4 Seats…

Military overthrow of President Omar al-Bashir 2019 Sudanese coup d'étatPart of the Sudanese RevolutionDate11 April 2019[1]LocationKhartoum, Sudan15°30′2″N 32°33′36″E / 15.50056°N 32.56000°E / 15.50056; 32.56000Result Military coup successful, protests continue Omar al-Bashir removed from power National Legislature dissolved Imposing a state of emergency for a period of three months Constitution suspended Transitional Military Council established Prot…

Japanese rice ball For the video game, see Onigiri (video game). OnigiriTwo onigiri, or rice balls, on a plateTypeRice ballsPlace of originJapanAssociated cuisine Japanese cuisine Main ingredientsJaponica riceSimilar dishesArancini, cifantuan, jumeok-bap, zongzi Cookbook: Onigiri  Media: Onigiri Yaki-onigiri with takuan Onigiri (お握り or 御握り), also known as omusubi (お結び), nigirimeshi (握り飯), or rice ball, is a Japanese food made from white rice formed into triangula…

Kembali kehalaman sebelumnya

Lokasi Pengunjung: 18.119.126.3