Skip to main content
0 votes
1 answer
181 views

I'm implementing the Christofides algorithm for solving the Traveling Salesman Problem and have reached the step where I need to find an Eulerian cycle in a multigraph. I'm unsure how to proceed when ...
J.Doe's user avatar
  • 27
3 votes
3 answers
219 views

Imagine we have a snake contained in a matrix that is matrix[a][b]: it is a tall and b wide. Cells in the matrix can be considered neighbors if they are directly, above, below, or to the left or right ...
Kerry Huang's user avatar
1 vote
0 answers
116 views

I have this graph: The starting node is Hotel and I want the program to find paths for all valid Hamiltonian cycles. But I cannot seem to get the code to work despite following examples of the ...
D.Man's user avatar
  • 311
0 votes
1 answer
70 views

I'm trying to solve the Hamiltonial cycle and path problem using backtracking method whether a source vertex is given for the input graph. When all the vertex are visited in that input graph, then the ...
Suman Bhattacharya's user avatar
1 vote
1 answer
299 views

Hamiltonian cycle instantiation and encoding: % vertices: n=node n(1..4). % edges: e=edge e(1,(2;3)). e(2,(3;4)). e(3,(1;4)). e(4,1). % starting point s(1). # p=path, o=omit, op=on-path, r=reach, s=...
asraful islam's user avatar
3 votes
3 answers
258 views

I have the following undirected graph (picture) that contains a cycle or a Hamiltonian path of length |V|= 8. The cycle (path) with no repeated edges and vertices is the red line. The adjacency matrix ...
Homer Jay Simpson's user avatar
0 votes
0 answers
111 views

You would have to convert an instance of the seating problem to an instance of Hamiltonian circuit (cycle). Does this mean in terms of complexity if one takes a certain complexity it cannot be ...
Nathan's user avatar
  • 1
0 votes
2 answers
1k views

I am trying to implement the Traveling Salesman Problem and I need to return the path that lead to the minimum cost. I have a distance matrix, and this is the code: static int TSP(int[][] distance, ...
Oana's user avatar
  • 29
0 votes
0 answers
229 views

I recently came across algorithms to find all cycles in an undirected graph, and was confused when i saw that they are running linear time (example), It seem easy to use one of these to find hamilton ...
Ofek Ron's user avatar
  • 8,608
0 votes
0 answers
136 views

I am trying to write a program which outputs all possible cycles starting and ending with node 1 and visiting all other nodes exactly once. Given is a complete undirected unweighted graph with N nodes....
Hughes's user avatar
  • 1
2 votes
0 answers
354 views

Given a dense graph (according to ore's theorem, dense means the sum of degrees of any 2 non-adjacent nodes is at least N, where N is the total number of nodes), we can find a Hamiltonian cycle in ...
Travelling Salesman's user avatar
1 vote
1 answer
54 views

The vertices of an undirected graph are numbered 1,2,...4286. The edge (i,j) exists if |i-j| <= 3, where i!=j. Which statements are true? the graph contains an Eulerian circle the graph contains a ...
aneys's user avatar
  • 73
0 votes
2 answers
2k views

I googled it and found: If G = (V,E) has n ≥ 3 vertices and every vertex has degree ≥ n/2 then G has a Hamilton circuit. But my question is if the degree of each vertex is 2 or more, then the graph ...
Abhishek Jaiswal's user avatar
0 votes
1 answer
212 views

I need to do some symulations about knight path and Hamilton cycle on chesseboard, but i wondering what if i exclude some fields from chesseboard xchessboard(1..8). ychessboard(1..8). time(1..8*8+1). ...
Krutek's user avatar
  • 5
0 votes
1 answer
915 views

I recently discovered the Hamiltonian Path/Circuit in CodeBullet's Snake A.I. video and decided to give it a go myself. I wrote a basic Depth First Search algorithm to visit all the nodes in a graph ...
Ahmed Mustafa's user avatar

15 30 50 per page
1
2 3 4 5
8