Dynamic programming problems. Tutorial realized in C++ Builder

Dynamic programming problems. Tutorial realized in C++ Builder
The purpose of the tutorial that I wrote "Dynamic Programming Problems, realized in C ++ Builder Tutorial", is to facilitate the learning of dynamic programming technique, to show by way of example which is the essence of programming methods and how should think about solving problems using dynamic programming.
Fragment:
2.2.9 Compaction problem (the mixed method)
I lie problem shows the way of compaction of a certain file ((Iota file, executable file). The file is retained on the support as o sequence of 0 and 1. We have a set of m sequences of 0 and ul I , not missing the sequence that contains only 0 and the sequence it contains only 1. It is necessary to find a decomposition of the string of 0 and 1 which constitute the file, to a minimum of the m sequences. If this issue is solved, the sequence may be replaced with an address and thus, the file becomes a sequence of addresses. In the case of long sequences r, performed saving support. Comments:
• This method is not used in practice.
• The problem always has solution. In the worst case the file can be decomposed using only "trivial" sequences of 0 and 1, but not realize savings of support.
Let n be the number of 0 or 1 making up the file. A sequence is given by a pair (i,j) with i and j, natural numbers.
Descrierea produsului
The purpose of the tutorial that I wrote "Dynamic Programming Problems, realized in C ++ Builder Tutorial", is to facilitate the learning of dynamic programming technique, to show by way of example which is the essence of programming methods and how should think about solving problems using dynamic programming.
Fragment:
2.2.9 Compaction problem (the mixed method)
I lie problem shows the way of compaction of a certain file ((Iota file, executable file). The file is retained on the support as o sequence of 0 and 1. We have a set of m sequences of 0 and ul I , not missing the sequence that contains only 0 and the sequence it contains only 1. It is necessary to find a decomposition of the string of 0 and 1 which constitute the file, to a minimum of the m sequences. If this issue is solved, the sequence may be replaced with an address and thus, the file becomes a sequence of addresses. In the case of long sequences r, performed saving support. Comments:
• This method is not used in practice.
• The problem always has solution. In the worst case the file can be decomposed using only "trivial" sequences of 0 and 1, but not realize savings of support.
Let n be the number of 0 or 1 making up the file. A sequence is given by a pair (i,j) with i and j, natural numbers.
Detaliile produsului