Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Consider the following two problems of graph.... Start Learning for Free
Consider the following two problems of graph.
1. Given a graph, find if the graph has a cycle that visits every vertex exactly once except the first visited vertex which must be visited again to complete the cycle.
2. Given a graph, find if the graph has a cycle that visits every edge exactly once.
Which of the following is true about above two problems.
  • a)
    Problem 1 belongs NP Complete set and 2 belongs to P
  • b)
    Problem 1 belongs to P set and 2 belongs to NP Complete set
  • c)
    Both problems belong to P set
  • d)
    Both problems belong to NP complete set
Correct answer is option 'A'. Can you explain this answer?
Most Upvoted Answer
Consider the following two problems of graph.1. Given a graph, find if...
NP Complete Problems in Graph Theory

Problem 1: Hamiltonian Cycle Problem

The Hamiltonian cycle problem is an NP-complete problem in graph theory. The problem is to determine whether a given graph contains a cycle that visits every vertex exactly once, except for the first and last vertices, which are visited twice to form a closed loop.


  • It is a decision problem that asks whether there exists a Hamiltonian cycle in an undirected graph.

  • It is NP-complete, which means that it is at least as hard as any other NP problem and is unlikely to have an efficient algorithm for large inputs.

  • It is a well-known problem in computer science and has been studied extensively.

  • There are many algorithms for solving this problem, but none of them are known to be efficient for all instances of the problem.



Problem 2: Eulerian Cycle Problem

The Eulerian cycle problem is another NP-complete problem in graph theory. The problem is to determine whether a given graph contains a cycle that visits every edge exactly once.


  • It is a decision problem that asks whether there exists an Eulerian cycle in a directed or undirected graph.

  • It is NP-complete, which means that it is at least as hard as any other NP problem and is unlikely to have an efficient algorithm for large inputs.

  • It is also a well-known problem in computer science and has been studied extensively.

  • There are many algorithms for solving this problem, but none of them are known to be efficient for all instances of the problem.



Comparison of the two problems


  • Both problems are related to the existence of cycles in graphs.

  • The Hamiltonian cycle problem is concerned with visiting every vertex exactly once, while the Eulerian cycle problem is concerned with visiting every edge exactly once.

  • Both problems are NP-complete, which means that they are among the hardest problems in computer science and are unlikely to have efficient algorithms for large inputs.

  • Both problems have been studied extensively and have many algorithms for solving them, but none of these algorithms are known to be efficient for all instances of the problems.



