Questions tagged [cyclic-graph]

55 questions
0
votes
0 answers

Data Structure and Design for Java object model based on Aggregating Data

Am working on a coding exercise which I am somewhat confused on how to implement a solution. According to the JavaDoc, I have to implement this EmployeeManager interface. Presume that employee data arrives in a separate thread from other requests.…
PacificNW_Lover
  • 4,746
  • 31
  • 90
  • 144
0
votes
1 answer

Applying solution for LCA in DAGs on cyclic graphs?

The answer to My question might be obvious, and I know that obvious answer on paper. I mean when it comes to some examples I understand why we aren't allowed to have loops to run the Lowest Common Ancestor algorithm, but I have problems…
0
votes
1 answer

How do I calculate the density of a cyclic graph?

I'm looking to find the density of a directed cyclic graph. According to Wikipedia, For undirected simple graphs, the graph density is defined as: 2 * |E| / (|V| * (|V| − 1)) For directed simple graphs, the graph density is defined as: |E| /…
Trevor Hickey
  • 36,288
  • 32
  • 162
  • 271
0
votes
0 answers

Conversion from weighted cyclic to acyclic graph

How to convert a given weighted cyclic graph among n nodes to a acyclic graph with minimum sum of edges? With an added information that in the output graph each node wont have more than D incoming edges. Weights are positive
letsBeePolite
  • 2,183
  • 1
  • 22
  • 37
0
votes
1 answer

How to determine parents and children of each node in a directed cyclic graph?

I'm working on a problem related to nested groups. I need to determine all the groups a group is a member of and all the groups that are it's members. Not just immediate parents and children but everyone in the hierarchy up and down. What I have…
user330612
  • 2,189
  • 7
  • 33
  • 64
0
votes
2 answers

Cyclic directed and undirected graphs

How to detect cycles in a directed graph undirected graph. For an undirected graph .. one of the algorithms which I've thought of is by using disjoint sets. for each vertex v in G Make-set(v) for each edge e(u,v) in G taken one by one if…
0
votes
1 answer

code for cycle detection is not finding returning the right number of cycles in directed graph in Java?

I have code written for calculating the no of cycles in a directed graph using DFS. The method to check if a cycle exists or not works fine. I now iterate through all the vertices (which I have in a HashMap) and check if a vertex is unvisited, then…
brain storm
  • 30,124
  • 69
  • 225
  • 393
0
votes
1 answer

How to have Jackson deserialize a cyclical graph that has been run through JSOG.stringify(myCyclicalGraph)

I am currently using the this Jackson plugin Which serialized my cyclical graphs. Then on the client I use the JSOG to decode the {@ref} objects like this: JSOG.decode(data) The problem comes when I am trying to send the json back up to the server.…
testing123
  • 11,367
  • 10
  • 47
  • 61
-1
votes
2 answers

Extracting Trees/DAG from a cyclic graph

Given a directed cyclic graph, how do I get various DAGs/trees, which are representative of the input graph? In effect, I'd like to extract various trees from the given circuit (directed & cyclic) graph.
-1
votes
1 answer

Algorithm to resolve circular dependencies?

I would like to create a module system whereby you can load dependencies in a circular fashion. The reason is, circular dependencies arise all over the place, like in Ruby on Rails, in the relationship between model classes: # app/models/x.rb class…
Lance
  • 75,200
  • 93
  • 289
  • 503
1 2 3
4