• Title/Summary/Keyword: NP-완비

Search Result 1, Processing Time 0.016 seconds

Performance Comparison between Genetic Algorithms and Dynamic Programming in the Subset-Sum Problem (부분집합 합 문제에서의 유전 알고리즘과 동적 계획법의 성능 비교)

  • Cho, Hwi-Yeon;Kim, Yong-Hyuk
    • Asia-pacific Journal of Multimedia Services Convergent with Art, Humanities, and Sociology
    • /
    • v.8 no.4
    • /
    • pp.259-267
    • /
    • 2018
  • The subset-sum problem is to find out whether or not the element sum of a subset within a finite set of numbers is equal to a given value. The problem is a well-known NP-complete problem, which is difficult to solve within a polynomial time. Genetic algorithm is a method for finding the optimal solution of a given problem through operations such as selection, crossover, and mutation. Dynamic programming is a method of solving a given problem from one or several subproblems. In this paper, we design and implement a genetic algorithm that solves the subset-sum problem, and experimentally compared the time performance to find the answer with the case of dynamic programming method. We selected a total of 17 test cases considering the difficulty in a set with 63 elements of positive number, and compared the performance of the two algorithms. The presented genetic algorithms showed time performance improved by 84% on 13 of 17 problems when compared with dynamic programming.