I am having trouble understanding how to determine the class complexities (NP complete, NP hard, P,...) of a discrete math problem. Could someone show the detailed procedure with explanations on these three problems? Assume that P ne NP. Please give math strict explanations.

Greyson Landry

Greyson Landry

Answered question

2022-07-16

How to determine class complexities of a discrete math problem?
I am having trouble understanding how to determine the class complexities (NP complete, NP hard, P,...) of a discrete math problem. Could someone show the detailed procedure with explanations on these three problems? Assume that P N P . Please give math strict explanations.
1. Is it in electric circuit that connects each of n cities, the shortest length of a transmission line that passes only once through each city and connects all cities in a closed network is less than k?
2. Given a sequence of n points of two dimensional coordinate system and indices of two points from that sequence. Is the shortest closed path that passes through all points shorter from the shortest path between given two points?
3. In a social network of n people, does the largest set of people that knows each other contains more than k people?

Answer & Explanation

autarhie6i

autarhie6i

Beginner2022-07-17Added 18 answers

Step 1
I assume you know the definitions.
1) is the Travelling Salesman (decision) Problem, which is known to be NP-complete.
Step 2
2) It is obvious that the answer is "no", because the first path contains the second. That didn't take much time, did it? So it's in P.
Step 3
3) This is in P for fixed k, because you can check all possible k + 1-tuples, of which there are fewer than n k + 1 , in polynomial time. If k can vary as well as n, it is known to be NP-complete: this is the clique decision problem.

Do you have a similar question?

Recalculate according to your conditions!

New Questions in Discrete math

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?