• Title/Summary/Keyword: 부분집합 합 문제

Search Result 6, Processing Time 0.019 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.

A Generalized Subtractive Algorithm for Subset Sum Problem (부분집합 합 문제의 일반화된 감산 알고리즘)

  • Lee, Sang-Un
    • The Journal of the Institute of Internet, Broadcasting and Communication
    • /
    • v.22 no.2
    • /
    • pp.9-14
    • /
    • 2022
  • This paper presents a subset sum problem (SSP) algorithm which takes the time complexity of O(nlogn). The SSP can be classified into either super-increasing sequence or random sequence depending on the element of Set S. Additive algorithm that runs in O(nlogn) has already been proposed to and utilized for the super-increasing sequence SSP, but exhaustive Brute-Force method with time complexity of O(n2n) remains as the only viable algorithm for the random sequence SSP, which is thus considered NP-complete. The proposed subtractive algorithm basically selects a subset S comprised of values lower than target value t, then sets the subset sum less the target value as the Residual r, only to remove from S the maximum value among those lower than t. When tested on various super-increasing and random sequence SSPs, the algorithm has obtained optimal solutions running less than the cardinality of S. It can therefore be used as a general algorithm for the SSP.

A Modeling and Solution Method for Routing of Container Ship (콘테이너 선박 운항경로 문제의 모형화와 해법)

  • 성기석;박순달
    • Journal of the Korean Operations Research and Management Science Society
    • /
    • v.14 no.2
    • /
    • pp.1-18
    • /
    • 1989
  • 콘태이너 선박은 출발항과 종착항의 두항구 사이를 잇는 지정된 항로를 오가면서 항로의 중도에 있는 각 항구에 기항하여 화물을 상.하역하는 형태로 각 항구 사이의 화물운송을 수행한다. 이때 이윤을 최대화 하기 위해서 선박을 어느 항구에 기항하고, 또 기항하는 항구에서는 얼마만큼의 화물을 항.하역할 것인지를 적절하게 결정해야 한다. 이러한 콘테이너 선박 운항경로 문제를 모형화 하고, 0-1 혼합정수 계획법을 이용한 수리모형을 제시한 후, 최소비용 흐름문제와 분지한계 기법을 이용한 최적해법을 제시하였다. 본 논문에서는 제시한 해법에서는 먼저, 기항하기로 한 항구의 집합에 따라 부분문제를 정의한다. 또한 분해된 부분문제에서 추가로 기항할 항구들에 대한 운항구간의 적제 한계와 운항비용을 완화시킨 문제를 정의하고, 그것을 다시 최소비용흐름문제를 이용하여 풀어서 상한값ㄹ 구한다. 이와 같은 방법으로 각 부분문제의 하한값과 하한값을 계신히여, 그것을 이용하여 분지를 절단하고, 또한 상한값이 높은 부분문제를 우선적으로 선택하여 분지합으로써 최적해를 구한다.

  • PDF

