Shortest path for direct acyclic graphs (DAG)

Open
#445 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
58/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
julia
Domain
data

Research direction

Search for dag_longest_path and topological_sort_by_dfs to find the existing DAG path implementation and its tests. Add the shortest-path entry point described in the issue, check its behavior with weighted DAGs, and extend the relevant tests so the new function’s results are verified.

Written by the indexing model from the issue text.

Description

Having the longest path algorithm for directed acyclic graphs means that we also have the shortest path algorithm for DAG.

function dag_shortest_path( g::::IsDirected, distmx::AbstractMatrix=weights(g); topological_order=topological_sort_by_dfs(g), ) = dag_longest_path( g, -distmx; topological_order )
Dominant language
Julia
Stars
540
Forks
131
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JuliaGraphs/Graphs.jl

All issues in JuliaGraphs/Graphs.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.