recategorized by
728 views
1 1 vote

A connected, simple, undirected planar graph $G(V, E)$ is given where $V$ denotes the set of vertices and E denotes the set of edges. In $V$, there is a designated source vertex $s$ and a designated destination vertex $t$. Let $P(v)$ denote the shortest path (may contain repetition of nodes/edges) from $s$ to $t$ that passes through $v$, and let $l(v)$ denote the path length (i.e., the number of edges) of $P(v)$.

  1. Describe an $O(|V|)$ time algorithm that determines the value of $\mathcal{T}$ where $\mathcal{T} = max_{\forall \: v \in V} l(v)$. Justify your analysis.
  2. Propose a data structure that supports your algorithm.

 

For example, in the graph shown in the above figure, $\mathcal{T}$ = 10, which corresponds to $P(6) : s \rightarrow 2 \rightarrow 3 \rightarrow 4 \rightarrow 7 \rightarrow 6 \rightarrow 7 \rightarrow 4 \rightarrow 14 \rightarrow 13 \rightarrow t$.]

Please log in or register to answer this question.

Position:
Show:

Related questions

1 1 vote
0 0 answers
686
686 views
go_editor asked Jun 1, 2016
686 views
Let $M$ be an $(n \times n)$ matrix where each element is a distinct positive integer. Construct another matrix $M'$ by permuting the rows and/or permuting the columns, s...
2 2 votes
0 0 answers
665
665 views
go_editor asked Jun 1, 2016
665 views
Draw a complete binary tree $T$ with $(N − 1)$ nodes where $N = 2^n$. Suppose each node in $T$ is a processor and each edge of $T$ is a physical link between two processo...
1 1 vote
0 0 answers
548
548 views
go_editor asked May 31, 2016
548 views
Consider the $fast \: square$ and $multiply \: algorithm$ to calculate $x^y \: mod \: N$ as given below, where $x, \: y,\: N$ are positive integers and $1 \leq x, y < N$....
1 1 vote
0 0 answers
494
494 views
go_editor asked May 31, 2016
494 views
Consider the $\text{fast square}$ and $\text{multiply algorithm}$ to calculate $x^y \text{ mod } N$ as given below, where $x, \: y,\: N$ are positive integers and $1 \le...