Questions tagged as 'grafo'

1
answer

Check if the graph is connected

Does anyone know how I can implement a method that checks me if an untargeted graph is connected and, if it is not, return its connected components? public void connectComps(){ ArrayList<LinkedList<Estacao>> css = new ArrayList...
asked by 17.11.2018 / 19:13
1
answer

How to generate Array-Adjacent of a BFS from a txt file? C ++

I'm using CodeBlocks. I have a .txt file that represents a maze, everything that is after : are rooms: Thefirstlineofthefileshowsthestartcoordinate,whichinthiscaseisAS.Everyletterwrepresentsawall.SomyBFShasastheinitialnode(orinitialro...
asked by 10.01.2016 / 15:43
0
answers

Dijkstra Algorithm

I'm trying to implement a maze, where you need to find a better way to get to the exit (without facing the wall). The labyrinth has already been implemented, the structure is almost ready (it runs through the entire labyrinth). But I would li...
asked by 17.06.2017 / 17:54
2
answers

Segmentation fault in C: Adjacency structure representing graph

I need to create a program to read a graph and represent it in an adjacency structure, however, my compiler is accusing segmentation fault and I can not figure out what might be causing this. Can you help me? #include <stdio.h> #includ...
asked by 24.01.2015 / 15:58
1
answer

C pointers

Well guys, I'm doing graph theory in C, and I've tried using dynamic allocation to create an array. Also, my code has a function to populate the array with 1 in the received indexes. However I have some error in the array allocation or in its pa...
asked by 17.08.2018 / 22:07
1
answer

How is the basic operation of the algorithm A *?

I'm reading about the A * search algorithm to be able to implement it in the future. I know it is used to find a path in a graph, but I can not see very well how it is done. However, I am having difficulty understanding certain aspects of i...
asked by 07.09.2018 / 07:30
3
answers

Binary Tree Removal

Personal how does the tree look after the 40's removal? In my understanding, instead of 40 would be number 41, right 44 and left 30. And the right of 44 the number 49, so right?     
asked by 14.12.2017 / 11:13
1
answer

All possible paths in graphs

I'm doing a work that starts from it, it's all about finding all possible paths from one vertex to another vertex, so I'm using an algorithm almost identical to DFS as shown below: #include <iostream> #include <list> #include <a...
asked by 28.06.2017 / 02:50
2
answers

How do I find the least cycle of an unguided graph?

I can find a cycle in an unguided graph. But I can not think of a way to list the vertices of each cycle, nor even find the smallest cycle. How do I do this?     
asked by 15.01.2015 / 23:17
1
answer

How to clean the properties of neo4j after deleting all data?

I was doing a test with neo4j and of course I found myself in front of many nodes and then I decided to clean everything, so I could start working with an application. Then I ran the following command: match ( n ) detach delete n He then cl...
asked by 24.08.2016 / 22:56