alpha041

40 Reputation

4 Badges

10 years, 355 days

MaplePrimes Activity


These are questions asked by alpha041

Dear all

is it possible to solve bilevel optimization problems in maple?

            min F(x,y)

     s.t.    min G(x,y)

        s.t.   k(x,y)<=0

suppose W1 is weight matrix of graph G1 and W2 is weight matrix of graph G2 (G1 and G2 has same vertices and same edges but with different edge weights)

we want to create graph G3 that has a weight matrix W3. suppose w3[i][j] is an element of W3. we must have :

w3[i][j]=max(w1[i][j],w2[i][j])

w1[i][j] and w2[i][j] are elements of W1 and W2,respectively.

how can we create such graph G3 ?

Hi i have two questions about paths in graph package: 1. suppose we have: path1=[1,3,5,7,9] path2=[1,2,3,6,7,8,9] if we want to create a graph that it's edges are edges of path1 and edges of path2,how can we do this? edge set of our graph should be {[1,3],[3,5],[5,7],[7,9],[1,2],[2,3],[3,6],[6,7],[7,8],[8,9]} 2. suppose p is an arbitrary path on a given weighted graph G how can i calculate weight of p (that is sum of it's edges weights) in maple ? thanks very much for your help

i have 2 questions:

Question 1. suppose we have generated a random weighted graph with 100 vertices and 2300 edges and found shortest path frome node 1 to node 100 using function ShortestPath(G,1,100). this function returns a path like [1 3 8 2 9 100] but don't get us value of shortest path!

in other words if weights are costs of travelling on edges,we want to find minimum cost of travelling from node 1 to node 100.

how can i find value of shortest path (minimum weight/cost) ?

Question 2. i want to create a sub graph of G by removing the edge that has maximum weight on shortest path found in Question 1. how can i find such edge and how to create such sub graph?

thanks

Page 1 of 1