From 11f763d24c0073be3c9a2ca68d2f03e0f06bd0e3 Mon Sep 17 00:00:00 2001 From: Antti H S Laaksonen Date: Fri, 17 Feb 2017 00:50:04 +0200 Subject: [PATCH] Corrections --- luku10.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/luku10.tex b/luku10.tex index 3e50835..a2edda7 100644 --- a/luku10.tex +++ b/luku10.tex @@ -468,9 +468,9 @@ for (int i = 0; i < n; i++) { \subsubsection{Counting subsets} Our last problem in this chapter is as follows: -We are given a collection $C$ of $m$ sets, +We are given a collection $C$ that consists of $m$ sets, and our task is to determine for each set -the number of sets that are its subsets. +the number of sets in $C$ that are its subsets. For example, consider the following collection: \[C = \{\{0\}, \{0,2\}, \{1,4\}, \{0,1,4\}, \{1,4,5\}\}\] For any set $x$ in $C$, @@ -492,7 +492,7 @@ However, a more efficient solution is possible using dynamic programming. Let $c(x,k)$ denote the number of sets in -$C$ that equal to a set $x$ +$C$ that equal a set $x$ if we are allowed to remove any subset of $\{0,1,\ldots,k\}$ from $x$. For example, in the above collection,