Atelier des rouesLab FR
Objects/Documentation

stables19.py

Address a group under a vertex constraint · stables19.py

Download ↓
"""Lexicographic unranking of independent sets of size k containing vertex v."""
import json
from itertools import combinations
from pathlib import Path
if __package__:
    from .stables18 import graph, polynomial, run
else:
    from stables18 import graph, polynomial, run


def count(mask,k):
    p=polynomial(mask)
    return p[k] if 0<=k<len(p) else 0


def unrank(v,k,r):

Read in context

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.