New answers tagged

0 votes

fastest algorithm to count leaf nodes (i.e. terminal nodes)

Store the tree in an array $A$ so that $A_i$ contains the index of the parent's node. For example: A = [-1 0 1 1] would be a four-node-tree where the root node has ...
Stand with Gaza's user avatar
0 votes

Work and depth of DAG - problem in understanding exam question

$D = 5$ (and is not a funtion of $n$ here) and goes $1 - 2 - 4 - 5 - 6$. What is the minimum number of processors that are needed to achieve depth? It clearly cannot be achieved with one processor, ...
Stand with Gaza's user avatar
0 votes

Parallel Algorithm Analysis: Loops

The work $W(n)$ is the total number of nodes in your computation graph and the span $D(n)$ is the number of nodes on the longest path of that graph. $T_P(n)$ is the runtime of the algorithm using $P$ ...
Stand with Gaza's user avatar

Top 50 recent answers are included