<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://algorist.com/algowiki_v2/index.php?action=history&amp;feed=atom&amp;title=Hardness-TADM2E</id>
		<title>Hardness-TADM2E - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://algorist.com/algowiki_v2/index.php?action=history&amp;feed=atom&amp;title=Hardness-TADM2E"/>
		<link rel="alternate" type="text/html" href="https://algorist.com/algowiki_v2/index.php?title=Hardness-TADM2E&amp;action=history"/>
		<updated>2026-05-01T00:45:30Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.28.0</generator>

	<entry>
		<id>https://algorist.com/algowiki_v2/index.php?title=Hardness-TADM2E&amp;diff=212&amp;oldid=prev</id>
		<title>Algowikiadmin: Protected &quot;Hardness-TADM2E&quot; ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))</title>
		<link rel="alternate" type="text/html" href="https://algorist.com/algowiki_v2/index.php?title=Hardness-TADM2E&amp;diff=212&amp;oldid=prev"/>
				<updated>2014-09-11T18:43:47Z</updated>
		
		<summary type="html">&lt;p&gt;Protected &amp;quot;&lt;a href=&quot;/algowiki_v2/index.php/Hardness-TADM2E&quot; title=&quot;Hardness-TADM2E&quot;&gt;Hardness-TADM2E&lt;/a&gt;&amp;quot; ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 18:43, 11 September 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;' lang='en'&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Algowikiadmin</name></author>	</entry>

	<entry>
		<id>https://algorist.com/algowiki_v2/index.php?title=Hardness-TADM2E&amp;diff=155&amp;oldid=prev</id>
		<title>Algowikiadmin: Recovering wiki</title>
		<link rel="alternate" type="text/html" href="https://algorist.com/algowiki_v2/index.php?title=Hardness-TADM2E&amp;diff=155&amp;oldid=prev"/>
				<updated>2014-09-11T18:23:13Z</updated>
		
		<summary type="html">&lt;p&gt;Recovering wiki&lt;/p&gt;
&lt;a href=&quot;https://algorist.com/algowiki_v2/index.php?title=Hardness-TADM2E&amp;amp;diff=155&amp;amp;oldid=62&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Algowikiadmin</name></author>	</entry>

	<entry>
		<id>https://algorist.com/algowiki_v2/index.php?title=Hardness-TADM2E&amp;diff=62&amp;oldid=prev</id>
		<title>Algowikiadmin: Recovering wiki</title>
		<link rel="alternate" type="text/html" href="https://algorist.com/algowiki_v2/index.php?title=Hardness-TADM2E&amp;diff=62&amp;oldid=prev"/>
				<updated>2014-09-11T18:13:44Z</updated>
		
		<summary type="html">&lt;p&gt;Recovering wiki&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Intractable Problems and Approximation Algorithms =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Transformations and Satisfiability'''&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-1. &lt;br /&gt;
Give the 3-SAT formula that results from applying the reduction of SAT to 3-SAT&lt;br /&gt;
for the formula:&lt;br /&gt;
&amp;amp;lt;math&amp;amp;gt; (x+y+\overline z +w+u+\overline v) \cdot (\overline x+\overline y+z+\overline w+u+v) \cdot (x+\overline y+\overline z+w+u+\overline v)\cdot (x+\overline y) &amp;amp;lt;/math&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[TADM2E 9.1|(Solution 9.1)]] &lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-2. &lt;br /&gt;
Draw the graph that results from the reduction of 3-SAT to vertex cover&lt;br /&gt;
for the expression&lt;br /&gt;
&amp;amp;lt;math&amp;amp;gt;(x+ \overline y +z) \cdot (\overline x+y+\overline z) \cdot(\overline x+y+z) \cdot (x+\overline y + \overline x) &amp;amp;lt;/math&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-3. &lt;br /&gt;
Suppose we are given a subroutine which can solve the&lt;br /&gt;
traveling salesman decision problem of&lt;br /&gt;
page (see book)&lt;br /&gt;
in, say, linear time.&lt;br /&gt;
Give an efficient algorithm to find the actual TSP tour by&lt;br /&gt;
making a polynomial number of calls to this subroutine.&lt;br /&gt;
&lt;br /&gt;
[[TADM2E 9.3|(Solution 9.3)]] &lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-4. &lt;br /&gt;
Implement a translator that translates satisfiability instances&lt;br /&gt;
into equivalent 3-SAT instances.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-5. &lt;br /&gt;
Design and implement a backtracking algorithm to test whether&lt;br /&gt;
a set of formulae are satisfiable.&lt;br /&gt;
What criteria can you use to prune this search?&lt;br /&gt;
&lt;br /&gt;
[[TADM2E 9.5|(Solution 9.5)]] &lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-6. &lt;br /&gt;
Implement the vertex cover to satisfiability reduction, and run&lt;br /&gt;
the resulting clauses through a satisfiability testing code.&lt;br /&gt;
Does this seem like a practical way to compute things?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Basic Reductions'''&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-7. &lt;br /&gt;
An instance of the ''set cover'' problem consists of a set &amp;amp;lt;math&amp;amp;gt;X&amp;amp;lt;/math&amp;amp;gt; of &amp;amp;lt;math&amp;amp;gt;n&amp;amp;lt;/math&amp;amp;gt;&lt;br /&gt;
elements, a family &amp;amp;lt;math&amp;amp;gt;F&amp;amp;lt;/math&amp;amp;gt; of subsets of &amp;amp;lt;math&amp;amp;gt;X&amp;amp;lt;/math&amp;amp;gt;, and an integer &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt;.&lt;br /&gt;
The question is, does there exist &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt; subsets from &amp;amp;lt;math&amp;amp;gt;F&amp;amp;lt;/math&amp;amp;gt; whose union is &amp;amp;lt;math&amp;amp;gt;X&amp;amp;lt;/math&amp;amp;gt;?&lt;br /&gt;
For example, if &amp;amp;lt;math&amp;amp;gt;X = \{1,2,3,4\}&amp;amp;lt;/math&amp;amp;gt; and&lt;br /&gt;
&amp;amp;lt;math&amp;amp;gt;F = \{ \{1,2\}, \{2,3\}, \{4\}, \{2,4\} \}&amp;amp;lt;/math&amp;amp;gt;, there does not exist a solution&lt;br /&gt;
for &amp;amp;lt;math&amp;amp;gt;k=2&amp;amp;lt;/math&amp;amp;gt;, but there does for &amp;amp;lt;math&amp;amp;gt;k=3&amp;amp;lt;/math&amp;amp;gt; (for example, &amp;amp;lt;math&amp;amp;gt; \{1,2\}, \{2,3\}, \{4\}&amp;amp;lt;/math&amp;amp;gt;).&lt;br /&gt;
Prove that set cover is NP-complete with a reduction from vertex cover.&lt;br /&gt;
&lt;br /&gt;
[[TADM2E 9.7|(Solution 9.7)]] &lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-8. &lt;br /&gt;
The ''baseball card collector problem'' is as follows.&lt;br /&gt;
Given packets &amp;amp;lt;math&amp;amp;gt;P_1, \ldots, P_m&amp;amp;lt;/math&amp;amp;gt;, each of which contains a subset of this&lt;br /&gt;
year's baseball cards, is it possible to collect all the year's cards by buying &amp;amp;lt;math&amp;amp;gt;\leq k&amp;amp;lt;/math&amp;amp;gt; packets?&lt;br /&gt;
For example, if the players are &amp;amp;lt;math&amp;amp;gt; \{Aaron, Mays, Ruth, Steven \} &amp;amp;lt;/math&amp;amp;gt; and the packets are &amp;amp;lt;math&amp;amp;gt; \{ \{Aaron,Mays\}, \{Mays,Ruth\}, \{Steven\}, \{Mays,Steven\} \}, &amp;amp;lt;/math&amp;amp;gt;&lt;br /&gt;
there does not exist a solution for &amp;amp;lt;math&amp;amp;gt;k=2&amp;amp;lt;/math&amp;amp;gt;, but there does for &amp;amp;lt;math&amp;amp;gt;k=3&amp;amp;lt;/math&amp;amp;gt;, such as &amp;amp;lt;math&amp;amp;gt; \{Aaron,Mays\}, \{Mays,Ruth\}, \{Steven\} &amp;amp;lt;/math&amp;amp;gt;&lt;br /&gt;
Prove that the baseball card collector problem is NP-hard using a reduction&lt;br /&gt;
from vertex cover.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-9. &lt;br /&gt;
The ''low-degree spanning tree problem'' is as follows.&lt;br /&gt;
Given a graph &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt; and an integer &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt;, does &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt; contain a spanning&lt;br /&gt;
tree such that all vertices in the tree have degree ''at most'' &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt;&lt;br /&gt;
(obviously, only tree edges count towards the degree)?&lt;br /&gt;
For example, in the following graph, there is no spanning tree such that all&lt;br /&gt;
vertices have a degree less than three.&lt;br /&gt;
\fixedfigsize{pictures/lowdegree.eps}{1.0in}&lt;br /&gt;
#Prove that the low-degree spanning tree problem is NP-hard with a reduction from Hamiltonian ''path''.&lt;br /&gt;
#Now consider the ''high-degree spanning tree problem'', which is as follows. Given a graph &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt; and an integer &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt;, does &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt; contain a spanning tree whose highest degree vertex is ''at least'' &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt;? In the previous example, there exists a spanning tree with a highest degree of 8. Give an efficient algorithm to solve the high-degree spanning tree problem, and an analysis of its time complexity.&lt;br /&gt;
&lt;br /&gt;
[[TADM2E 9.9|(Solution 9.9)]] &lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-10. &lt;br /&gt;
Show that the following problem is NP-complete:&lt;br /&gt;
* ''Problem:'' Dense subgraph&lt;br /&gt;
* ''Input:'' A graph &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt;, and integers &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt; and &amp;amp;lt;math&amp;amp;gt;y&amp;amp;lt;/math&amp;amp;gt;.&lt;br /&gt;
* ''Output:'' Does &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt; contain a subgraph with exactly &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt; vertices and at least &amp;amp;lt;math&amp;amp;gt;y&amp;amp;lt;/math&amp;amp;gt; edges?&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-11. &lt;br /&gt;
Show that the following problem is NP-complete:&lt;br /&gt;
* ''Problem:'' Clique, no-clique&lt;br /&gt;
* ''Input:'' An undirected graph &amp;amp;lt;math&amp;amp;gt;G=(V,E)&amp;amp;lt;/math&amp;amp;gt; and an integer &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt;.&lt;br /&gt;
* ''Output:'' Does &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt; contain both a clique of size &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt; and an independent set of size &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[TADM2E 9.11|(Solution 9.11)]] &lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-12. &lt;br /&gt;
An ''Eulerian cycle'' is a tour that visits every edge in&lt;br /&gt;
a graph exactly once.&lt;br /&gt;
An ''Eulerian subgraph'' is a subset of the edges and vertices of a graph&lt;br /&gt;
that has an Eulerian cycle.&lt;br /&gt;
Prove that the problem of finding the number of edges in&lt;br /&gt;
the largest Eulerian subgraph of a graph is NP-hard.&lt;br /&gt;
(Hint: the Hamiltonian circuit problem is NP-hard even if each vertex&lt;br /&gt;
in the graph is incident upon exactly three edges.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Creative Reductions'''&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-13. &lt;br /&gt;
Prove that the following problem is NP-complete:&lt;br /&gt;
* ''Problem:'' Hitting Set&lt;br /&gt;
* ''Input:'' A collection &amp;amp;lt;math&amp;amp;gt;C&amp;amp;lt;/math&amp;amp;gt; of subsets of a set &amp;amp;lt;math&amp;amp;gt;S&amp;amp;lt;/math&amp;amp;gt;, positive integer &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt;.&lt;br /&gt;
* ''Output:'' Does &amp;amp;lt;math&amp;amp;gt;S&amp;amp;lt;/math&amp;amp;gt; contain a subset &amp;amp;lt;math&amp;amp;gt;S'&amp;amp;lt;/math&amp;amp;gt; such that &amp;amp;lt;math&amp;amp;gt;|S'| \leq k&amp;amp;lt;/math&amp;amp;gt; and each subset in &amp;amp;lt;math&amp;amp;gt;C&amp;amp;lt;/math&amp;amp;gt; contains at least one element from &amp;amp;lt;math&amp;amp;gt;S'&amp;amp;lt;/math&amp;amp;gt;?&lt;br /&gt;
&lt;br /&gt;
[[TADM2E 9.13|(Solution 9.13)]] &lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-14. &lt;br /&gt;
Prove that the following problem is NP-complete:&lt;br /&gt;
* ''Problem:'' Knapsack&lt;br /&gt;
* ''Input:'' A set &amp;amp;lt;math&amp;amp;gt;S&amp;amp;lt;/math&amp;amp;gt; of &amp;amp;lt;math&amp;amp;gt;n&amp;amp;lt;/math&amp;amp;gt; items, such that the &amp;amp;lt;math&amp;amp;gt;i&amp;amp;lt;/math&amp;amp;gt;th item has value &amp;amp;lt;math&amp;amp;gt;v_i&amp;amp;lt;/math&amp;amp;gt; and weight &amp;amp;lt;math&amp;amp;gt;w_i&amp;amp;lt;/math&amp;amp;gt;.  Two positive integers: weight limit &amp;amp;lt;math&amp;amp;gt;W&amp;amp;lt;/math&amp;amp;gt; and value requirement &amp;amp;lt;math&amp;amp;gt;V&amp;amp;lt;/math&amp;amp;gt;.&lt;br /&gt;
* ''Output:'' Does there exist a subset &amp;amp;lt;math&amp;amp;gt;S' \in S&amp;amp;lt;/math&amp;amp;gt; such that &amp;amp;lt;math&amp;amp;gt;\sum_{i \in S'} w_i \leq W&amp;amp;lt;/math&amp;amp;gt; and &amp;amp;lt;math&amp;amp;gt;\sum_{i \in S'} v_i \geq V&amp;amp;lt;/math&amp;amp;gt;?&lt;br /&gt;
(Hint: start from integer partition.)&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-15. &lt;br /&gt;
Prove that the following problem is NP-complete:&lt;br /&gt;
* ''Problem:'' Hamiltonian Path&lt;br /&gt;
* ''Input:'' A graph &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt;, and vertices &amp;amp;lt;math&amp;amp;gt;s&amp;amp;lt;/math&amp;amp;gt; and &amp;amp;lt;math&amp;amp;gt;t&amp;amp;lt;/math&amp;amp;gt;.&lt;br /&gt;
* ''Output:'' Does &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt; contain a path which starts from &amp;amp;lt;math&amp;amp;gt;s&amp;amp;lt;/math&amp;amp;gt;, ends at &amp;amp;lt;math&amp;amp;gt;t&amp;amp;lt;/math&amp;amp;gt;, and visits all vertices without visiting any vertex more than once?&lt;br /&gt;
(Hint: start from Hamiltonian cycle.)&lt;br /&gt;
&lt;br /&gt;
[[TADM2E 9.15|(Solution 9.15)]] &lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-16. &lt;br /&gt;
Prove that the following problem is NP-complete:&lt;br /&gt;
* ''Problem:'' Longest Path&lt;br /&gt;
* ''Input:'' A graph &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt; and positive integer &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt;.&lt;br /&gt;
* ''Output:'' Does &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt; contain a path that visits at least &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt; different vertices without visiting any vertex more than once?&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-17. &lt;br /&gt;
Prove that the following problem is NP-complete:&lt;br /&gt;
* ''Problem:'' Dominating Set&lt;br /&gt;
* ''Input:'' A graph &amp;amp;lt;math&amp;amp;gt;G=(V,E)&amp;amp;lt;/math&amp;amp;gt; and positive integer &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt;.&lt;br /&gt;
* ''Output:'' Is there a subset &amp;amp;lt;math&amp;amp;gt;V' \in V&amp;amp;lt;/math&amp;amp;gt; such that &amp;amp;lt;math&amp;amp;gt;|V'|\leq k&amp;amp;lt;/math&amp;amp;gt; where for each vertex &amp;amp;lt;math&amp;amp;gt;x \in V&amp;amp;lt;/math&amp;amp;gt; either &amp;amp;lt;math&amp;amp;gt;x \in V'&amp;amp;lt;/math&amp;amp;gt; or there exists an edge &amp;amp;lt;math&amp;amp;gt;(x,y)&amp;amp;lt;/math&amp;amp;gt;, where &amp;amp;lt;math&amp;amp;gt;y \in V'&amp;amp;lt;/math&amp;amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[TADM2E 9.17|(Solution 9.17)]] &lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-18. &lt;br /&gt;
Prove that the vertex cover problem (does there exist a subset &amp;amp;lt;math&amp;amp;gt;S&amp;amp;lt;/math&amp;amp;gt; of &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt;&lt;br /&gt;
vertices in a graph &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt; such that every edge in &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt; is incident upon&lt;br /&gt;
at least one vertex in &amp;amp;lt;math&amp;amp;gt;S&amp;amp;lt;/math&amp;amp;gt;?) remains NP-complete even when all the vertices in&lt;br /&gt;
the graph are restricted to have even degrees.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-19. &lt;br /&gt;
Prove that the following problem is NP-complete:&lt;br /&gt;
* ''Problem:'' Set Packing&lt;br /&gt;
* ''Input:'' A collection &amp;amp;lt;math&amp;amp;gt;C&amp;amp;lt;/math&amp;amp;gt; of subsets of a set &amp;amp;lt;math&amp;amp;gt;S&amp;amp;lt;/math&amp;amp;gt;, positive integer &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt;.&lt;br /&gt;
* ''Output:'' Does &amp;amp;lt;math&amp;amp;gt;S&amp;amp;lt;/math&amp;amp;gt; contain at least &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt; disjoint subsets (i.e., such that none of these subsets have any elements in common?)&lt;br /&gt;
&lt;br /&gt;
[[TADM2E 9.19|(Solution 9.19)]] &lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-20. &lt;br /&gt;
Prove that the following problem is NP-complete:&lt;br /&gt;
* ''Problem:'' Feedback Vertex Set&lt;br /&gt;
* ''Input:'' A directed graph &amp;amp;lt;math&amp;amp;gt;G=(V,A)&amp;amp;lt;/math&amp;amp;gt; and positive integer &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt;.&lt;br /&gt;
* ''Output:'' Is there a subset &amp;amp;lt;math&amp;amp;gt;V' \in V&amp;amp;lt;/math&amp;amp;gt; such that &amp;amp;lt;math&amp;amp;gt;|V'|\leq k&amp;amp;lt;/math&amp;amp;gt;, such that deleting the vertices of &amp;amp;lt;math&amp;amp;gt;V'&amp;amp;lt;/math&amp;amp;gt; from &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt; leaves a DAG?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Algorithms for Special Cases'''&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-21. &lt;br /&gt;
A Hamiltonian path &amp;amp;lt;math&amp;amp;gt;P&amp;amp;lt;/math&amp;amp;gt; is a path&lt;br /&gt;
that visits each vertex exactly once.&lt;br /&gt;
The problem of testing whether a graph &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt; contains a&lt;br /&gt;
Hamiltonian path is NP-complete.&lt;br /&gt;
There does not have to be an&lt;br /&gt;
edge in &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt; from the ending vertex to the starting vertex of &amp;amp;lt;math&amp;amp;gt;P&amp;amp;lt;/math&amp;amp;gt;, unlike&lt;br /&gt;
in the Hamiltonian cycle problem.&lt;br /&gt;
Give an &amp;amp;lt;math&amp;amp;gt;O(n+m)&amp;amp;lt;/math&amp;amp;gt;-time&lt;br /&gt;
algorithm to test whether a directed acyclic graph &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt; (a DAG)&lt;br /&gt;
contains a Hamiltonian path.&lt;br /&gt;
(Hint: think about topological sorting and DFS.)&lt;br /&gt;
&lt;br /&gt;
[[TADM2E 9.21|(Solution 9.21)]] &lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-22. &lt;br /&gt;
The &amp;amp;lt;math&amp;amp;gt;2&amp;amp;lt;/math&amp;amp;gt;-SAT problem is, given a Boolean formula in 2-conjunctive normal form&lt;br /&gt;
(CNF), to decide whether the formula is satisfiable.&lt;br /&gt;
&amp;amp;lt;math&amp;amp;gt;2&amp;amp;lt;/math&amp;amp;gt;-SAT is like &amp;amp;lt;math&amp;amp;gt;3&amp;amp;lt;/math&amp;amp;gt;-SAT, except that each clause can have only two literals.&lt;br /&gt;
For example, the following formula is in &amp;amp;lt;math&amp;amp;gt;2&amp;amp;lt;/math&amp;amp;gt;-CNF:&lt;br /&gt;
&amp;amp;lt;math&amp;amp;gt; (x_1 \vee x_2) \wedge (\bar{x}_2 \vee x_3) \wedge (x_1 \vee \bar{x}_3) &amp;amp;lt;/math&amp;amp;gt;&lt;br /&gt;
Give a polynomial-time algorithm to solve &amp;amp;lt;math&amp;amp;gt;2&amp;amp;lt;/math&amp;amp;gt;-SAT.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''P=NP?'''&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-23. &lt;br /&gt;
Show that the following problems are in NP:&lt;br /&gt;
#Does graph &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt; have a simple path (i.e., with no vertex repeated) of length &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt;?&lt;br /&gt;
#Is integer &amp;amp;lt;math&amp;amp;gt;n&amp;amp;lt;/math&amp;amp;gt; composite (i.e., not prime)?&lt;br /&gt;
#Does graph &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt; have a vertex cover of size &amp;amp;lt;math&amp;amp;gt;k&amp;amp;lt;/math&amp;amp;gt;?&lt;br /&gt;
&lt;br /&gt;
[[TADM2E 9.23|(Solution 9.23)]] &lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-24. &lt;br /&gt;
It was a long open question whether the decision problem ''Is integer &amp;amp;lt;math&amp;amp;gt;n&amp;amp;lt;/math&amp;amp;gt; a composite number, in other words, not prime?'' can be computed in&lt;br /&gt;
time polynomial in the size of its input.&lt;br /&gt;
Why doesn't the following algorithm suffice to prove it is in P,&lt;br /&gt;
since it runs in &amp;amp;lt;math&amp;amp;gt;O(n)&amp;amp;lt;/math&amp;amp;gt; time?&lt;br /&gt;
   PrimalityTesting(&amp;amp;lt;math&amp;amp;gt;n&amp;amp;lt;/math&amp;amp;gt;)&lt;br /&gt;
      composite := &amp;amp;lt;math&amp;amp;gt;false&amp;amp;lt;/math&amp;amp;gt;&lt;br /&gt;
      for i := 2 to &amp;amp;lt;math&amp;amp;gt;n-1&amp;amp;lt;/math&amp;amp;gt; do&lt;br /&gt;
         if &amp;amp;lt;math&amp;amp;gt;(n\,\bmod\,i) = 0&amp;amp;lt;/math&amp;amp;gt; then&lt;br /&gt;
            composite := &amp;amp;lt;math&amp;amp;gt;true&amp;amp;lt;/math&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Approximation Algorithms'''&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-25. &lt;br /&gt;
In the ''maximum-satisfiability problem'', we seek a truth assignment that&lt;br /&gt;
satisfies as many clauses as possible.&lt;br /&gt;
Give an heuristic that always satisfies at least half as many clauses&lt;br /&gt;
as the optimal solution.&lt;br /&gt;
&lt;br /&gt;
[[TADM2E 9.25|(Solution 9.25)]] &lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-26. &lt;br /&gt;
Consider the following heuristic for vertex cover.&lt;br /&gt;
Construct a DFS tree of the graph, and delete all the leaves from this tree.&lt;br /&gt;
What remains must be a vertex cover of the graph.&lt;br /&gt;
Prove that the size of this cover is at most twice as large as optimal.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-27. &lt;br /&gt;
The ''maximum cut'' problem for a graph &amp;amp;lt;math&amp;amp;gt;G=(V,E)&amp;amp;lt;/math&amp;amp;gt; seeks to partition&lt;br /&gt;
the vertices &amp;amp;lt;math&amp;amp;gt;V&amp;amp;lt;/math&amp;amp;gt; into disjoint sets &amp;amp;lt;math&amp;amp;gt;A&amp;amp;lt;/math&amp;amp;gt; and &amp;amp;lt;math&amp;amp;gt;B&amp;amp;lt;/math&amp;amp;gt; so as to maximize the&lt;br /&gt;
number of edges &amp;amp;lt;math&amp;amp;gt;(a,b) \in E&amp;amp;lt;/math&amp;amp;gt; such that &amp;amp;lt;math&amp;amp;gt;a \in A&amp;amp;lt;/math&amp;amp;gt; and &amp;amp;lt;math&amp;amp;gt;b \in B&amp;amp;lt;/math&amp;amp;gt;.&lt;br /&gt;
Consider the following heuristic for max cut.&lt;br /&gt;
First assign &amp;amp;lt;math&amp;amp;gt;v_1&amp;amp;lt;/math&amp;amp;gt; to &amp;amp;lt;math&amp;amp;gt;A&amp;amp;lt;/math&amp;amp;gt; and &amp;amp;lt;math&amp;amp;gt;v_2&amp;amp;lt;/math&amp;amp;gt; to &amp;amp;lt;math&amp;amp;gt;B&amp;amp;lt;/math&amp;amp;gt;.&lt;br /&gt;
For each remaining vertex, assign it to the side that adds the most edges&lt;br /&gt;
to the cut.&lt;br /&gt;
Prove that this cut is at least half as large as the optimal cut.&lt;br /&gt;
&lt;br /&gt;
[[TADM2E 9.27|(Solution 9.27)]] &lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-28. &lt;br /&gt;
In the ''bin-packing problem'', we are given &amp;amp;lt;math&amp;amp;gt;n&amp;amp;lt;/math&amp;amp;gt; items&lt;br /&gt;
with weights &amp;amp;lt;math&amp;amp;gt;w_1,w_2,...,w_n&amp;amp;lt;/math&amp;amp;gt;, respectively.&lt;br /&gt;
Our goal is to find the smallest&lt;br /&gt;
number of bins that will hold the &amp;amp;lt;math&amp;amp;gt;n&amp;amp;lt;/math&amp;amp;gt; objects,&lt;br /&gt;
where each bin has capacity of at most one kilogram.&lt;br /&gt;
The ''first-fit heuristic''&lt;br /&gt;
considers the objects in the order in which they are given.&lt;br /&gt;
For each object,&lt;br /&gt;
place it into first bin that has room for it.&lt;br /&gt;
If no such bin exists, start a new bin.&lt;br /&gt;
Prove that this heuristic uses at most twice as many bins as the optimal&lt;br /&gt;
solution.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-29. &lt;br /&gt;
For the first-fit heuristic described just above, give an example where the packing&lt;br /&gt;
it fits uses at least &amp;amp;lt;math&amp;amp;gt;5/3&amp;amp;lt;/math&amp;amp;gt; times as many bins as optimal.&lt;br /&gt;
&lt;br /&gt;
[[TADM2E 9.29|(Solution 9.29)]] &lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;br&amp;amp;gt;9-30. &lt;br /&gt;
A ''vertex coloring'' of graph &amp;amp;lt;math&amp;amp;gt;G=(V,E)&amp;amp;lt;/math&amp;amp;gt; is an assignment of colors to vertices&lt;br /&gt;
of &amp;amp;lt;math&amp;amp;gt;V&amp;amp;lt;/math&amp;amp;gt; such that each edge &amp;amp;lt;math&amp;amp;gt;(x,y)&amp;amp;lt;/math&amp;amp;gt; implies that vertices &amp;amp;lt;math&amp;amp;gt;x&amp;amp;lt;/math&amp;amp;gt; and&lt;br /&gt;
&amp;amp;lt;math&amp;amp;gt;y&amp;amp;lt;/math&amp;amp;gt; are assigned different colors.&lt;br /&gt;
Give an algorithm for vertex coloring &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt; using at most &amp;amp;lt;math&amp;amp;gt;\Delta+1&amp;amp;lt;/math&amp;amp;gt;&lt;br /&gt;
colors, where &amp;amp;lt;math&amp;amp;gt;\Delta&amp;amp;lt;/math&amp;amp;gt; is the maximum vertex degree of &amp;amp;lt;math&amp;amp;gt;G&amp;amp;lt;/math&amp;amp;gt;.&lt;/div&gt;</summary>
		<author><name>Algowikiadmin</name></author>	</entry>

	</feed>