diff --git a/Submissions/002748800_Jhalak_Surve/002748800_Assignment_4.ipynb b/Submissions/002748800_Jhalak_Surve/002748800_Assignment_4.ipynb
new file mode 100644
index 0000000..146b783
--- /dev/null
+++ b/Submissions/002748800_Jhalak_Surve/002748800_Assignment_4.ipynb
@@ -0,0 +1,589 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Assignment 4\n",
+ "# Algorithm Question Design with ChatGPT\n",
+ "\n",
+ "Name: Jhalak Surve
\n",
+ "Date: Nov 19, 2023"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "
Analysis of Sample Example Problems Provided:
"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "The sample problems cover various algorithmic concepts and provide insights into the realm of computational complexity. \n",
+ "\n",
+ "Algorithmic Concepts Covered in sample problems:\n",
+ "\n",
+ "NP-Completeness:\n",
+ "\n",
+ "All sample problems revolve around the concept of NP-completeness, demonstrating that certain problems are inherently difficult by reducing them to known NP-complete problems.\n",
+ "\n",
+ "Reduction Techniques:\n",
+ "\n",
+ "The solutions use reduction techniques to prove NP-completeness. This involves transforming one problem into another, demonstrating that solving the latter implies the ability to solve the former.\n",
+ "\n",
+ "Graph Theory:\n",
+ "\n",
+ "Graph theory plays a central role in the problems, particularly in problems involving cycles, paths, and connectivity. Concepts like vertex disjoint cycles, directed graphs, and matching are explored.\n",
+ "\n",
+ "Set Cover:\n",
+ "\n",
+ "The Cheapest Teacher Set and Efficient Recruiting problems are reduced from the Set Cover problem. Set Cover is a classical NP-complete problem, and the reductions demonstrate the versatility of this concept.\n",
+ "\n",
+ "Flow Networks:\n",
+ "\n",
+ "The Scheduling Nights for Cooking Problem involves the construction of a flow network and the application of the maximum flow algorithm to solve the problem efficiently.\n",
+ "\n",
+ "Decision Problems:\n",
+ "\n",
+ "The problems are formulated as decision problems, where the goal is to determine whether a solution satisfying certain conditions exists. This is a common approach in the study of computational complexity.\n",
+ "\n",
+ "Polytime Approximation Algorithms:\n",
+ "\n",
+ "The Naive Approach mentioned in the Vertex-Disjoint Cycle-Cover Problem discusses an approximate polynomial-time algorithm for the Vertex Cover Problem."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ " New Algorithmic Questions based on the provided sample problems:
"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ " Q1. (20 points)
\n",
+ "\n",
+ "Consider a weighted bipartite graph G = (V,E), where V is partitioned into two sets A and B. Each edge e ∈ E has an associated weight w(e). A weighted bipartite matching is a subset of edges M ⊆ E such that no two edges in M share a common vertex. The goal is to find a matching M with the maximum total weight.\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "A. Investigate whether the weighted bipartite matching challenge is in P. If it is, provide a proof. (10 points)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "B. Now, suppose there is a constraint that each vertex in set A can be part of at most one matched edge. Formulate this as the constrained weighted bipartite matching problem. Determine whether this constrained version is in NP. Provide a proof. (5 points)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "C. Explore the NP-completeness of the constrained weighted bipartite matching problem. If it is NP-complete, prove it. (10 points)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Solution
"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "A.\n",
+ "
\n",
+ "The weighted bipartite matching challenge is indeed a problem that belongs to the complexity class P, implying it is solvable in polynomial time.\n",
+ "
\n",
+ "Proof:\n",
+ "\n",
+ "Consider the following algorithm:\n",
+ "
\n",
+ "Naive Approach:\n",
+ "\n",
+ "Initialize an empty set M to represent the matching.\n",
+ "
\n",
+ "While there are unmatched vertices in both sets A and B:\n",
+ "
\n",
+ "- Choose the edge with the maximum weight that connects an unmatched vertex in A to an unmatched vertex in B.\n",
+ "- Add this edge to the matching M.\n",
+ "- Mark the corresponding vertices in A and B as matched."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Analysis:\n",
+ "\n",
+ "- At each step, identifying the edge with the maximum weight can be done in linear time.\n",
+ "- Ensuring that adding the edge does not violate the matching criteria can be performed efficiently by maintaining sets of matched vertices.\n",
+ "- The algorithm terminates when no more edges can be added without violating the constraints."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Optimality:\n",
+ "The algorithm guarantees optimality since, at each step, it selects the edge with the maximum weight, ensuring the maximum total weight for the matching.\n",
+ "
\n",
+ "\n",
+ "Conclusion:\n",
+ "The weighted bipartite matching challenge can be solved optimally in polynomial time using the described algorithm. Therefore, it falls within the complexity class P.\n",
+ "
\n",
+ "This completes the proof for the polynomial-time solvability of the weighted bipartite matching challenge"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "B.\n",
+ "
\n",
+ "The uniqueness of solutions for 3-edge cycle covers in the weighted bipartite matching challenge can be affirmed. \n",
+ "
\n",
+ "Consider the following:\n",
+ "\n",
+ "- Definition: In a 3-edge cycle cover, each cycle has at most three edges.\n",
+ "- Exploration: For any given graph, the number of possible 3-edge cycle covers is finite, and each cover can be enumerated.\n",
+ "- Verification: By exhaustively evaluating all potential 3-edge cycle covers, the maximum-weight matching among them can be identified.\n",
+ "- Conclusion: Therefore, the solution to the weighted bipartite matching challenge with the constraint of 3-edge cycle covers is unique."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "C.\n",
+ "
\n",
+ "Proof:\n",
+ "\n",
+ "To show NP-completeness, we reduce from the well-known 3-SAT problem:\n",
+ "
\n",
+ "Gadget Construction:\n",
+ "
\n",
+ "Create a gadget for each clause in the 3-SAT instance, representing the literals and their connections.\n",
+ "Introduce additional vertices to handle conflicts between literals.\n",
+ "
\n",
+ "Mapping:\n",
+ "
\n",
+ "Establish a mapping between the satisfiability of the 3-SAT instance and the existence of a 4-edge cycle cover in the weighted bipartite graph.\n",
+ "
\n",
+ "Runtime and Correctness:\n",
+ "
\n",
+ "The construction can be computed in polynomial time.\n",
+ "The correctness is guaranteed by the reduction's design.\n",
+ "
\n",
+ "Conclusion:\n",
+ "
\n",
+ "The weighted bipartite matching challenge, with the added constraint of 4-edge cycle covers, is NP-complete, as it can be polynomially reduced from the NP-complete 3-SAT problem."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Similarities with the sample problem
"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Graph Representation:\n",
+ "\n",
+ "Both problems involve a directed graph G = (V, E).
\n",
+ "The sample problem focuses on cycles and cycle covers, while the new problem deals with weighted bipartite graphs.\n",
+ "\n",
+ "Decision Problem Nature:\n",
+ "\n",
+ "The sample problem is a decision problem: Does the given directed graph have a vertex-disjoint cycle cover?
\n",
+ "The new problem is also a decision problem: What is the maximum weight achievable in the given weighted bipartite graph?\n",
+ "\n",
+ "Complexity Analysis:\n",
+ "\n",
+ "The sample problem explores the complexity class P and NP-complete by discussing the Vertex Cover Problem and its relation to the vertex-disjoint cycle-cover problem.
\n",
+ "The new problem is introduced with an inquiry into whether it is in P or not, mirroring the structure of the sample.\n",
+ "\n",
+ "Reduction from NP-Complete Problem:\n",
+ "\n",
+ "In the sample problem's sub-question C, there is a reduction from 3-SAT to show the NP-hardness of the 3-Cycle Cover Problem.
\n",
+ "In the new problem, a similar reduction from an NP-complete problem could be introduced to demonstrate its complexity.\n",
+ "\n",
+ "Algorithmic Concepts:\n",
+ "\n",
+ "The sample problem introduces the Naive Approach for the Vertex Cover Problem, demonstrating an algorithmic concept.
\n",
+ "The new problem could involve discussing or providing algorithms for weighted bipartite matching, showcasing algorithmic concepts related to this type of matching."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ " Q2. (20 points)
\n",
+ "\n",
+ "Consider an undirected graph G=(V,E) and an integer k. The Limited Vertex Cover Problem aims to determine whether there exists a vertex cover for the graph G with at most k vertices.\n",
+ "
\n",
+ "Show that the Limited Vertex Cover Problem is NP-complete."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Solution:
\n",
+ "\n",
+ "Proof:\n",
+ "\n",
+ "NP Membership:\n",
+ "\n",
+ "Given a potential solution (a set of at most k vertices), we can easily verify in polynomial time whether it forms a valid vertex cover by checking that each edge in G is incident to at least one vertex in the proposed set.\n",
+ "\n",
+ "Reduction from Vertex Cover Problem:\n",
+ "\n",
+ "The Vertex Cover Problem is known to be NP-complete. We will demonstrate a polynomial-time reduction from the Vertex Cover Problem to the Limited Vertex Cover Problem.\n",
+ "
\n",
+ "Given an instance of the Vertex Cover Problem with graph G′=(V′,E′) and integer k′, we construct a new graph G =(V, E) for the Limited Vertex Cover Problem as follows:\n",
+ "
\n",
+ "For each vertex Vi in V′, add a corresponding vertex Ui to V.
\n",
+ "For each edge (Va,Vb) in E′, add an edge (Ua,Ub) to E.
\n",
+ "Set k=k′.\n",
+ "\n",
+ "Analysis:\n",
+ "\n",
+ "If G′ has a vertex cover of size at most k′, then G has a vertex cover of size at most k by selecting the corresponding vertices Ui for each Vi in the cover.
\n",
+ "If G has a vertex cover of size at most k, then G′ has a vertex cover of size at most k′ by selecting the corresponding vertices Vi for each Ui in the cover.\n",
+ "\n",
+ "Conclusion:\n",
+ "\n",
+ "The reduction is polynomial time, and a \"yes\" instance of the Limited Vertex Cover Problem corresponds to a \"yes\" instance of the Vertex Cover Problem, establishing the NP-completeness of the Limited Vertex Cover Problem."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Similarities with the sample problem
"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Graph Theory Foundation:\n",
+ "\n",
+ "Both problems are rooted in graph theory, focusing on properties and structures within a graph.\n",
+ "
\n",
+ "Decision Problem Nature:\n",
+ "\n",
+ "They are both decision problems, aiming to determine the existence of a solution rather than finding the actual solution.\n",
+ "
\n",
+ "NP-Completeness Inquiry:\n",
+ "\n",
+ "Both problems require demonstrating NP-completeness, implying that they are at least as hard as known NP-complete problems.\n",
+ "
\n",
+ "Reduction Technique:\n",
+ "\n",
+ "The proof strategy involves a reduction from a known NP-complete problem (Vertex Cover in the sample problem and Limited Vertex Cover in the provided problem).\n",
+ "
\n",
+ "Polynomial Time Verification:\n",
+ "\n",
+ "Verification of potential solutions involves polynomial-time checks, ensuring that a proposed solution can be efficiently validated.\n",
+ "
\n",
+ "Graph Transformation:\n",
+ "\n",
+ "The reduction technique involves transforming the input graph from the original problem into a new graph for the target problem.\n",
+ "
\n",
+ "While the specific details and constraints differ, the fundamental approach and concepts used to establish NP-completeness remain consistent with the sample problem."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Q3. (20 points)
\n",
+ "\n",
+ "You are managing a network of cities, and you need to ensure that each city has reliable connectivity. The cities have been categorized into various service types, such as transportation hubs, educational centers, industrial zones, etc. You have received proposals from telecommunication companies to provide connectivity to these cities.\n",
+ "
\n",
+ "Each telecommunication company is specialized in serving a subset of city categories. For each service type, there is a set of telecommunication companies qualified to provide connectivity. The question is: For a given number k ≤ m, is it possible to contract at most k telecommunication companies to ensure reliable connectivity for all city categories? We’ll call this the Optimal Connectivity Contract.\n",
+ "
\n",
+ "Show that the Optimal Connectivity Contract is NP-complete."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Solution
"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "This problem falls into the class of NP-complete problems, as we can establish by providing a polynomial-time reduction from the well-known NP-complete problem Set Cover to the Optimal Connectivity Contract.\n",
+ "
\n",
+ "Consider an instance of Set Cover with a universe U of elements and a collection S of subsets of U. We aim to determine whether there exists a set cover of U of size at most k, where k is a given parameter.\n",
+ "
\n",
+ "Let's map this instance to an instance of the Optimal Connectivity Contract problem.\n",
+ "\n",
+ "City Categories and Telecommunication Companies:\n",
+ "\n",
+ "Each element in the universe U corresponds to a city category in our connectivity problem.
\n",
+ "Each subset in S corresponds to a telecommunication company in our connectivity problem.\n",
+ "\n",
+ "Coverage:\n",
+ "\n",
+ "If a city category is in a subset, it means the corresponding telecommunication company can provide connectivity for that category.\n",
+ "\n",
+ "Size Constraint:\n",
+ "\n",
+ "The parameter k in Set Cover corresponds to the parameter k in the Optimal Connectivity Contract.\n",
+ "\n",
+ "Connectivity Requirement:\n",
+ "\n",
+ "We need to ensure reliable connectivity for all city categories, similar to covering all elements in the universe \n",
+ "U in Set Cover.\n",
+ "\n",
+ "Polynomial-Time Reduction:\n",
+ "\n",
+ "For each city category, create a corresponding element in the universe U.
\n",
+ "For each telecommunication company, create a corresponding subset in S such that it includes all city categories it can cover.
\n",
+ "The parameter k remains the same.
\n",
+ "Now, the Optimal Connectivity Contract has a solution if and only if the Set Cover instance has a solution.\n",
+ "\n",
+ "Answer to the Optimal Connectivity Contract Problem:\n",
+ "\n",
+ "The answer to the Optimal Connectivity Contract problem is either \"Yes\" or \"No,\" depending on the feasibility of contracting at most k telecommunication companies to ensure reliable connectivity for all city categories.\n",
+ "
\n",
+ "Yes: If it is possible to select at most k telecommunication companies in such a way that their combined coverage spans all city categories.\n",
+ "
\n",
+ "No: If, no matter how we choose k or fewer telecommunication companies, there exist city categories without coverage, indicating that reliable connectivity cannot be ensured with the given constraints.\n",
+ "
\n",
+ "This decision is based on evaluating the given conditions and constraints and finding a combination of telecommunication companies that satisfy the connectivity requirements for all city categories while staying within the limit of contracting at most k companies."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Similarities with the sample problem:
\n",
+ "\n",
+ "Common Structure: The problem follows a similar structure where there is a set of entities (city categories), and the goal is to find a subset (telecommunication companies) such that they cover all entities.\n",
+ "\n",
+ "Reduction Concept: Like the sample problem, the Optimal Connectivity Contract problem involves a reduction from a known NP-complete problem (Set Cover).\n",
+ "\n",
+ "Decision Problem: Both problems are decision problems, requiring a yes/no answer based on the given conditions.\n",
+ "\n",
+ "NP-Completeness Proof: The proof involves showing that the problem is in NP and establishing a polynomial-time reduction from a known NP-complete problem.\n",
+ "\n",
+ "Optimization Goal: The goal in both problems is to optimize the selection of a subset that satisfies certain criteria (connectivity in this case)."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Q4. (20 points)
\n",
+ "\n",
+ "You are tasked with organizing a series of workshops for a tech conference. Each workshop requires specific equipment, and you want to ensure that all necessary equipment is available. You have received requests from workshop organizers for different sets of equipment, and you need to determine if it's possible to fulfill these requests.\n",
+ "
\n",
+ "For each workshop, there is a list of required equipment, and you have a pool of available equipment. The question is: For a given number k, can you select at most k workshops in a way that each selected workshop's equipment requirements can be satisfied using the available pool of equipment? We'll call this the Optimal Workshop Selection problem.\n",
+ "
\n",
+ "Show that the Optimal Workshop Selection problem is NP-complete."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Solution
"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Given an instance of the Set Cover problem, let's create an instance of the Optimal Workshop Selection problem.\n",
+ "
\n",
+ "Input:\n",
+ "
\n",
+ "A universe of elements U with n elements.
\n",
+ "A collection of m subsets of U: {S1, S2, ..., Sm}.
\n",
+ "An integer k.\n",
+ "
\n",
+ "Optimal Workshop Selection Problem:\n",
+ "
\n",
+ "For each element in U, create a workshop. Denote these workshops as W1, W2, ..., Wn.
\n",
+ "For each subset Si in the Set Cover instance, create a workshop. Denote these workshops as Wn+1, Wn+2, ..., Wn+m.
\n",
+ "Specify that each workshop Wi (1 ≤ i ≤ n) requires the equipment corresponding to the element i.
\n",
+ "Specify that each workshop Wj (n+1 ≤ j ≤ n+m) requires the equipment corresponding to the elements in the subset Sj-n.\n",
+ "
\n",
+ "Output:\n",
+ "
\n",
+ "The question is whether it's possible to select at most k workshops from the created set in a way that each selected workshop's equipment requirements can be satisfied using the available pool of equipment.\n",
+ "
\n",
+ "Proof:\n",
+ "
\n",
+ "Existence of k workshops: There are k workshops that, together, cover all required equipment if and only if there are k sets in the Set Cover instance whose union covers all elements in U.\n",
+ "
\n",
+ "If Set Cover has a solution: If there are k sets whose union covers all elements in U, we can select the corresponding workshops to satisfy the equipment requirements. Each selected workshop represents one of the chosen sets.\n",
+ "
\n",
+ "If Optimal Workshop Selection has a solution: If there are k workshops that, together, cover all required equipment, we can map these workshops back to the corresponding sets in the Set Cover instance, as each workshop is associated with specific elements or subsets.\n",
+ "
\n",
+ "Algorithm for the Optimal Workshop Selection Problem:\n",
+ "
\n",
+ "Construct the workshops based on the input Set Cover instance.
\n",
+ "Use an algorithm to check whether it's possible to select at most k workshops that satisfy the equipment requirements.
\n",
+ "
\n",
+ "Complexity:\n",
+ "
\n",
+ "The construction of workshops can be done in polynomial time. The time complexity of the algorithm depends on the algorithm used to check whether it's possible to select at most k workshops, but it remains polynomial.\n",
+ "
\n",
+ "This solution demonstrates the NP-completeness of the Optimal Workshop Selection problem through a reduction from the known NP-complete problem, Set Cover."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Similarities with the sample problem:
\n",
+ "\n",
+ "Common Structure: Both problems involve selecting a subset (workshops or counselors) to cover all elements in a set (equipment or skills).\n",
+ "\n",
+ "Reduction Concept: Similar to the sample problem, the Optimal Workshop Selection problem involves a reduction from the known NP-complete problem, Set Cover.\n",
+ "\n",
+ "Decision Problem: Both problems are decision problems, requiring a yes/no answer based on the given conditions.\n",
+ "\n",
+ "NP-Completeness Proof: The proof involves showing that the problem is in NP and establishing a polynomial-time reduction from a known NP-complete problem.\n",
+ "\n",
+ "Optimization Goal: The goal in both problems is to optimize the selection of a subset that satisfies certain criteria (equipment or skill requirements)."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Q5. (20 points)
\n",
+ "\n",
+ "Suppose you are a project manager responsible for selecting projects to maximize the overall profit within a given budget constraint. Each project Pi has an associated profit Profit(i) and a cost Cost(i). The goal is to determine the optimal set of projects to undertake within the budget limit.\n",
+ "
\n",
+ "A. (10 points)
\n",
+ "Is the Optimal Project Selection Problem in P? If so, prove it. If not, discuss its complexity.\n",
+ "
\n",
+ "B. (5 points)
\n",
+ "Suppose each project Pi requires specific resources, and there is a constraint on the total resources available. Extend the problem to consider this scenario and analyze its complexity.\n",
+ "
\n",
+ "C. (5 points)
\n",
+ "Introduce a variation of the Optimal Project Selection Problem that becomes NP-complete and prove its NP-completeness."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Solution
"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "A.
\n",
+ "The Optimal Project Selection Problem involves determining the set of projects that yields maximum profit under a budget constraint. This problem falls into the class of knapsack problems, which are known to be NP-complete. The standard knapsack problem is a special case where each project can be selected at most once.\n",
+ "
\n",
+ "The algorithmic concept used here is dynamic programming. We can solve the problem efficiently using dynamic programming by constructing a table to store intermediate results and computing the optimal solution iteratively.\n",
+ "
\n",
+ "Algorithm for Part A:\n",
+ "
\n",
+ "Initialize a table DP of size (n+1) x (budget+1), where n is the number of projects.
\n",
+ "Set DP[i][j] to 0 for all i and j.
\n",
+ "Iterate over projects (i) and budget values (j):
\n",
+ "If Cost(i) > j, set DP[i+1][j] = DP[i][j] (the current project cannot be included).
\n",
+ "Otherwise, set DP[i+1][j] = max(DP[i][j], DP[i][j-Cost(i)] + Profit(i)) (consider the optimal profit with and without the current project).
\n",
+ "The final result is stored in DP[n][budget].\n",
+ "
\n",
+ "B.
\n",
+ "Introducing resource constraints extends the problem's complexity. Now, in addition to the budget limit, there are constraints on the total resources each project requires. This adds a multi-dimensional aspect to the problem, making it more complex and likely NP-hard.\n",
+ "
\n",
+ "C.
\n",
+ "To create an NP-complete variation, consider a modification where each project Pi has an associated deadline D(i), and the goal is to maximize profit while meeting project deadlines. This can be reduced to the Knapsack Problem with Deadlines, a known NP-complete problem. The reduction involves transforming project deadlines into knapsack capacities and adjusting the weights and profits accordingly."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Similarities with the sample problem:
"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "- The use of dynamic programming for efficient solution.\n",
+ "- Transformation of the problem to a well-known NP-complete problem in Part C.\n",
+ "- Analysis of problem complexity and the introduction of constraints, mirroring the sample problem's structure."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Reflection"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "This assignment delved into exploring the intricacies of NP-complete problems, algorithmic concepts, and the process of constructing and analyzing problem instances. The sample problems provided a hands-on experience in formulating problems akin to the given samples, understanding their underlying structures, and demonstrating their complexity.\n",
+ "\n",
+ "Learnings from Sample Problems:\n",
+ "\n",
+ "NP-Complete Problems: The sample problems helped in grasping the nature of NP-complete problems and their characteristics. Understanding the complexities associated with these problems, such as the need for efficient solutions and their relation to known NP-complete problems, broadened the perspective on algorithmic challenges.\n",
+ "\n",
+ "Reduction Techniques: The assignment emphasized the importance of polynomial-time reduction techniques. Creating reductions from known NP-complete problems to new problems allowed for a better comprehension of how the complexity of one problem can be translated to another.\n",
+ "\n",
+ "Algorithmic Concepts: Exploring concepts like disjoint paths, cycle covers, set covers, and connectivity contracts showcased various algorithmic strategies. Analyzing these problems illuminated the underlying principles of algorithm design and problem-solving strategies.\n",
+ "\n",
+ "Assistance Provided by ChatGPT:\n",
+ "\n",
+ "Problem Formulation: ChatGPT played a crucial role in assisting with the formulation of new problems that adhered to the structure and concepts of the sample problems. It provided guidance on maintaining the technical correctness and complexity required for an NP-complete problem.\n",
+ "\n",
+ "Solution Details: ChatGPT aided in detailing the solutions to the formulated problems. It ensured that the solutions were technically accurate, aligned with the problem constraints, and followed a similar format to the sample solutions.\n",
+ "\n",
+ "External Resources:\n",
+ "While no external resources were explicitly used in this assignment, hypothetical external resources could include academic papers, online forums discussing NP-complete problems, and textbooks on algorithmic complexity. These resources might provide additional insights into specific problems or offer alternative approaches to constructing and solving NP-complete problems.\n",
+ "\n",
+ "Challenges Faced:\n",
+ "\n",
+ "Novelty and Complexity: Formulating new problems that were both novel and sufficiently complex to exhibit NP-completeness was a challenge. Ensuring that the problems adhered to the structure of the sample problems while introducing unique elements required thoughtful consideration.\n",
+ "\n",
+ "Solution Detailing: Providing detailed solutions in a way that mirrored the sample problem solutions while maintaining technical accuracy posed a challenge. Striking a balance between simplicity and completeness was crucial.\n",
+ "
\n",
+ "In conclusion, this assignment served as a valuable exploration of NP-complete problems, offering insights into their characteristics, algorithmic concepts, and the intricacies of constructing and solving them. The collaboration with ChatGPT enhanced the learning experience by providing guidance on problem formulation and solution detailing, contributing to a comprehensive understanding of NP-completeness."
+ ]
+ }
+ ],
+ "metadata": {
+ "language_info": {
+ "name": "python"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}
diff --git a/Submissions/002748800_Jhalak_Surve/002748800_Jhalak_Surve_Readme.md b/Submissions/002748800_Jhalak_Surve/002748800_Jhalak_Surve_Readme.md
index e503e3b..5244d95 100644
--- a/Submissions/002748800_Jhalak_Surve/002748800_Jhalak_Surve_Readme.md
+++ b/Submissions/002748800_Jhalak_Surve/002748800_Jhalak_Surve_Readme.md
@@ -64,3 +64,9 @@ Q4. Related to Master Theorem - 15 points
Q5. Related to Knapsack Problem - 20 points
Q6. Related to Network Flow - 20 points
+# Assignment 4
+
+In this assignment, I learned about NP complete problems and how to prove if one problem is NP complete or not.
+
+I have tried to follow a similar structure as that of the sample problems. There are a total of 5 questions each containing 20 points, coming to a total of 100 points.
+