Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCC.equipollent #7

Open
Jean-Baptiste-Camps opened this issue Jun 20, 2017 · 1 comment
Open

PCC.equipollent #7

Jean-Baptiste-Camps opened this issue Jun 20, 2017 · 1 comment

Comments

@Jean-Baptiste-Camps
Copy link
Owner

This function needs to have some simple tests just to check if the values inputed by the user exist in the database, and to avoid unexpected function stops due to user typo.

@Jean-Baptiste-Camps
Copy link
Owner Author

Ok, here is a more serious issue, with implications of complexity.

Right now, what the function does is that it looks at an adjacency matrix, and,

  1. for each VL, makes the list of the VL with which it is not in conflict, and then deduplicates them;
  2. look at each list, to see if there are internal conflicts;
  3. remove lists that have internal conflicts;
  4. use the remaining lists to build alternative databases.

It works ok with simple cases, such as `fournival'

Simple case: fournival

Starting situation

Adjacency matrix

    64 93 169 280 230
64   0  1   1   1   0
93   1  0   1   0   1
169  1  1   0   0   1
280  1  0   0   0   1
230  0  1   1   1   0

conflicts_fourniclean

Output

The lists identified are:

  • "64" "230"
  • "93" "280"
  • "169" "280"
  • "93" "169" "280"

And, the last one is then removed, because it has 'internal' conflicts.

Problematic case, ChevLyon

But, with more complex cases, such as Chevalier au lion, it is quite hard to do so.

Starting situation

Adjacency matrix:

   11 23 56 12 19 22 44 21 51 33 27 30 48 57
11  0  1  1  0  0  0  0  0  0  0  0  0  0  0
23  1  0  0  1  0  0  0  0  0  0  0  0  0  0
56  1  0  0  1  0  0  0  0  0  0  0  0  1  0
12  0  1  1  0  0  0  0  0  0  0  0  0  0  0
19  0  0  0  0  0  1  1  0  0  0  0  0  0  0
22  0  0  0  0  1  0  1  0  0  1  0  0  0  0
44  0  0  0  0  1  1  0  0  0  1  0  0  0  0
21  0  0  0  0  0  0  0  0  1  0  0  0  0  0
51  0  0  0  0  0  0  0  1  0  0  0  0  0  1
33  0  0  0  0  0  1  1  0  0  0  0  0  0  0
27  0  0  0  0  0  0  0  0  0  0  0  1  0  0
30  0  0  0  0  0  0  0  0  0  0  1  0  0  0
48  0  0  1  0  0  0  0  0  0  0  0  0  0  0
57  0  0  0  0  0  0  0  0  1  0  0  0  0  0

chevlyon_conflicts

Output

For now, the output is no list at all, because, for instance, 11 is not in conflict with all other VL except 56 and 23, but all of them have 'internal' conflicts.

The question is: what do we want in such a case? Do we want all combinations? Eg.

  • 11, 48, 12, 30, 33, 19, 21, 57
  • 11, 48, 12, 30, 33, 19, 51
  • 11, 48, 12, 30, 22, 44, 21, 57
  • 11, 48, 12, 30, 22, 44, 51
  • 11, 48, 12, 27, 33, 19, 21, 57
  • 11, 48, 12, 27, 33, 19, 51
  • 11, 48, 12, 27, 22, 44, 21, 57
  • 11, 48, 12, 27, 22, 44, 51

Does that even make real sense, apart from being complex ? @floriancafiero , what do you think ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant