Skip to main content
. 2018 Jun 29;18(7):2097. doi: 10.3390/s18072097
Algorithm 1. Greedy Gradient Max-Cut
  • 1

    Input: the graph GA={X,A} and labeled vertex Xl and label Y;

  • 2

    Initialization:

  • 3

    Construct the initial cut {Sj} by the initial labeled vertex Xl:

    Sj={xi|yij=1},j=1,2,,c

  • 4

    Unlabeled vertex set Xu=XXl;

  • 5

    repeat

  • 6

        for all j=0 to |Xu| do

  • 7

             calculate the connectivity:

    cij=k=1nλkaikykj,xiXu,j=1,,c

  • 8

        End for

  • 9

        Update the cut {Sj} by placing the vertex xi* to the Sj* subset:

    (i*,j*)=argmini,j,xiXucij

  • 10

        Add xi to Xl:XlXl+xi

  • 11

    Delete xi from Xu:XuXuxi;

  • 12

    Until Xu=

  • 13

    Output: the final cut and the corresponding labeled subsets Sj,j=1,2,,cSj, j = 1, 2,…, c