Commit 76fa0232 authored by Philipp Meyer's avatar Philipp Meyer

Use modulos operation in remainder protocol

parent e6106f86
......@@ -279,9 +279,9 @@ createModuloProtocol n c = PopulationProtocol { states = [Mod i | i <- [0..(n-1)
modOpinion (Mod a) = a == c
modOpinion (ModPassive b) = b
modPredicate = "EXISTS k : " ++
modPredicate = "( " ++
(intercalate " + " [ show i ++ " * " ++ toVar (Mod i) | i <- [0..(n-1)] ]) ++
" = " ++ show c ++ " + " ++ show n ++ " * k"
" ) % " ++ show n ++ " = " ++ show c
createMajorityProtocol :: MajorityProtocol
......
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