Search:

Type: Posts; User: claudio.r

Search: Search took 0.21 seconds.

  1. Replies
    18
    Views
    2,499

    Re: Euler Paths with dfs algorithm problem

    It is supposed to backtrack in the pop() instruction, and after we visit an edge, i delete that edge from the matrix. The problem, is that when the program goes to a dead end, it does not backtrack,...
  2. Replies
    18
    Views
    2,499

    Re: Euler Paths with dfs algorithm problem

    The code output should be 1 2 4 3 5 2 6 4 5 1 that represent the order in the graph that the nodes are visited. The out put of the program is 1 2 4 3 5 1 2 6 4 5, which means that he is visiting an...
  3. Replies
    18
    Views
    2,499

    Re: Euler Paths with dfs algorithm problem

    Right now i can find the simple euler paths. But when the algorithm needs to backtrack i have a problem.

    this is my current code:



    public class Graph {

    private int numVertex;
    private...
  4. Replies
    18
    Views
    2,499

    Re: Euler Paths with dfs algorithm problem

    Here's the full error message:



    java.lang.StackOverflowError
    at java.util.Vector.ensureCapacityHelper(Unknown Source)
    at java.util.Vector.addElement(Unknown Source)
    at...
  5. Replies
    18
    Views
    2,499

    Re: Euler Paths with dfs algorithm problem

    Right now, i'm trying to use a stack strucuture to remove a node from the list, but everytime i try to use pop() i get exceptions.

    This is my current code:



    public class Graph {

    private...
  6. Replies
    18
    Views
    2,499

    Re: Euler Paths with dfs algorithm problem

    I have the algorithm, i need helping with the java part.

    This is what i'm trying to achieve:
    Euler tour - Algorithmist

    right now i have an adjacency matrix, that is populated with the all the...
  7. Replies
    18
    Views
    2,499

    Re: Euler Paths with dfs algorithm problem

    Right now, the program outputs the result of a dfs search on the graph:



    visited: [1]
    i: 2
    visited: [1, 2]
    i: 4
    visited: [1, 2, 4]
    i: 3
  8. Replies
    18
    Views
    2,499

    Re: Euler Paths with dfs algorithm problem

    Here os the code with the main loading a graph. Currently it only makes a DFS search, i want to modify it to at least make some backtracking based on the edges it already visited. My main goal is to...
  9. Replies
    18
    Views
    2,499

    Euler Paths with dfs algorithm problem

    Hi everyone, it's my first time here ;)

    I'm implementing an algorithm to find all the euler paths in a graph. I'm basing myself, to create the dfs, in the code found here: algorithm - Find all...
Results 1 to 9 of 9