NK1972's blog

By NK1972, history, 4 months ago, In English

****Please Help***** How to Solve Travelling Salesman Problem using Branch and Bound????

Link:https://www.techiedelight.com/travelling-salesman-problem-using-branch-and-bound/

********But my question is how to solve this problem without using structure?????? *******

 
 
 
 
  • Vote: I like it
  • -28
  • Vote: I do not like it

»
4 months ago, # |
  Vote: I like it +8 Vote: I do not like it

What exactly do you mean by "without using structure"?

  • »
    »
    4 months ago, # ^ |
      Vote: I like it -19 Vote: I do not like it

    struct Node { // stores edges of the state-space tree // help in tracing the path when the answer is found vector<pair<int, int>> path;

    // stores the reduced matrix
    int reducedMatrix[N][N];
    
    // stores the lower bound
    int cost;
    
    // stores the current city number
    int vertex;
    
    // stores the total number of cities visited so far
    int level;

    };

    How to modify this part??