필터 지우기
필터 지우기

finding the paths with successor values

조회 수: 2 (최근 30일)
sampath kumar punna
sampath kumar punna 2019년 10월 31일
편집: Shivam Prasad 2019년 11월 4일
if
sucessor
1 2
2 3,4
3 4
4
if 1,2,3,4 are the activites and beside values are their sucssors for each activity, then how to get the paths for it.
for suppose the above proeblem has the paths
1-2-3-4
1-2-4
these are the two paths we get
is there any code to get paths like that.
  댓글 수: 1
darova
darova 2019년 10월 31일
I don't understand. Can you make a simple drawing or scheme?

댓글을 달려면 로그인하십시오.

답변 (1개)

Shivam Prasad
Shivam Prasad 2019년 11월 4일
편집: Shivam Prasad 2019년 11월 4일
Hi Sampath,
This can be solved by performing a depth first search on the array.
Firstly represent the activities and successors as a graph. Here, activities are the nodes and successors are the links to other nodes. Then, perform a depth first search as given in the following link:-

카테고리

Help CenterFile Exchange에서 Networks에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by