Let the G be a graph with 100 vertices numbered 1 to 100
Two vertices i and j are adjecnt if | i-j| =8 or | i-j|
=12. The Number of connected components in G is ?
Answer Posted / achintya singhal
good question
there are 4 connected components..
first contains vertices numbered 1, 5, 9,13,17,21,25,29....
second contains 2, 6, 10, 14, 18.......
third one contains 3, 7, 11, 15......
fourth contains 4, 8, 12, 16, 20.......
| Is This Answer Correct ? | 5 Yes | 6 No |
Post New Answer View All Answers
What is a bubble sort and how do you perform it?
How many null values are allowed in a set?
In what areas do data structures are applied?
What is the prerequisite for binary searching?
What is the heap in data structures?
Why is hashing used?
Differentiate between hashset and treeset.
In Data Structure, write output of given program.
Which one is the simplest sorting in data structure?
How do treesets work internally?
What is binary tree example?
Is quicksort a stable algorithm?
Which sorting is stable?
What does arraylist remove do?
What are priority queues?