 # 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 2022-07-16 Answered
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\ne NP.$ 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?
You can still ask an expert for help

## Want to know more about Discrete math?

• Live experts 24/7
• Questions are typically answered in as fast as 30 minutes
• Personalized clear answers

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it autarhie6i
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.

We have step-by-step solutions for your answer!