FM-index backward search counts exact matches by shrinking a suffix-array interval.

highlighted = computed this step

Search right to left

Backward search scans the pattern from right to left. Each scanned letter shrinks a suffix-array interval until only matching suffixes remain.

right-to-left pattern scan\text{right-to-left pattern scan}
Backward-search intervalThe highlighted suffix-array interval is the final search range.RankStartSuffix07$16A$24ACA$31ATTACA$45CA$50GATTACA$63TACA$72TTACA$BoundaryValuelo1hi4hi minus lo3

The final interval counts matches

For pattern A, backward search returns interval [1,4). The width is 3, matching the number of occurrences.

[1,4) has width 3[1,4)\text{ has width }3
Backward-search intervalThe highlighted suffix-array interval is the final search range.RankStartSuffix07$16A$24ACA$31ATTACA$45CA$50GATTACA$63TACA$72TTACA$BoundaryValuelo1hi4hi minus lo3

Read mappers use this idea

Tools such as BWA and Bowtie use FM-index ideas to map reads without storing every suffix explicitly. The index narrows the candidate locations for exact seeds.

FM-indexsmall candidate interval\text{FM-index} \longrightarrow \text{small candidate interval}
Backward-search intervalThe highlighted suffix-array interval is the final search range.RankStartSuffix07$16A$24ACA$31ATTACA$45CA$50GATTACA$63TACA$72TTACA$BoundaryValuelo1hi4hi minus lo3