The fragile complexity of a comparison-based algorithm is $f(n)$ if each input element participates in $O(f(n))$ comparisons. In this paper, we explore the fragile complexity of algorithms adaptive to various restrictions on the input, i.e., algorithms with a fragile complexity parameterized by a quantity other than the input size n. We show that searching for the predecessor in a sorted array has fragile complexity ${\Theta}(\log k)$, where $k$ is the rank of the query element, both in a randomized and a deterministic setting. For predecessor searches, we also show how to optimally reduce the amortized fragile complexity of the elements in the array. We also prove the following results: Selecting the $k$-th smallest element has expected fragile complexity $O(\log \log k)$ for the element selected. Deterministically finding the minimum element has fragile complexity ${\Theta}(\log(Inv))$ and ${\Theta}(\log(Runs))$, where $Inv$ is the number of inversions in a sequence and $Runs$ is the number of increasing runs in a sequence. Deterministically finding the median has fragile complexity $O(\log(Runs) + \log \log n)$ and ${\Theta}(\log(Inv))$. Deterministic sorting has fragile complexity ${\Theta}(\log(Inv))$ but it has fragile complexity ${\Theta}(\log n)$ regardless of the number of runs.
翻译:基于比较的算法的复杂程度是 $f(n) 美元。 如果每个输入元素都以 $O(f(n)) 的比较方式参与, 则该算法的复杂程度是 $f(n) 美元 。 在本文中, 我们探索适应投入的各种限制的算法的脆弱复杂性, 即, 以输入大小以外的数量来选择脆弱的复杂度参数的算法。 我们显示, 在排序的阵列中寻找前身的复杂程度是 $@Theta}(\log k), 美元是查询元素的等级, 随机和确定性设置。 对于前身搜索, 我们还要展示如何以最佳方式减少阵列中元素的易易碎复杂性。