wiz-icon
MyQuestionIcon
MyQuestionIcon
18
You visited us 18 times! Enjoying our articles? Unlock Full Access!
Question

Which of the following statements are TRUE?

1. The problem of determining whether there exists a cycle in an undirected graph is in P.

2. The problem of determining whether there exists a cycle in an undirected graph is in NP.

3. If a problem A is NP-Complete, there exists a non-deterministic polynomial time algorithm to solve A.

A
3 only
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
1 and 3 only
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
1, 2 and 3
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
2 only
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is C 1, 2 and 3
1. By depth first search we can find whether there exits a cycle in an undirected graph in O(n2) times so it is P problem.

2. As P NP so this problem will also be considered as NP problem.

3. This is the definition of NP-complete so it is trivially true.

So option (a) is correct

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Some More Tools
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon