Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
i7
peregrine
Commits
3e3398b2
Commit
3e3398b2
authored
Aug 06, 2018
by
Philipp Meyer
Browse files
Add example with precondition
parent
4df80c03
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/averageandconquer.pp
0 → 100644
View file @
3e3398b2
{
"title"
:
"Average and Conquer protocol"
,
"states"
:
[
"G0"
,
"B0"
,
"G3"
,
"B3"
,
"G1_1"
,
"B1_1"
],
"transitions"
:
[
{
"name"
:
"G0, B3 -> B0, B3"
,
"pre"
:
[
"G0"
,
"B3"
],
"post"
:
[
"B0"
,
"B3"
]},
{
"name"
:
"G0, B1_1 -> B0, B1_1"
,
"pre"
:
[
"G0"
,
"B1_1"
],
"post"
:
[
"B0"
,
"B1_1"
]},
{
"name"
:
"B0, G3 -> G0, G3"
,
"pre"
:
[
"B0"
,
"G3"
],
"post"
:
[
"G0"
,
"G3"
]},
{
"name"
:
"B0, G1_1 -> G0, G1_1"
,
"pre"
:
[
"B0"
,
"G1_1"
],
"post"
:
[
"G0"
,
"G1_1"
]},
{
"name"
:
"G3, B3 -> B1_1, G1_1"
,
"pre"
:
[
"G3"
,
"B3"
],
"post"
:
[
"B1_1"
,
"G1_1"
]},
{
"name"
:
"G3, B1_1 -> G1_1, G1_1"
,
"pre"
:
[
"G3"
,
"B1_1"
],
"post"
:
[
"G1_1"
,
"G1_1"
]},
{
"name"
:
"B3, G1_1 -> B1_1, B1_1"
,
"pre"
:
[
"B3"
,
"G1_1"
],
"post"
:
[
"B1_1"
,
"B1_1"
]},
{
"name"
:
"G1_1, B1_1 -> B0, G0"
,
"pre"
:
[
"G1_1"
,
"B1_1"
],
"post"
:
[
"B0"
,
"G0"
]}
],
"initialStates"
:
[
"G3"
,
"B3"
],
"trueStates"
:
[
"G0"
,
"G3"
,
"G1_1"
],
"initialPredicate"
:
"G3 != B3"
,
"predicate"
:
"G3 >= B3"
,
"precondition"
:
"G3 != B3"
,
"description"
:
"This protocol is a fast and exact majority protocol. It computes
\n
whether there are initially more agents voting yes (represented by
\n
state Gm) than agents voting no (represented by state Bm). The protocol
\n
does not handle ties. Parameters m and d control the running time
\n
of the protocol. Described in Dan Alistarh, Rati Gelashvili,
\n
Milan Vojnovi
\u
0107. Fast and Exact Majority in Population Protocols.
\n
PODC 2015."
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment