Graph Theory37 sections · 1633 units
Open in Course

Quiz: Matching States

Knowledge check

Check Your Understanding

In the tree matching DP, you track dp[u][0] and dp[u][1]. What do these states represent?

  1. A.dp[u][0]: u is not selected as a node. dp[u][1]: u is selected as a node.
  2. B.dp[u][0]: u does not use an edge to its parent. dp[u][1]: u uses an edge to its parent.
  3. C.dp[u][0]: subtree of u has 00 matched edges. dp[u][1]: subtree has 11.
  4. D.dp[u][0]: u is a leaf. dp[u][1]: u is internal.
Start the roadmap to answer the quizzes and solve the challenges