solve_gcp -- solve the graph coloring problem with bisection and fixed-k model
    Parameters:
        - V: set/list of nodes in the graph
        - E: set/list of edges in the graph
    Returns tuple with number of colors used, and dictionary mapping colors to vertices

def solve_gcp(V,E):
    """solve_gcp -- solve the graph coloring problem with bisection and fixed-k model
    Parameters:
        - V: set/list of nodes in the graph
        - E: set/list of edges in the graph
    Returns tuple with number of colors used, and dictionary mapping colors to vertices
    """
    LB = 0
    UB = len(V)
    color = {}
    while UB-LB > 1:
        K = int((UB+LB) / 2)
        gcp = gcp_fixed_k(V,E,K)
        # gcp.Params.OutputFlag = 0 # silent mode
        #gcp.Params.Cutoff = .1
        gcp.setObjlimit(0.1)
        gcp.optimize()
        status = gcp.getStatus()
        if status == "optimal":
            x,z = gcp.data
            for i in V:
                for k in range(K):
                    if gcp.getVal(x[i,k]) > 0.5:
                        color[i] = k
                        break
                # else:
                #     raise "undefined color for", i
            UB = K
        else:
            LB = K

    return UB,color