def isVC(E, C):
    """checks if C is a vertex cover for graphs E
     C -- set of vertices 
     E -- graphs represented as a list of edges
     returns True/False"""
    for (x, y) in E:
        if (x not in C) and (y not in C):
            return False
    return True