I either need Sage help, or math help, in order to figure out whether all these fun facts about pairwise intersections extend to triple (and higher order) intersections. In one-dimension, I can show that the expected length of the intersection of k unit intervals, conditional upon the intersection being nonempty, is 1/k. It follows (via the additivity of expected values of random variables and the multiplicativity of expected values of independent random variables) that if you take the intersection of k a-by-b rectangles, conditional upon the intersection being nonempty, the intersection has expected perimeter (2a+2b)/k and expected area (ab)/k^2. This extends easily to parallelograms and parallelohedra, but where I get stuck is thinking about centrosymmetric hexagons. Can anyone see how to prove (or disprove) that if you take the intersection of three translates of a centrosymmetric hexagon, conditioned upon the intersection being nonempty, the expected perimeter is P/3 and the expected area is A/9, where P and A are the perimeter and area of the hexagon? Alternatively, can anyone tell me why the following Sage code (for computing the expected number of vertices of the triple intersection) doesn't work? v = [] h = 866/1000 for i in range(10): s=4*floor(1000000*random())/1000000-2 t=4*floor(1000000*random())/1000000-2 u=4*floor(1000000*random())/1000000-2 v=4*floor(1000000*random())/1000000-2 p1=Polyhedron(vertices=[[-1,0],[-1/2,h],[1/2,h],[1,0],[1/2,-h],[-1/2,-h]]) p2=Polyhedron(vertices=[[-1+s,0+t],[-1/2+s,h+t],[1/2+s,h+t],[1+s,0+t],[1/2+s,-h+t],[-1/2+s,-h+t]]) p3=Polyhedron(vertices=[[-1+u,0+v],[-1/2+u,h+v],[1/2+u,h+v],[1+u,0+v],[1/2+u,-h+v],[-1/2+u,-h+v]]) p12=p1.intersection(p2) if len(p12.f_vector())>1: p123=p12.intersection(p3) if len(p123.f_vector())>1: v.append((p123.f_vector())[1]) sum(v)/len(v) If I knew how to fix the bug, I think I'd be able to do numerical experiments regarding perimeter and area as well. Thanks, Jim Propp
Never mind (at least about the Sage help). I found the bug, and it wasn't anything Sage-specific; I was using the variable "v" in two different ways. Note that this mistake could have been discovered by a debugging tool that checks to see whether the coder has redefined an already-defined variable without ever using it. I'm waiting for AI's that partner with human coders, learn about the kinds of mistakes they make, and help them find those mistakes. I'm guessing there are kinds of errors that most coders make, and kinds of errors that are more specific to individual coders. How long do you think I'll have to wait? Jim Propp P.S. Stay tuned for updates about triple-intersections (assuming I don't make more coding errors that I have trouble locating, resulting in my being unable to run experiments). On Wed, Dec 20, 2017 at 9:35 AM, James Propp <jamespropp@gmail.com> wrote:
I either need Sage help, or math help, in order to figure out whether all these fun facts about pairwise intersections extend to triple (and higher order) intersections.
In one-dimension, I can show that the expected length of the intersection of k unit intervals, conditional upon the intersection being nonempty, is 1/k.
It follows (via the additivity of expected values of random variables and the multiplicativity of expected values of independent random variables) that if you take the intersection of k a-by-b rectangles, conditional upon the intersection being nonempty, the intersection has expected perimeter (2a+2b)/k and expected area (ab)/k^2.
This extends easily to parallelograms and parallelohedra, but where I get stuck is thinking about centrosymmetric hexagons.
Can anyone see how to prove (or disprove) that if you take the intersection of three translates of a centrosymmetric hexagon, conditioned upon the intersection being nonempty, the expected perimeter is P/3 and the expected area is A/9, where P and A are the perimeter and area of the hexagon?
Alternatively, can anyone tell me why the following Sage code (for computing the expected number of vertices of the triple intersection) doesn't work?
v = [] h = 866/1000 for i in range(10): s=4*floor(1000000*random())/1000000-2 t=4*floor(1000000*random())/1000000-2 u=4*floor(1000000*random())/1000000-2 v=4*floor(1000000*random())/1000000-2 p1=Polyhedron(vertices=[[-1,0],[-1/2,h],[1/2,h],[1,0],[1/2,- h],[-1/2,-h]]) p2=Polyhedron(vertices=[[-1+s,0+t],[-1/2+s,h+t],[1/2+s,h+t], [1+s,0+t],[1/2+s,-h+t],[-1/2+s,-h+t]]) p3=Polyhedron(vertices=[[-1+u,0+v],[-1/2+u,h+v],[1/2+u,h+v], [1+u,0+v],[1/2+u,-h+v],[-1/2+u,-h+v]]) p12=p1.intersection(p2) if len(p12.f_vector())>1: p123=p12.intersection(p3) if len(p123.f_vector())>1: v.append((p123.f_vector())[1]) sum(v)/len(v)
If I knew how to fix the bug, I think I'd be able to do numerical experiments regarding perimeter and area as well.
Thanks,
Jim Propp
I fixed my Sage code and tested it for bugs by running it on squares (for which I know what the story is). In those tests I found that a triple intersection of three unit squares (conditioned on the intersection being nonempty) has about 11% the area of a unit square. This agrees with the proved result (where the exact constant is 1/9). It now appears experimentally that the triple intersection of three unit regular hexagons (conditioned on the intersection being nonempty) has about 11% the area of a unit regular hexagon. I conjecture that the exact constant is 1/9. Can anyone prove or disprove this? (Might it be true more generally for arbitrary centrosymmetric polygons, and for disks as a limiting case?) I haven't run any experiments involving perimeter, since I haven't figured out how to compute perimeters of polygons. Here the natural guess would be the exact constant 1/3 (since this is what one gets for squares and more generally parallelograms). It also appears that the triple intersection of three unit regular hexagons (conditioned on the intersection being nonempty) has between 4.6 and 4.7 vertices on average. I'm not sure counting vertices for multiple intersections will lead to anything interesting. Jim Propp On Thu, Dec 21, 2017 at 8:51 AM, James Propp <jamespropp@gmail.com> wrote:
Never mind (at least about the Sage help). I found the bug, and it wasn't anything Sage-specific; I was using the variable "v" in two different ways.
Note that this mistake could have been discovered by a debugging tool that checks to see whether the coder has redefined an already-defined variable without ever using it.
I'm waiting for AI's that partner with human coders, learn about the kinds of mistakes they make, and help them find those mistakes. I'm guessing there are kinds of errors that most coders make, and kinds of errors that are more specific to individual coders. How long do you think I'll have to wait?
Jim Propp
P.S. Stay tuned for updates about triple-intersections (assuming I don't make more coding errors that I have trouble locating, resulting in my being unable to run experiments).
On Wed, Dec 20, 2017 at 9:35 AM, James Propp <jamespropp@gmail.com> wrote:
I either need Sage help, or math help, in order to figure out whether all these fun facts about pairwise intersections extend to triple (and higher order) intersections.
In one-dimension, I can show that the expected length of the intersection of k unit intervals, conditional upon the intersection being nonempty, is 1/k.
It follows (via the additivity of expected values of random variables and the multiplicativity of expected values of independent random variables) that if you take the intersection of k a-by-b rectangles, conditional upon the intersection being nonempty, the intersection has expected perimeter (2a+2b)/k and expected area (ab)/k^2.
This extends easily to parallelograms and parallelohedra, but where I get stuck is thinking about centrosymmetric hexagons.
Can anyone see how to prove (or disprove) that if you take the intersection of three translates of a centrosymmetric hexagon, conditioned upon the intersection being nonempty, the expected perimeter is P/3 and the expected area is A/9, where P and A are the perimeter and area of the hexagon?
Alternatively, can anyone tell me why the following Sage code (for computing the expected number of vertices of the triple intersection) doesn't work?
v = [] h = 866/1000 for i in range(10): s=4*floor(1000000*random())/1000000-2 t=4*floor(1000000*random())/1000000-2 u=4*floor(1000000*random())/1000000-2 v=4*floor(1000000*random())/1000000-2 p1=Polyhedron(vertices=[[-1,0],[-1/2,h],[1/2,h],[1,0],[1/2,- h],[-1/2,-h]]) p2=Polyhedron(vertices=[[-1+s,0+t],[-1/2+s,h+t],[1/2+s,h+t], [1+s,0+t],[1/2+s,-h+t],[-1/2+s,-h+t]]) p3=Polyhedron(vertices=[[-1+u,0+v],[-1/2+u,h+v],[1/2+u,h+v], [1+u,0+v],[1/2+u,-h+v],[-1/2+u,-h+v]]) p12=p1.intersection(p2) if len(p12.f_vector())>1: p123=p12.intersection(p3) if len(p123.f_vector())>1: v.append((p123.f_vector())[1]) sum(v)/len(v)
If I knew how to fix the bug, I think I'd be able to do numerical experiments regarding perimeter and area as well.
Thanks,
Jim Propp
I've also run my experiment on centrosymmetric octagons, and it appears that for them as well, the triple intersection of three random translates of a centrosymmetric octagon (conditioned on the intersection being nonempty) has on average area equal to 1/9 the area of the original octagon. So, I'll go out on a limb and conjecture that this is true for arbitrary centrosymmetric octagons. Anyone have any ideas for how to prove this? I get the feeling that only a few of you are interested, so I'll try to restrain my impulse to share further experimental results (e.g., higher dimensions, higher multiplicities of intersection) on math-fun; instead I'll just share with the few folks (like Veit and Warren and George) who've shown interest in the past. I expect there'll be an article or two coming out of this, depending on the shape of the theory as it emerges. Jim On Thu, Dec 21, 2017 at 9:44 AM, James Propp <jamespropp@gmail.com> wrote:
I fixed my Sage code and tested it for bugs by running it on squares (for which I know what the story is). In those tests I found that a triple intersection of three unit squares (conditioned on the intersection being nonempty) has about 11% the area of a unit square. This agrees with the proved result (where the exact constant is 1/9).
It now appears experimentally that the triple intersection of three unit regular hexagons (conditioned on the intersection being nonempty) has about 11% the area of a unit regular hexagon. I conjecture that the exact constant is 1/9. Can anyone prove or disprove this? (Might it be true more generally for arbitrary centrosymmetric polygons, and for disks as a limiting case?)
I haven't run any experiments involving perimeter, since I haven't figured out how to compute perimeters of polygons. Here the natural guess would be the exact constant 1/3 (since this is what one gets for squares and more generally parallelograms).
It also appears that the triple intersection of three unit regular hexagons (conditioned on the intersection being nonempty) has between 4.6 and 4.7 vertices on average. I'm not sure counting vertices for multiple intersections will lead to anything interesting.
Jim Propp
On Thu, Dec 21, 2017 at 8:51 AM, James Propp <jamespropp@gmail.com> wrote:
Never mind (at least about the Sage help). I found the bug, and it wasn't anything Sage-specific; I was using the variable "v" in two different ways.
Note that this mistake could have been discovered by a debugging tool that checks to see whether the coder has redefined an already-defined variable without ever using it.
I'm waiting for AI's that partner with human coders, learn about the kinds of mistakes they make, and help them find those mistakes. I'm guessing there are kinds of errors that most coders make, and kinds of errors that are more specific to individual coders. How long do you think I'll have to wait?
Jim Propp
P.S. Stay tuned for updates about triple-intersections (assuming I don't make more coding errors that I have trouble locating, resulting in my being unable to run experiments).
On Wed, Dec 20, 2017 at 9:35 AM, James Propp <jamespropp@gmail.com> wrote:
I either need Sage help, or math help, in order to figure out whether all these fun facts about pairwise intersections extend to triple (and higher order) intersections.
In one-dimension, I can show that the expected length of the intersection of k unit intervals, conditional upon the intersection being nonempty, is 1/k.
It follows (via the additivity of expected values of random variables and the multiplicativity of expected values of independent random variables) that if you take the intersection of k a-by-b rectangles, conditional upon the intersection being nonempty, the intersection has expected perimeter (2a+2b)/k and expected area (ab)/k^2.
This extends easily to parallelograms and parallelohedra, but where I get stuck is thinking about centrosymmetric hexagons.
Can anyone see how to prove (or disprove) that if you take the intersection of three translates of a centrosymmetric hexagon, conditioned upon the intersection being nonempty, the expected perimeter is P/3 and the expected area is A/9, where P and A are the perimeter and area of the hexagon?
Alternatively, can anyone tell me why the following Sage code (for computing the expected number of vertices of the triple intersection) doesn't work?
v = [] h = 866/1000 for i in range(10): s=4*floor(1000000*random())/1000000-2 t=4*floor(1000000*random())/1000000-2 u=4*floor(1000000*random())/1000000-2 v=4*floor(1000000*random())/1000000-2 p1=Polyhedron(vertices=[[-1,0],[-1/2,h],[1/2,h],[1,0],[1/2,- h],[-1/2,-h]]) p2=Polyhedron(vertices=[[-1+s,0+t],[-1/2+s,h+t],[1/2+s,h+t], [1+s,0+t],[1/2+s,-h+t],[-1/2+s,-h+t]]) p3=Polyhedron(vertices=[[-1+u,0+v],[-1/2+u,h+v],[1/2+u,h+v], [1+u,0+v],[1/2+u,-h+v],[-1/2+u,-h+v]]) p12=p1.intersection(p2) if len(p12.f_vector())>1: p123=p12.intersection(p3) if len(p123.f_vector())>1: v.append((p123.f_vector())[1]) sum(v)/len(v)
If I knew how to fix the bug, I think I'd be able to do numerical experiments regarding perimeter and area as well.
Thanks,
Jim Propp
participants (1)
-
James Propp