The Money Changing Problem (MCP) can be stated as follows: Given k positive integers a1 <· · · < ak and a query integer M , is there a linear combination i ci ai = M with non-negative integers ci , a decomposition of M? If so, produce one or all such decompositions.The largest integer without such a decomposition is called the Frobenius number g(a1, . . . , ak ). A data structure called the residue table of a1 words can be used to compute the Frobenius number in time O(a1). We present an intriguingly simple algorithm for computing the residue table which runs in time O(ka1), with no additional memory requirements, outperforming the best previously known algorithm. Simulations show that it performs well even on “hard” instances from the literature. In addition, we can employ the residue table to answer MCP decision instances in constant time, and a slight modification of size O(a1) to compute one decomposition for a query M. Note that since both computing the Frobenius number and MCP (decision) are NP-hard, one cannot expect to find an algorithm that is polynomial in the size of the input, i.e., in k,logak, and log M.We then give an algorithm which, using a modification of the residue table, also constructible in O(ka1) time, computes all decompositions of a query integer M. Its worst-case running time is O(ka1) for each decomposition, thus the total runtime depends only on the output size and is independent of the size of query M itself.We apply our latter algorithm to interpreting mass spectrometry (MS) peaks: Due to its high speed and accuracy, MS is now the method of choice in protein identification. Interpreting individual peaks is one of the recurring subproblems in analyzing MS data; the task is to identify sample molecules whose mass the peak possibly represents. This can be stated as an MCP instance, with the masses of the individual amino acids as the k integers a1 , . . . , ak . Our simulations show that our algorithm is fast on real data and is well suited for generating candidates for peak interpretation.

A fast and simple algorithm for the Money Changing Problem

Liptak, Zsuzsanna
2007-01-01

Abstract

The Money Changing Problem (MCP) can be stated as follows: Given k positive integers a1 <· · · < ak and a query integer M , is there a linear combination i ci ai = M with non-negative integers ci , a decomposition of M? If so, produce one or all such decompositions.The largest integer without such a decomposition is called the Frobenius number g(a1, . . . , ak ). A data structure called the residue table of a1 words can be used to compute the Frobenius number in time O(a1). We present an intriguingly simple algorithm for computing the residue table which runs in time O(ka1), with no additional memory requirements, outperforming the best previously known algorithm. Simulations show that it performs well even on “hard” instances from the literature. In addition, we can employ the residue table to answer MCP decision instances in constant time, and a slight modification of size O(a1) to compute one decomposition for a query M. Note that since both computing the Frobenius number and MCP (decision) are NP-hard, one cannot expect to find an algorithm that is polynomial in the size of the input, i.e., in k,logak, and log M.We then give an algorithm which, using a modification of the residue table, also constructible in O(ka1) time, computes all decompositions of a query integer M. Its worst-case running time is O(ka1) for each decomposition, thus the total runtime depends only on the output size and is independent of the size of query M itself.We apply our latter algorithm to interpreting mass spectrometry (MS) peaks: Due to its high speed and accuracy, MS is now the method of choice in protein identification. Interpreting individual peaks is one of the recurring subproblems in analyzing MS data; the task is to identify sample molecules whose mass the peak possibly represents. This can be stated as an MCP instance, with the masses of the individual amino acids as the k integers a1 , . . . , ak . Our simulations show that our algorithm is fast on real data and is well suited for generating candidates for peak interpretation.
2007
Money changing problem; Frobenius number; Integer decomposition; Weighted strings; Compomers; Mass spectrometry; Parikh vectors
File in questo prodotto:
File Dimensione Formato  
BoeckerLiptak_Algorithmica2007.pdf

solo utenti autorizzati

Tipologia: Versione dell'editore
Licenza: Copyright dell'editore
Dimensione 1.27 MB
Formato Adobe PDF
1.27 MB Adobe PDF   Visualizza/Apri   Richiedi una copia

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11562/390648
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 51
  • ???jsp.display-item.citation.isi??? 48
social impact