From e7a2e027e5121cd5a5df1776b372cbffe779a9f6 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Wed, 9 Nov 2022 11:17:17 +0400 Subject: [PATCH] Add content for complexity classes --- .../content/113-complexity-classes/100-p.md | 29 ++++++++++++++- .../content/113-complexity-classes/101-np.md | 29 ++++++++++++++- .../113-complexity-classes/102-co-np.md | 29 ++++++++++++++- .../113-complexity-classes/103-np-hard.md | 29 ++++++++++++++- .../100-travelling-salesman-problem.md | 10 +++++- .../104-np-complete/101-knapsack-problem.md | 9 ++++- .../102-longest-path-problem.md | 9 ++++- .../104-np-complete/readme.md | 29 ++++++++++++++- .../113-complexity-classes/105-p-equals-np.md | 7 +++- .../content/113-complexity-classes/readme.md | 35 ++++++++++++++++++- 10 files changed, 205 insertions(+), 10 deletions(-) diff --git a/content/roadmaps/103-computer-science/content/113-complexity-classes/100-p.md b/content/roadmaps/103-computer-science/content/113-complexity-classes/100-p.md index 2eff90c81..d50543e3c 100644 --- a/content/roadmaps/103-computer-science/content/113-complexity-classes/100-p.md +++ b/content/roadmaps/103-computer-science/content/113-complexity-classes/100-p.md @@ -1 +1,28 @@ -# P \ No newline at end of file +# P + +The P in the P class stands for Polynomial Time. It is the collection of decision problems(problems with a “yes” or “no” answer) that can be solved by a deterministic machine in polynomial time. + +Free Content + +Types of Complexity Classes | P, NP, CoNP, NP hard and NP complete +Trying to understand P vs NP vs NP Complete vs NP Hard +Complexity: P, NP, NP-completeness, Reductions +Complexity: Approximation Algorithms +Complexity: Fixed-Parameter Algorithms + + +Lecture 23: Computational Complexity + +---- + +Greedy Algs. II & Intro to NP Completeness +NP Completeness II & Reductions +NP Completeness III +NP Completeness IV + +---- + +CSE373 2020 - Lecture 23 - NP-Completeness +CSE373 2020 - Lecture 24 - Satisfiability +CSE373 2020 - Lecture 25 - More NP-Completeness +CSE373 2020 - Lecture 26 - NP-Completeness Challenge diff --git a/content/roadmaps/103-computer-science/content/113-complexity-classes/101-np.md b/content/roadmaps/103-computer-science/content/113-complexity-classes/101-np.md index 5799a89e8..e6731d71d 100644 --- a/content/roadmaps/103-computer-science/content/113-complexity-classes/101-np.md +++ b/content/roadmaps/103-computer-science/content/113-complexity-classes/101-np.md @@ -1 +1,28 @@ -# Np \ No newline at end of file +# NP + +The NP in NP class stands for Non-deterministic Polynomial Time. It is the collection of decision problems that can be solved by a non-deterministic machine in polynomial time. + +Free Content + +Types of Complexity Classes | P, NP, CoNP, NP hard and NP complete +Trying to understand P vs NP vs NP Complete vs NP Hard +Complexity: P, NP, NP-completeness, Reductions +Complexity: Approximation Algorithms +Complexity: Fixed-Parameter Algorithms + + +Lecture 23: Computational Complexity + +---- + +Greedy Algs. II & Intro to NP Completeness +NP Completeness II & Reductions +NP Completeness III +NP Completeness IV + +---- + +CSE373 2020 - Lecture 23 - NP-Completeness +CSE373 2020 - Lecture 24 - Satisfiability +CSE373 2020 - Lecture 25 - More NP-Completeness +CSE373 2020 - Lecture 26 - NP-Completeness Challenge diff --git a/content/roadmaps/103-computer-science/content/113-complexity-classes/102-co-np.md b/content/roadmaps/103-computer-science/content/113-complexity-classes/102-co-np.md index eae24a61f..cd537c5ed 100644 --- a/content/roadmaps/103-computer-science/content/113-complexity-classes/102-co-np.md +++ b/content/roadmaps/103-computer-science/content/113-complexity-classes/102-co-np.md @@ -1 +1,28 @@ -# Co np \ No newline at end of file +# Co-NP + +Co-NP stands for the complement of NP Class. It means if the answer to a problem in Co-NP is No, then there is proof that can be checked in polynomial time. + +Free Content + +Types of Complexity Classes | P, NP, CoNP, NP hard and NP complete +Trying to understand P vs NP vs NP Complete vs NP Hard +Complexity: P, NP, NP-completeness, Reductions +Complexity: Approximation Algorithms +Complexity: Fixed-Parameter Algorithms + + +Lecture 23: Computational Complexity + +---- + +Greedy Algs. II & Intro to NP Completeness +NP Completeness II & Reductions +NP Completeness III +NP Completeness IV + +---- + +CSE373 2020 - Lecture 23 - NP-Completeness +CSE373 2020 - Lecture 24 - Satisfiability +CSE373 2020 - Lecture 25 - More NP-Completeness +CSE373 2020 - Lecture 26 - NP-Completeness Challenge diff --git a/content/roadmaps/103-computer-science/content/113-complexity-classes/103-np-hard.md b/content/roadmaps/103-computer-science/content/113-complexity-classes/103-np-hard.md index 87126abc5..5fe78ab08 100644 --- a/content/roadmaps/103-computer-science/content/113-complexity-classes/103-np-hard.md +++ b/content/roadmaps/103-computer-science/content/113-complexity-classes/103-np-hard.md @@ -1 +1,28 @@ -# Np hard \ No newline at end of file +# NP-Hard + +An NP-hard problem is at least as hard as the hardest problem in NP and it is the class of the problems such that every problem in NP reduces to NP-hard. + +Free Content + +Types of Complexity Classes | P, NP, CoNP, NP hard and NP complete +Trying to understand P vs NP vs NP Complete vs NP Hard +Complexity: P, NP, NP-completeness, Reductions +Complexity: Approximation Algorithms +Complexity: Fixed-Parameter Algorithms + + +Lecture 23: Computational Complexity + +---- + +Greedy Algs. II & Intro to NP Completeness +NP Completeness II & Reductions +NP Completeness III +NP Completeness IV + +---- + +CSE373 2020 - Lecture 23 - NP-Completeness +CSE373 2020 - Lecture 24 - Satisfiability +CSE373 2020 - Lecture 25 - More NP-Completeness +CSE373 2020 - Lecture 26 - NP-Completeness Challenge diff --git a/content/roadmaps/103-computer-science/content/113-complexity-classes/104-np-complete/100-travelling-salesman-problem.md b/content/roadmaps/103-computer-science/content/113-complexity-classes/104-np-complete/100-travelling-salesman-problem.md index a3acc3add..0e4249c12 100644 --- a/content/roadmaps/103-computer-science/content/113-complexity-classes/104-np-complete/100-travelling-salesman-problem.md +++ b/content/roadmaps/103-computer-science/content/113-complexity-classes/104-np-complete/100-travelling-salesman-problem.md @@ -1 +1,9 @@ -# Travelling salesman problem \ No newline at end of file +# Travelling Salesman Problem + +The Travelling Salesman Problem (TSP) is a classic problem in computer science. It is a problem that is NP-complete, which means that it is a problem that is hard to solve. It is also a problem that is used to test the efficiency of algorithms. + +Free Content +Travelling Salesman Problem | Set 1 (Naive and Dynamic Programming) +What is the Traveling Salesman Problem? +4.7 Traveling Salesperson Problem - Dynamic Programming +Traveling Salesman Problem | Dynamic Programming | Graph Theory diff --git a/content/roadmaps/103-computer-science/content/113-complexity-classes/104-np-complete/101-knapsack-problem.md b/content/roadmaps/103-computer-science/content/113-complexity-classes/104-np-complete/101-knapsack-problem.md index bfc8cc87c..0dabfd74d 100644 --- a/content/roadmaps/103-computer-science/content/113-complexity-classes/104-np-complete/101-knapsack-problem.md +++ b/content/roadmaps/103-computer-science/content/113-complexity-classes/104-np-complete/101-knapsack-problem.md @@ -1 +1,8 @@ -# Knapsack problem \ No newline at end of file +# Knapsack Problem + +KnapSack Problem is a classic problem in computer science. It is a problem in which we are given a set of items, each with a weight and a value, and we need to determine which items to include in a collection so that the total weight is less than or equal to a given limit and the total value is as large as possible. + +Free Content +0-1 Knapsack Problem | DP-10 +How to solve the Knapsack Problem with dynamic programming +3.1 Knapsack Problem - Greedy Method diff --git a/content/roadmaps/103-computer-science/content/113-complexity-classes/104-np-complete/102-longest-path-problem.md b/content/roadmaps/103-computer-science/content/113-complexity-classes/104-np-complete/102-longest-path-problem.md index 7ad4a912b..eb9ca1bf1 100644 --- a/content/roadmaps/103-computer-science/content/113-complexity-classes/104-np-complete/102-longest-path-problem.md +++ b/content/roadmaps/103-computer-science/content/113-complexity-classes/104-np-complete/102-longest-path-problem.md @@ -1 +1,8 @@ -# Longest path problem \ No newline at end of file +# Longest Path Problem + +Longest path problem is a problem that asks us to find the longest path in a graph. + +Free Content +Longest Path in a Directed Acyclic Graph +Shortest/Longest path on a Directed Acyclic Graph (DAG) | Graph Theory +Longest Simple Path - Intro to Algorithms diff --git a/content/roadmaps/103-computer-science/content/113-complexity-classes/104-np-complete/readme.md b/content/roadmaps/103-computer-science/content/113-complexity-classes/104-np-complete/readme.md index b6fe732b0..d6dfab5e4 100644 --- a/content/roadmaps/103-computer-science/content/113-complexity-classes/104-np-complete/readme.md +++ b/content/roadmaps/103-computer-science/content/113-complexity-classes/104-np-complete/readme.md @@ -1 +1,28 @@ -# Np complete \ No newline at end of file +# NP Complete + +A problem is NP-complete if it is both NP and NP-hard. NP-complete problems are the hard problems in NP. + +Free Content + +Types of Complexity Classes | P, NP, CoNP, NP hard and NP complete +Trying to understand P vs NP vs NP Complete vs NP Hard +Complexity: P, NP, NP-completeness, Reductions +Complexity: Approximation Algorithms +Complexity: Fixed-Parameter Algorithms + + +Lecture 23: Computational Complexity + +---- + +Greedy Algs. II & Intro to NP Completeness +NP Completeness II & Reductions +NP Completeness III +NP Completeness IV + +---- + +CSE373 2020 - Lecture 23 - NP-Completeness +CSE373 2020 - Lecture 24 - Satisfiability +CSE373 2020 - Lecture 25 - More NP-Completeness +CSE373 2020 - Lecture 26 - NP-Completeness Challenge diff --git a/content/roadmaps/103-computer-science/content/113-complexity-classes/105-p-equals-np.md b/content/roadmaps/103-computer-science/content/113-complexity-classes/105-p-equals-np.md index d03ed63a2..e9bdc7466 100644 --- a/content/roadmaps/103-computer-science/content/113-complexity-classes/105-p-equals-np.md +++ b/content/roadmaps/103-computer-science/content/113-complexity-classes/105-p-equals-np.md @@ -1 +1,6 @@ -# P equals np \ No newline at end of file +# P = NP + +The P = NP problem is one of the most famous problems in computer science. It asks if the problem of determining if a given input belongs to a certain class of problems is as hard as the problem of solving the given input. In other words, it asks if the problem of determining if a given input belongs to a certain class of problems is as hard as the problem of determining if a given input belongs to a certain class of problems. This problem is also known as the Halting Problem. + +Free Content +What's "P=NP?", and why is it such a famous question? diff --git a/content/roadmaps/103-computer-science/content/113-complexity-classes/readme.md b/content/roadmaps/103-computer-science/content/113-complexity-classes/readme.md index c0a819127..b411cc51d 100644 --- a/content/roadmaps/103-computer-science/content/113-complexity-classes/readme.md +++ b/content/roadmaps/103-computer-science/content/113-complexity-classes/readme.md @@ -1 +1,34 @@ -# Complexity classes \ No newline at end of file +# Complexity Classes + +In computer science, there exist some problems whose solutions are not yet found, the problems are divided into classes known as Complexity Classes. In complexity theory, a Complexity Class is a set of problems with related complexity. These classes help scientists to groups problems based on how much time and space they require to solve problems and verify the solutions. It is the branch of the theory of computation that deals with the resources required to solve a problem. + +Free Content +Types of Complexity Classes | P, NP, CoNP, NP hard and NP complete +Trying to understand P vs NP vs NP Complete vs NP Hard +Complexity: P, NP, NP-completeness, Reductions +Complexity: Approximation Algorithms +Complexity: Fixed-Parameter Algorithms + + +Lecture 23: Computational Complexity + +---- + +Greedy Algs. II & Intro to NP Completeness +NP Completeness II & Reductions +NP Completeness III +NP Completeness IV + +---- + +CSE373 2020 - Lecture 23 - NP-Completeness +CSE373 2020 - Lecture 24 - Satisfiability +CSE373 2020 - Lecture 25 - More NP-Completeness +CSE373 2020 - Lecture 26 - NP-Completeness Challenge + + + + + + +