Saturday, September 21, 2024
Google search engine
HomeData Modelling & AIData Structures | Graph | Question 6

Data Structures | Graph | Question 6

How many undirected graphs (not necessarily connected) can be constructed out of a given set V= {V 1, V 2,…V n} of n vertices ?
(A) n(n-l)/2
(B) 2^n
(C) n!
(D) 2^(n(n-1)/2)

Answer: (D)
Explanation: In an undirected graph, there can be maximum n(n-1)/2 edges. We can choose to have (or not have) any of the n(n-1)/2 edges. So, total number of undirected graphs with n vertices is 2^(n(n-1)/2).
Quiz of this Question

Feeling lost in the world of random DSA topics, wasting time without progress? It’s time for a change! Join our DSA course, where we’ll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 neveropen!

RELATED ARTICLES

Most Popular

Recent Comments