This is for dynamic programming
algorithm. Because Greedy algorithm doesn't give optimal solution.
Then Dynamic programming is more efficientcompare to greedy
algorithm
Q1: Here we consider finding the length of the shortest path between all pairs of nodes in an undirected, weighted graph G. For simplicity, assume that the n nodes are labeled 1; 2; : : : ; n, that the weight wij of any edge e = (i; j) is positive and that there is an edge between every pair of nodes. In this question, the goal is to solve this via dynamic programming. Note that the algorithm you will...
The force field F (x, y) = (x + 4y)i + (x^2 − 3)j acts on an object traveling from (0, 0) to (0, 1). The object moves along the path x = c(y − y^2 ) with 0 ≤ y ≤ 1. Determine the value of c that minimizes the work done on the object by the force field. Please use the line work integral, and optimization
There are n trading posts numbered 1 to n as you travel
downstream. At any trading post i you can rent a canoe to be
returned at any of the downstream trading posts j>i. You are
given a cost array R(i,j) giving the cost of these rentals for all
1≤i<j≤n. We can assume that R(i,i)=0, and that you can't go
upriver (so perhaps R(i,j)= ∞ if i>j). For example, one cost
array with n=4 might be the following.
The problem...
5. If we apply binary dilation to the same large object twice using the same small structuring element, the effect, if any, of the second dilation on the object is that the object: (a) is unchanged (b) is completely removed (c) becomes larger (d) becomes smaller (e) does not change 6. Which of the following is/are true? (a) Dijkstra's algorithm can be used to find shortest paths in a network (b) Dijkstra's algorithm is a method to find straight lines...
Consider the following undirected weighted graph where you want to find a path from A to G. A / \ B --- C \ / \ G --- H Weights (costs) of the edges are W(AB) = 1; W(AC) = 3; W(BC) = 1; W(BG) = 9; W(CG) = 5; W(CH) = 2; W(GH) = 1, and the heuristic estimates (h(n)) to the goal node, G, are h(A) = 5, h(B) = 4, h(C) = 1, h(G) = 0, h(H)...
Please help me with these questions, show working. thank you
I-(8z2+3e3rcos(5y) i-( 5e3rsin(5y)) j+16xz k The vector field I is conservative, find a scalar potential function f(x.y,z) such that I grad f and f(0,0,0) 1 Your answer should be expressed using the correct Maple syntax; for example, it might be: 2*x^2"y+5*z*exp(-9*y) cos(4*z) Do not use decimal approximations all numbers must be correct Maple expressions. The scalar potential is f(x,y,z) Skipped Change the order of integration and evaluate the following double...
1. Two firms compete in a linear city of length 1 unit. Consumers are uniformly located along the city. Consumer i's utility derived from buying firm j's product is given by jj-(-x)2-Pj where j 1,2 indicate the two firms, t is the per unit cost of travelling along the city, is the location of consumer i, x is the location of firm j, and pj is the price of product j. Product one contains some intrinsically superior features and 22,...
I need help with B, C, D. These are Calc 3 problems
32. Suppose a particle of mass m has position given by r(0) =< 1,0,0 >, and velocity given by v(0)0,1,-1 > at time t = 0. Also, assume that for every time t 20 the particle experiences only the force given by the vector function F(t) = m < -cos(t), 0, sin(t) >. Disregard units in this problem a) Use Newton's Second Law, F(t) = ma(t) (where a(t)...
can anyone provide answers with explaination ? thanks
a lot
I. In the example of recycling the elements of a list in O1) time, which situation holds? A. Both lists are circular B. Both ists are not circular C. The list to be recycled is circular, the garbage list is not D. The garbage list is circular, the list to be recycled is not 2. What is the worst-case time to perform MINIMUML) for a sorted, doubly-linked list with nodes?...
please help ! Q1-Q6
1. Let F (3x - 4y +22)i+(4x +2y 3z2)j + (2xz moving once around an 4y zk be a vector field. Consider a particle ellipse C given by parametrization r= 4 cos ti +3 sin tj. Find the work done. 3 3 = 3, y=-- and 2 1 2. Let D be the region in the first quadrant bounded by the lines y=-r1, y 4 + 1. Use the transformation u 3 2y, v r +...