Commit d3188bb6 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent c6e7c989
No preview for this file type
------------------------------- MODULE Route -------------------------------
EXTENDS FiniteSets
EXTENDS Integers, FiniteSets, Sequences
CONSTANT Nodes, Edges, root
......@@ -22,4 +22,21 @@ Connected(i,j) ==
ASSUME \A i,j \in Nodes : Connected(i,j)
--------
RECURSIVE SumSeq(_)
SumSeq(S) == IF S = << >> THEN 0
ELSE Head(S) + SumSeq(Tail(S))
RECURSIVE SumSet(_)
SumSet(S) == IF S = {} THEN 0
ELSE
LET y == CHOOSE x \in S : TRUE
IN y + SumSet(S \ {y})
=============================================================================
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment