<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>HW on CS 412</title>
		<link>/molloykp/teaching/cs412_f26/categories/hw/</link>
		<description>Recent content in HW on CS 412</description>
		<generator>Hugo</generator>
		<language>en</language>
		
		
		
		
			<atom:link href="/molloykp/teaching/cs412_f26/categories/hw/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>NP Complete Project Problem Specification</title>
				<link>/molloykp/teaching/cs412_f26/pas/npcompleteproject/input_specs/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>/molloykp/teaching/cs412_f26/pas/npcompleteproject/input_specs/</guid>
				<description>&lt;p&gt;This document outlines the input and output specifications&#xA;for each NP-complete problem.  For each problem, sample&#xA;input and output are provided.&lt;/p&gt;&#xA;&lt;h2 id=&#34;weighted-graph-problems-tsp-longest-path&#34;&gt;Weighted Graph Problems (TSP, Longest Path)&lt;/h2&gt;&#xA;&lt;p&gt;For traveling sales person, the names of the two programs are:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;cs412_tsp_exact.py&lt;/li&gt;&#xA;&lt;li&gt;cs412_tsp_approx.py&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;For the longest path problem, the names of the two programs are:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;cs412_longestpath_exact.py&lt;/li&gt;&#xA;&lt;li&gt;cs412_longestpath_approx.py&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The input is a weighted graph specified by a line containing the number of vertices &lt;em&gt;n&lt;/em&gt; and the&#xA;number of edges &lt;em&gt;m&lt;/em&gt; followed by &lt;em&gt;m&lt;/em&gt; lines containing the edges given&#xA;in &lt;em&gt;u&lt;/em&gt; &lt;em&gt;v&lt;/em&gt; &lt;em&gt;w&lt;/em&gt; format, representing an edge between &lt;em&gt;u&lt;/em&gt; and &lt;em&gt;v&lt;/em&gt; of weight &lt;em&gt;w&lt;/em&gt;.&#xA;TSP graphs are undirected and edges will be listed only once and the graph will be a complete graph. LP graphs are undirected&#xA;and edges will be listed once (but it is not necessarily a complete graph).&lt;/p&gt;</description>
			</item>
			<item>
				<title>NP Complete Project Problem Specification</title>
				<link>/molloykp/teaching/cs412_f26/pas/npcompleteproject/input_specs2026/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>/molloykp/teaching/cs412_f26/pas/npcompleteproject/input_specs2026/</guid>
				<description>&lt;p&gt;This document outlines the input and output specifications&#xA;for each NP-complete problem as well as file naming standards.&#xA;For each problem, sample input and output are provided.&lt;/p&gt;&#xA;&lt;p&gt;Problem | Prefix&#xA;Traveling Salesperson     | tsp_&#xA;Longest Path              | fp_&lt;/p&gt;&#xA;&lt;p&gt;ALl problems with have the following:&#xA;Program Type | Suffix&#xA;brute force  | bf&#xA;back tracking | bt&#xA;back tracking with ordering | bt_ordering&#xA;random approximation | random&#xA;greedy approximation | greedy&lt;/p&gt;</description>
			</item>
			<item>
				<title>Project Options</title>
				<link>/molloykp/teaching/cs412_f26/pas/npcompleteproject/proj_augments/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>/molloykp/teaching/cs412_f26/pas/npcompleteproject/proj_augments/</guid>
				<description>&lt;h2 id=&#34;project-options&#34;&gt;Project Options&lt;/h2&gt;&#xA;&lt;h3 id=&#34;max-3-sat&#34;&gt;MAX 3-SAT&lt;/h3&gt;&#xA;&lt;h4 id=&#34;solve-problem-using-independent-set-approximation&#34;&gt;Solve Problem using Independent Set Approximation&lt;/h4&gt;&#xA;&lt;p&gt;For this option, you must develop code that transforms the 3-SAT input into&#xA;input for the independent set problem (in a polynomial number of steps).  Many&#xA;examples of how to do this are in publication, you just need to implement one&#xA;of them and discuss how it works.&lt;/p&gt;&#xA;&lt;p&gt;You can then use the instructor provided approximation algorithm for independent&#xA;set and compare it to how your team&amp;rsquo;s approximation method (part D) performs.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
