Hilarious post all around. The replies are extremely butthurt.

  • 2812481591 [any, it/its]@hexbear.net
    link
    fedilink
    English
    arrow-up
    37
    ·
    edit-2
    18 days ago

    Think of the election as a Bus route from source, S, to Target, T. a directed graph G=(V,E), where V is the set of vertices (nodes) and E is the set of edges. Each edge (i,j)∈E has an associated non-negative cost (or length) cij

    Let xij​ be a binary variable that equals 1 if edge (i,j) is included in the shortest path, and 0 otherwise.

    Minimize ∑​_(i,j)∈E [cij​xij​]

    Subject to:

    ∑_j:(s,j)∈E[xsj]−∑_i:(i,s)∈E [xis]=1

    ∑_i:(i,t)∈E [xit]−∑_j:(t,j)∈E [xtj]=−1

    ∑_i:(i,k)∈E [xik]−∑_j:(k,j)∈E [xkj]=0∀k∈V∖{s,t}

    xij∈{0,1}∀(i,j)∈E