Advanced shape from focus (SFF) method by usng curved window (곡면 윈도우를 이용한 shape from focus(SFF) 방법의 개선)

  • 윤정일;최태선
    • Proceedings of the IEEK Conference
    • /
    • 1998.06a
    • /
    • pp.777-780
    • /
    • 1998
  • 물체의 3차원적인 정보를 복원하는 일은 그 정보의 일련된 이용에 있어서 중요한 문제이다. 이를 위해 여러가지 방법들이 연구되고 있으며, 그 중 shape from focus(SFF) 방법은 영상의 초점이 맞는 렌즈의 위치를 찾아내어 렌즈 공식에 의해 초점이 맞는 부분의 거리 정보를 구할 수 있다. 기존의 이 방법은 초점이 맞았는지의 정도를 계산하기 위한 focus measure 값들을 카메라의 광학축에 수직인 단순한 평면으로 가정하여 그 합이 최대가 되는 위치를 찾아내었다. 이를 개선하기 위해서 focused image surface(FIS) 개념이 연구되었고 그로 인해 더욱 나아진 결과를 얻었다. 물체의 FIS는 카메라 렌즈에 의해 초점이 맞게된 물체의 점들의 집합으로 이루어진 공간상의 면이다. 기하광학에 의해 물체의 모양과 FIS 상이에는 일대일 대응 관계가 있고 FIS의 형태를 구하는것이 결국은 물체의 모양을 복원하는것이다. FIS 개념을 처음 적용할 때는 물체의 모양이 부분적으로 영상 탐지기(image detector)와 같은 평면으로 가정하여 3차원 공간상에서 가능한 모든 방향의 평면에 대한 focus measure를 구하여 그 값이 최대가 되는 렌즈의 위치를 구하였다. 그러나 이러한 방법은 focus measure의 합이 정사각형의 윈도우에서 계산되기 때문에 곡면으로 이루어진 실제 물체에서는 오차르 ㄹ가지게 된다. 본 논문에서는 이와는 달이 평면이 아닌 곡면에 대한 focus measure의 합이 최대가 되는 렌즈의 위치를 구하여 이전의 방법들 보다 정확한 복원이 가능함을 보인다.

  • PDF

Simple Algorithm for Baseball Elimination Problem (야구 배제 문제의 단순 알고리즘)

  • Lee, Sang-Un
    • The Journal of the Institute of Internet, Broadcasting and Communication
    • /
    • v.20 no.3
    • /
    • pp.147-152
    • /
    • 2020
  • The baseball elimination problem(BEP) is eliminates teams that finishes the season in the early stage without play the remaining games because of the team never most wins even though all wins of remaining games. This problem solved by max-flow/min-cut theorem. But the max-flow/min-cut method has a shortcoming of iterative constructs the network for all of team and decides the min-cut for each network. This paper suggests ascending sort in wins game plus remaining games for each team, then the candidate eliminating team set K with lower 1/2 rank and most easy, simple, and fast computes the existence or not of subset R that a team elimination decision. As a result of various experimental data, this algorithm can be find all of elimination teams for whole data with fast and correct.

A Parallel Implementation of the Order-Preserving Multiple Pattern Matching Algorithm using Fingerprints of Texts (텍스트의 핑거프린트를 이용한 순위다중패턴매칭 알고리즘 병렬 구현)

  • Park, Somin;Kim, Youngho;Sim, Jeong Seop
    • Proceedings of the Korea Information Processing Society Conference
    • /
    • 2020.11a
    • /
    • pp.57-60
    • /
    • 2020
  • 순위다중패턴매칭문제는 길이가 n인 텍스트 T와 패턴들의 집합 P' = {P1,P2…,Pk}가 주어졌을 때, P'에 속하는 패턴들과 상대적인 순위가 일치하는 T의 모든 부분문자열들의 위치를 찾는 문제이다. P'에서 가장 짧은 패턴의 길이가 m, 가장 긴 패턴의 길이를 $\bar{m}$, 모든 패턴들의 길이의 합을 M, q개의 연속된 문자들을 q-그램이라 할 때, 기존에 텍스트의 핑거프린트를 이용하여 순위다중패턴매칭문제를 $O(q!+nqlogq+Mlog\bar{m}+nM)$ 시간에 해결하는 알고리즘이 제시되었다. 본 논문에서는 텍스트의 핑거프린트를 활용하여 O(max(q!,M,n))개의 스레드를 이용하여 순위다중패턴매칭문제를 평균적으로 $O(\bar{m}+qlogq+n/q!)$ 시간에 해결하는 병렬 구현 방법을 제시한다. 실험 결과, n = 1,000,000, k = 1,000, m = 5, q = 3일 때, 본 논문에서 제시하는 병렬 구현 방법은 기존의 순차 알고리즘보다 약 19.8배 빠르게 수행되었다.