Vidyalelo
Data Structure · all questions

Graphs
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

153

Questions

7/8

Page

Pick an option on a question to see the right answer and solution.

The number of elements in the adjacency matrix of a graph having 7 vertices is . . . . . . . .

Select an option to see the answer and solution.

What would be the Incidence Matrix of the given HyperGraph?
V = {x,y,z} E = {{x,y}{y}{x,z}{z,y}}

Select an option to see the answer and solution.

Given a plane graph, G having 2 connected component, having 6 vertices, 7 edges and 4 regions. What will be the number of connected components?

Select an option to see the answer and solution.

The column sum in an incidence matrix for a directed graph having no self loop is . . . . . . . .

Select an option to see the answer and solution.

Size of an And Inverter Graph is the number of . . . . . . . . gates and the number of logic levels is number of . . . . . . . . gates on the . . . . . . . . path from a primary input to a primary output.

Select an option to see the answer and solution.

If a Graph Structured Stack contains {1, 2, 3, 4} {1, 5, 3, 4} {1, 6, 7, 4} and {8, 9, 7, 4}, what would be the source and sink vertices of the DAC?

Select an option to see the answer and solution.

For the given conditions, which of the following is in the correct order of increasing space requirement?
i. Undirected, no weight
ii. Directed, no weight
iii. Directed, weighted
iv. Undirected, weighted

Select an option to see the answer and solution.

With V(greater than 1) vertices, how many edges at most can a Directed Acyclic Graph possess?

Select an option to see the answer and solution.

MultiGraphs having self-loops are called PseudoGraphs?

Select an option to see the answer and solution.

Dijkstra's Algorithm will work for both negative and positive weights?

Select an option to see the answer and solution.

Which of these adjacency matrices represents a simple graph?

Select an option to see the answer and solution.

Which of the following is not a topological sorting of the given graph?
Graphs mcq question image

Select an option to see the answer and solution.

Which of the following graphs are isomorphic to each other?
Graphs mcq question image

Select an option to see the answer and solution.

If a connected Graph (G) contains n vertices what would be the rank of its incidence matrix?

Select an option to see the answer and solution.

Given the following program, what will be the 3rd number that'd get printed in the output sequence for the given input?
#include <bits/stdc++.h> 
using namespace std; 
int cur=0; 
int G[10][10]; 
bool visited[10]; 
deque <int> q; 
 
void fun(int n); 
 
int main()
{   
	int num=0; 
	int n; 
	cin>>n; 
 
	for(int i=0;i<n;i++) 
      	for(int j=0;j<n;j++) 
        	cin>>G[i][j]; 
 
	for(int i=0;i<n;i++) 
        visited[i]=false; 
 
        fun(n); 
	return 0; 
} 
 
void fun(int n)
{ 
	cout<<cur<<" "; 
	visited[cur]=true; 
	q.push_back(cur); 
 
	do
        { 
		for(int j=0;j<n;j++)
                { 
		    if(G[cur][j]==1 && !visited[j])
                    { 
		        q.push_back(j); 
		        cout<<j<<" "; 
		        visited[j]=true; 
	            } 
 
                 } 
 
		q.pop_front(); 
		if(!q.empty()) 
		cur=q.front(); 
	 }while(!q.empty()); 
}
Input Sequence:-
9 
0 1 0 0 0 0 0 0 1    
1 0 0 0 0 0 0 0 0 
0 0 0 1 1 1 0 0 1 
0 0 1 0 0 0 0 0 0 
0 0 1 0 0 0 0 1 0 
0 0 1 0 0 0 1 0 0 
0 0 0 0 0 1 0 1 1 
0 0 0 0 1 0 1 0 0 
1 0 1 0 0 0 1 0 0

Select an option to see the answer and solution.

What is the maximum number of possible non zero values in an adjacency matrix of a simple graph with n vertices?

Select an option to see the answer and solution.

A connected planar graph having 6 vertices, 7 edges contains . . . . . . . . regions.

Select an option to see the answer and solution.

Which of the following symbols represent nodes having exactly one child?
i. Δ 
ii. ◊ 
iii. ∇ 
iv. T 
v. ⊥

Select an option to see the answer and solution.

On which of the following statements does the time complexity of checking if an edge exists between two particular vertices is not, depends?

Select an option to see the answer and solution.

Determine the longest string which is described by the given Directed Acyclic Word Graph.
Graphs mcq question image

Select an option to see the answer and solution.