I want to compute the probabilities of restarting the protocol in step 4 of the
section 3.52 proof of small magnitude of Compact Confidential Transactions. I will be more verbose to attempt to make this comprehensible to those who didn't complete relevant courses in Calculus and Probability Theory. Please check my math below. Tangentially, am I correct that step 4 in the white paper is currently missing a required stipulation that the protocol must also be restarted if
c = 0?
Joint Probability of SumIn consideration of the relevant value
r + c * x̄ (
where x is renamed x̄ so isn't confused with x-axis below) from step 3 (
of the proof of magnitude within a much larger interval T), then in general the probability that any sum (e.g.
x + y) is greater (or separately less) than some chosen value
k, can be modeled by the area above (or respectively below) the line
x + y = k within the rectangle containing the range of tuples
(x, y) and relative to the total area of said rectangle. For example, if the possible values of
x and
y are between
0 and
1, then the probability of
x + y ≥ 1 (i.e.
k = 1), is given by the area above the line
y = 1 - x bounded by the unit square[1] divided by the area of the said square as shown below:
The area above the line
y = 1 - x contained within the unit-square can be computed
by integrating over the
difference (distance) between the square's top line
y = 1 and the lower line
y = 1 - x over the interval where the line intersects and is within the said square from
x = 0 to
x = 1:
area = ∫10 1 - (1 - x) dx = x2/2 |10 = 12/2 - 02/2 = ½Since the total area of the unit square is
1 * 1 = 1, then
P(X + Y ≥ 1) = ½ / 1 = ½.
Note this can also be computed as double integral directly computing the area between the unit-square as the upper curve and the line
y = 1 - x as the lower curve:
∫10∫11-x dy dx = ∫10 (y |11-x) dx = ∫10 1 - (1 - x) dx.
Note n00bs may skip this paragraph. The above is a 2D simplification that only applies where
x and
y are independent and
uniformly distributed variables, which applies in our case. Given
x and
y are independent but not uniformly distributed, then (even though it doesn't apply in our case but stated to so as to be thorough) the joint
probability distribution function (pdf) of
x and
y must be plotted along the
z-axis to compute the 3D volume above the 3D plane
x + y = k (which requires a double integral to compute, as we will see when we consider the joint probability of sums and products). The joint pdf is the convolution of the independent pdfs[1] as intuitively depicted below for the uniform distribution case. In the animation below visualize
1 + 1 = 2 (as the two distributions first touch) has a probability of
~0 and
½ + ½ = 1 has the maximum probability (because the pdfs of
x and
y are maximally overlapped).
Joint Probability of ProductIn general the probability that any product (e.g.
x * y) is greater (or separately less) than some chosen value
k, can be modeled by the area above (or respectively below) the hyperbola
x * y = k within the rectangle containing the range of tuples
(x, y) and relative to the total area of said rectangle. For example, if the possible values of
x and
y are between
0 and
2, then the probability of
x * y ≥ 1 (i.e.
k =1), is given by the area above the hyperbola
y = 1 / x bounded by the
two-unit square[2] divided by the area of the said square as shown below (note only the hyperbola is draw below and the two-unit square is not shown so just draw it in your mind)
. Note that in this example a unit-square (as opposed to a two-unit square) would contain none of the area above the hyperbola, because mean of the product of two (independently, uniformly distributed) numbers is half the mean of the product, e.g. 16 (mean of 8) = 16 * 1 (means of 8 * ½) = 8 * 2 (means of 4 * 1) = 4 * 4 (means of 2 * 2) with mean of 8 for [0, 16], 4 for [0, 8], 2 for [0,4], and 1 for [0,2]:
The area above the hyperbola
y = 1 / x contained within the two-unit square can be computed by integrating over the difference (distance) between the square's top line
y = 2 and the lower hyperbola
y = 1 / x over the interval where the hyperbola intersects and is within the said square from
x = ½ to
x = 2:
area = ∫2½ 2 - 1/x dx = 2 * x - ln(|x|) |2½ = 4 - ln(2) - (1 - ln(½)) = 3 - 2 * ln(2) = 1.6137Since the total area of the two-unit square is
2 * 2 = 4, then
P(X * Y ≥ 1) = 1.6137 / 4 = 0.40343.
Note this can also be computed as double integral directly computing the area between the two-unit-square as the upper curve and the hyperbola
y = 1 / x as the lower curve:
∫2½∫21/x dy dx = ∫2½ (y |21/x) dx = ∫2½ 2 - 1/x dx.
Joint Probability of Sum and Product(Again assuming the simplification of independent and uniformly distributed variables
x,
y, and
z, then ) In general the probability that any sum and product (e.g.
z + x * y) is greater (or separately less) than some chosen value
k, can be modeled by the 3D
volume above (or respectively below) the 3D hyperbolic paraboloid
z + x * y = k within the 3D cuboid (
i.e. cube without requirement for equal area sides) containing the range of triples
(x, y, z) and relative to the total volume of said cuboid. A third axis z is required to model the joint probability of (two) combined 2D joint (sum and product) probabilities.
Afaik, generally the closed form of computing the volume under a 3D curve constrained by another 3D curve is complex because the definite integral needs the definite bounds of the intersection of the two curves on each axis, which can require for example rebasing the equation to a suitable coordinate system such as the use polar coordinates in Example 2 of [3].
The 3D hyperbolic paraboloid is a saddle shape[4] where cross-sectional hyperbola
x * y = k - z (where
z is constant for the cross-section) drifts lower moving away from the origin as shown below
. Note the equations for hyperbola and hyperbolic paraboloid at Wikipedia and else where contain x2 and y2 terms and mine above do not, this is because those equations have the center axis aligned with an axis of the coordinate system as depicted below:
So visualizing the above rotated to as the hyperbola was depicted for Joint Product of Sum for
z = 0 cross-section for 3D hyperbolic paraboloid and considering the relevant
r + c * x̄ from the white paper, then a cuboid defined by the 3D segment
[(0,0,0), (b, 2t, T)], I attempt to write the correct integral to compute volume above the hyperbolic paraboloid and contained within 4 faces of the cuboid:
volume = ∫k0∫(k-z)/2tb∫2t(k-z)/x dy dx dz = ∫k0∫(k-z)/2tb 2t - (k-z)/x dx dz = ∫k0 (2t * x - (k-z) * ln(|x|) |(k-z)/2tb) dz.
volume = ∫k0 (k-z)(1 - ln(|(k-z)/2t|)) - 2t * b + (k-z) * ln(|b|) dzvolume = 1/4 (-z (b 2t+2+3 z)-k2+2 (k-z)2 log(2-t (k-z))+6 k z)+log(b) (k z-z2/2)+constant |k0 (as integrated by Wolfram Alpha)
Even if the above is correct so far (which I am not so confident of[5]), it assumes
k < T and it doesn't subtract the volume above the hyperbolic paraboloid that is under the bottom two faces of the cuboid. So the correct probability would be smaller.
For the moment, I have expended my available time to further this.
Can anyone help finish this and compute some sample probabilities for the originally stated goal at the top of this post?
[1]
http://math.stackexchange.com/questions/285362/choosing-two-random-numbers-in-0-1-what-is-the-probability-that-sum-of-them[2]
http://math.stackexchange.com/questions/1292294/find-the-probability-of-the-product-of-two-random-variables[3]
http://mathinsight.org/double_integral_volume[4]
http://www.math.ubc.ca/~cwsei/math200/graphics/hyperbolic_paraboloid.html[5]
http://math.stackexchange.com/questions/581440/finding-the-volume-of-a-region-below-a-plane-and-above-a-paraboloid-triple-inte