Subsequence

In mathematics, a subsequence of a given sequence is a sequence that can be derived from the given sequence by deleting some or no elements without changing the order of the remaining elements. For example, the sequence is a subsequence of obtained after removal of elements and The relation of one sequence being the subsequence of another is a preorder.

Subsequences can contain consecutive elements which were not consecutive in the original sequence. A subsequence which consists of a consecutive run of elements from the original sequence, such as from is a substring. The substring is a refinement of the subsequence.

The list of all subsequences for the word "apple" would be "a", "ap", "al", "ae", "app", "apl", "ape", "ale", "appl", "appe", "aple", "apple", "p", "pp", "pl", "pe", "ppl", "ppe", "ple", "pple", "l", "le", "e", "" (empty string).

Common subsequence

Given two sequences and a sequence is said to be a common subsequence of and if is a subsequence of both and For example, if then is said to be a common subsequence of and

This would not be the longest common subsequence, since only has length 3, and the common subsequence has length 4. The longest common subsequence of and is

Applications

Subsequences have applications to computer science,[1] especially in the discipline of bioinformatics, where computers are used to compare, analyze, and store DNA, RNA, and protein sequences.

Take two sequences of DNA containing 37 elements, say:

SEQ1 = ACGGTGTCGTGCTATGCTGATGCTGACTTATATGCTA
SEQ2 = CGTTCGGCTATCGTACGTTCTATTCTATGATTTCTAA

The longest common subsequence of sequences 1 and 2 is:

LCS(SEQ1,SEQ2) = CGTTCGGCTATGCTTCTACTTATTCTA

This can be illustrated by highlighting the 27 elements of the longest common subsequence into the initial sequences:

SEQ1 = ACGGTGTCGTGCTATGCTGATGCTGACTTATATGCTA
SEQ2 = CGTTCGGCTATCGTACGTTCTATTCTATGATTTCTAA

Another way to show this is to align the two sequences, that is, to position elements of the longest common subsequence in a same column (indicated by the vertical bar) and to introduce a special character (here, a dash) for padding of arisen empty subsequences:

SEQ1 = ACGGTGTCGTGCTAT-G--C-TGATGCTGA--CT-T-ATATG-CTA-
        | || ||| ||||| |  | |  | || |  || | || |  |||
SEQ2 = -C-GT-TCG-GCTATCGTACGT--T-CT-ATTCTATGAT-T-TCTAA

Subsequences are used to determine how similar the two strands of DNA are, using the DNA bases: adenine, guanine, cytosine and thymine.

Theorems

  • Every infinite sequence of real numbers has an infinite monotone subsequence (This is a lemma used in the proof of the Bolzano–Weierstrass theorem).
  • Every infinite bounded sequence in has a convergent subsequence (This is the Bolzano–Weierstrass theorem).
  • For all integers and every finite sequence of length at least contains a monotonically increasing subsequence of length  or a monotonically decreasing subsequence of length  (This is the Erdős–Szekeres theorem).
  • A metric space is compact if every sequence in has a convergent subsequence whose limit is in .

See also

Notes

  1. ^ In computer science, string is often used as a synonym for sequence, but it is important to note that substring and subsequence are not synonyms. Substrings are consecutive parts of a string, while subsequences need not be. This means that a substring of a string is always a subsequence of the string, but a subsequence of a string is not always a substring of the string, see: Gusfield, Dan (1999) [1997]. Algorithms on Strings, Trees and Sequences: Computer Science and Computational Biology. USA: Cambridge University Press. p. 4. ISBN 0-521-58519-8.

This article incorporates material from subsequence on PlanetMath, which is licensed under the Creative Commons Attribution/Share-Alike License.

Read other articles:

1965 single by Red SovineGiddyup GoSingle by Red Sovinefrom the album Giddyup Go B-sideKiss and the KeysReleasedOctober 1965RecordedAugust 1965Starday Sound StudioNashville, TennesseeGenreCountry, Truck-driving countryLength3:57LabelStardaySongwriter(s)Red Sovine and Tommy HillProducer(s)Tommy HillRed Sovine singles chronology Hold Everything (Till I Get Home) (1956) Giddyup Go (1965) Long Night (1966) Giddyup Go is a country music song made famous by Red Sovine. Released in 1965, the song wa...

 

Опис файлу Опис укр. Братська могила воїнів Радянської Армії та пам'ятник воїнам-односельцям, які загинули в роки Великої Вітчизняної війни, село Лук'янівка, біля клубу Це фотографія пам'ятки культурної спадщини в Україні. Номер у каталозі ГО «Вікімедіа Україна»: 32-202-0033 Д...

 

