dp with bitmasking ideas needed.

Правка en2, от ASHWANTH_K, 2024-05-11 06:08:51

Is it possible to calculate the following recurrences in $$$O(N*2^N)$$$.

1) $$$dp[mask] = min(dp[mask] , dp[m_1] + dp[m_2]);$$$
where $$$m_1|m_2 = mask$$$

2) $$$dp[mask] = min(dp[mask] , dp[m_1] + dp[m_2]);$$$
where $$$m_1 \oplus m_2 = mask$$$ and $$$m_1$$$ ,$$$m_2$$$ are subsets of mask.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский ASHWANTH_K 2024-05-11 06:08:51 39 Tiny change: '2 = mask$ \n\n\n ' -> '2 = mask$ and $m_1$ ,$m_2$ are subsets of mask.\n\n\n '
en1 Английский ASHWANTH_K 2024-05-11 06:07:58 319 Initial revision (published)