JaroslavTulach: /* Module Repository with Ranges */ - 2012-05-07 20:25:14

Module Repository with Ranges

←Older revision Revision as of 20:25, 7 May 2012
Line 9: Line 9:
Let <math>A_{1.0}, A_{1.1}, A_{1.7}, A_{1.11}, A_{2.1}, A_{2.9}, A_{3.0}</math> denote versions of module <math>A</math>. It is not really important what format the versions use, the only condition is that there is a [[wikipedia:Linear_order|linear order]] among the versions. As such the rest of the terminology is using single variable (<math>x</math> or <math>p</math>) to denote the version.
Let <math>A_{1.0}, A_{1.1}, A_{1.7}, A_{1.11}, A_{2.1}, A_{2.9}, A_{3.0}</math> denote versions of module <math>A</math>. It is not really important what format the versions use, the only condition is that there is a [[wikipedia:Linear_order|linear order]] among the versions. As such the rest of the terminology is using single variable (<math>x</math> or <math>p</math>) to denote the version.
-
Let <math>A_{x} \rightarrow B_{[u,v)}</math> denote the fact that version ''x'' of module A depends on version range <math>[u, v)</math> of module ''B''. E.g. any version of module ''B'' between u and less than v can be used to satisfy A's need. Let <math>A_{x} \rightarrow B_{[u,v]}</math> denote close interval dependency and allow its usage as well.
+
Let <math>A_{x} \rightarrow B_{[u,v)}</math> denote the fact that version ''x'' of module A depends on version range <math>[u, v)</math> of module ''B''. E.g. any version of module ''B'' between u and less than v can be used to satisfy A's need. Let <math>A_{x} \rightarrow B_{[u,v]}</math> denote closed interval dependency and allow its usage as well.
Let ''Repository'' <math>R=(M,D)</math> be any set of modules with their versions and their dependencies on other modules.
Let ''Repository'' <math>R=(M,D)</math> be any set of modules with their versions and their dependencies on other modules.

JaroslavTulach: /* Conversion of 3SAT to Module Range Dependencies Problem */ - 2012-01-08 13:46:38

Conversion of 3SAT to Module Range Dependencies Problem

