Creating an independent set from a graph in Alloy 4.2 -
i've created test graph try , create independent set from. know , independent set set of vertices aren't connected, i'm not sure how accomplish in alloy 4.2. here's have:
abstract sig vertex { e: set vertex -- e edge relation } -- test graph has vertices a, b, c, d, e, f 1 sig a, b, c, d, e, f extends vertex { } pred independentset[e: vertex->vertex, s: set vertex] { --code here? } pred show { -- setting edge relation (a->a + a->b + a->c + a->d) + (b->a + b->b + b->c + b->e) + (c->a + c->b + c->c + c->f) = e } run show 6
all i, j: s | not -> j in e
that's answer put, think it's sort of correct , gives instance. think it's missing point not sure how express it. hope gives idea!
Comments
Post a Comment