Minimum Set Cover Problem using Greedy Algorithm

버전 1.0.1 (1.25 KB) 작성자: Arunkumar Gopu
This is code is used to find the minimum set (rows) covering all the elements in a given array
다운로드 수: 255
업데이트 날짜: 2020/5/5

라이선스 보기

The well-known problem of set covering is coded in this Matlab file using the greedy algorithm. The input to this program is an array appended with zeros at the end like the below example.
The output is selected rows indicated with 1. (1 denotes the row is selected and 0 denotes the rows are not selected).

Sample Input
(r1 to r8 label is just for reference and doesn't belong to the part of the array)

r1: 7 8 12 0 0 0
r2: 1 2 3 0 0 0
r3: 3 5 6 0 0 0
r4: 6 7 8 9 0 0
r5: 10 11 0 0 0 0
r6: 4 5 6 7 0 0
r7: 8 9 10 0 0 0
r8: 1 2 3 4 5 6

Output
{1 0 0 1 1 0 0 1}

인용 양식

Arunkumar Gopu (2026). Minimum Set Cover Problem using Greedy Algorithm (https://kr.mathworks.com/matlabcentral/fileexchange/75355-minimum-set-cover-problem-using-greedy-algorithm), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2018b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.1

Improved descriptions

1.0.0