From 355aef958ec5b0e940906cbb7ac6c7b94333ec0e Mon Sep 17 00:00:00 2001 From: Antti H S Laaksonen Date: Wed, 24 May 2017 00:13:02 +0300 Subject: [PATCH] Paths in a grid --- chapter10.tex | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/chapter10.tex b/chapter10.tex index 7400bda..00642c0 100644 --- a/chapter10.tex +++ b/chapter10.tex @@ -516,6 +516,119 @@ with $N=64$ (\texttt{long long} numbers). \section{Dynamic programming} +Bit operations provide an efficient way to +implement dynamic programming algorithms +whose states contain subsets of elements, +because such states can be stored as integers. +In particular, information about all subsets +of $n$ elements can be stored in an array like +\begin{lstlisting} +int value[1<