Ця стаття не містить посилань на джерела. Ви можете допомогти поліпшити цю статтю, додавши посилання на надійні (авторитетні) джерела. Матеріал без джерел може бути піддано сумніву та вилучено. (лютий 2020) Науково — дослідний технологічний інститут приладобудування (Н

Luis Soriano (Bildmitte) und einer der Esel Der Biblioburro (dt. Biblio-Esel) ist eine fahrende Bibliothek (Fahrbibliothek), die vom Rücken von zwei Eseln, Alfa und Beto, herunter Bücher an Kunden verleiht. Das Projekt wurde von Luis Soriano in La Gloria, Kolumbien ins Leben gerufen.[1] Sorianos Begeisterung für das Lesen begann bereits im Kindesalter. Er erwarb einen Hochschulabschluss in Spanischer Literatur, nachdem er bei einem Professor studiert hatte, der zweimal monatlich se...

 

Lage der höchsten Hauptgipfel Die Liste der höchsten Berge in Deutschland führt die Berge mit den höchsten Gipfeln Deutschlands auf. Alle diese Berge befinden sich im südlichsten Bayern nahe der Grenze zu Österreich. Innerhalb der Alpen liegen sie in den Ostalpen und sind Teil der Nördlichen Kalkalpen. Zum größten Teil gehören sie den Gebirgsgruppen Wetterstein, Berchtesgadener Alpen und Allgäuer Alpen an. Da die Definition eines Berges nicht allgemeingültig festgelegt ist, wird z...

 

برج قنبد قابوس موقع اليونيسكو للتراث العالمي الدولة إيران النوع ثقافي المعايير (i) معيار تقدير القيمة العالمية الاستثثنائية  [لغات أخرى]‏[1]،  و(ii) معيار تقدير القيمة العالمية الاستثثنائية  [لغات أخرى]‏[1]،  و(iii) معيار تقدير القيمة العالمية الاستثث

獲得メダル  ノルウェー 男子 スキージャンプ オリンピック 金 1924 シャモニー 個人スペシャル・ジャンプ ノルディックスキー世界選手権 金 1926 Lahti 個人スペシャル・ジャンプ セーリング オリンピック 銀 1936 ベルリン 8メートル級 ヤコブ・チューリン・”チュラ”タムス(Jacob Tullin Tulla Thams、1898年4月7日 - 1954年7月27日)はノルウェーのオリンピック選手。クリス...

 

For the 2018 Australian mini-series, see Olivia Newton-John: Hopelessly Devoted to You.  TV series or program OliviaThe show's title card.Also known asOlivia the PigWelcome to the World of the Pig OliviaGenre Animated television series Children's television series Comedy Created byKate BoutilierPatricia ResnickBased onOlivia book series by Ian FalconerDeveloped byKate BoutilierEryk CasemiroWritten byKate BoutilierSilvia Cardenas OlivasEryk CasemiroIan FalconerMichele GendelmanJill GoreyS...

 

Overview of education in Mauritius Education in MauritiusMinistry of Education and Human Resources andMinistry of Tertiary Education, Science, Research and TechnologyMinister of EducationLeela Devi DookhunNational education budget (2016)Budget₨ 16 billion[1]General detailsPrimary languages• English• French• Mauritian creoleSystem typeNationalLiteracy (2022)Total91.9%[2]Male93.6%Female90.3%Post secondary106,300Attainment (2022)Post-secondary diploma8.8%[3] Educa...

Pakistani business and political family Saifullah Khan familyCurrent regionIslamabad, PakistanPlace of originLakki MarwatTraditionsSunni MuslimEstate(s)Saif Group The Saifullah Khan family, also known as Khans of Marwat is a prominent business and political family of Pakistan, based in the province of Khyber Pakhtunkhwa and capital city of Pakistan, Islamabad. The family is of Pashtun origin and hails from Lakki Marwat. Saifullah family is also Khans of Marwat tribe of Pashtuns. Members Anwar...

 

Social networking service and microblogging service App.netType of siteSocial networking service, microbloggingAvailable inEnglishOwnerMixed Media LabsURLApp.netRegistrationRequiredLaunchedAugust 8, 2012 (2012-08-08)Current statusShut Down (since March 16, 2017 (2017-03-16)) App.net was an ad-free online social networking service and microblogging service which enabled its users to write messages of up to 256 characters. App.net provided their own web i...

 

Meußließen Gemeinde Clenze Koordinaten: 52° 56′ N, 10° 53′ O52.94081910.88022Koordinaten: 52° 56′ 27″ N, 10° 52′ 49″ O Eingemeindung: 1. Juli 1972 Postleitzahl: 29459 Vorwahl: 05844 Meußließen (Landkreis Lüchow-Dannenberg) Lage von Meußließen in Landkreis Lüchow-Dannenberg Meußließen ist ein Ortsteil der Gemeinde Clenze im niedersächsischen Landkreis Lüchow-Dannenberg. Das Dorf liegt westlich vom Kernbereich vo...

2008 single by G-Unit featuring Young BuckI Like the Way She Do ItI Like the Way She Do It CD coverSingle by G-Unit featuring Young Buckfrom the album T·O·S (Terminate on Sight) ReleasedApril 22, 2008Recorded2008GenreHip hopLength3:56LabelG-UnitInterscopeSongwriter(s)Curtis JacksonChristopher LloydMarvin BernardDavid BrownJesse MatthewsKendred SmithProducer(s)Street RadioG-Unit featuring Young Buck singles chronology Smile (2004) I Like the Way She Do It (2008) Rider Pt. 2 (2008) I Like the...

 

Musical revue Playbill for The Passing Show on tour in 1894 The Passing Show was a musical revue in three acts, billed as a topical extravaganza, with a book and lyrics by Sydney Rosenfeld and music by Ludwig Engländer and various other composers. It featured spoofs of theatrical productions of the past season. The show was presented in 1894 by George Lederer at the Casino Theatre. It was one of the first musical revues on Broadway and led the fashion for such productions.[1] The Cas...

 

2002 single by ShakiraQue Me Quedes TúSingle by Shakirafrom the album Laundry Service Released11 November 2002 (2002-11-11)Recorded2001Genre Rock en español soft rock Length4:48LabelEpicComposer(s) Shakira Luis Fernando Ochoa[1] Lyricist(s)ShakiraProducer(s) Shakira Luis Ochoa Shakira singles chronology Objection (Tango) (2002) Que Me Quedes Tú (2002) The One (2003) Music videoQue Me Quedes Tú on YouTube Que Me Quedes Tú (English: That I Have You) is a song by Colo...

Upazila in Rajshahi Division, BangladeshGurudaspur গুরুদাসপুরUpazilaGurudaspurLocation in BangladeshCoordinates: 24°22′N 89°15′E / 24.367°N 89.250°E / 24.367; 89.250Country BangladeshDivisionRajshahi DivisionDistrictNatore DistrictArea • Total199.4 km2 (77.0 sq mi)Population (1991) • Total173,276 • Density870/km2 (2,300/sq mi)Time zoneUTC+6 (BST)WebsiteOfficial Map of Gurudasp...

 

South Korean singer and actor (born 1990) For other people with the same name, see Lee Jun-ho. In this Korean name, the family name is Lee. Lee Jun-hoLee in July 2023Born (1990-01-25) January 25, 1990 (age 33)Seoul, South KoreaEducation Howon University (BA) Sejong University (MA – Cinematography) OccupationsSingeractorMusical careerGenresK-popelectronicR&Bhip hopInstrument(s)VocalsYears active2008–presentLabelsJYPMember of2PMWebsite2pm.jype.com Musical artistKorean nameHangul이...

 

Typeface KlavikaCategorySans-serifClassificationCross of Humanist and GeometricDesigner(s)Eric OlsonFoundryProcess Type FoundryDate created2004LicenseProprietarySample Klavika is a family of sans-serif fonts designed by Eric Olson and released by Process Type Foundry in 2004. It contains four weights: light, regular, medium, and bold (with corresponding italics) and variations of numerals.[1] The family of typefaces is described as straight-sided technical sans-serifs[2] flexi...

Juan Miguel Fuente-Alba Fuente-Alba en 2012, mientras era Comandante en Jefe del Ejército. Comandante en Jefe del Ejército de Chile 9 de marzo de 2010-9 de marzo de 2014Predecesor Óscar Izurieta FerrerSucesor Humberto Oviedo Arriagada Información personalNombre de nacimiento Juan Miguel Fuente-Alba Poblete Nacimiento 31 de agosto de 1953 (70 años)Santiago, ChileNacionalidad ChilenaFamiliaCónyuge Anita María Pinochet RibbeckHijos 3EducaciónEducado en Escuela Militar del Libertador...

 

1969 superhero team by Marvel Comics For the modern team, see Guardians of the Galaxy (2008 team). Guardians of the GalaxyDebut: Marvel Super-Heroes #18 (January 1969). Cover art by Gene Colan and Mike Esposito. (l. to r.) Vance Astro, Charlie-27, Martinex, Yondu.Publication informationPublisherMarvel ComicsFirst appearanceMarvel Super-Heroes #18 (January 1969)In-story informationBase(s)Freedom's LadyUSS Captain AmericaMember(s)List of Guardians of the Galaxy members Guardians of the Galaxy a...

 

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