Skip to content

Instantly share code, notes, and snippets.

@samueleresca
Created April 25, 2021 18:12
Show Gist options
  • Save samueleresca/8aa60efe4bb69683ff62aed5d5787224 to your computer and use it in GitHub Desktop.
Save samueleresca/8aa60efe4bb69683ff62aed5d5787224 to your computer and use it in GitHub Desktop.
from quoracle import QuorumSystem, Node
if __name__ == '__main__':
a, b, c = Node('a'), Node('b'), Node('c')
majority = QuorumSystem(reads=a*b + b*c + a*c)
print(majority.load(read_fraction=1)) # 2/3
print(majority.capacity(read_fraction=1)) # 3/2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment