0

I've chanced upon quite a few reference books using definitions stating "for the string S[1..n]" and "in the array A[0..n-1]", and I did look up several sites in related fields but am unable to figure out what this notation means. I know that this question is probably trivial to many and may have been answered prior to this question in a related post, but some help will be deeply appreciated as I'm pretty much stuck..

Stoner
  • 846
  • 1
  • 10
  • 30
  • 1
    The string S, which has characters numbered 1 to n. An array A, with positions numbered 0 to n-1. – Arya McCarthy May 20 '17 at 08:33
  • If you view a string as a sequence of characters, then `S[1..n]` means a string from its character at the first index to its nth index. Same goes for the array, 0th element to n - 1 element. – Yuval Itzchakov May 20 '17 at 08:33
  • Ah does that mean that for a string S='abcdef', we have a=1,b=2,...,f=6 in that sense? – Stoner May 20 '17 at 08:36
  • In that case, what does it mean when we have an alphabet = [1..n]? From my understanding, an alphabet in Automata Theory is a finite set of characters or symbols.. @YuvalItzchakov – Stoner May 20 '17 at 08:38
  • 2
    @Stoner Yes. Just remember sequences *usually* start at index 0, but I assume the intent of the author referring to 1 just means he views 1 as the first character of the string. – Yuval Itzchakov May 20 '17 at 08:40
  • @Stoner Can you provide a reference to the article/blog/book you're reading? – Yuval Itzchakov May 20 '17 at 08:40
  • @YuvalItzchakov Its "Genome-Scale Algorithm Design Biological Sequence Analysis in the Era of High-throughput sequencing" by Alexandru I. Tomescu, Djamal Belazzougui, Fabio Cunial, and Veli Mäkinen. http://www.genome-scale.info/ – Stoner May 20 '17 at 08:45
  • In particular, I was looking at the definition of the Burrows-Wheeler transform via the suffix array. – Stoner May 20 '17 at 08:46

0 Answers0