Math Problem Statement

Procedure DFS(graph, parents, sequence, i) sequence = sequence ++ [i] foreach j in columns(graph){ if(graph[i][j] == 1 and not(isKey(parents, j))){ parents[j] = i parents, sequence = DFS(graph, parents, sequence, j) } } return(parents, sequence) End DFS

Solution

Ask a new question for Free

By Image

Drop file here or Click Here to upload

Math Problem Analysis

Mathematical Concepts

Graph Theory
Depth-First Search (DFS)
Adjacency Matrix

Formulas

-

Theorems

-

Suitable Grade Level

Advanced