A generalized deterministic two-party communication protocol where at each step,
a player sends an element of an arbitrary finite type β (rather than just a Bool).
Equivalent to DetProtocol up to complexity (see toProtocol)
where sending a β-valued message costs ⌈log₂ |β|⌉ bits.
- output {X : Type u_1} {Y : Type u_2} {α : Type u_3} (val : α) : Protocol X Y α
- alice {X : Type u_1} {Y : Type u_2} {α : Type u_3} {β : Type} [Fintype β] [Nonempty β] (f : X → β) (P : β → Protocol X Y α) : Protocol X Y α
- bob {X : Type u_1} {Y : Type u_2} {α : Type u_3} {β : Type} [Fintype β] [Nonempty β] (f : Y → β) (P : β → Protocol X Y α) : Protocol X Y α
Instances For
Executes the generalized protocol on inputs x and y.
Equations
- (CommunicationComplexity.Deterministic.FiniteMessage.Protocol.output val).run x y = val
- (CommunicationComplexity.Deterministic.FiniteMessage.Protocol.alice f P).run x y = (P (f x)).run x y
- (CommunicationComplexity.Deterministic.FiniteMessage.Protocol.bob f P).run x y = (P (f y)).run x y
Instances For
The communication complexity of a generalized protocol. Sending a β-valued message
costs ⌈log₂ |β|⌉ bits, reflecting the number of bits needed to encode an element of β.
Equations
- (CommunicationComplexity.Deterministic.FiniteMessage.Protocol.output val).complexity = 0
- (CommunicationComplexity.Deterministic.FiniteMessage.Protocol.alice f P).complexity = Nat.clog 2 (Fintype.card β) + Finset.univ.sup fun (i : β) => (P i).complexity
- (CommunicationComplexity.Deterministic.FiniteMessage.Protocol.bob f P).complexity = Nat.clog 2 (Fintype.card β) + Finset.univ.sup fun (i : β) => (P i).complexity
Instances For
Convert a finite-message protocol to a binary protocol with the same
run behavior and complexity, encoding each β-valued message as
⌈log₂ |β|⌉ bits.
Equations
- p.toProtocol = ⋯.choose
Instances For
Embed a binary protocol into a generalized protocol (with β = Bool at each step).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Every binary protocol can be viewed as a generalized protocol with the same
run behavior and complexity (using β = Bool at each step).
Pull back a finite-message protocol along functions fX : X' → X
and fY : Y' → Y, composing each message function with the maps.
Equations
- (CommunicationComplexity.Deterministic.FiniteMessage.Protocol.output val).comap fX fY = CommunicationComplexity.Deterministic.FiniteMessage.Protocol.output val
- (CommunicationComplexity.Deterministic.FiniteMessage.Protocol.alice f P).comap fX fY = CommunicationComplexity.Deterministic.FiniteMessage.Protocol.alice (f ∘ fX) fun (b : β) => (P b).comap fX fY
- (CommunicationComplexity.Deterministic.FiniteMessage.Protocol.bob f P).comap fX fY = CommunicationComplexity.Deterministic.FiniteMessage.Protocol.bob (f ∘ fY) fun (b : β) => (P b).comap fX fY