1:

Input: G = (V, E), N (number ofcontrollers), Constraints (e.g., number of controllers, number of controllers assigned to each device)

2:

M i n C o s t

3:

Add placements in V to the set of possible controller placements k

4:

Assign the set of the controllers in k to network devices

5:

Do

6:

Select a placement i randomly from k

7:

Remove i from the set of possible placement k

8:

Assign the set of the controllers in k to network devices

9:

C o s t k = C o s t F u n c ( G , k )

10:

If ( C o s t k > M i n C o s t )

11:

Add i to the set of possible placements k

12:

End If

13:

While ( C o s t k < M i n C o s t )

14:

Return N Controller Placements, Controller Assignments, M i n C o s t