←Older revision Revision as of 13:46, 8 January 2012
Line 24: Line 24:
=== Conversion of [[3SAT]] to Module Range Dependencies Problem ===
=== Conversion of [[3SAT]] to Module Range Dependencies Problem ===
-
Let there be [[3SAT]] formula with with variables <math>v_1, ..., v_m</math> as defined at [[LibraryReExportIsNPComplete#3SAT|in the original proof]].
+
Let there be [[3SAT]] formula with variables <math>v_1, ..., v_m</math> as defined at [[LibraryReExportIsNPComplete#3SAT|in the original proof]].
Let's create a repository of modules <math>R</math>. For each variable <math>v_i</math> let's create two modules <math>M^i_{1.0}</math> and <math>M^i_{1.1}</math>, and put them into repository <math>R</math>.
Let's create a repository of modules <math>R</math>. For each variable <math>v_i</math> let's create two modules <math>M^i_{1.0}</math> and <math>M^i_{1.1}</math>, and put them into repository <math>R</math>.

JaroslavTulach: /* Module Repository with Ranges */ - 2012-01-08 13:44:24

Module Repository with Ranges

←Older revision Revision as of 13:44, 8 January 2012
Line 9: Line 9:
Let <math>A_{1.0}, A_{1.1}, A_{1.7}, A_{1.11}, A_{2.1}, A_{2.9}, A_{3.0}</math> denote versions of module <math>A</math>. It is not really important what format the versions use, the only condition is that there is a [[wikipedia:Linear_order|linear order]] among the versions. As such the rest of the terminology is using single variable (<math>x</math> or <math>p</math>) to denote the version.
Let <math>A_{1.0}, A_{1.1}, A_{1.7}, A_{1.11}, A_{2.1}, A_{2.9}, A_{3.0}</math> denote versions of module <math>A</math>. It is not really important what format the versions use, the only condition is that there is a [[wikipedia:Linear_order|linear order]] among the versions. As such the rest of the terminology is using single variable (<math>x</math> or <math>p</math>) to denote the version.
-
Let <math>A_{x} \rightarrow B_{[u,v)}</math> denote the fact that version ''x'' of module A depends on version range <math>[u, v)</math> of module ''B''. E.g. any version of module ''B'' between u and less than v can be used to satisfy A's need. Let <math>A_{x} \rightarrow B_{[u,v]}</math> denote close interval dependency and allow its usage as well. Btw. We don't need to really work on ranges, it is enough to use anything which is linearly ordered.
+
Let <math>A_{x} \rightarrow B_{[u,v)}</math> denote the fact that version ''x'' of module A depends on version range <math>[u, v)</math> of module ''B''. E.g. any version of module ''B'' between u and less than v can be used to satisfy A's need. Let <math>A_{x} \rightarrow B_{[u,v]}</math> denote close interval dependency and allow its usage as well.
Let ''Repository'' <math>R=(M,D)</math> be any set of modules with their versions and their dependencies on other modules.
Let ''Repository'' <math>R=(M,D)</math> be any set of modules with their versions and their dependencies on other modules.

JaroslavTulach at 13:06, 8 January 2012 - 2012-01-08 13:06:19

←Older revision Revision as of 13:06, 8 January 2012
Line 1: Line 1:
 +
<skin>monobook</skin>
 +
From the things described so far it seems that [[RangeDependencies]] may not be as bad, but still, there are severe [[NP-Complete]] problems associated with them. Following sections demonstrate the problems.
From the things described so far it seems that [[RangeDependencies]] may not be as bad, but still, there are severe [[NP-Complete]] problems associated with them. Following sections demonstrate the problems.

JaroslavTulach: New page: From the things described so far it seems that RangeDependencies may not be as bad, but still, there are severe NP-Complete problems associated with them. Following sections demons... - 2012-01-08 13:05:38

New page: From the things described so far it seems that RangeDependencies may not be as bad, but still, there are severe NP-Complete problems associated with them. Following sections demons...

New page

From the things described so far it seems that [[RangeDependencies]] may not be as bad, but still, there are severe [[NP-Complete]] problems associated with them. Following sections demonstrate the problems.

=== Module Repository with Ranges ===

Let <math>A, B, C, ...</math> denote various modules and their [[API]]s.

Let <math>A_{1.0}, A_{1.1}, A_{1.7}, A_{1.11}, A_{2.1}, A_{2.9}, A_{3.0}</math> denote versions of module <math>A</math>. It is not really important what format the versions use, the only condition is that there is a [[wikipedia:Linear_order|linear order]] among the versions. As such the rest of the terminology is using single variable (<math>x</math> or <math>p</math>) to denote the version.

Let <math>A_{x} \rightarrow B_{[u,v)}</math> denote the fact that version ''x'' of module A depends on version range <math>[u, v)</math> of module ''B''. E.g. any version of module ''B'' between u and less than v can be used to satisfy A's need. Let <math>A_{x} \rightarrow B_{[u,v]}</math> denote close interval dependency and allow its usage as well. Btw. We don't need to really work on ranges, it is enough to use anything which is linearly ordered.

Let ''Repository'' <math>R=(M,D)</math> be any set of modules with their versions and their dependencies on other modules.

Let C be a ''Configuration'' in a repository <math>R=(M,D)</math>, if
<math>C \subseteq M</math>, where following is satisfied:
# '''each dependency is satisfied''' with some version from dependency range: <math>\forall A_x \in C, \forall A_x \rightarrow B_{[u,v)} \in D \Rightarrow \exists w \in [u,v) \wedge B_{w} \in C</math>
# '''only one version is enabled''': <math>A_{x} \in C \wedge A_{y} \in C \Rightarrow x = y</math>

=== Module Range Dependency Problem ===

Let there be a repository <math>R = (M,D)</math> and a module <math>A \in M</math>. Does there exist a configuration <math>C</math> in the repository <math>R</math>, such that the module <math>A \in C</math>, e.g. the module can be enabled?

=== Conversion of [[3SAT]] to Module Range Dependencies Problem ===

Let there be [[3SAT]] formula with with variables <math>v_1, ..., v_m</math> as defined at [[LibraryReExportIsNPComplete#3SAT|in the original proof]].

Let's create a repository of modules <math>R</math>. For each variable <math>v_i</math> let's create two modules <math>M^i_{1.0}</math> and <math>M^i_{1.1}</math>, and put them into repository <math>R</math>.

For each formula
<math>(x_{i1} \vee x_{i2} \vee x_{i3})</math>
let's create a module <math>F^i</math> that will have three versions. Each of them will depend on one variable's module. In case the variable is used with negation, it will depend on version ''1.0'', otherwise on version ''1.1''. So for formula
:<math>v_a \vee \neg v_b \vee \neg v_c</math>
we will get:
:<math>F^i_{1.1} \rightarrow M^a_{[1.1,1.1]}</math>
:<math>F^i_{1.2} \rightarrow M^b_{[1.0,1.0]}</math>
:<math>F^i_{1.3} \rightarrow M^c_{[1.0,1.0]}</math>
All these modules and dependencies are added into repository <math>R</math>

Now we will create a module <math>T_{1.0}</math> that depends on all formulas:
:<math>T_{1.0} \rightarrow F^1_{[1.0,2.0)}</math>
:<math>T_{1.0} \rightarrow F^2_{[1.0,2.0)}</math>
:...
:<math>T_{1.0} \rightarrow F^n_{[1.0,2.0)}</math>
and add this module as well as its dependencies into repository <math>R</math>.

'''Claim''': There <math>\exists C</math> (a configuration) of repository <math>R</math> and <math>T_{1.0} \in C</math> <math>\Longleftrightarrow</math> there is a solution to the [[3SAT]] formula.

The proof is step by step similar to the one given in [[LibraryReExportIsNPComplete]], so it is not necessary to repeat it here.