PART B: Complexity Classification i) Explain P (Deterministic Polynomial time) problems with a suitable example. [10 Marks] ii) Identify and discuss a problem that is considered to be NP (Non-deterministic Polynomial time). [10 Marks]
Added by Anthony P.
Close
Step 1
In simpler terms, these are problems for which an algorithm exists that can solve any instance of the problem in a time that is a polynomial function of the size of the input. Example: A classic example of a P problem is the sorting of a list of numbers. There Show more…
Show all steps
Your feedback will help us improve your experience
Manisha Sarker and 91 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Consider three problems, $P_{1}, P_{2}$ and $P_{3} .$ It is known that $P_{1}$ has polynomial time solution, $P$, is NP-complete and $P_{3}$ is in NP. Which one of the following is true? (A) $P_{3}$ has polynomial time solution if $P_{1}$ is polynomial time reducible to $P_{3}$. (B) $P_{3}$ is NP-complete if $P_{3}$ is polynomial time reducible to $P_{2}$. (C) $P_{3}$ is $\mathrm{NP}$ complete if $P_{2}$ is reducible to $P_{3}$ (D) $P_{3}$ has polynomial time complexity and $P_{3}$ is reducible to $P_{2}$
Theory of Computation
RECURSIVELY ENUMERABLE SETS AND TURING MACHINES, DECIDABILITY
Give an algorithm that determines whether or not a given undirected graph G = (V,E) contains a cycle. Your algorithm should run in O(V) time, independent of |E|.
James K.
Given a graph with n edges, what is the time complexity of finding a Euler path? Is this a polynomial time algorithm? Explain and show all work and the graph. Hint: Include the algorithm and pseudocode.
Supreeta N.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD