Edit this page Backlinks This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ===== Lab 12: NP-hard and NP-complete problems ===== Consider the following problems: **k-Independent Set** Let $math[G=(V,E)] be an undirected graph and $math[k] be a natural number. **k-Independent-Set** asks if there exists a subset $math[C\subseteq V] of size $math[k] of nodes from $math[G] such that all nodes from $math[G] are **independent**: $math[\forall u,v \in V . (u,v)\not\in E]. **Remark:** Let $math[G] be a **social network** where each edge $math[(u,v)\in E] models friendship between participants $math[u] and $math[v]. **k-independent-set** asks if there exist a group of size $math[k] such that no two members of it are friends. **Subset Sum** Let $math[a_1, a_2, \ldots, a_n, b] be natural numbers. **Subset Sum** asks if there exist a subset of $math[a_1, a_2, \ldots, a_n] whose **sum** equals $math[b]. **Remark:** Imagine $math[a_1, a_2, \ldots, a_n] to be **weights** of various items identified as $math[1,2, \ldots, n] and that $math[b] is the **capacity** of a rucksack. **Subset sum** asks if you can pick a **combination** of items such that the rucksack can be **completely full**. **Partition** Let $math[a_1, a_2, \ldots, a_n] be natural numbers. **Partition** asks if there exists a partitioning of $math[{a_1, \ldots, a_n}] into $math[P_1,P_2] such that the sum of elements from one element of the partition equals that of the other. * how is a **partition** formally defined? **Remark:** Imagine you have items each having a certain **value** $math[a_1, a_2, \ldots, a_n]. **Partition** asks you to split those items between two people such that each one receives **equal** value.