<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"><rdf:Description rdf:about="https://repozitorij.uni-lj.si/IzpisGradiva.php?id=172854"><dc:title>Substring counting with insertions</dc:title><dc:creator>Brank,	Janez	(Avtor)
	</dc:creator><dc:creator>Hočevar,	Tomaž	(Avtor)
	</dc:creator><dc:subject>string</dc:subject><dc:subject>substring</dc:subject><dc:subject>counting</dc:subject><dc:subject>insertion</dc:subject><dc:subject>KMP</dc:subject><dc:subject>period</dc:subject><dc:subject>weighted ancestors</dc:subject><dc:description>Substring counting is a classical algorithmic problem with numerous solutions that achieve linear time complexity. In this paper, we address a variation of the problem where, given three strings p, t, and s, we are interested in the number of occurrences of p in all strings that would result from inserting t into s at every possible position. Essentially, we are solving several substring counting problems of the same substring p in related strings. We give a detailed description of several conceptually different approaches to solving this problem and conclude with an algorithm that has a linear time complexity. The solution is based on a recent result from the field of substring search in compressed sequences and exploits the periodicity of strings. We also provide a self-contained implementation of the algorithm in C++ and experimentally verify its behavior, chiefly to demonstrate that its running time is linear in the lengths of all three input strings.</dc:description><dc:date>2025</dc:date><dc:date>2025-09-11 14:46:35</dc:date><dc:type>Članek v reviji</dc:type><dc:identifier>172854</dc:identifier><dc:language>sl</dc:language></rdf:Description></rdf:RDF>
