Dynamic Programming21 sections · 916 units
Open in Course

Quiz: Assignment

Knowledge check

Check Your Understanding

In the Assignment Problem using Bitmask DP, what is the transition when adding worker i to assign to an unassigned task j?

  1. A.dp[mask] = sum of cost[i][j] for all j where bit j is set
  2. B.dp[mask | (1 << j)] = dp[mask] * cost[i][j]
  3. C.dp[mask | (1 << j)] = min(dp[mask | (1 << j)], dp[mask] + cost[i][j])
  4. D.dp[mask] = min(dp[mask], dp[mask ^ (1 << j)] + cost[i][j])
Start the roadmap to answer the quizzes and solve the challenges