# Question

b. Describe an efficient method to determine whether or not one d-dimensional box nests inside another.

c. Suppose that you are given a set of n d-dimensional boxes {B1, B2,..., Bn}. Describe an efficient algorithm to determine the longest sequence (Bi2, Biz,...Bik) of boxes such that nests within Bij+1for j = 1, 2,..., k - 1. Express the running time of your algorithm in terms of n and d.

c. Suppose that you are given a set of n d-dimensional boxes {B1, B2,..., Bn}. Describe an efficient algorithm to determine the longest sequence (Bi2, Biz,...Bik) of boxes such that nests within Bij+1for j = 1, 2,..., k - 1. Express the running time of your algorithm in terms of n and d.

## Answer to relevant Questions

Suppose that we order the edge relaxations in each pass of the Bellman-Ford algorithm as follows. Before the first pass, we assign an arbitrary linear order v1, v2,..., v |v| to the vertices of the input graph G = (V, E). ...Professor Michener claims that there is no need to create a new source vertex in line 1 of JOHNSON. He claims that instead we can just use G′ = G and let s be any vertex in V [G]. Give an example of a weighted, ...Suppose that a flow network G = (V, E) has symmetric edges, that is, (u, v) ¬ E if and only if (v, u) ¬ E. Show that the Edmonds-Karp algorithm terminates after at most |V| |E|/4 iterations.Prove that any sorting network on n inputs has depth at least lg n.Show that edge (u, v) isa. a tree edge or forward edge if and only if d[u] < d[v] < f[v] < f[u],b. a back edge if and only if d[v] < d[u] < f[u] < f[v], andc. a cross edge if and only if d[v] < f[v] < d[u] < f[u].Post your question

0