Q86.Marks: +2.0UGC NET Paper 2: Computer Science 7th Dec 2023 Shift 2
Which of the following graphs are trees ?
A.
B.
C.
D.
Choose the correct answer from the options given below :
1.(A) and (B) Only ✓ Correct
2.(A), (B) and (D) Only
3.(A) and (D) Only
4.(A), (B), (C) and (D) Only
Solution
The correct answer is (A) and (B) Only
Key Points
Tree:
A tree is a type of graph that is acyclic, meaning there are no cycles or loops. It consists of nodes connected by edges in a hierarchical structure. Each node, except the root, has exactly one parent, forming a parent-child relationship.
There are no loops or cycles in a tree structure.
A tree is a connected graph, meaning there is a unique path between any pair of nodes.
Each node in a tree (except the root) has exactly one parent.
There is a unique topmost node called the root from which all other nodes are descendants.
Trees are usually directed, meaning edges have a specific direction (from parent to child).
Trees are commonly used for hierarchical data representation, such as file systems, organizational charts, and expression trees. Binary Search Trees (BSTs) are a specific type of tree used for efficient searching and sorting.
Graph:
A graph is a more general structure that can be cyclic or acyclic. It consists of nodes (vertices) and edges connecting these nodes. There are no strict hierarchical relationships between nodes in a graph.
A graph may or may not be connected. There can be isolated components within a graph.
Nodes in a graph can have multiple incoming edges, meaning they can have multiple parents.
There is no concept of a root node in a general graph.
Graphs can be directed or undirected. In directed graphs, edges have a direction, while in undirected graphs, edges have no direction.
Graphs are more general-purpose and can represent a wide range of relationships between entities. They are used in applications like social networks, road networks, dependency graphs, and more.
Option D is disconnected graph so it is not tree
Only option A and B are acyclic graph so correct answer is option 1.