Abstract:A coin set is a strictly increasing list of positive integers that always begins with 1. A coin set is called greedy when the simple greedy change-making algorithm always produces the fewest number of coins in change. Here, the greedy change-making algorithm repeatedly selects the largest denomination coin less than the remaining amount until it has assembled the correct change. Pearson has provided an efficient algorithm for determining whether a coin set is greedy. We study a stricter property on coin sets,… Show more
This paper analyzes a necessary and sufficient condition for the change-making problem to be solvable with a greedy algorithm. The change-making problem is to minimize the number of coins used to pay a given value in a specified currency system. This problem is NP-hard, and therefore the greedy algorithm does not always yield an optimal solution. Yet for almost all real currency systems, the greedy algorithm outputs an optimal solution. A currency system for which the greedy algorithm returns an optimal solution for any value of payment is called a canonical system. Canonical systems with at most five types of coins have been characterized in previous studies. In this paper, we give characterization of canonical systems with six types of coins, and we propose a partial generalization of characterization of canonical systems.
This paper analyzes a necessary and sufficient condition for the change-making problem to be solvable with a greedy algorithm. The change-making problem is to minimize the number of coins used to pay a given value in a specified currency system. This problem is NP-hard, and therefore the greedy algorithm does not always yield an optimal solution. Yet for almost all real currency systems, the greedy algorithm outputs an optimal solution. A currency system for which the greedy algorithm returns an optimal solution for any value of payment is called a canonical system. Canonical systems with at most five types of coins have been characterized in previous studies. In this paper, we give characterization of canonical systems with six types of coins, and we propose a partial generalization of characterization of canonical systems.
“…Optimal change-making is weakly NP-hard but has a pseudopolynomial time dynamic program that is often used as an example or an exercise in undergraduate algorithms classes [5,7]. However, although there have also been studies on sets of coins that would lead to small solutions [24] or on counting distinct ways of making change [4], much of the research on change-making has focused on a different problem: for which coinage systems is the greedy algorithm optimal [3,6,11,14,20]? This can be tested in polynomial time [20].…”
Section: Making Change In 2048mentioning
confidence: 99%
“…Alternatively, suppose we use 3-smooth tile values, the numbers whose only prime factors are two or three: 1, 2, 3,4,6,8,9,12,16,18,24,27,32,36, . .…”
The 2048 game involves tiles labeled with powers of two that can be merged to form bigger powers of two; variants of the same puzzle involve similar merges of other tile values. We analyze the maximum score achievable in these games by proving a min-max theorem equating this maximum score (in an abstract generalized variation of 2048 that allows all the moves of the original game) with the minimum value that causes a greedy change-making algorithm to use a given number of coins. A widely-followed strategy in 2048 maintains tiles that represent the move number in binary notation, and a similar strategy in the Fibonacci number variant of the game (987) maintains the Zeckendorf representation of the move number as a sum of the fewest possible Fibonacci numbers; our analysis shows that the ability to follow these strategies is intimately connected with the fact that greedy change-making is optimal for binary and Fibonacci coinage. For variants of 2048 using tile values for which greedy change-making is suboptimal, it is the greedy strategy, not the optimal representation as sums of tile values, that controls the length of the game. In particular, the game will always terminate whenever the sequence of allowable tile values has arbitrarily large gaps between consecutive values.
“…No artigo original sobre o Smoothsort, Dijkstra deixou a prova desse problema para o leitor. Apresentamos a seguir uma prova simples, baseada no Teorema 1 e no Corolário 1 desse teorema, expostos em [10].…”
Section: Heapsort E áRvores De Leonardounclassified
Neste trabalho apresentamos o algoritmo de ordenação Smoothsort [1][2], desenvolvido por Dijkstra em 1981 e que, inexplicavelmente, não é citado na literatura corrente sobre métodos de ordenação como um método relevante [3-5]. Sua importância vem do fato dele ter complexidade de pior caso O(n log n), restrita a O(n) para conjuntos de dados já ordenados, uma importante situação prática. Nenhum dos métodos destacados na literatura apresenta tal comportamento. Além de descrever o algoritmo, mostramos também análises alternativas sobre a complexidade do algoritmo, que não estão presentes no artigo original do método.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.