• 完全图G就是指图G的每个顶点之间都有连边。
    这样,令完全图G的阶|G|=N,那么完全图G具有如下性质:
    1.图G有(N-1)*N/2条边。
    2.图G上的生成树有N^(N-2)种。
    3.★图G的补图G'中没有边。

    由此可以引发一个很简单的定理:
    ★一个图T的一个完全子图G,对应它的补图T'上的一个独立集。

    那么求一个图的最大完美子图就等价于它的补图的最大独立集所包含的点的个数。
    于是我们可以用匹配算...
  • Priest John's Busiest DayTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 446 Accepted: 103 Special JudgeDescription

    John is the only priest in his town. September 1st is the John's busiest day in a year because there...
  • //poj 2728Desert KingTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 3853 Accepted: 878Description

    David the Great has just become the king of a desert country. To win the respect of his people, he decided to build channe...
  • 总的来说还是建图比较麻烦。
    关键就是抓住关系来建就行。
    和取范式(~x+y)的意思大概可以这么理解,如果X,Y的0,1取值可以导致整个式子结果为1,则连边。
    这样此式就是(~x->~y)^(y->x)
    对于一对元素其中一个的存在关系推导出来的其另一元素的存在关系,则连边。
    如果一个元素x必须存在,那么我们连(~x->x),必须不存在则连(x->~x)

    这样再配合别的如二分之类的东西,基本就可以解了~...
  • 2008-08-04

    [笔记]2-SAT - [武林秘籍]

    月赛的时候dora搜过去的题目。。。。orz poj 3678Katu PuzzleTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1107 Accepted: 116Description

    Katu Puzzle is presented as a directed graph G(V, E) with each edge e(a, b) labeled by a boolean...
    Tag:笔记 图论