## Graduate Student Theses, Dissertations, & Professional Papers

2021

Thesis

#### Degree Type

Master of Arts (MA)

Mathematics

#### Department or School/College

Mathematical Sciences

#### Committee Chair

Oliver Serang Ph.D.

#### Commitee Members

Cory Palmer Ph.D. Kelly McKinnie Ph.D.

#### Keywords

LOH, layer ordered heap, partial ordering, top-k

#### Publisher

University of Montana

#### Subject Categories

Other Applied Mathematics | Theory and Algorithms

#### Abstract

The layer-ordered heap (LOH) is a simple data structure used in algorithms that perform optimal top-$k$ on $X+Y$, algorithms with the best known runtime for top-$k$ on $X_1+X_2+\cdots+X_m$, and the fastest method in practice for computing the most abundant isotopologue peaks in a chemical compound. In the analysis of these algorithms, the rank, $\alpha$, has been treated as a constant and $n$, the size of the array, has been treated as the sole parameter. Here, we explore the algorithmic complexity of LOH construction with $\alpha$ as a parameter, introduce a few algorithms for constructing LOHs, analyze their complexity in both $n$ and $\alpha$, and demonstrate that one algorithm is optimal in both $n$ and $\alpha$ for building a LOH of any rank. We then apply this to improve performance in applications where they are employed, find an estimate for the optimal $\alpha$ given an $n$ and $k$ for top-$k$ on $X+Y$, and derive a novel algorithm for top-$k$ on a multinomial distribution. Finally, we show that the results of our LOH analysis correspond with empirical experiments of runtimes when applying the LOH construction algorithms to both a common task in machine learning and top-$k$ on $X_1+X_2+\cdots+X_m$ and that our estimate of the optimal $\alpha$ for top-$k$ on $X+Y$ corresponds well with empirical data.

COinS