Questions tagged [graph-layering]

Use when a graph is a connected graph where "layers" L0 … Lk partition the vertices. Do not use with a layered graph drawing. If you have any doubts then don't use this tag.

This tag should not be used with:

Layered graph drawing


Definition: (NIST)

A connected graph where "layers" L0 … Lk partition the vertices. Each edge, which has a nonnegative integral weight, connects only vertices in successive layers. The width is the greatest number of vertices in any layer, i.e., MAXi=0k |Li|.


References

Layered Graphs: Applications and Algorithms (pdf)

7 questions
3
votes
2 answers

Shortest path in a maze with health loss

Suppose you have a dungeon, represented by a 2D matrix. You have a start point S (x1,y1) and an end point E (x2, y2). Along the way, some cells have a number in them, which subtract from your health score. Other cells are obstacles that you can't…
Ben G
  • 26,091
  • 34
  • 103
  • 170
2
votes
3 answers

How to handle "composed nodes" in a graph traversed via Dijkstra's algorithm?

I'm dealing with a state machine that is currently traversed via Dijkstra's algorithm. However, now I need to enhance that state machine to be "smarter" in how it figures out routes to account for some side-effects. Basically some paths are not…
2
votes
2 answers

Binary Maze with a Trick

The problem is a binary maze where 1's are walls and 0's are valid paths. You start from the top left (0,0) and you have to reach the bottom right (width -1, height -1). You have to find the shortest path from the top left to the bottom right. The…
GreenSkies
  • 141
  • 1
  • 10
1
vote
2 answers

Count the total number ways to reach the nth stair using step 1, 2 or 3 but the step 3 can be taken only once

For any given value N we have to find the number of ways to reach the top while using steps of 1,2 or 3 but we can use 3 steps only once. for example if n=7 then possible ways could be [1,1,1,1,1,1,1] [1,1,1,1,1,2] etc but we cannot have [3,3,1] or…
aditya singh
  • 111
  • 2
  • 10
1
vote
1 answer

All shortest paths in a graph using K reverse edges

Let's say i have a directed graph G(V,E) with positive integer weights at it's edges.What i need to do is find the shortest paths between all vertices using at most K(integer) reverse edges.What i mean by that is:If we are at edge u and there is…
Epitheoritis 32
  • 366
  • 5
  • 13
0
votes
1 answer

Plotting angular data in ggplot

I have a set of angles that I want to plot, compare and visualise in a circular scale and then patch them into a comparative figure panel. I understand the plot function does what I want for an individual dataset. However, I have multiple of them…
0
votes
1 answer

Graph layering and DP

Graph layering is a common technique to deal with the shortest path with some restrictions. Here is a description about this technique: https://youtu.be/OQ5jsbhAv_M?t=47m7s. So, just wondering, whether this technique will be the same as doing DP,…
NoSegfault
  • 675
  • 1
  • 9
  • 14