Wikipedia:Reference desk/Archives/Mathematics/2012 December 7

= December 7 =

Radius of intersection of sphere and plane
Hello. THe problem is "What is the radius of the circle that is the intersection of the plane $$x+y+z=1$$ and the sphere $$x^2+y^2+z^2=1$$?" I set the equations equal, then set about completing the square so that I got $$(x-\frac{1}{2})^2+(y-\frac{1}{2})^2+(z-\frac{1}{2})^2=\frac{3}{4}$$. This gave me a sphere of radius $$\frac{\sqrt{3}}{2}$$ but this wasn't one of the answers. I'm not sure how to approach this problem. Help? 24.92.74.238 (talk) 02:36, 7 December 2012 (UTC)
 * Quick and dirty... The points (1,0,0), (0,1,0) and (0,0,1) are all on the edge of the circle (no intersection point can have a value for any co-ordinate greater than one). This is an equilateral triangle inscribed in the circle that you want (which is the same as saying the circle you want circumscribes that triangle). The distance between each of those points is $$\sqrt{2}$$. According to Equilateral Triangle, if the edges of the equilateral triangle are of length a, the radius of the circumscribed circle is a * $$\frac{\sqrt{3}}{3}$$. So the result is $$\frac{\sqrt{6}}{3}$$ = $$\frac{\sqrt{2}}{\sqrt{3}}$$ Are either of these the answer?Naraht (talk) 05:11, 7 December 2012 (UTC)


 * You should take care of what your equations mean. The first means "all points (x,y,z) for which x + y + z = 1", and the second means "all points (x,y,z) for which x2 + y2 + z2 = 1". You are asked to find the intersection of these two sets, i.e. "all points (x,y,z) for which x + y + z = 1 and simultaneously x2 + y2 + z2 = 1". From geometric considerations you will know that the intersection of a sphere and a plane is a circle (or a point or the empty set, depending on the relative separation). So arriving at an equation for a sphere rather than a circle, already you should know that you have discarded a constraint, and ended up with a sphere that happens to contain the circle of intersection, but you've lost the information of which circle.
 * You could try various approaches. This problem is simple to deal with geometrically due to the particular choice of coefficients. Visualize the actual plane and the actual sphere relative to the axes. You could rotate these (using a substitution of variables) so that the plane is parallel to two of the axes, or else work out some obvious points where these figures intersect (values of x, y and z that simultaneously satisfy both equations), and work geometrically from there. — Quondum 05:22, 7 December 2012 (UTC)


 * I corrected the title from "point" to "sphere". StuRat (talk) 05:37, 7 December 2012 (UTC)
 * I think my quick and dirty method above works, but only because there are nice integer points in the intersection. If the sphere had had a radius of 1.5 instead, my method is useless....Naraht (talk) 18:29, 7 December 2012 (UTC)


 * Not necessarily. How about if you solve the linear constraint for z in terms of x and y and substitute in for z in the quadratic constraint. Then pick 3 (x,y) pairs that satisfy the resulting quadratic in x and y and plug each of those back into the solution for z. This should give three points on the desired circle, and we can use your very elegant method (using the formula for circumradius of a triangle with general sides). (I haven't lost any information handling the constraints this way, have I?) Duoduoduo (talk) 20:08, 7 December 2012 (UTC)
 * Well maybe not useless since we have the general triangle circumradious, but no where near quick and dirty. to use my changed example, that means picking 3 x,y pairs that fit 1.5 = x^2 + y^2 + (1-x-y)^2 = x^2 + y^2 + (1+x^2+y^2-2x-2y-2xy)= 1+2x^2+2y^2-2x-2y-2xy. I can't figure out any x,y that fits that off the top of my head, good luck...Naraht (talk) 20:26, 7 December 2012 (UTC)


 * Maybe not quick and dirty, but an alternative to Quondom's suggestion to rotate by changing variables. Duoduoduo (talk) 21:49, 7 December 2012 (UTC)
 * Given the problem as a homework or exam question, I would have used Naraht's "quick and dirty" method without a doubt, which is what I had in mind when I said "else work out some obvious points ... and and work geometrically from there"; I was trying to encourage some thinking (and hadn't noticed that Naraht had added an answer before I'd opened my edit window). The more general methods (the rotation or even finding a parameterized curve) are rather laborious, but it may help to be aware of them. — Quondum 09:40, 8 December 2012 (UTC)

You could find the point on plane closest to origin. A then find the distance, d, from that point to the origin. Then you have a right angled triangle with the radius of the sphere, 1, as the hypothenuse and d and r the radius of the circle as the other two sides. This can be solved by Pythagoras. In this example the point is $$(1/3,1/3,1/3)$$ and $$d=1/sqrt(3)$$. The radius of the circle is then $$r=sqrt(1^2-1/3)=sqrt(2/3)$$. This approach should be easy to generalise.--Salix (talk): 10:37, 8 December 2012 (UTC)

Mazes (complex branching passages)
Do mathematicians have a method for measuring and comparing the complexities of mazes (complex branching passages)? These are multicursal passages, as distinct from labyrinths (unicursal passages). —Wavelength (talk) 03:34, 7 December 2012 (UTC)


 * Don't know if there is one already, but we can invent one. How about if we add up the number of 3-way branches and 4-way branches (maybe count those doubly) ?  Of course, if the entrance and exit are right next to each other, with no wall in-between, then a seemingly complex maze can be solved easily.  Perhaps we should just count the minimum number of 3-way and 4-way branches we must encounter to get from the starting point to the end.  StuRat (talk) 01:48, 8 December 2012 (UTC)


 * (Note #1) My preference is for a method that is already used by mathematicians, although I myself can probably devise a variety of methods involving various properties of mazes. (Note #2) My question did not specify mazes of the type found in popular puzzles, where each maze has exactly one entrance and exactly one exit.
 * Different types of branches (triple, quadruple, and quintuple) might increase complexity, but interior island configurations might be analyzed as decreasing complexity inasmuch as they increase the number of practical routes.
 * —Wavelength (talk) 16:40, 8 December 2012 (UTC)


 * It would be quite hard to assign a "natural" (i.e. not human-centric) complexity to a maze, seeing as any maze can be solved in linear time and space with a simple graph search using any arbitrary rule for pulling from the fringe (e.g. DFS, BFS). That is, the only way to make a maze that's really fundamentally hard is to make it bigger.


 * On the other hand, if you're willing to accept non-natural algorithms for assigning difficulty values to mazes, here are some ideas (for mazes with a single start point and single end point):
 * Run a depth-first search, using a distance heuristic with bounded lookahead to choose the next visited vertex from each point. Count the number of steps of backtracking the algorithm does before it finds a solution.
 * Run an A* search with a distance heuristic. Divide the number of visited vertices by the minimum path length.
 * Both of these have desirable properties like giving small numbers on labyrinths with no branching, reducing complexity when there are islands permitting multiple valid paths to the endpoint, etc. « Aaron Rotenberg « Talk « 07:51, 10 December 2012 (UTC)


 * Thank you for your reply.
 * —Wavelength (talk) 20:22, 10 December 2012 (UTC)

Does graph theory have such a method, so that, for example, one maze might have a complexity of 2 and another maze might have a complexity of 3? —Wavelength (talk) 18:21, 7 December 2012 (UTC)


 * Possibly the most important measure of complexity is whether the maze is a simple tree which has branches and no loops or one with cycles.--Salix (talk): 10:17, 8 December 2012 (UTC)


 * I'm with Salix on this one. I'd convert mazes into graphs first, by some trivial method, and then run optimizations on that.

.Maze               Graph .############# .#  # #   #F#    +-+ + +-+ F .# # # ### # #    | | |   | | .# #S#    # #    + S +-+-+ + .# ### # ### #   |   | |   | .#     # #   #    +-+-+ + +-+ .# # ##### # #    | |     | | .# #         #    + +-+-+ .#############
 * I did use only one start and one finish square here, but if you don't like that, you could label any square the way you want. In further processing, thy are just two labeled nodes, S and F respectively. If you remove all unlabeled nodes with exactly 2 neighbors, you get the following graph:

Before         After .+-+ + +-+ F       + +   F .| | |   | |        | |   | .+ S +-+-+ +     S +-+   | .|  | |   |     / /  |   | .+-+-+ + +-+    +-+   + +-+ .| |     | |    |  \____| | .+ +-+-+    +       +-+ The 2x2 nodes close to F are special; if we removed two of them, we would end up with two edges, both of which would connect the same two points. We can, however, remove one of them: .   + +   F .    | |   | . S +-+   | . / / |   | .+-+   +   + .|  \____ /| .+       +-+
 * The number of edges could then be seen as a measure of the complexity. The number of surviving edges after all unlabeled nodes with only one or two neighbors have been eliminated would be another measure of complexity. Only S, F, the three nodes of the triangle, and five edges would survive. If the maze is a deformed tree, only S and F and the connecting edge will survive.
 * Not sure if I've added anything you don't already know, though. - ¡Ouch! (hurt me / more pain) 08:05, 11 December 2012 (UTC)


 * Thank you for your reply with diagrams. I should have searched for an answer online earlier, but I only began to do so today, and from a search for measure maze complexity, I found a method explained at http://www.math.uco.edu/mcclendon/complexityrecmazes.pdf.  The calculations there involve summations and fractions.  Also, I have discovered the field known as computational complexity theory, so this discussion involves the intersection of graph theory and computational complexity theory.
 * —Wavelength (talk) 18:03, 11 December 2012 (UTC)