MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What does a graph represent?
A
A list of nodes in order
B
Relationships between nodes
C
Nothing
D
A diagram of a computer network
Explanation: 

Detailed explanation-1: -A graph is a network of nodes connected by links. Links may be directed or non-directed. A directed link is represented as an arrow connecting a source node to a target node. A non-directed link is simply a line segment connecting two nodes.

Detailed explanation-2: -Nodes are entities whose relationships are expressed using edges. If a graph comprises 2 nodes and and an undirected edge between them, then it expresses a bi-directional relationship between the nodes and edge.

Detailed explanation-3: -Relationships between two nodes are, in addition to being called edges, are referred to as ties or links.

Detailed explanation-4: -The nodes in a graph represent persons (or animals, organizations, cities, countries, etc) and the lines represent relationships among them. The line between persons a and b is represented mathematically like this: (a, b). The network drawn above contains these edges: (a, b), (a, e), (a, d), (b, c), and (d, c).

Detailed explanation-5: -A direct relationship is when one variable increases, so does the other. An indirect relationship is when one variable increases, the other decreases. A cyclic relationship repeats itself over time. When the line on the graph always eventually comes back to the same place.

There is 1 question to complete.