• Title/Summary/Keyword: 삼각분할

Search Result 71, Processing Time 0.018 seconds

An Exact Division Algorithm for Change-Making Problem (거스름돈 만들기 문제의 정확한 나눗셈 알고리즘)

  • Lee, Sang-Un
    • The Journal of the Institute of Internet, Broadcasting and Communication
    • /
    • v.22 no.3
    • /
    • pp.185-191
    • /
    • 2022
  • This paper proposed a division algorithm of performance complexity $O{\frac{n(n+1)}{2}}$ for a change-making problem(CMP) in which polynomial time algorithms are not known as NP-hard problem. CMP seeks to minimize the sum of the xj number of coins exchanged when a given amount of money C is exchanged for cj,j=1,2,⋯,n coins. Known polynomial algorithms for CMPs are greedy algorithms(GA), divide-and-conquer (DC), and dynamic programming(DP). The optimal solution can be obtained by DP of O(nC), and in general, when given C>2n, the performance complexity tends to increase exponentially, so it cannot be called a polynomial algorithm. This paper proposes a simple algorithm that calculates quotient by dividing upper triangular matrices and main diagonal for k×n matrices in which only j columns are placed in descending order of cj of n for cj ≤ C and i rows are placed k excluding all the dividers in cj. The application of the proposed algorithm to 39 benchmarking experimental data of various types showed that the optimal solution could be obtained quickly and accurately with only a calculator.