optimized bottlenecks based on benchmarks. fast now
This commit is contained in:
parent
4a579cd2fd
commit
3a6c511ed5
|
@ -1,13 +1,15 @@
|
|||
import adversary
|
||||
from math import sqrt
|
||||
|
||||
prover = adversary.Prover("= (ham x) k", "= (ham y) (+ k 1)", "<= ham (^ x y) p")
|
||||
bounds = prover.find_bounds(16, 5, 3);
|
||||
lower_bound = sqrt(bounds.min_x_relations * bounds.min_y_relations / bounds.max_joint_relations)
|
||||
prover = adversary.Prover(
|
||||
"= (ham x) k", "= (ham y) (+ k 1)", "= ham (^ x y) p").hint_symmetric()
|
||||
bounds = prover.find_bounds(16, 5, 8)
|
||||
lower_bound = sqrt(bounds.min_x_relations *
|
||||
bounds.min_y_relations / bounds.max_joint_relations)
|
||||
print("m =", bounds.min_x_relations)
|
||||
print(f"From x={bounds.single_bounding_x:b}")
|
||||
print("m' =", bounds.min_y_relations)
|
||||
print(f"From y={bounds.single_bounding_y:b}")
|
||||
print("ℓ·ℓ' =", bounds.max_joint_relations)
|
||||
print(f"From x={bounds.joint_bounding_x:b} and y={bounds.joint_bounding_y:b} and window={bounds.bounding_window:b}")
|
||||
print(f"Query lower bounds = {lower_bound}")
|
||||
print(f"From x={bounds.joint_bounding_x:012b} and y={bounds.joint_bounding_y:012b} and window={bounds.bounding_window:012b}")
|
||||
print(f"Query lower bounds = {lower_bound}")
|
||||
|
|
Loading…
Reference in New Issue