Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Problems/NPComplete/NPC_ARCSET/ARCSET_Class.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ class ARCSET : IGraphProblem<ArcSetBruteForce,ArcSetVerifier,ArcSetDefaultVisual
public ArcSetDefaultVisualization defaultVisualization { get; } = new ArcSetDefaultVisualization();

public string[] contributors { get; } = { "Alex Diviney" };
public string contributorsLink { get; } = "https://redux.portneuf.cose.isu.edu/aboutus";



public int K;

Expand All @@ -61,4 +64,4 @@ public ARCSET(string arcInput)
graph = new UtilCollectionGraph(arcset["N"], arcset["E"]);
K = int.Parse(arcset["K"].ToString());
}
}
}
4 changes: 3 additions & 1 deletion Problems/NPComplete/NPC_CLIQUE/CLIQUE_Class.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class CLIQUE : IGraphProblem<CliqueBruteForce,CliqueVerifier,cliqueDefaultVisual
public cliqueDefaultVisualization defaultVisualization { get; } = new cliqueDefaultVisualization();
public UtilCollectionGraph graph { get; set; }
public string[] contributors {get;} = { "Kaden Marchetti", "Alex Diviney" };
public string contributorsLink { get; } = "https://redux.portneuf.cose.isu.edu/aboutus";


// --- Properties ---
public List<string> nodes {
Expand Down Expand Up @@ -76,4 +78,4 @@ public CLIQUE(string GInput)
graph = new UtilCollectionGraph(cliqueGraph["N"], cliqueGraph["E"]);
}

}
}
5 changes: 4 additions & 1 deletion Problems/NPComplete/NPC_SUBSETSUM/SUBSETSUM_Class.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ class SUBSETSUM : IProblem<SubsetSumBruteForce,SubsetSumVerifier, DummyVisualiza
public string source {get;} = "Karp, Richard M. Reducibility among combinatorial problems. Complexity of computer computations. Springer, Boston, MA, 1972. 85-103.";
public string sourceLink { get; } = "https://cgi.di.uoa.gr/~sgk/teaching/grad/handouts/karp.pdf";
public string[] contributors {get;} = { "Garret Stouffer, Caleb Eardley"};
public string contributorsLink { get; } = "https://redux.portneuf.cose.isu.edu/aboutus";


public static string _defaultInstance { get; } = "{{1,7,12,15} : 28}";
public string defaultInstance {get;} = _defaultInstance;
public string instance {get;set;} = string.Empty;
Expand Down Expand Up @@ -83,4 +86,4 @@ public int getT(string instance) {
}


}
}
18 changes: 15 additions & 3 deletions Problems/NPComplete/NPC_TSP/TSP_Class.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,21 @@ class TSP : IGraphProblem<TSPBruteForce, TSPVerifier, TSPDefaultVisualization, U
// --- Fields ---
public string problemName {get;} = "Traveling Salesperson";
public string problemLink { get; } = "https://en.wikipedia.org/wiki/Travelling_salesman_problem";
public string formalDefinition {get;} = "TSP = {<G,k> | G is a weighted graph where there is a path through every vertex whose weights add up to less than k}";
public string problemDefinition {get;} = "";
public string formalDefinition {get;} =
"TSP = {<G,k> | G is a weighted graph where there exists a Hamiltonian cycle whose total weight is less than k }";
public string problemDefinition {get;} =
"The Traveling Salesperson Problem (TSP) asks whether there exists a Hamiltonian cycle in a weighted graph G such that the total cost of the tour is less than a given bound k. "
+ "This decision version of TSP determines if a route exists that visits every vertex exactly once and returns to the start while staying within the weight limit.";
public string[] contributors {get;} = {"Andrija Sevaljevic"};
public string contributorsLink { get; } = "https://redux.portneuf.cose.isu.edu/aboutus";
public string source {get;} =
"Karp, Richard M. Reducibility among combinatorial problems. In Complexity of Computer Computations, 1972.";
public string sourceLink { get; } =
"https://en.wikipedia.org/wiki/Travelling_salesman_problem";
public string wikiName {get;} = "Travelling_salesman_problem";
public string[] contributors {get;} = {"Andrija Sevaljevic"};
public string contributorsLink { get; } = "https://redux.portneuf.cose.isu.edu/aboutus";


public string source {get;} = "";
private static string _defaultInstance { get; } = "(({New York,Chicago,Denver,Los Angeles,Miami},{({New York,Chicago},790),({New York,Denver},1770),({New York,Los Angeles},2450),({New York,Miami},1280),({Chicago,Denver},1000),({Chicago,Los Angeles},2015),({Chicago,Miami},1370),({Denver,Los Angeles},1015),({Denver,Miami},2060),({Los Angeles,Miami},2745)}),8000)";
Expand Down Expand Up @@ -81,4 +93,4 @@ public TSP(string GInput)

graph = new UtilCollectionGraph(tsp["N"], tsp["E"]);
}
}
}