Therefore, the correct answer is option A, which states that problem 1 belongs to the NP-complete set, and problem 2 belongs to the P set.
Free Test
Community Answer
Consider the following two problems of graph.1. Given a graph, find if...
Problem 1 is Hamiltonian Cycle problem which is a famous NP Complete problem.
Problem 2 is Euler Circuit problem which is solvable in Polynomial time.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Consider the following two problems of graph.1. Given a graph, find if the graph has a cycle that visits every vertex exactly once except the first visited vertex which must be visited again to complete the cycle.2. Given a graph, find if the graph has a cycle that visits every edge exactly once.Which of the following is true about above two problems.a)Problem 1 belongs NP Complete set and 2 belongs to Pb)Problem 1 belongs to P set and 2 belongs to NP Complete setc)Both problems belong to P setd)Both problems belong to NP complete setCorrect answer is option 'A'. Can you explain this answer?
Question Description
Consider the following two problems of graph.1. Given a graph, find if the graph has a cycle that visits every vertex exactly once except the first visited vertex which must be visited again to complete the cycle.2. Given a graph, find if the graph has a cycle that visits every edge exactly once.Which of the following is true about above two problems.a)Problem 1 belongs NP Complete set and 2 belongs to Pb)Problem 1 belongs to P set and 2 belongs to NP Complete setc)Both problems belong to P setd)Both problems belong to NP complete setCorrect answer is option 'A'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about Consider the following two problems of graph.1. Given a graph, find if the graph has a cycle that visits every vertex exactly once except the first visited vertex which must be visited again to complete the cycle.2. Given a graph, find if the graph has a cycle that visits every edge exactly once.Which of the following is true about above two problems.a)Problem 1 belongs NP Complete set and 2 belongs to Pb)Problem 1 belongs to P set and 2 belongs to NP Complete setc)Both problems belong to P setd)Both problems belong to NP complete setCorrect answer is option 'A'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider the following two problems of graph.1. Given a graph, find if the graph has a cycle that visits every vertex exactly once except the first visited vertex which must be visited again to complete the cycle.2. Given a graph, find if the graph has a cycle that visits every edge exactly once.Which of the following is true about above two problems.a)Problem 1 belongs NP Complete set and 2 belongs to Pb)Problem 1 belongs to P set and 2 belongs to NP Complete setc)Both problems belong to P setd)Both problems belong to NP complete setCorrect answer is option 'A'. Can you explain this answer?.
Solutions for Consider the following two problems of graph.1. Given a graph, find if the graph has a cycle that visits every vertex exactly once except the first visited vertex which must be visited again to complete the cycle.2. Given a graph, find if the graph has a cycle that visits every edge exactly once.Which of the following is true about above two problems.a)Problem 1 belongs NP Complete set and 2 belongs to Pb)Problem 1 belongs to P set and 2 belongs to NP Complete setc)Both problems belong to P setd)Both problems belong to NP complete setCorrect answer is option 'A'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of Consider the following two problems of graph.1. Given a graph, find if the graph has a cycle that visits every vertex exactly once except the first visited vertex which must be visited again to complete the cycle.2. Given a graph, find if the graph has a cycle that visits every edge exactly once.Which of the following is true about above two problems.a)Problem 1 belongs NP Complete set and 2 belongs to Pb)Problem 1 belongs to P set and 2 belongs to NP Complete setc)Both problems belong to P setd)Both problems belong to NP complete setCorrect answer is option 'A'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider the following two problems of graph.1. Given a graph, find if the graph has a cycle that visits every vertex exactly once except the first visited vertex which must be visited again to complete the cycle.2. Given a graph, find if the graph has a cycle that visits every edge exactly once.Which of the following is true about above two problems.a)Problem 1 belongs NP Complete set and 2 belongs to Pb)Problem 1 belongs to P set and 2 belongs to NP Complete setc)Both problems belong to P setd)Both problems belong to NP complete setCorrect answer is option 'A'. Can you explain this answer?, a detailed solution for Consider the following two problems of graph.1. Given a graph, find if the graph has a cycle that visits every vertex exactly once except the first visited vertex which must be visited again to complete the cycle.2. Given a graph, find if the graph has a cycle that visits every edge exactly once.Which of the following is true about above two problems.a)Problem 1 belongs NP Complete set and 2 belongs to Pb)Problem 1 belongs to P set and 2 belongs to NP Complete setc)Both problems belong to P setd)Both problems belong to NP complete setCorrect answer is option 'A'. Can you explain this answer? has been provided alongside types of Consider the following two problems of graph.1. Given a graph, find if the graph has a cycle that visits every vertex exactly once except the first visited vertex which must be visited again to complete the cycle.2. Given a graph, find if the graph has a cycle that visits every edge exactly once.Which of the following is true about above two problems.a)Problem 1 belongs NP Complete set and 2 belongs to Pb)Problem 1 belongs to P set and 2 belongs to NP Complete setc)Both problems belong to P setd)Both problems belong to NP complete setCorrect answer is option 'A'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider the following two problems of graph.1. Given a graph, find if the graph has a cycle that visits every vertex exactly once except the first visited vertex which must be visited again to complete the cycle.2. Given a graph, find if the graph has a cycle that visits every edge exactly once.Which of the following is true about above two problems.a)Problem 1 belongs NP Complete set and 2 belongs to Pb)Problem 1 belongs to P set and 2 belongs to NP Complete setc)Both problems belong to P setd)Both problems belong to NP complete setCorrect answer is option 'A'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev