Select all the statements below which are TRUE: We are given two sequences: X wi
ID: 3575880 • Letter: S
Question
Select all the statements below which are TRUE:
We are given two sequences: X with length 7 and Y with length 4. There are cases when the length of a Longest Common Subsequence (LCS) of X and Y is 5.
Let x be a node in a Binary Search Tree. If z is a node in the left subtree of x, then z.key x.key.
Let v be a vertex in the graph G. If v.d = after we run Breadth First Search algorithm BFS(G,s), then it means that v is not reachable from the source vertex s.
Dijkstra's algorithm can be used to compute single-source shortest paths when all edges have nonnegative weights.
To show that a greedy algorithm always yields an optimal solution, we need to prove (i) the optimal substructure property, and (ii) the greedy-choice property.
Let G be a directed graph. In the adjacency-list representation of G, the sum of the lengths of adjacency lists is 2|E|.
Please help...
1.We are given two sequences: X with length 7 and Y with length 4. There are cases when the length of a Longest Common Subsequence (LCS) of X and Y is 5.
2.Let x be a node in a Binary Search Tree. If z is a node in the left subtree of x, then z.key x.key.
3.Let v be a vertex in the graph G. If v.d = after we run Breadth First Search algorithm BFS(G,s), then it means that v is not reachable from the source vertex s.
Dijkstra's algorithm can be used to compute single-source shortest paths when all edges have nonnegative weights.
4.To show that a greedy algorithm always yields an optimal solution, we need to prove (i) the optimal substructure property, and (ii) the greedy-choice property.
5.Let G be a directed graph. In the adjacency-list representation of G, the sum of the lengths of adjacency lists is 2|E|.
Explanation / Answer
1)False.because longest common subsequence checking in both.if x=4 length string ,y=7 lengh string then possibility for LCS=lenght which is lessthan among those 2
2)True
3)False.in BFS we have to travel level wise.there is no scope to distance
3b)True
4)True
5)False
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.