Perbandingan algoritma brute force , divide and conquerohohervin
Algoritma brute force, divide and conquer, dan decrease and conquer merupakan pendekatan yang berbeda dalam memecahkan masalah secara komputasi. Brute force memecahkan masalah secara sederhana dengan mencoba semua kemungkinan, divide and conquer memecah masalah menjadi submasalah kecil lalu menggabungkan hasilnya, sedangkan decrease and conquer hanya memecah masalah menjadi submasalah kemudian memecahkan satu submasalah.
Dokumen tersebut membahas dua algoritma, yaitu algoritma brute force dan greedy untuk memecahkan masalah knapsack 0/1 dan mencari FPB dua bilangan bulat. Algoritma brute force mencoba semua kemungkinan solusi sedangkan algoritma greedy memilih solusi secara langkah demi langkah berdasarkan aturan tertentu untuk mendapatkan solusi yang optimal.
Algoritma ini merupakan salah satu metode kecerdasann buatan untuk pencocokan kata / kalimat, dan dapat digunakan dalam pencocokan binary. contoh kasus dapat digunakan untuk pengolahan citra, deteksi, pencarian KMS
Algoritma Brute Force adalah pendekatan yang sederhana dan langsung untuk memecahkan suatu masalah dengan cara mengevaluasi semua kemungkinan secara sistematis tanpa mempertimbangkan efisiensi. Contoh algoritma brute force adalah bubble sort, selection sort, dan evaluasi nilai polinom secara langsung.
Perbandingan algoritma brute force , divide and conquerohohervin
Algoritma brute force, divide and conquer, dan decrease and conquer merupakan pendekatan yang berbeda dalam memecahkan masalah secara komputasi. Brute force memecahkan masalah secara sederhana dengan mencoba semua kemungkinan, divide and conquer memecah masalah menjadi submasalah kecil lalu menggabungkan hasilnya, sedangkan decrease and conquer hanya memecah masalah menjadi submasalah kemudian memecahkan satu submasalah.
Dokumen tersebut membahas dua algoritma, yaitu algoritma brute force dan greedy untuk memecahkan masalah knapsack 0/1 dan mencari FPB dua bilangan bulat. Algoritma brute force mencoba semua kemungkinan solusi sedangkan algoritma greedy memilih solusi secara langkah demi langkah berdasarkan aturan tertentu untuk mendapatkan solusi yang optimal.
Algoritma ini merupakan salah satu metode kecerdasann buatan untuk pencocokan kata / kalimat, dan dapat digunakan dalam pencocokan binary. contoh kasus dapat digunakan untuk pengolahan citra, deteksi, pencarian KMS
Algoritma Brute Force adalah pendekatan yang sederhana dan langsung untuk memecahkan suatu masalah dengan cara mengevaluasi semua kemungkinan secara sistematis tanpa mempertimbangkan efisiensi. Contoh algoritma brute force adalah bubble sort, selection sort, dan evaluasi nilai polinom secara langsung.
Knapsack problem adalah masalah memilih barang dengan mempertimbangkan berat dan nilai setiap barang untuk memaksimalkan keuntungan total dalam batasan kapasitas knapsack. Metode greedy digunakan dengan memilih barang berdasarkan nilai, berat, atau rasio nilai-berat untuk mendapatkan solusi. Masalah ini relevan dalam pengisian barang di gudang atau optimalisasi sumber daya.
Dokumen tersebut membahas tentang masalah knapsack yang merupakan masalah optimalisasi dimana tujuannya adalah memilih objek mana saja yang harus dimasukkan ke dalam karung (knapsack) sehingga total nilai keuntungan yang didapatkan maksimal dengan memperhatikan kapasitas karung. Dokumen tersebut menjelaskan tiga pendekatan greedy untuk menyelesaikan masalah knapsack yaitu greedy berdasarkan keuntungan, berat, dan kepadatan seti
TEKNIK MENENTUKAN KOMPOSISI BUAH PADA MASALAH PENGANGKUTAN DENGAN MENGGUNAKAN...faisalpiliang1
Teknik menentukan komposisi buah pada masalah pengangkutan dengan menggunakan metode greedy knapsack membahas cara menentukan jenis dan jumlah buah yang dapat diangkut secara optimal menggunakan truk berkapasitas 15 ton dengan mempertimbangkan berat dan nilai setiap jenis buah. Metode ini mengurutkan rasio antara nilai dan berat setiap buah secara menurun untuk menentukan solusi terbaik.
Metode Greedy digunakan untuk memecahkan masalah optimasi dengan membuat pilihan optimum lokal pada setiap langkah agar mengarah pada solusi optimum global. Metode ini menerapkan prinsip "raku dan tamak" dimana pada setiap langkah membuat keputusan terbaik untuk mendapatkan solusi secara incremental. Metode Greedy diterapkan pada masalah seperti penukaran uang, penyimpanan data optimal, knapsack, dan pembuatan pohon minimal.
Dokumen tersebut membahas metode greedy dalam penyelesaian masalah optimasi. Metode ini mengambil keputusan lokal yang optimal pada setiap langkah untuk mencapai solusi global yang optimal. Beberapa contoh masalah yang dapat diselesaikan dengan metode ini adalah optimal storage, knapsack problem, minimum spanning tree, dan shortest path problem.
Dokumen tersebut membahas metode greedy dalam penyelesaian masalah optimasi. Metode ini mengambil keputusan secara lokal di setiap langkah untuk mencapai solusi global yang optimal. Beberapa contoh masalah yang dapat diselesaikan dengan metode ini adalah optimal storage, knapsack problem, minimum spanning tree, dan shortest path problem.
Dokumen tersebut membahas metode greedy untuk memecahkan masalah optimasi. Metode ini mengambil keputusan lokal yang optimal pada setiap langkah untuk mencapai solusi global yang optimal. Dibahas pula contoh-contoh masalah optimasi seperti penukaran uang, knapsack problem, dan penyimpanan program secara optimal yang dapat diselesaikan menggunakan metode greedy.
The document discusses the importance of documentation in software testing. It notes that documentation is needed to record test implementation and results, and helps direct testing and reuse tests. There are different types of test documentation, including test plans, specifications, and analysis reports. Effective documentation provides benefits like training, communication, maintenance, and historical reference. Test documentation should be maintained throughout the software development life cycle.
1) The document discusses various metrics for measuring software productivity, quality, and testing at different stages of the software development process. It covers metrics for requirements, design, source code, testing, maintenance, and processes.
2) Key metrics discussed include defects per KLOC, function points, defect removal efficiency, and size-oriented vs function-oriented metrics. Metrics for object-oriented design, user interfaces, and project management are also summarized.
3) Collecting measures and developing metrics at each stage of development allows indicators to be obtained and improvements to be made to both the product and process. A variety of productivity, quality, and testing metrics can provide meaningful insights.
The document discusses various debugging techniques. It describes the brute force method, which involves taking memory dumps and adding print statements to locate bugs. This generates a large amount of data but requires little thought. The cause elimination method deduces or induces potential causes and tests hypotheses to eliminate them one by one. Other methods include trial and error, backtracking code to find failures, and forward tracking to see when results first became wrong. Principles for locating errors include thinking carefully and getting a fresh perspective. Principles for repairing errors are to fix the underlying cause, check for new errors, and re-evaluate the design when making changes.
The document discusses debugging processes and techniques. It defines debugging as the process of finding, correcting and removing bugs from programs. There are three main types of errors: syntactic, semantic, and logic errors. The debugging process involves reproducing the problem reliably, finding the source of the error, fixing just that one error, testing the fix, and optionally looking for more errors. Key debugging techniques include inserting print statements, using a debugger, explaining the code to someone else, and fixing only one error at a time. The overall goal of debugging is to methodically match symptoms to causes to locate and correct errors in code.
This document discusses various types of software testing strategies including integration testing, continuous integration testing, and system testing. It provides details on techniques like top-down integration, bottom-up integration, smoke testing, regression testing, interface testing, and acceptance and installation testing. The objectives are to learn about integration testing, continuous integration testing, and system testing. Key aspects of different strategies like top-down vs bottom-up integration and categories of system test cases are compared. Determining when to stop testing is noted as one of the most difficult questions.
The document provides an overview of software testing strategies. It discusses that the main objective of software testing is to systematically find errors without taking much time. It emphasizes the importance of choosing the best testing strategy. It then covers various software testing strategies including unit testing, integration testing, validation testing, and system testing. Unit testing involves testing individual software components in isolation while integration testing focuses on testing the interaction between integrated components. The document contrasts the incremental and "big bang" approaches to integration testing and argues that the incremental approach is more effective.
The document discusses object-oriented testing strategies. It explains that in object-oriented testing, the component being tested is a class-object rather than a function. Unit testing focuses on testing each class's operations and attributes. Integration testing focuses on testing groups of collaborating classes. Validation testing is based on use case scenarios from the object-oriented analysis model. The document provides details on techniques for unit testing, integration testing, and validation testing of object-oriented systems.
The document discusses various software testing techniques, including blackbox and whitebox testing. Blackbox testing focuses on functional requirements without seeing the internal structure and includes equivalence class testing, limit testing, robustness testing, and requirements testing. Whitebox testing uses internal program structure to derive test cases and focuses on all logical paths and decisions. It includes basis path testing and control structure testing such as conditional and loop testing. The document provides examples of applying these techniques.
This document discusses various software testing techniques classified into static, dynamic, and exhaustive categories. Static techniques like verification and static analysis do not require executing the program. Dynamic techniques execute the program and are divided into structure-oriented techniques like control flow testing and function-oriented techniques like function coverage and use case testing. Exhaustive techniques aim to cover all possible test cases. The document provides examples and explanations of different testing methods.
The document discusses software testing concepts including:
1. It defines key terms related to software defects such as errors, defects, failures, and faults.
2. It outlines the different phases of software testing from component/unit testing to acceptance testing and discusses principles of good testability.
3. It provides guidance on writing test plans and cases, including reviewing requirements, identifying test suites, and transforming use cases into test cases.
This document discusses methodology selection strategy for systems analysis and design. It explains that there is no single framework appropriate for every software project, and the methodology needs to be adapted to the specific team and product. It outlines important factors to consider like clarity of requirements, technology familiarity, system complexity, schedule constraints. The methodology should guide the team's process but allow flexibility. The success of the methodology is measured by timely delivery of quality product increments that satisfy stakeholders.
The document discusses software quality and testing. It defines software reliability as the probability of failure-free operation of a computer program in a given environment and time. Testing aims to find errors in programs to improve reliability, rather than show a program works correctly. The document outlines ISO quality standards for software development including ISO 9001, which provides a framework for quality processes and procedures. Organizations must comply with ISO 9001 requirements to achieve quality certification.
The document discusses software quality assurance and testing. It defines software quality as having two aspects - quality of design which includes requirements and specifications, and quality of conformance which focuses on implementation. Software Quality Assurance (SQA) includes quality management, effective engineering processes, formal techniques, testing strategies, documentation control, and measurement/reporting. SQA aims to ensure requirements quality, design quality, code quality, and effective quality control. Non-functional attributes like reliability, usability, and performance largely determine a software's subjective quality from a user's perspective.
Knapsack problem adalah masalah memilih barang dengan mempertimbangkan berat dan nilai setiap barang untuk memaksimalkan keuntungan total dalam batasan kapasitas knapsack. Metode greedy digunakan dengan memilih barang berdasarkan nilai, berat, atau rasio nilai-berat untuk mendapatkan solusi. Masalah ini relevan dalam pengisian barang di gudang atau optimalisasi sumber daya.
Dokumen tersebut membahas tentang masalah knapsack yang merupakan masalah optimalisasi dimana tujuannya adalah memilih objek mana saja yang harus dimasukkan ke dalam karung (knapsack) sehingga total nilai keuntungan yang didapatkan maksimal dengan memperhatikan kapasitas karung. Dokumen tersebut menjelaskan tiga pendekatan greedy untuk menyelesaikan masalah knapsack yaitu greedy berdasarkan keuntungan, berat, dan kepadatan seti
TEKNIK MENENTUKAN KOMPOSISI BUAH PADA MASALAH PENGANGKUTAN DENGAN MENGGUNAKAN...faisalpiliang1
Teknik menentukan komposisi buah pada masalah pengangkutan dengan menggunakan metode greedy knapsack membahas cara menentukan jenis dan jumlah buah yang dapat diangkut secara optimal menggunakan truk berkapasitas 15 ton dengan mempertimbangkan berat dan nilai setiap jenis buah. Metode ini mengurutkan rasio antara nilai dan berat setiap buah secara menurun untuk menentukan solusi terbaik.
Metode Greedy digunakan untuk memecahkan masalah optimasi dengan membuat pilihan optimum lokal pada setiap langkah agar mengarah pada solusi optimum global. Metode ini menerapkan prinsip "raku dan tamak" dimana pada setiap langkah membuat keputusan terbaik untuk mendapatkan solusi secara incremental. Metode Greedy diterapkan pada masalah seperti penukaran uang, penyimpanan data optimal, knapsack, dan pembuatan pohon minimal.
Dokumen tersebut membahas metode greedy dalam penyelesaian masalah optimasi. Metode ini mengambil keputusan lokal yang optimal pada setiap langkah untuk mencapai solusi global yang optimal. Beberapa contoh masalah yang dapat diselesaikan dengan metode ini adalah optimal storage, knapsack problem, minimum spanning tree, dan shortest path problem.
Dokumen tersebut membahas metode greedy dalam penyelesaian masalah optimasi. Metode ini mengambil keputusan secara lokal di setiap langkah untuk mencapai solusi global yang optimal. Beberapa contoh masalah yang dapat diselesaikan dengan metode ini adalah optimal storage, knapsack problem, minimum spanning tree, dan shortest path problem.
Dokumen tersebut membahas metode greedy untuk memecahkan masalah optimasi. Metode ini mengambil keputusan lokal yang optimal pada setiap langkah untuk mencapai solusi global yang optimal. Dibahas pula contoh-contoh masalah optimasi seperti penukaran uang, knapsack problem, dan penyimpanan program secara optimal yang dapat diselesaikan menggunakan metode greedy.
The document discusses the importance of documentation in software testing. It notes that documentation is needed to record test implementation and results, and helps direct testing and reuse tests. There are different types of test documentation, including test plans, specifications, and analysis reports. Effective documentation provides benefits like training, communication, maintenance, and historical reference. Test documentation should be maintained throughout the software development life cycle.
1) The document discusses various metrics for measuring software productivity, quality, and testing at different stages of the software development process. It covers metrics for requirements, design, source code, testing, maintenance, and processes.
2) Key metrics discussed include defects per KLOC, function points, defect removal efficiency, and size-oriented vs function-oriented metrics. Metrics for object-oriented design, user interfaces, and project management are also summarized.
3) Collecting measures and developing metrics at each stage of development allows indicators to be obtained and improvements to be made to both the product and process. A variety of productivity, quality, and testing metrics can provide meaningful insights.
The document discusses various debugging techniques. It describes the brute force method, which involves taking memory dumps and adding print statements to locate bugs. This generates a large amount of data but requires little thought. The cause elimination method deduces or induces potential causes and tests hypotheses to eliminate them one by one. Other methods include trial and error, backtracking code to find failures, and forward tracking to see when results first became wrong. Principles for locating errors include thinking carefully and getting a fresh perspective. Principles for repairing errors are to fix the underlying cause, check for new errors, and re-evaluate the design when making changes.
The document discusses debugging processes and techniques. It defines debugging as the process of finding, correcting and removing bugs from programs. There are three main types of errors: syntactic, semantic, and logic errors. The debugging process involves reproducing the problem reliably, finding the source of the error, fixing just that one error, testing the fix, and optionally looking for more errors. Key debugging techniques include inserting print statements, using a debugger, explaining the code to someone else, and fixing only one error at a time. The overall goal of debugging is to methodically match symptoms to causes to locate and correct errors in code.
This document discusses various types of software testing strategies including integration testing, continuous integration testing, and system testing. It provides details on techniques like top-down integration, bottom-up integration, smoke testing, regression testing, interface testing, and acceptance and installation testing. The objectives are to learn about integration testing, continuous integration testing, and system testing. Key aspects of different strategies like top-down vs bottom-up integration and categories of system test cases are compared. Determining when to stop testing is noted as one of the most difficult questions.
The document provides an overview of software testing strategies. It discusses that the main objective of software testing is to systematically find errors without taking much time. It emphasizes the importance of choosing the best testing strategy. It then covers various software testing strategies including unit testing, integration testing, validation testing, and system testing. Unit testing involves testing individual software components in isolation while integration testing focuses on testing the interaction between integrated components. The document contrasts the incremental and "big bang" approaches to integration testing and argues that the incremental approach is more effective.
The document discusses object-oriented testing strategies. It explains that in object-oriented testing, the component being tested is a class-object rather than a function. Unit testing focuses on testing each class's operations and attributes. Integration testing focuses on testing groups of collaborating classes. Validation testing is based on use case scenarios from the object-oriented analysis model. The document provides details on techniques for unit testing, integration testing, and validation testing of object-oriented systems.
The document discusses various software testing techniques, including blackbox and whitebox testing. Blackbox testing focuses on functional requirements without seeing the internal structure and includes equivalence class testing, limit testing, robustness testing, and requirements testing. Whitebox testing uses internal program structure to derive test cases and focuses on all logical paths and decisions. It includes basis path testing and control structure testing such as conditional and loop testing. The document provides examples of applying these techniques.
This document discusses various software testing techniques classified into static, dynamic, and exhaustive categories. Static techniques like verification and static analysis do not require executing the program. Dynamic techniques execute the program and are divided into structure-oriented techniques like control flow testing and function-oriented techniques like function coverage and use case testing. Exhaustive techniques aim to cover all possible test cases. The document provides examples and explanations of different testing methods.
The document discusses software testing concepts including:
1. It defines key terms related to software defects such as errors, defects, failures, and faults.
2. It outlines the different phases of software testing from component/unit testing to acceptance testing and discusses principles of good testability.
3. It provides guidance on writing test plans and cases, including reviewing requirements, identifying test suites, and transforming use cases into test cases.
This document discusses methodology selection strategy for systems analysis and design. It explains that there is no single framework appropriate for every software project, and the methodology needs to be adapted to the specific team and product. It outlines important factors to consider like clarity of requirements, technology familiarity, system complexity, schedule constraints. The methodology should guide the team's process but allow flexibility. The success of the methodology is measured by timely delivery of quality product increments that satisfy stakeholders.
The document discusses software quality and testing. It defines software reliability as the probability of failure-free operation of a computer program in a given environment and time. Testing aims to find errors in programs to improve reliability, rather than show a program works correctly. The document outlines ISO quality standards for software development including ISO 9001, which provides a framework for quality processes and procedures. Organizations must comply with ISO 9001 requirements to achieve quality certification.
The document discusses software quality assurance and testing. It defines software quality as having two aspects - quality of design which includes requirements and specifications, and quality of conformance which focuses on implementation. Software Quality Assurance (SQA) includes quality management, effective engineering processes, formal techniques, testing strategies, documentation control, and measurement/reporting. SQA aims to ensure requirements quality, design quality, code quality, and effective quality control. Non-functional attributes like reliability, usability, and performance largely determine a software's subjective quality from a user's perspective.
The document describes an introduction to software testing presentation. It discusses the software development life cycle (SDLC) which includes planning, analysis, design, implementation, and maintenance phases. It then explains different software development methodologies like structured design, rapid application development, and agile development. Finally, it provides definitions and goals of software testing, and presents a model of the software testing process.
Dokumen ini membahas tentang analisis dan desain sistem untuk sistem ATM. Terdapat penjelasan mengenai diagram urutan dan diagram kelas yang menggambarkan interaksi antar objek dalam sistem ATM untuk beberapa kasus penggunaan seperti mengecek saldo, mentransfer uang, dan mengambil uang. Dokumen ini juga menampilkan contoh desain antarmuka pengguna untuk sistem ATM menggunakan perangkat lunak Netbeans.
Dokumen ini membahas tentang pemodelan proses bisnis dengan diagram aktivitas dan menggunakan sistem ATM sebagai contoh studi kasus. Diagram aktivitas digunakan untuk memvisualisasikan aliran kerja dalam suatu proses bisnis yang melibatkan beberapa departemen. Contoh aktivitas yang dimodelkan meliputi memasukkan PIN, mengecek saldo, mentransfer uang, mengambil uang, dan logout.
The document discusses use case diagrams for systems analysis and design. It provides examples of use case diagrams for an appointment system and an ATM system. Key elements of use case diagrams are described, including actors, use cases, relationships like generalization, include and extend, and the system boundary. The ATM system example demonstrates how a use case diagram can model the interactions between an actor (user) and the various functions of an ATM machine like checking balance, transferring money, withdrawing money and logging out.
Systems analysis and design techniques are discussed, including requirement gathering and business process analysis. Requirement gathering involves document analysis, interviews, questionnaires, and observation to understand user needs. Functional requirements define system functions while non-functional requirements address system qualities. Business process analysis assesses current processes and can involve automation, improvement, or reengineering. Barriers to effective requirement gathering include users finding additional needs after seeing a system ("yes but" syndrome), incomplete discovery of all needs ("undiscovered ruins" syndrome), and communication gaps between users and developers.
The document discusses a feasibility analysis for a proposed CD Selections Internet Order System project.
The technical feasibility is determined to be medium risk overall, as the application and technology are somewhat unfamiliar but compatible with existing systems. The economic feasibility analysis shows a 229% return on investment over 3 years with a break-even point of 1.7 years. The organizational feasibility is low risk as the project aligns with goals of increasing sales and becoming more Internet-savvy.
3. Definisi Knapsack Problem (KP)
Masalah penempatan item (barang) ke dalam suatu
tempat (biasa disebut Knapsack) yang mempunyai
kapasitas tertentu, dimana setiap item memiliki berat
dan nilai, sehingga total berat dari item-item yang
ditempatkan tidak melebihi kapasitas Knapsack dan
nilai yang didapatkan maksimum
4. 1/0 Knapsack
{0,1}-Knapsack Problem ({0,1}-KP) adalah kasus khusus dari KP dimana setia
p item hanya tersedia 1 unit, sehingga keputusannya adalah untuk memasukk
an
item tersebut ke dalam Knapsack (x=1) atau tidak (x=0).
Diberikan n buah objek dan sebuah knapsack dengan kapasitas bobot W.
Setiap objek memiliki properti bobot (weigth) wi dan keuntungan (profit) pi.
Objektif persoalan : memilih objek-objek yang dimasukkan ke dalam knapsac
k sedemikian sehingga memaksimumkan keuntungan
Total bobot objek yang dimasukkan ke dalam knapsack tidak boleh melebihi
kapasitas knapsack.
5. Aplikasi
Masalah pengangkutan barang
Persoalan 0/1 Knapsack dapat dipandang sebagai mencari
himpunan bagian (subset) dari keseluruhan objek yang mu
at ke dalam knapsack dan memberikan total keuntungan
terbesar.
6. Solusi persoalan dinyatakan sebagai vektor n-tupel:
X = {x1, x2, …, xn}
xi = 1 jika objek ke-i dimasukkan ke dalam knapsack,
xi = 0 jika objek ke-i tidak dimasukkan.
7. Exhaustive Search untuk Persoalan 0/1 Knapsack
1. Enumerasikan (list) semua himpunan bagian dari
himpunan dengan n objek.
2. Hitung (evaluasi) total keuntungan dari setiap himpunan
bagian dari langkah 1.
3. Pilih himpunan bagian yang memberikan total keuntunga
n terbesar.
8. Contoh
Tinjau persoalan 0/1 Knapsack dengan n = 4.
Misalkan objek-objek tersebut kita beri nomor 1, 2, 3, dan 4.
Properti setiap objek i dan kapasitas knapsack adalah sebagai
berikut : w1 = 2; p1 = 20
w2 = 5; p1 = 30
w3 = 10; p1 = 50
w4 = 5; p1 = 10
Kapasitas knapsack W = 16
9. Step 1
Himpunan Bagian Total Bobot
{}
{1}
{2}
{3}
{4}
{1, 2}
{1, 3}
{1, 4}
{2, 3}
{2, 4}
{3, 4}
{1, 2, 3}
{1, 2, 4}
{1, 3, 4}
{2, 3, 4}
{1, 2, 3, 4}
0
2
5
10
5
7
12
7
15
10
15
17
12
17
20
22
Enumerasikan (list)
semua himpunan bagian
dari himpunan dengan n
objek
10. Step 2
Himpunan Bagian Total Bobot Total keuntungan
{}
{1}
{2}
{3}
{4}
{1, 2}
{1, 3}
{1, 4}
{2, 3}
{2, 4}
{3, 4}
{1, 2, 3}
{1, 2, 4}
{1, 3, 4}
{2, 3, 4}
{1, 2, 3, 4}
0
2
5
10
5
7
12
7
15
10
15
17
12
17
20
22
0
20
30
50
10
50
70
30
80
40
60
tidak layak
60
tidak layak
tidak layak
tidak layak
Hitung (evaluasi)
total keuntungan
dari setiap himpunan
11. Step 3
Himpunan bagian objek yang memberikan keuntungan ma
ksimum adalah {2, 3} dengan total keuntungan adalah 80.
Solusi persoalan 0/1 Knapsack di atas adalah :
X = {0, 1, 1, 0}
12. TSP dan 0/1 Knapsack merupakan contoh persoalan
yang mempunyai kompleksitas algoritma eksponensial
ial.
Keduanya digolongkan sebagai persoalan NP
(Non-deterministic Polynomial), karena tidak mungkin
13. REFFERENCE
Munir, Rinaldi. Diktat Kuliah “Kompleksitas Algoritma”, Departemen T
eknik Informatika ITB
Levitin, Anany. 2012. Introduction to the Design and Analysis of A
lgorithms, 3rd Edition.Addison Wesley
Iryanto, M. P., & Mardiyati, S. (2017). Penyelesaian {0,1}-Knapsack Pro
blem dengan Algoritma Soccer League Competition. PRISMA, Prosidin
g Seminar Nasional Matematika, 688-700. Retrieved from https://jour
nal.unnes.ac.id/sju/index.php/prisma/article/view/21531