Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Representation:</strong></p> <p>You have 24 elements, I will name this elements from A to X (24 first letters). Each of these elements will have a place in one of the 4 graphs. I will assign a number to the 24 nodes of the 4 graphs from 1 to 24.</p> <p>I will identify the position of A by a 24-uple =(xA1,xA2...,xA24), and if I want to assign A to the node number 8 for exemple, I will write (xa1,Xa2..xa24) = (0,0,0,0,0,0,0,1,0,0...0), where 1 is on position 8.</p> <p>We can say that A =(xa1,...xa24)</p> <p>e1...e24 are the unit vectors (1,0...0) to (0,0...1)</p> <p>note about the operator '.':</p> <ul> <li>A.e1=xa1</li> <li>...</li> <li>X.e24=Xx24</li> </ul> <p>There are some constraints on A,...X with these notations :</p> <p>Xii is in {0,1} and</p> <p>Sum(Xai)=1 ... Sum(Xxi)=1</p> <p>Sum(Xa1,xb1,...Xx1)=1 ... Sum(Xa24,Xb24,... Xx24)=1</p> <p>Since one element can be assign to only one node.</p> <p>I will define a graph by defining the neighbors relation of each node, lets say node 8 has neighbors node 7 and node 10</p> <p>to check that A and B are neighbors on node 8 for exemple I nedd:</p> <p>A.e8=1 and B.e7 or B.e10 =1 then I just need A.e8*(B.e7+B.e10)==1</p> <p>in the function isNeighborInGraphs(A,B) I test that for every nodes and I get one or zero depending on the neighborhood.</p> <p><strong>Notations:</strong></p> <ul> <li>4 graphs of 6 nodes, the position of each element is defined by an integer from 1 to 24. (1 to 6 for first graph, etc...)</li> <li>e1... e24 are the unit vectors (1,0,0...0) to (0,0...1)</li> <li>Let A, B ...X be the N elements.</li> </ul> <blockquote> <p>A=(0,0...,1,...,0)=(xa1,xa2...xa24) </p> <p>B=... </p> <p>... </p> <p>X=(0,0...,1,...,0)</p> </blockquote> <ul> <li>Graph descriptions:</li> </ul> <blockquote> <p>IsNeigborInGraphs(A,B)=A.e1*B.e2+... //if 1 and 2 are neigbors in one graph for exemple</p> </blockquote> <ul> <li>State of the system:</li> </ul> <blockquote> <p>L(A)=[B,B,C,E,G...] // list of neigbors of A (can repeat)</p> </blockquote> <pre><code>actualise(L(A)): for element in [B,X] if IsNeigbotInGraphs(A,Element) L(A).append(Element) endIf endfor </code></pre> <ul> <li>Objective functions</li> </ul> <blockquote> <p>N(A)=len(L(A))+Sum(IsneigborInGraph(A,i),i in L(A))</p> <p>...</p> <p>N(X)= ...</p> </blockquote> <p><strong>Description of the algorithm</strong></p> <ol> <li>start with an initial position A=e1... X=e24</li> <li>Actualize L(A),L(B)... L(X)</li> <li>Solve this (with a solveur, <a href="http://www.ampl.com/" rel="nofollow">ampl</a> for exemple will work I guess since it's a nonlinear optimization problem):</li> </ol> <p><em>Objective function</em></p> <blockquote> <p>min(Sum(N(Z),Z=A to X)</p> </blockquote> <p><em>Constraints:</em></p> <blockquote> <p>Sum(Xai)=1 ... Sum(Xxi)=1</p> <p>Sum(Xa1,xb1,...Xx1)=1 ... Sum(Xa24,Xb24,... Xx24)=1</p> </blockquote> <p>You get the best solution</p> <p>4.Repeat step 2 and 3, 3 more times.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload