Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged graph-algorithms
0
votes
1
answer
31
Algorithms
Focus on the word constraint , I am little confused (in meaning of the word)here. What should be the answer 2 or 16.
Focus on the word constraint , I am little confused (in meaning of the word)here. What should be the answer 2 or 16.
Overflow04
353
views
Overflow04
asked
Oct 19, 2022
Algorithms
algorithms
test-series
graph-algorithms
+
–
0
votes
0
answers
32
CLRS
A long distance runner wants to carry only a single water bottle along the route and she can run k miles on one bottle of water. Before the race, she is given a map of all n watering stops (i.e. mile markers of these stops). Assume that the distance ... is the number of miles runner can run on a bottle of water Output: Sequence S of watering stops for the runner minimizing number of stops
A long distance runner wants to carry only a single water bottle along the route and she can run k miles on one bottle of water. Before the race, she is given a map of al...
LRU
280
views
LRU
asked
Oct 8, 2022
Algorithms
algorithms
graph-algorithms
time-complexity
+
–
0
votes
1
answer
33
Applied Test
Which of the following are applications for DFS when we have an unweighted directed graph at hand. 1.Single source shortest path from the source vertex. 2 Topological sorting of the vertices 3 Strongly connected components of the graph. 4 Detection of cycles in the graph. Can we use unweighted directed graph in Topological sorting ?? .
Which of the following are applications for DFS when we have an unweighted directed graph at hand.1.Single source shortest path from the source vertex.2 Topological sorti...
lalitver10
599
views
lalitver10
asked
Sep 9, 2022
Algorithms
graph-algorithms
data-structures
test-series
+
–
0
votes
1
answer
34
Nptel Assignment Question
Consider the following algorithm on a graph with edge weights. Sort the edges as [e1,e2,...,em] in decreasing order of cost. Start with the original graph. Consider each edge ej. If this edge is part of a cycle delete it. Which of the following is not ... at the end is a minimum cost spanning tree. Exactly m-n+1 edges will be deleted. At most n-1 edges will be deleted.
Consider the following algorithm on a graph with edge weights.Sort the edges as [e1,e2,...,em] in decreasing order of cost.Start with the original graph. Consider each ed...
rsansiya111
674
views
rsansiya111
asked
Dec 8, 2021
Algorithms
nptel-quiz
graph-algorithms
sorting
+
–
0
votes
1
answer
35
NPTEL Assignment Question
Consider the following strategy to solve the single source shortest path problem with edge weights from source s. 1. Replace each edge with weight w by w edges of weight 1 connected by new intermediate nodes 2. Run BFS(s) on the modified graph to ... ;s algorithm.s st This strategy will not solve the problem correctly. This strategy will only work if the graph is acyclic.
Consider the following strategy to solve the single source shortest path problem with edge weights from source s.1. Replace each edge with weight w by w edges of weight 1...
rsansiya111
1.3k
views
rsansiya111
asked
Dec 8, 2021
Algorithms
nptel-quiz
shortest-path
graph-search
graph-algorithms
+
–
0
votes
2
answers
36
NPTEL Assignment Question
An undirected graph G has 300 edges. The degree of a vertex v, deg(v), is the number of edges connected to v. Suppose V = {v1,v2,...,v30}. What is the value of deg(v1)+ deg(v2) + · · · + deg(v30)? 300 600 900 None of these
An undirected graph G has 300 edges. The degree of a vertex v, deg(v), is the number of edges connected to v. Suppose V = {v1,v2,...,v30}.What is the value of deg(v1)+ de...
rsansiya111
869
views
rsansiya111
asked
Dec 8, 2021
Algorithms
nptel-quiz
graph-algorithms
+
–
0
votes
1
answer
37
NPTEL Assignment Question
Let G be a weighted connected undirected graph with distinct positive edge weights. If every edge weight is increased by the same value, then which of the following statements is/are TRUE? P: Minimum spanning tree of G does not change Q: Shortest path between any pair of vertices does not change P only Q only Neither P nor Q Both P and Q
Let G be a weighted connected undirected graph with distinct positive edge weights.If every edge weight is increased by the same value, then which of the following statem...
rsansiya111
613
views
rsansiya111
asked
Dec 7, 2021
Algorithms
nptel-quiz
graph-algorithms
minimum-spanning-tree
shortest-path
+
–
0
votes
1
answer
38
NPTEL Assignment Question
rsansiya111
406
views
rsansiya111
asked
Dec 7, 2021
Algorithms
nptel-quiz
shortest-path
graph-algorithms
+
–
20
votes
6
answers
39
GATE CSE 2021 Set 2 | Question: 1
Let $G$ be a connected undirected weighted graph. Consider the following two statements. $S_1$: There exists a minimum weight edge in $G$ which is present in every minimum spanning tree of $G$. $S_2$: If every edge in $G$ has distinct weight, then $G$ has a ... are true $S_1$ is true and $S_2$ is false $S_1$ is false and $S_2$ is true Both $S_1$ and $S_2$ are false
Let $G$ be a connected undirected weighted graph. Consider the following two statements.$S_1$: There exists a minimum weight edge in $G$ which is present in every minimum...
Arjun
11.9k
views
Arjun
asked
Feb 18, 2021
Algorithms
gatecse-2021-set2
algorithms
graph-algorithms
minimum-spanning-tree
1-mark
+
–
15
votes
3
answers
40
GATE CSE 2021 Set 2 | Question: 46
Consider the following directed graph: Which of the following is/are correct about the graph? The graph does not have a topological order A depth-first traversal starting at vertex $S$ classifies three directed edges as back edges The graph does not have a strongly connected component For each pair of vertices $u$ and $v$, there is a directed path from $u$ to $v$
Consider the following directed graph:Which of the following is/are correct about the graph?The graph does not have a topological orderA depth-first traversal starting at...
Arjun
8.8k
views
Arjun
asked
Feb 18, 2021
Algorithms
gatecse-2021-set2
multiple-selects
algorithms
graph-algorithms
2-marks
+
–
15
votes
3
answers
41
GATE CSE 2021 Set 2 | Question: 55
In a directed acyclic graph with a source vertex $\textsf{s}$, the $\textit{quality-score}$ of a directed path is defined to be the product of the weights of the edges on the path. Further, for a vertex $v$ other than $\textsf{s}$, the quality ... $\textsf{s}$ is assumed to be $1$. The sum of the quality-scores of all vertices on the graph shown above is _______
In a directed acyclic graph with a source vertex $\textsf{s}$, the $\textit{quality-score}$ of a directed path is defined to be the product of the weights of the edges on...
Arjun
7.2k
views
Arjun
asked
Feb 18, 2021
Algorithms
gatecse-2021-set2
algorithms
graph-algorithms
directed-acyclic-graph
numerical-answers
2-marks
+
–
8
votes
3
answers
42
GATE CSE 2021 Set 1 | Question: 17
Consider the following undirected graph with edge weights as shown: The number of minimum-weight spanning trees of the graph is ___________.
Consider the following undirected graph with edge weights as shown:The number of minimum-weight spanning trees of the graph is ___________.
Arjun
11.0k
views
Arjun
asked
Feb 18, 2021
Algorithms
gatecse-2021-set1
algorithms
graph-algorithms
minimum-spanning-tree
numerical-answers
1-mark
+
–
1
votes
1
answer
43
NIELIT Scientific Assistant A 2020 November: 79
Which of the following algorithms can be used to most efficiently find whether a cycle is present in a given graph? Prim’s Minimum Spanning Tree Algorithm Breadth First Search Depth First Search Kruskal’s Minimum Spanning Tree Algorithm
Which of the following algorithms can be used to most efficiently find whether a cycle is present in a given graph?Prim’s Minimum Spanning Tree AlgorithmBreadth First S...
gatecse
628
views
gatecse
asked
Dec 9, 2020
Algorithms
nielit-sta-2020
algorithms
graph-algorithms
+
–
0
votes
2
answers
44
NIELIT 2017 OCT Scientific Assistant A (CS) - Section B: 29
Which of the following algorithm solve the all-pair shortest path problem? Dijakstra’s algorithm Floyd’s algorithm Prim’s algorithm Warshall’s algorithm
Which of the following algorithm solve the all-pair shortest path problem?Dijakstra’s algorithmFloyd’s algorithmPrim’s algorithmWarshall’s algorithm
admin
1.0k
views
admin
asked
Apr 1, 2020
Algorithms
nielit2017oct-assistanta-cs
algorithms
graph-algorithms
+
–
1
votes
2
answers
45
NIELIT 2017 July Scientist B (IT) - Section B: 4
What are the appropriate data structures for graph traversal using Breadth First Search(BFS) and Depth First Search(DFS) algorithms? Stack for BFS and Queue for DFS Queue for BFS and Stack for DFS Stack for BFS and Stack for DFS Queue for BFS and Queue for DFS
What are the appropriate data structures for graph traversal using Breadth First Search(BFS) and Depth First Search(DFS) algorithms?Stack for BFS and Queue for DFSQueue f...
admin
1.4k
views
admin
asked
Mar 30, 2020
DS
nielit2017july-scientistb-it
data-structures
graph-algorithms
breadth-first-search
depth-first-search
+
–
0
votes
2
answers
46
NIELIT 2017 July Scientist B (CS) - Section B: 42
Let $G$ be a graph with $n$ vertices and $m$ edges.What is the tightest upper bound on the running time of Depth First Search of $G$, when $G$ is represented using adjacency matrix? $O(n)$ $O(m+n)$ $O(n^2)$ $O(mn)$
Let $G$ be a graph with $n$ vertices and $m$ edges.What is the tightest upper bound on the running time of Depth First Search of $G$, when $G$ is represented using adjace...
admin
1.5k
views
admin
asked
Mar 30, 2020
Algorithms
nielit2017july-scientistb-cs
algorithms
graph-algorithms
+
–
38
votes
5
answers
47
GATE CSE 2020 | Question: 31
Let $G = (V, E)$ be a weighted undirected graph and let $T$ be a Minimum Spanning Tree (MST) of $G$ maintained using adjacency lists. Suppose a new weighed edge $(u, v) \in V \times V$ is added to $G$. The worst case time complexity of determining if $T$ is still an MST ... $\Theta (\mid E \mid \mid V \mid) \\$ $\Theta(E \mid \log \mid V \mid) \\$ $\Theta( \mid V \mid)$
Let $G = (V, E)$ be a weighted undirected graph and let $T$ be a Minimum Spanning Tree (MST) of $G$ maintained using adjacency lists. Suppose a new weighed edge $(u, v) ...
Arjun
19.1k
views
Arjun
asked
Feb 12, 2020
Algorithms
gatecse-2020
algorithms
minimum-spanning-tree
graph-algorithms
2-marks
+
–
39
votes
6
answers
48
GATE CSE 2020 | Question: 40
Let $G = (V,E)$ be a directed, weighted graph with weight function $w: E \rightarrow \mathbb{R}$. For some function $f: V \rightarrow \mathbb{R}$, for each edge$(u,v)\in E$, define ${w}'(u,v)$ as $w(u,v)+f(u)-f(v)$. Which one of the ... from $s$ to $u$ in the graph obtained by adding a new vertex $s$ to $G$ and edges of zero weight from $s$ to every vertex of $G$
Let $G = (V,E)$ be a directed, weighted graph with weight function $w: E \rightarrow \mathbb{R}$. For some function $f: V \rightarrow \mathbb{R}$, for each edge$(u,v)\in ...
Arjun
18.2k
views
Arjun
asked
Feb 12, 2020
Algorithms
gatecse-2020
algorithms
graph-algorithms
2-marks
+
–
8
votes
4
answers
49
GATE CSE 2020 | Question: 49
Consider a graph $G = (V,E)$, where $V = \{v_1,v_2, \dots ,v_{100}\}$, $E = \{(v_i,v_j) \mid 1\leq i < j \leq 100\}$, and weight of the edge $(v_i,v_j)$ is $\mid i – j \mid$. The weight of minimum spanning tree of $G$ is _________
Consider a graph $G = (V,E)$, where $V = \{v_1,v_2, \dots ,v_{100}\}$, $E = \{(v_i,v_j) \mid 1\leq i < j \leq 100\}$, and weight of the edge $(v_i,v_j)$ is $\mid i – j ...
Arjun
9.8k
views
Arjun
asked
Feb 12, 2020
Algorithms
gatecse-2020
numerical-answers
algorithms
graph-algorithms
2-marks
+
–
0
votes
1
answer
50
Cormen Edition 3 Exercise 22.2 Question 8 (Page No. 539)
The diameter of a tree $T= (V, E)$ is defined as $max_{u,v\ \epsilon\ V}\ \delta(u,v)$, that is, the largest of all shortest-path distances in the tree. Give an efficient algorithm to compute the diameter of a tree, and analyze the running time of your algorithm.
The diameter of a tree $T= (V, E)$ is defined as $max_{u,v\ \epsilon\ V}\ \delta(u,v)$, that is, the largest of all shortest-path distances in the tree. Give an efficient...
KUSHAGRA गुप्ता
980
views
KUSHAGRA गुप्ता
asked
Nov 12, 2019
Algorithms
cormen
graph-algorithms
breadth-first-search
descriptive
+
–
1
votes
1
answer
51
Cormen Edition 3 Exercise 22.2 Question 7 (Page No. 539)
There are two types of professional wrestlers: babyfaces ( good guys ) and heels ( bad guys ). Between any pair of professional wrestlers, there may or may not be a rivalry. Suppose we have n professional wrestlers and we ... between a babyface and a heel. If it is possible to perform such a designation, your algorithm should produce it.
There are two types of professional wrestlers: “babyfaces” (“good guys”) and “heels” (“bad guys”). Between any pair of professional wrestlers, there may o...
KUSHAGRA गुप्ता
1.2k
views
KUSHAGRA गुप्ता
asked
Nov 12, 2019
Algorithms
cormen
graph-algorithms
breadth-first-search
descriptive
+
–
Page:
« prev
1
2
3
4
5
6
7
...
14
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register