Предлагается модификация алгоритма Бентли-Маурера, решающего дву мерную задачу интервального поиска. Эта модификация позволяет снизить ис ходное логарифмическое среднее время поиска до константного при сохранении логарифмического времени поиска в худшем случае. Этот алгоритм зависит от параметра, при вариации которого объем памяти, необходимый алгоритму, изменяется от 0(к 3 ) до 0(к log к), при этом среднее время поиска (без учета времени на перечисление ответа) изменяется от O(l) до O(logfc). В частности, для любого € > 0 при объеме памяти 0(к 1+е ) достигается среднее время поиска 0(1). На основе этих результатов получены верхние оценки функциональной сложности двумерной задачи интервального поиска.Работа выполнена при поддержке Российского фонда фундаментальных ис следований, гранты 98-01-00130, 01-01-00748.
ВведениеДанная работа посвящена исследованию сложности алгоритмов решения двумерной задачи интервального поиска, которая состоит в поиске в конечном подмножестве евклидовой плоскости всех тех точек, которые попадают в прямоугольник-запрос.Типичная задача интервального поиска для двух измерений заключается в вы явлении в базе данных, содержащей записи о служащих некоторой компании, всех служащих, чьи возраст и жалованье находятся в заданных интервалах. оценки приводятся без времени перечисления ответа. В [8] предложен метод прямого доступа, который решает задачу за время О (log А;), но требует затрат по памяти по рядка Л 3 . Чтобы уменьшить требуемую память, в [10] предложен многоэтапный ме тод прямого доступа. Он позволяет снижать порядок требуемой памяти, но при этом возрастает константа при логарифме в оценке времени. С помощью метода дерева интервалов (или дерева регионов) в [11] получена оценка времени поиска O(log 2 k) при затратах памяти O(fclogfc). В [22] и [19] независимо предложена модификация дерева интервалов, которая позволила снизить время поиска до C(log к) при тех же затратах памяти. В [14] затраты памяти снижены до €(к log к/ log log к), но при этом возросла константа при логарифме в оценке времени. Во всех этих работах оцени вается время поиска в худшем случае. В [13] описан метод хеширования, который использован вместо поиска по древовидным структурам в задаче интервального по иска. Применение этого метода позволило получить довольно быстрые в среднем решения задачи интервального поиска при условии, что область запросов находится в заранее определенных границах.При оценке алгоритмов поиска обычно используют три основные характеристи ки: объем памяти, требуемый алгоритмом, время поиска в худшем случае и среднее время поиска. Естественно, хотелось бы находить алгоритмы, хорошие в соответст вии с той или иной характеристикой, или, возможно, в соответствии с комбинацией характеристик. Выбор критерия оптимизации является одним из основных момен тов в теории синтеза управляющих систем (в частности, при синтезе оптимальных алгоритмов поиска). Условимся обозначать через Q объем требуемой памяти, а че рез Т время вычислений. В литературе в цервую очередь встречаются такие кри терии оптимизации: Q...