Dominion Strategy Forum

Miscellaneous => General Discussion => Topic started by: Ozle on May 08, 2014, 04:04:21 pm

Title: Maths thread.
Post by: Ozle on May 08, 2014, 04:04:21 pm
Yeah so let's talk about maths....
Title: Re: Maths thread.
Post by: Awaclus on May 08, 2014, 04:05:47 pm
Shouldn't this be on the Innovation forum?
Title: Re: Maths thread.
Post by: sudgy on May 08, 2014, 04:27:06 pm
Actually, this might be a good idea.  It takes over the random stuff thread a lot.

Can anyone show me why the solution to y'' = -y is A*sin(x) + B*cos(x)?  It might be too complicated for me, but I'm still curious.  I can see that it needs to be sinusoidal, and that that equation is a solution, but how do you derive it?
Title: Re: Maths thread.
Post by: DStu on May 08, 2014, 04:31:06 pm
Actually, this might be a good idea.  It takes over the random stuff thread a lot.

Can anyone show me why the solution to y'' = -y is A*sin(x) + B*cos(x)?  It might be too complicated for me, but I'm still curious.  I can see that it needs to be sinusoidal, and that that equation is a solution, but how do you derive it?
In my analysis course, we proved that the solution is unique (given starting point and derivative), and defined sin/cos as the solution...
Title: Re: Maths thread.
Post by: Axxle on May 08, 2014, 04:33:43 pm
Is maths anything like math?
Title: Re: Maths thread.
Post by: Ozle on May 08, 2014, 04:44:56 pm
Is maths anything like math?

yes it's the proper short form of mathematics
Title: Re: Maths thread.
Post by: qmech on May 08, 2014, 04:53:44 pm
Actually, this might be a good idea.  It takes over the random stuff thread a lot.

Can anyone show me why the solution to y'' = -y is A*sin(x) + B*cos(x)?  It might be too complicated for me, but I'm still curious.  I can see that it needs to be sinusoidal, and that that equation is a solution, but how do you derive it?

The best way to see it is if you already know a little bit about exponentials.  The derivative of exp(kx) is k.exp(kx), for any k.  So the second derivative of exp(kx) is k^2.exp(kx).  So you get a solution if k^2 = 1, i.e. if k = +-i.  So for any constant A and B, A.exp(ix) + B.exp(-ix) is a solution.  This happens to be equivalent to your expression with sines and cosines (with a different A and B).

The reason why these are all the solutions is that the solution space is two-dimensional.  This is perhaps believable because you get one arbitrary constant from each of the implicit integrations, but showing it formally might be a bit beyond you right now.  (I can't remember how to do it offhand.)

[Aside that might be better ignored: you've almost certainly only be told that it means for a function from R to R to be differentiable, so my example that brings in complex numbers is a bit of a cheat.  It does go to the heart of the matter though: it's not so much of an exaggeration to say that making that kind of argument work is the main reason physicists and engineers care about complex numbers.]
Title: Re: Maths thread.
Post by: SirPeebles on May 08, 2014, 04:54:30 pm
Actually, this might be a good idea.  It takes over the random stuff thread a lot.

Can anyone show me why the solution to y'' = -y is A*sin(x) + B*cos(x)?  It might be too complicated for me, but I'm still curious.  I can see that it needs to be sinusoidal, and that that equation is a solution, but how do you derive it?

One way to derive it is to use Euler's formula!

Suppose we already know how to solve y' = k y to get y = e^(kt).  Then e^(kt) is also a solution to the equation y'' = k^2 y.  But of course so is e^(-kt).  It turns out that if y1 and y2 are both solutions to y'' = k^2 y, then so is A*y1 + B*y2 for any constants A and B (a differential equation with this property is called a homogeneous linear equation).  So A*e^(kt) + B*e^(-kt) is a solution to y'' = k^2 y.  To get your equation, just choose k = i.  So the solutions are A*e^(it) + B*e^(-it).  If A=B=1/2, you get cos(t).  If A= 1/(2i) and B = -1/(2i), you get sin(t).

edit:  ninja'd by qmech.  one way to get some intution for why that gives all solutions is that having these two parameters A and B provides precisely enough space to have a unique solution matching any pair of initial conditions of y(0) and y'(0).  Physically, y'' = - y models the motion of a ball hanging on a spring, and for any initial position and initial velocity there is "obviously" a unique motion which unfolds.
Title: Re: Maths thread.
Post by: heron on May 08, 2014, 04:59:48 pm
Maths competitions is pretty much my biggest hobby, although currently I'm a little burned out after the USA Junior Maths Olympiad.

My favorite subject is combinatorics, and least favorite is geometry. The only way that I can solve geometry problems is plotting the figure into the complex plane.

Here is a fun maths problem: Let n be a natural number. 2n distinct points are plotted in the plane. Half of them are colored red, and the other half are colored orange. The points are then divided into n pairs, each with 1 red and 1 orange point. Then, a line segment is drawn between the 2 points in each pair. Prove that there is a way to pair the points such that after the line segments are drawn, none of the line segments intersect each other.
Title: Re: Maths thread.
Post by: sudgy on May 08, 2014, 05:13:34 pm
One way to derive it is to use Euler's formula!

The reason I was asking was because the derivation of Euler's formula that I saw used it at a part...  :P
Title: Re: Maths thread.
Post by: LastFootnote on May 08, 2014, 05:14:38 pm
Is maths anything like math?

yes it's the proper short form of mathematics

I disagree!

*drives off*
Title: Re: Maths thread.
Post by: SirPeebles on May 08, 2014, 05:27:41 pm
One way to derive it is to use Euler's formula!

The reason I was asking was because the derivation of Euler's formula that I saw used it at a part...  :P

Yeah.  This is how I proved Euler's Formula in my differential equations class a few months ago.

In general, there is no such thing as "the definition" of a mathematical object like sine.  Rather, there is a web of equivalent statements, any one of which can be used as "the definition".  So to prove it in an entirely satisfactory way, I would need to know the definition you are starting with.

Another way to solve the equation y'' = -y is to search for a power series solution.  Suppose we want the solution which matches y(0) = 0, y'(0) = 1.  Then
y = 0 + x + a2 x^2 + a3 x^3 + ...
y'' = 2 a2 + 2*3 a3 x + 3*4 a4 x^2 + ...

Since we want y'' = -y, we match up coefficients and solve.  You'll arrive at the Taylor series for sin(x).
Title: Re: Maths thread.
Post by: qmech on May 08, 2014, 05:34:14 pm
Here is a fun maths problem:

I assume the points should be in general position?

Here's another: is it always possible to cover 10 marks on a white table cloth with 10 plates that cannot overlap?
Title: Re: Maths thread.
Post by: sudgy on May 08, 2014, 05:36:57 pm
One way to derive it is to use Euler's formula!

The reason I was asking was because the derivation of Euler's formula that I saw used it at a part...  :P

Yeah.  This is how I proved Euler's Formula in my differential equations class a few months ago.

In general, there is no such thing as "the definition" of a mathematical object like sine.  Rather, there is a web of equivalent statements, any one of which can be used as "the definition".  So to prove it in an entirely satisfactory way, I would need to know the definition you are starting with.

Another way to solve the equation y'' = -y is to search for a power series solution.  Suppose we want the solution which matches y(0) = 0, y'(0) = 1.  Then
y = 0 + x + a2 x^2 + a3 x^3 + ...
y'' = 2 a2 + 2*3 a3 x + 3*4 a4 x^2 + ...

Since we want y'' = -y, we match up coefficients and solve.  You'll arrive at the Taylor series for sin(x).

Aaaaaaaaand I don't understand it.  I guess I'll wait until I know more to think about it.
Title: Re: Maths thread.
Post by: scott_pilgrim on May 08, 2014, 05:58:39 pm
Here is a fun maths problem: Let n be a natural number. 2n distinct points are plotted in the plane. Half of them are colored red, and the other half are colored orange. The points are then divided into n pairs, each with 1 red and 1 orange point. Then, a line segment is drawn between the 2 points in each pair. Prove that there is a way to pair the points such that after the line segments are drawn, none of the line segments intersect each other.

Can we please color them red and blue?  Red and orange will look so similar...
Title: Re: Maths thread.
Post by: SirPeebles on May 08, 2014, 06:06:05 pm
One way to derive it is to use Euler's formula!

The reason I was asking was because the derivation of Euler's formula that I saw used it at a part...  :P

Yeah.  This is how I proved Euler's Formula in my differential equations class a few months ago.

In general, there is no such thing as "the definition" of a mathematical object like sine.  Rather, there is a web of equivalent statements, any one of which can be used as "the definition".  So to prove it in an entirely satisfactory way, I would need to know the definition you are starting with.

Another way to solve the equation y'' = -y is to search for a power series solution.  Suppose we want the solution which matches y(0) = 0, y'(0) = 1.  Then
y = 0 + x + a2 x^2 + a3 x^3 + ...
y'' = 2 a2 + 2*3 a3 x + 3*4 a4 x^2 + ...

Since we want y'' = -y, we match up coefficients and solve.  You'll arrive at the Taylor series for sin(x).

Aaaaaaaaand I don't understand it.  I guess I'll wait until I know more to think about it.

Let me try one more.  I think the definition of sine you have in mind is geometric.  Here's a derivation that is based on the unit circle.

It is easier for me to think of if the independent variable is t for time.  In fact, let's rephrase the problem as looking for the function x(t) for which x'' = - x.

A common technique is to remove the second derivative by introducing a new function, y(t) = x'(t).  Then our differential equation just says y'(t) = -x(t).  In other words, we now have two equations with two unknown functions (but no second derivatives!)

x' = y
y' = -x

At each time t, let P(t) be the point in the plane with x coordinate x(t) and y coordinate y(t).  So P(t) = ( x(t), y(t) ).  As time proceeds, in which direction will this point move?  For that we need to see what the rate of change of P is.  That's the derivative dP/dt, which in this case is P'(t) = ( x'(t), y'(t) ) = (y,-x) from our pair of differential equations.

Now, the direction from the origin to (x,y) is perpendicular with to the direction from the origin to (-y,x),   So P(t) moves around the origin in a circle with a constant speed.

Now suppose our initial conditions are x(0) = 1, x'(0) = 0.  Well, y(0) = x'(0) = 0, so the point starts at (1,0).  The speed is given by v^2 = (x')^2 + (y')^2 = (y)^2 + (-x)^2 = y^2 + x^2.  At t=0 this gives v(0)=1, and since the speed is constant we have v(t) = 1.  Thus the distance traveled in time t is just v*t = 1*t = t, and so t is equal to the angle swept out as measured in radians.  The x-coordinate is therefore x(t) = cos(t).

Title: Re: Maths thread.
Post by: Polk5440 on May 08, 2014, 06:08:44 pm
One way to derive it is to use Euler's formula!

The reason I was asking was because the derivation of Euler's formula that I saw used it at a part...  :P

Yeah.  This is how I proved Euler's Formula in my differential equations class a few months ago.

In general, there is no such thing as "the definition" of a mathematical object like sine.  Rather, there is a web of equivalent statements, any one of which can be used as "the definition".  So to prove it in an entirely satisfactory way, I would need to know the definition you are starting with.

Another way to solve the equation y'' = -y is to search for a power series solution.  Suppose we want the solution which matches y(0) = 0, y'(0) = 1.  Then
y = 0 + x + a2 x^2 + a3 x^3 + ...
y'' = 2 a2 + 2*3 a3 x + 3*4 a4 x^2 + ...

Since we want y'' = -y, we match up coefficients and solve.  You'll arrive at the Taylor series for sin(x).

Aaaaaaaaand I don't understand it.  I guess I'll wait until I know more to think about it.

(Edit: I said something kind of stupid here. )

Try this article on for size.

http://www.u.arizona.edu/~mwalker/501BReadings/Gale&Shapley_AMM1962.pdf

It's short, simple, and spawned a whole subfield in economics (matching theory). And it insults the general population at the very end (see page 15). What entertainment!
Title: Re: Maths thread.
Post by: heron on May 08, 2014, 06:23:57 pm
Here is a fun maths problem: Let n be a natural number. 2n distinct points are plotted in the plane. Half of them are colored red, and the other half are colored orange. The points are then divided into n pairs, each with 1 red and 1 orange point. Then, a line segment is drawn between the 2 points in each pair. Prove that there is a way to pair the points such that after the line segments are drawn, none of the line segments intersect each other.

Can we please color them red and blue?  Red and orange will look so similar...

Actually, I think we might be best with black and white to minimize the effects of color blindness.
Title: Re: Maths thread.
Post by: Watno on May 08, 2014, 06:25:06 pm
But I guess the background is white, so you won't be able to see the white points.
Title: Re: Maths thread.
Post by: sudgy on May 08, 2014, 06:37:36 pm
(Edit: I said something kind of stupid here. )

I was about to respond to the thing you said was stupid, but it was gone!  :O :O :O

I'll respond to it anyway.  I've actually not taken a single bit of calculus officially.  I've just studied it in my free time, because I know that will help me in the future (I want to do physics in college, and from what I've seen, it requires a lot of calculus).  It's all for fun anyway, and I was just curious about something, so I thought I would ask here (I'd already looked at a few other places and couldn't find anything).
Title: Re: Maths thread.
Post by: navical on May 08, 2014, 08:00:07 pm
Here is a fun maths problem: Let n be a natural number. 2n distinct points are plotted in the plane. Half of them are colored red, and the other half are colored orange. The points are then divided into n pairs, each with 1 red and 1 orange point. Then, a line segment is drawn between the 2 points in each pair. Prove that there is a way to pair the points such that after the line segments are drawn, none of the line segments intersect each other.

Assume that no three points lie on the same straight line, since otherwise it fails for e.g. four points on a straight line coloured RROO in that order.

Call the set of points A. We will do this by induction on n. Clearly, when n=1 it's possible.

So for n>1, consider the convex hull of A, which is a convex polygon with vertices at points of A such that no point of A is outside the polygon. There are two cases: all the vertices of the convex hull are the same colour, or some are different. If some are different, then two adjacent vertices F and G will be different, and we can safely draw a line between them; no line between two points will ever leave the convex hull, and F and G are both outside the convex hull of the remaining points. Then the number of remaining points is less than n, so by induction we're done.

If all the points on the convex hull have the same colour - red, without loss of generality - then pick two, call them X and Y, and consider a straight line L perpendicular to the line between X and Y. If the line L is very close to X, then there are more red points than orange points on the side of L closer to X. If the line L is very close to Y, then there are more orange points than red points on the side of L closer to X. The aim is to move L from close to X to close to Y, and at some point, there will be equal numbers of orange points and red points on the side of L closer to X.

The only way this can fail to happen is if there are two orange points P and Q which lie on the same line K which is perpendicular to the line between X and Y, and there is one more red point than orange point on the side of K closer to X. (So if L is just closer to X than K, there is one more red than orange on X's side, and if L is just closer to Y than K, there is one more orange than red on X's side). In this situation, however, putting L in the same place as K and then twisting it very slightly around the midpoint of the line segment PQ will give us a line L with equal numbers of orange points and red points on the side of L closer to X, as wanted.

Then we can apply induction to the points on the side of L closer to X, and separately to the points on the side of L closer to Y, to get a set of lines that works for all the points.

Remark: I think this proof only actually requires no four points to lie on the same line, but it was easier to write up with three.
Title: Re: Maths thread.
Post by: AndrewisFTTW on May 08, 2014, 08:23:52 pm
We already have a math thread, it's called "Random Stuff". Duh.
Title: Re: Maths thread.
Post by: heron on May 08, 2014, 08:26:53 pm
I think that proof works. Nice. Also, yes, I probably should have specified that no three points are collinear.

Here is mine:


Consider 4 points which are the endpoints of two intersecting line segments. Those points form a convex quadrilateral, and the segments are the diagonals of that quadrilateral. We can re-pair those 4 points so that those two segments are two opposite sides of the quadrilateral and do not intersect. From the triangle inequalities, we know that the sum of the lengths of two opposite sides of a convex quadrilateral is strictly less than the sum of the lengths of the diagonals.

Now, consider the pairing of points which leads to the least total length of the line segments. We know that such a pairing exists since there is a finite number of points. Assume that two of the segments in this pairing intersect. Then, we can re-pair them as described above, and the total length of the line segments will decrease. But that is a contradiction, since we started with the pairing with the least total length.

Therefore the pairing with the least total length of line segments will not have any intersecting segments.
Title: Re: Maths thread.
Post by: SirPeebles on May 08, 2014, 08:36:04 pm
I didn't want to post a problem while heron's was still on the table, but now I'll share it.  This is my favorite math problem.  It is from a fairly well-known math contest, so don't spoil it if you've seen it.

Each point on the xy-plane is colored white.  You have a paintbrush tool with the peculiar property that when you click on a point, each point an irrational distance from where you clicked will be colored black.  For instance, if you click on the origin (0,0), then (1,1) will turn black since sqrt(2) is irrational, but (0,1) will not turn black.

Is it possible to color the entire plane black with a finite number of clicks?  And if so, what is the fewest number of clicks required?
Title: Re: Maths thread.
Post by: sudgy on May 08, 2014, 09:11:30 pm
I didn't want to post a problem while heron's was still on the table, but now I'll share it.  This is my favorite math problem.  It is from a fairly well-known math contest, so don't spoil it if you've seen it.

Each point on the xy-plane is colored white.  You have a paintbrush tool with the peculiar property that when you click on a point, each point an irrational distance from where you clicked will be colored black.  For instance, if you click on the origin (0,0), then (1,1) will turn black since sqrt(2) is irrational, but (0,1) will not turn black.

Is it possible to color the entire plane black with a finite number of clicks?  And if so, what is the fewest number of clicks required?

Ooh!  The lower bound is 2! (not 2!, but two with an actual exclamation mark (although 2! = 2...))
Title: Re: Maths thread.
Post by: SirPeebles on May 08, 2014, 09:28:49 pm
why?
Title: Re: Maths thread.
Post by: sudgy on May 08, 2014, 09:31:18 pm
why?

Well, all points have other points that are a rational distance away.  So it can't be one, since one click will not turn the points a rational distance away black.
Title: Re: Maths thread.
Post by: heron on May 08, 2014, 09:33:25 pm
Well, you cannot color the plane black with just two clicks.
WLOG you click (0,0) and (k,0).
If all of the points are colored black, then there does not exist a point (a,b) such that sqrt(a^2 + b^2) is rational and sqrt((a - k)^2 + b^2) is rational. However, if a = k/2, and b = sqrt(q^2 - a^2), where q is some rational number, then sqrt(a^2 + b^2) is rational and sqrt((a - k)^2 + b^2) = sqrt(a^2 + b^2). So it is impossible to color the entire plane black with just two clicks.

I believe you can color the plane with three clicks.
Consider the clicks (0,0); (1,0); and (sqrt(2),0). Assume that there exists a point (a,b) that is colored white. Then sqrt(a^2 + b^2); sqrt((a - 1)^2 + b^2); and sqrt((a - sqrt(2))^2 + b^2) are all rational.
Note that since the product of two rational numbers is always rational, the square root of an irrational number is never rational. Since we have sqrt((a - 1)^2 + b^2) = sqrt(a^2 + b^2 - 2a + 1) is a rational number, and we know that a^2 + b^2 is rational, we see that a must be rational. (This is because the sum of 2 rational numbers is always rational, and the sum of a rational number and an irrational number is always irrational).

We also have that sqrt((a - sqrt(2))^2 + b^2) = sqrt(a^2 + b^2 - 2a*sqrt(2) + 2) is a rational number. We know that a^2 + b^2 +2 is rational, so 2a*sqrt(2) must be rational as well. However, the product of a rational number and an irrational number is always irrational, so a must be irrational, which is a contradiction.

Therefore the plane can be colored black in a minimum of 3 clicks.

Note: All of my statements about sums and products of rational and irrational numbers are easily proven using the definition of a rational number, or all already given by the closure properties.


Hopefully that is all correct, that was a nice problem.
Title: Re: Maths thread.
Post by: sudgy on May 08, 2014, 09:36:50 pm
why?

Well, all points have other points that are a rational distance away.  So it can't be one, since one click will not turn the points a rational distance away black.

Oh, I see what you are saying.  I meant, "I know the answer is at least 2."  Not, "The answer is 2."  Oops.
Title: Re: Maths thread.
Post by: SirPeebles on May 08, 2014, 10:08:38 pm
heron's argument looks good.

Here's my favorite solution.  Click any point, but consider the portion of the plane which is not turned black.  It will be a collection of concentric circles, one for each rational number.  Call these the red circles.  Now click any other point, and call the rational circles about that point the blue circles.  After these two clicks, the only points which are still white are where a blue and a red circle intersect.  There is a countable number of red circles and a countable number of blue circles, and each pair intersects at most twice, so after two clicks only a countable number of white points remain.  Let's call these points the stubborn points.

Now where should we make the third click?  Let's call a point "good" if clicking there will finish the job, and call it "bad" if it leaves a white point leftover.  Then the "bad" points are precisely the rational-radius circles centered on the stubborn points.  Thus the bad points lie on a countable number of circles.  But the plane is not a countable union of circles*, so there must exist a "good" point.

*Why can't the plane be a countable union of circles?  There are two quick arguments.

1) [Measure theory] A circle has measure zero (Roughly this means that a circle has zero area.  Here I am referring to the circle, not the solid disk.).  A countable union of measure zero sets still has measure zero, and therefore cannot be the full plane.  Indeed, we see that almost all points are "good".

2) [Baire category]  A circle in the plane is nowhere dense.  The "bad" points therefore form a meager set.  But the plane is not meager.

Note:  The only property of the irrational numbers we use is that their complement is countable.  So for instance, a paintbrush which colors only at transcendental distances will also color the entire plane in three clicks.  And you can choose "almost any" three distinct points to click, in the technical measure theory sense.

edit:  Here's a third way to see that the plane is not a countable union of circles, without using scary words.  (It is secretly just argument 1)

3) [No scary words]  A circle can always be "thickened" into narrow round band whose area is as small as you'd like.  List your countable collection of circles C1, C2, C3, ... .  Thicken C1 to a narrow band of area at most 1/2, thicken C2 to a band of area at most 1/2^2, thicken C3 to at most 1/2^3, and so forth.  Then the union of these thickened circles has area at most 1/2 + 1/2^2 + 1/2^3 + ... = 1.  Thus the union does not cover the entire plane.
Title: Re: Maths thread.
Post by: pacovf on May 08, 2014, 10:32:24 pm
So uh tensorial notation from my string theory course (technically physics, but oh well), something bothers me with the Polyakov action. At some point we want to know the variation of sqrt(-det(g) ) when g varies, g being a 2d metric.

I am told that d(sqrt( -det(g) )) = +1/2 * sqrt( -det(g) ) * gab * dgab = -1/2 * sqrt( -det(g) ) * gab * dgab

So gab * dgab = - gab * dgab, and that sign change is bugging the hell out of me. So, can someone explain that to me, or is it an error?
Title: Re: Maths thread.
Post by: AndrewisFTTW on May 08, 2014, 10:49:06 pm
I got a D in geometry. Then I failed algebra 2. Then when I got to college I had to take basic algebra again for no credit. I think I took another math course and I probably got a C or something.
Title: Re: Maths thread.
Post by: AndrewisFTTW on May 08, 2014, 10:49:57 pm
Ozle was my teacher.
Title: Re: Maths thread.
Post by: SirPeebles on May 08, 2014, 10:53:02 pm
So uh tensorial notation from my string theory course (technically physics, but oh well), something bothers me with the Polyakov action. At some point we want to know the variation of sqrt(-det(g) ) when g varies, g being a 2d metric.

I am told that d(sqrt( -det(g) )) = +1/2 * sqrt( -det(g) ) * gab * dgab = -1/2 * sqrt( -det(g) ) * gab * dgab

So gab * dgab = - gab * dgab, and that sign change is bugging the hell out of me. So, can someone explain that to me, or is it an error?

I'm a bit rusty on this stuff.  If I recall correctly, gab * gab = gbb = tr g.  Is there any reason in your context to assume that the trace of your metric is constant?  Because then your identity just follows from the product rule.  That is, differentiating the trace would give gab * dgab + gab * dgab = 0.

edit:  oh, gbb isn't the trace of g, is it?  It's the trace of the Kronecker delta, or whatever is appropriate for your signature.  So yeah, it should be a constant, so what you're looking for comes right out of the product rule.

edit 2:  The signature doesn't come into play for the scalar gbb.  That is just the trace of the Kronecker symbol, which is the number of dimensions.  In this case, 2.
Title: Re: Maths thread.
Post by: qmech on May 09, 2014, 03:28:33 am
Two very nice solutions.  I managed to get the splitting out with the ham sandwich theorem, and was hoping there would be an elementary way to do it.
Title: Re: Maths thread.
Post by: WalrusMcFishSr on May 09, 2014, 04:04:21 am
Can you extend that irrational paintbrush problem to n dimensions?
Title: Re: Maths thread.
Post by: qmech on May 09, 2014, 04:10:46 am
Can you extend that irrational paintbrush problem to n dimensions?

Yes, it works straightforwardly.

(Post 1000 is in the maths thread!  I mean, whatever (http://xkcd.com/1000).)
Title: Re: Maths thread.
Post by: Joseph2302 on May 09, 2014, 05:06:17 am
https://www.youtube.com/watch?v=BipvGD-LCjU
Title: Re: Maths thread.
Post by: pacovf on May 09, 2014, 06:13:38 am
So uh tensorial notation from my string theory course (technically physics, but oh well), something bothers me with the Polyakov action. At some point we want to know the variation of sqrt(-det(g) ) when g varies, g being a 2d metric.

I am told that d(sqrt( -det(g) )) = +1/2 * sqrt( -det(g) ) * gab * dgab = -1/2 * sqrt( -det(g) ) * gab * dgab

So gab * dgab = - gab * dgab, and that sign change is bugging the hell out of me. So, can someone explain that to me, or is it an error?

I'm a bit rusty on this stuff.  If I recall correctly, gab * gab = gbb = tr g.  Is there any reason in your context to assume that the trace of your metric is constant?  Because then your identity just follows from the product rule.  That is, differentiating the trace would give gab * dgab + gab * dgab = 0.

edit:  oh, gbb isn't the trace of g, is it?  It's the trace of the Kronecker delta, or whatever is appropriate for your signature.  So yeah, it should be a constant, so what you're looking for comes right out of the product rule.

edit 2:  The signature doesn't come into play for the scalar gbb.  That is just the trace of the Kronecker symbol, which is the number of dimensions.  In this case, 2.

Ugh, you are obviously right.

[ By definition in the tensor notation, gab= (gab)-1, where the -1 means the inverse of the metric, not the inverse of gab, tensor notation can be very unclear. So yeah, gab * gab = gab * gba = Iaa = n (where n dimension), and derivation indeed gives the result. ]

What bothered me in the equation is that, "usually", Aa*Ba = Aa*Ba because of the symmetry of the metric (sometimes you don't use a metric to lower and raise indices though). Somehow I can't make sense of why this is different when using dg. Note that in this case, g is a variable that happens to be a metric, so there's no reason why you should use g to raise and lower indices, in fact we had defined another metric beforehand. If we call hab the object that we use to lower indices (probably the predefined metric, but when reading the notes again, I noticed it wasn't specified), we get:

hac*hbd*gab*dgcd = - hca*hdb*gab*dgcd

And somehow that doesn't feel right, 95% of the time h is symmetric, and in the cases where it isn't, I've only encountered antisymmetric h. I guess there must be a reason that prevents me from raising and lowering indices for dg, but I don't see why.
Title: Re: Maths thread.
Post by: SirPeebles on May 09, 2014, 10:30:30 am
Ugh, you are obviously right.

[ By definition in the tensor notation, gab= (gab)-1, where the -1 means the inverse of the metric, not the inverse of gab, tensor notation can be very unclear. So yeah, gab * gab = gab * gba = Iaa = n (where n dimension), and derivation indeed gives the result. ]

What bothered me in the equation is that, "usually", Aa*Ba = Aa*Ba because of the symmetry of the metric (sometimes you don't use a metric to lower and raise indices though). Somehow I can't make sense of why this is different when using dg. Note that in this case, g is a variable that happens to be a metric, so there's no reason why you should use g to raise and lower indices, in fact we had defined another metric beforehand. If we call hab the object that we use to lower indices (probably the predefined metric, but when reading the notes again, I noticed it wasn't specified), we get:

hac*hbd*gab*dgcd = - hca*hdb*gab*dgcd

And somehow that doesn't feel right, 95% of the time h is symmetric, and in the cases where it isn't, I've only encountered antisymmetric h. I guess there must be a reason that prevents me from raising and lowering indices for dg, but I don't see why.

Suppose you have a matrix A, and you change it by a small amount dA.  How much does the inverse of A change by?  Well, A-1A = I, after the change we will have (A-1 + d[A-1])(A + dA) = I to first order, so A-1 dA + d[A-1] A = 0. That is essentially what we just proved if you put in A = g and contract indices.

The reason that the indices don't behave the way you are expecting is because d[A-1] is NOT just the matrix inverse of dA.  If you raise the indices on dgab then you get the equivalent of (dg)-1, which is not the same thing as d(g-1).
Title: Re: Maths thread.
Post by: Kirian on May 09, 2014, 10:33:10 am
I took two years of college physics and two years of calculus... and I have exactly no idea what y'all are talking about.
Title: Re: Maths thread.
Post by: SirPeebles on May 09, 2014, 10:39:54 am
I took two years of college physics and two years of calculus... and I have exactly no idea what y'all are talking about.

Newton's laws of motion only apply to inertial frames.  For example, if you consider motion from the noninertial frame where the Earth is at rest, then F = ma gets cluttered up with extra terms which are often interpreted as fictitious forces, namely centrifugal force and Coriolis force.  The tensor notation was developed by Albert Einstein during his work on general relativity as a way of writing down laws of physics which hold in any frame, inertial or not.  Nowadays it is used throughout physics, not only in general relativity.
Title: Re: Maths thread.
Post by: pacovf on May 09, 2014, 10:48:50 am
The reason that the indices don't behave the way you are expecting is because d[A-1] is NOT just the matrix inverse of dA.  If you raise the indices on dgab then you get the equivalent of (dg)-1, which is not the same thing as d(g-1).

Oh, ok, so basically dgab and dgab as "defined" in that result are not the same tensor modulo index raising. Man, that could definitely use a footnote. Thanks for the explanation, though! Much appreciated.

I took two years of college physics and two years of calculus... and I have exactly no idea what y'all are talking about.

Me neither.
Title: Re: Maths thread.
Post by: SirPeebles on May 09, 2014, 10:51:00 am
I don't think they are usually even tensors.

Edit:  I take that back.  If g and g+dg are both tensors, then so is dg.
Title: Re: Maths thread.
Post by: DStu on May 09, 2014, 10:56:08 am
Quote
I took two years of college physics and two years of calculus... and I have exactly no idea what y'all are talking about.

Me neither.

I'm about to defend my math phd thesis, and I quitted this subthread at "tensor"...
Title: Re: Maths thread.
Post by: Kirian on May 09, 2014, 11:04:41 am
I'm trying to mostly ignore it, it'll just make me tensor.
Title: Re: Maths thread.
Post by: pacovf on May 09, 2014, 11:26:07 am
Quote
I took two years of college physics and two years of calculus... and I have exactly no idea what y'all are talking about.

Me neither.

I'm about to defend my math phd thesis, and I quitted this subthread at "tensor"...

I nearly quitted this thread at "trascendental". Somehow I feel that if tensors want to make you quit, you know how to use that. Or you've had to work with non-commutative algebras.

Is there any other big pure maths sector? Differential Geometry, Number Theory, Algebra and its numerous spin-offs... Topology, Set Theory...
Title: Re: Maths thread.
Post by: DStu on May 09, 2014, 11:29:22 am
Quote
I took two years of college physics and two years of calculus... and I have exactly no idea what y'all are talking about.

Me neither.

I'm about to defend my math phd thesis, and I quitted this subthread at "tensor"...

I nearly quitted this thread at "trascendental". Somehow I feel that if tensors want to make you quit, you know how to use that. Or you've had to work with non-commutative algebras.

Is there any other big pure maths sector?
Actually, applied math.  But actually from all of these, I probably can handle tensors if I must, but the point is that here I don't need to, so...
Title: Re: Maths thread.
Post by: pacovf on May 09, 2014, 11:31:23 am
Want kind of applied?

I'm doing mostly theoretical physics (but I did some engineering before, so I've forgotten some advanced probability and statistics), so that's differential geometry, group theory and gauge theory (not sure if that last one is actually a math discipline).
Title: Re: Maths thread.
Post by: DStu on May 09, 2014, 11:33:41 am
Want kind of applied?

I'm doing mostly theoretical physics (but I did some engineering before, so I've forgotten some advanced probability and statistics), so that's differential geometry, group theory and gauge theory (not sure if that last one is actually a math discipline).

Probablitly theory / stochastic analysis, concerend with speed of convergence of Markov chains, mostly on function spaces...
Title: Re: Maths thread.
Post by: Watno on May 09, 2014, 12:17:59 pm
There's also Discrete Mathematics.

Why is Set Theory associated with Algebra by the way? My university does this as well, but I don't really see it (though I haven't done an set theory lectures yet).
Title: Re: Maths thread.
Post by: SirPeebles on May 09, 2014, 12:26:48 pm
I don't usually see algebra lumped with set theory.
Title: Re: Maths thread.
Post by: sudgy on May 09, 2014, 12:43:29 pm
Hehe, I just read about power series and such last night, and now understand SirPeebles first thing about it.  I'm trying to find a good smiley for this but I can't think of it...
Title: Re: Maths thread.
Post by: soulnet on May 09, 2014, 03:12:10 pm
There's also Discrete Mathematics.

Why is Set Theory associated with Algebra by the way? My university does this as well, but I don't really see it (though I haven't done an set theory lectures yet).

You can see any logic as an algebra.

(I am assuming by "Set Theory" you mean something like "ZFC theory" or its vicinity)
Title: Re: Maths thread.
Post by: pacovf on May 09, 2014, 03:13:51 pm
You can see anything as a category, if you think about it long enough.

EDIT: your head may explode before that, though.
Title: Re: Maths thread.
Post by: soulnet on May 09, 2014, 03:20:41 pm
You can see anything as a category, if you think about it long enough.

ugh, categories. That is just the extreme result of the fallacy "more general is better". Using too general tools usually hides the meaning of what you prove.
Title: Re: Maths thread.
Post by: SirPeebles on May 09, 2014, 03:43:50 pm
You can see anything as a category, if you think about it long enough.

ugh, categories. That is just the extreme result of the fallacy "more general is better". Using too general tools usually hides the meaning of what you prove.

I've got to disagree here.  Category theory opens up some incredibly beautiful unifications and dualities. 
Title: Re: Maths thread.
Post by: soulnet on May 09, 2014, 04:13:24 pm
You can see anything as a category, if you think about it long enough.

ugh, categories. That is just the extreme result of the fallacy "more general is better". Using too general tools usually hides the meaning of what you prove.

I've got to disagree here.  Category theory opens up some incredibly beautiful unifications and dualities.

That's not really disagreeing. My point is not "category theory is useless" but "trying to get category theory to be an all-encompassing theory" is a counterproductive goal, regardless on whether it is possible or not, and a significant amount of category theorist seem to advocate that goal (this is hugely biased by the ones that I know or have heard off, and not being in the field myself, could easily be a narrow view).
Title: Re: Maths thread.
Post by: navical on May 09, 2014, 05:51:39 pm
I think that proof works. Nice. Also, yes, I probably should have specified that no three points are collinear.

Here is mine:


Consider 4 points which are the endpoints of two intersecting line segments. Those points form a convex quadrilateral, and the segments are the diagonals of that quadrilateral. We can re-pair those 4 points so that those two segments are two opposite sides of the quadrilateral and do not intersect. From the triangle inequalities, we know that the sum of the lengths of two opposite sides of a convex quadrilateral is strictly less than the sum of the lengths of the diagonals.

Now, consider the pairing of points which leads to the least total length of the line segments. We know that such a pairing exists since there is a finite number of points. Assume that two of the segments in this pairing intersect. Then, we can re-pair them as described above, and the total length of the line segments will decrease. But that is a contradiction, since we started with the pairing with the least total length.

Therefore the pairing with the least total length of line segments will not have any intersecting segments.


Oh, very nice.
Title: Re: Maths thread.
Post by: qmech on May 10, 2014, 04:33:32 am
Here's another: is it always possible to cover 10 marks on a white table cloth with 10 plates that cannot overlap?

Reposting this.  The solution is a very neat trick which is tremendously useful when doing real maths.
Title: Re: Maths thread.
Post by: SirPeebles on May 10, 2014, 05:50:22 am
Here's another: is it always possible to cover 10 marks on a white table cloth with 10 plates that cannot overlap?

Reposting this.  The solution is a very neat trick which is tremendously useful when doing real maths.

Surely it depends on the sizes and shapes of the plates and of the cloth.
Title: Re: Maths thread.
Post by: qmech on May 10, 2014, 08:20:30 am
Here's another: is it always possible to cover 10 marks on a white table cloth with 10 plates that cannot overlap?

Reposting this.  The solution is a very neat trick which is tremendously useful when doing real maths.

Surely it depends on the sizes and shapes of the plates and of the cloth.

Marks are points and plates are disks of equal size.  Assume the tablecloth is R^2.  The question is whether it's possible to cover all of the points with any number of disks (although you obviously don't need more than 10).

Note that it's important what number 10 is: if I can put points sufficiently densely everywhere then it's impossible because the disks can't overlap, and it's obviously possible for, say, 2 points.
Title: Re: Maths thread.
Post by: pacovf on May 10, 2014, 08:25:59 am
I assume you can choose the size of the plates?

But then if you can choose the size of the plates, the answer is obviously yes, you just have to get small enough plates.

And if you can't choose the size of the plates, you are not even sure that you can fit all 10 plates on the cloth, so the answer is no, you can't always fit them in such a way as to cover all 10 points.

I am with SirPeebles in this one, I think we are missing a premise.
Title: Re: Maths thread.
Post by: qmech on May 10, 2014, 08:41:22 am
I assume you can choose the size of the plates?

No.  Or yes, but the points are placed afterwards.
Title: Re: Maths thread.
Post by: pacovf on May 10, 2014, 08:46:31 am
I assume you can choose the size of the plates?

No.  Or yes, but the points are placed afterwards.

Huh? If the points are placed after placing the plates, you can always place them outside the plates, since the plates are disks...?
Title: Re: Maths thread.
Post by: qmech on May 10, 2014, 08:52:13 am
The disks are placed after the points.
Title: Re: Maths thread.
Post by: Watno on May 10, 2014, 08:53:10 am
I think the suggested sequence was
1)Choose a size for the plates
2)Place points
3)Place plates

Also he said that the cloth is R^2
Title: Re: Maths thread.
Post by: liopoil on May 10, 2014, 08:57:10 am
must the center of each plate be over the tablecloth? Or can you hang them over the table, with just a little bit on the table.
Title: Re: Maths thread.
Post by: Watno on May 10, 2014, 08:58:06 am
Also he said that the cloth is R^2
Title: Re: Maths thread.
Post by: qmech on May 10, 2014, 08:59:10 am
must the center of each plate be over the tablecloth? Or can you hang them over the table, with just a little bit on the table.

That would be allowed: you can assume the tablecloth is infinite.
Title: Re: Maths thread.
Post by: liopoil on May 10, 2014, 09:00:13 am
must the center of each plate be over the tablecloth? Or can you hang them over the table, with just a little bit on the table.

That would be allowed: you can assume the tablecloth is infinite.
...then how is the tablecloth R^2?
Title: Re: Maths thread.
Post by: liopoil on May 10, 2014, 09:00:44 am
Am I missing what R^2 means?
Title: Re: Maths thread.
Post by: Watno on May 10, 2014, 09:02:13 am
R^2 is supposed to be the plane of real numbers
Title: Re: Maths thread.
Post by: qmech on May 10, 2014, 09:12:21 am
Sorry, R^2 is what I call an infinite (two-dimensional) plane, because you can specify any point in it with two real numbers.  Just think of it as an infinitely large tablecloth.
Title: Re: Maths thread.
Post by: liopoil on May 10, 2014, 09:47:18 am
oh, duh, yeah, I've seen a capital R used for the set of real numbers before, although normally it's supposed to be all fancy and stuff, right? But that's inconvenient to type of course. Anyway, yeah, I don't know how to go about proving that. I feel like there should be a fairly simple iterative process to find a configuration. Although maybe it's possible to show that there is a configuration without finding it. Well, I'll read someone's solution whenever they figure it out :P.
Title: Re: Maths thread.
Post by: Watno on May 10, 2014, 09:49:09 am
We should petition theory to enable Latex code for this thread :P
Title: Re: Maths thread.
Post by: qmech on May 10, 2014, 09:57:29 am
Unicode has an ℝ, but it doesn't look right without serifs...
Title: Re: Maths thread.
Post by: pacovf on May 10, 2014, 11:10:01 am
Is the solution constructive?
Title: Re: Maths thread.
Post by: qmech on May 10, 2014, 11:19:20 am
Is the solution constructive?

Good question.
Title: Re: Maths thread.
Post by: sitnaltax on May 10, 2014, 11:25:22 am
My attempts to use pennies, pen, and notebook to come up with a counterexample say yes, but I'll keep working on it. Because clearly if the answer is yes, the follow-up is to find the smallest number of marks/disks for which the answer is no.
Title: Re: Maths thread.
Post by: heron on May 10, 2014, 11:28:28 am
My attempts to use pennies, pen, and notebook to come up with a counterexample say yes, but I'll keep working on it. Because clearly if the answer is yes, the follow-up is to find the smallest number of marks/disks for which the answer is no.

If you have one more mark than disks, you will not always be able to cover all of the marks since they could be really far apart.
Title: Re: Maths thread.
Post by: DStu on May 10, 2014, 11:45:53 am
Is the solution constructive?

Obviously not, because
Quote
The solution is a very neat trick which is tremendously useful when doing real maths.
Title: Re: Maths thread.
Post by: blueblimp on May 10, 2014, 12:26:40 pm
Love this solution, but I think there is a minor bug:

When picking X and Y, they can't just be any two points on the convex hull. For example, consider a convex hull that's a large regular polygon, where X and Y are adjacent. Then the line perpendicular to XY, passing through X, would also pass through the interior of the convex hull. Putting some requirement about X and Y being "opposite" points (whatever that means) would work, but I think there's an easier fix that also more easily handles the case of two points on the line.

In the case where all points on the convex hull are red, sort the points by (ascending) x-coordinate, breaking ties by (ascending) y-coordinate. Observe that the first and last points in this ordering are on the convex hull, and thus both red. Also observe that, for any division of this ordering into a prefix and suffix, the convex hull of the prefix does not intersect the convex hull of the suffix. (I don't know a great way to prove this formally, but it's pretty obvious given the ordering we chose.)

Then, use the same sweeping argument. The prefix of length 1 has more red points than orange points, and the prefix of length 2n-1 has more orange points than red points. Hence there exists a prefix with an equal number of red points and orange points, which means the corresponding suffix has an equal number of each colour too. That falls into the inductive case.

One reason that I like your solution because it gives an algorithm that's obviously polynomial time. Computing the convex hull and sweeping is O(n log n). Because we don't have control over how we split the point set for induction, the overall algorithm can be O(n^2 log n). (It's easy to construct an example where the prefix is length 2 for most of the recursive steps.)
Title: Re: Maths thread.
Post by: sitnaltax on May 10, 2014, 12:51:04 pm
My attempts to use pennies, pen, and notebook to come up with a counterexample say yes, but I'll keep working on it. Because clearly if the answer is yes, the follow-up is to find the smallest number of marks/disks for which the answer is no.

If you have one more mark than disks, you will not always be able to cover all of the marks since they could be really far apart.

Of course. I took it as a given that the number of marks and disks is the same. (In fact, I assume that the limited number of disks is a sort of red herring w.r.t. the interesting part of the riddle, and the key is to find the smallest number of points that cannot be covered with any number of disks.)
Title: Re: Maths thread.
Post by: liopoil on May 10, 2014, 12:58:53 pm
well having more circles can't possibly help you...
Title: Re: Maths thread.
Post by: Polk5440 on May 10, 2014, 01:02:04 pm
Discs and tablecloth: Oscar needs more than 10 points to thwart me. The circles can jiggle around too much.

Is that a mathy enough answer for ya'?

No? Ok.

Here's the outline of my proof:

0) Oscar secretly places the points on the table trying to thwart me. I have no idea where they are.
1) I tile the table with infinite number of discs such that they are maximally dense and give the tiling a good spin so that what I've covered is uniformly random.
2) Let Ei be the event that I covered point i (i = 1,2,...,10).
3) I have covered all ten points with probability Pr(E1 & E2 & E3 & ... & E10).
3a) Pr(E1 & E2 & E3 & ... & E10) = 1 - Pr(notE1 or notE2 or notE3 or ... or notE10) >= 1 - Pr(notE1) - Pr(notE2) - ... - Pr(notE10) > 0 (see detail)
4) The probability I have covered the 10 points is positive, so there is some way to cover those 10 points no matter how Oscar places them (pick one and call it the special tiling).
5) What, so we're only allowed to use 10 discs? Remove discs from the special tiling which do not cover a point. We must be left with 10 or fewer discs.

Detail: Pr(notEi) = 1 - pi/(2*sqrt(3)) or approximately .09. To see this, draw equilateral triangles over the circle tiling such that the center of the circles are the vertices of the triangles. Each triangle has area  sqrt(3)*r^2. Each triangle is covered by half a circle, area pi*r^2/2. The ratio is pi/(2*sqrt(3)). The ratio of empty space to covered space in the tiling is thus 1 - pi/(2*sqrt(3)).


I should not have spent my morning on this.....
Title: Re: Maths thread.
Post by: heron on May 10, 2014, 01:05:01 pm
I think that that does not work because The probabilities are not independent.
Title: Re: Maths thread.
Post by: Kirian on May 10, 2014, 01:05:04 pm
My attempts to use pennies, pen, and notebook to come up with a counterexample say yes, but I'll keep working on it. Because clearly if the answer is yes, the follow-up is to find the smallest number of marks/disks for which the answer is no.

If you have one more mark than disks, you will not always be able to cover all of the marks since they could be really far apart.


I assume he meant N disks and N points, and determine the smallest N where the answer is no.

I can definitely prove for N <= 3, but I'm not sure if this can be generalized.  Also all of my notation is lay mathematician.

Consider disks of diameter D.  Any given two points are either distance d < D apart, or d >= D apart.

If all three pairs of points have d >= D, then they can and must be covered by three separate disks. The smallest possible configuration for this is an equilateral triangle of side D. The three covering disks can have their centers on each point, each tangent to the other two disks; they can also be spaced farther apart if desired.  If any one point is more distant than D from the other two, then the third disk can be placed even farther away.

If any pair of points are < D apart, that pair can be covered by just one disk.  Any third point is either covered by this disk, or can be covered by a second disk at worst tangent to the first disk.


Intuitively, this ought to generalize to any N.  But I think I lack the ability to prove that.
Title: Re: Maths thread.
Post by: pacovf on May 10, 2014, 01:09:59 pm
My attempts to use pennies, pen, and notebook to come up with a counterexample say yes, but I'll keep working on it. Because clearly if the answer is yes, the follow-up is to find the smallest number of marks/disks for which the answer is no.

Maybe the real question (EDIT: as stated by Kirian) is what the smallest number of marks where you cannot always cover them with plates is, and there's some sort of weird argument that lets you find that number in some sort of "orthogonal" reasoning that doesn't actually care much for the premise of the problem.

And he mentions 10 specifically just because some mathematicians like visualizing people getting frustrated over pencils and pennies. Which means that my money is currently on "yes", since otherwise someone might stumble over a counterexample.

@Kirian: it can't be generalized to any N. With N high enough, you can (locally) put the marks in a dense lattice, which means that some marks will fall in between three plates if the lattice is dense (and large) enough. Also if d >= D but d < 2D, you must cover the points with differents plates, but you can't necessarily do that when there are more than three points.
Title: Re: Maths thread.
Post by: Polk5440 on May 10, 2014, 01:11:26 pm
I think that that does not work because The probabilities are not independent.

But Pr(A or B) = Pr(A) + Pr(B) - Pr(A and B) <= Pr(A) + Pr(B), so I'm okay, I think.
Title: Re: Maths thread.
Post by: SirPeebles on May 10, 2014, 01:17:16 pm
I would take some plates.  Place one on the plane, then arrange six tangent plates around this central one in a hexagonal pattern.  This would leave six symmetrically arranged "triangular" gaps.  I would place a mark at the center of each of these seven plates and then one at the center every other (i.e., alternating) gaps.  This would give me ten points, and I doubt that you can cover all ten.  So I haven't worked out a proof, but I suspect that the answer is that you cannot cover this arrangement of ten.
Title: Re: Maths thread.
Post by: pacovf on May 10, 2014, 01:22:33 pm
yep I am stupid and I do not know how to read.
Title: Re: Maths thread.
Post by: Polk5440 on May 10, 2014, 01:24:26 pm
I would take some plates.  Place one on the plane, then arrange six tangent plates around this central one in a hexagonal pattern.  This would leave six symmetrically arranged "triangular" gaps.  I would place a mark at the center of each of these seven plates and then one at the center every other (i.e., alternating) gaps.  This would give me ten points, and I doubt that you can cover all ten.  So I haven't worked out a proof, but I suspect that the answer is that you cannot cover this arrangement of ten.

Jiggle the plates. You can cover it. Cover each gap point with a plate that also covers one center point. Make sure one of these center points is the center circle. You have 4 points left which you can easily cover with 4 more plates.
Title: Re: Maths thread.
Post by: Polk5440 on May 10, 2014, 01:26:07 pm
Discs and tablecloth: Oscar needs more than 10 points to thwart me. The circles can jiggle around too much.

Is that a mathy enough answer for ya'?

No? Ok.

Here's the outline of my proof:

0) Oscar secretly places the points on the table trying to thwart me. I have no idea where they are.
1) I tile the table with infinite number of discs such that they are maximally dense and give the tiling a good spin so that what I've covered is uniformly random.
2) Let Ei be the event that I covered point i (i = 1,2,...,10).
3) I have covered all ten points with probability Pr(E1 & E2 & E3 & ... & E10).
3a) Pr(E1 & E2 & E3 & ... & E10) = 1 - Pr(notE1 or notE2 or notE3 or ... or notE10) >= 1 - Pr(notE1) - Pr(notE2) - ... - Pr(notE10) > 0 (see detail)
4) The probability I have covered the 10 points is positive, so there is some way to cover those 10 points no matter how Oscar places them (pick one and call it the special tiling).
5) What, so we're only allowed to use 10 discs? Remove discs from the special tiling which do not cover a point. We must be left with 10 or fewer discs.

Detail: Pr(notEi) = 1 - pi/(2*sqrt(3)) or approximately .09. To see this, draw equilateral triangles over the circle tiling such that the center of the circles are the vertices of the triangles. Each triangle has area  sqrt(3)*r^2. Each triangle is covered by half a circle, area pi*r^2/2. The ratio is pi/(2*sqrt(3)). The ratio of empty space to covered space in the tiling is thus 1 - pi/(2*sqrt(3)).


I should not have spent my morning on this.....

Pr(E1&E2&E3...) = 1 - Pr(notE1) - Pr(E1| notE2) - Pr(E1&E2| notE3) - ..., so I am afraid that your result is not correct. If you manage to prove it in a way that is independent of N, you should assume that you've made a mistake somewhere.

But I have to say that I really like your argument.

My argument does not work for n > 10. 1 - 10*.9 > 0 but 1 - 11*.9 < 0 and the proof fails.
Title: Re: Maths thread.
Post by: qmech on May 10, 2014, 01:30:03 pm

My preferred phrasing is that the average number of points uncovered is less than 1, so that there must exist some configuration where 0 points are uncovered.

This is a prototypical application of the probabilistic method.
Title: Re: Maths thread.
Post by: heron on May 10, 2014, 01:32:17 pm
I think that that does not work because The probabilities are not independent.

But Pr(A or B) = Pr(A) + Pr(B) - Pr(A and B) <= Pr(A) + Pr(B), so I'm okay, I think.

Of course, you are correct. I believe then that this neat trick is called the probabilistic method.

edit: ninja'd
Title: Re: Maths thread.
Post by: Polk5440 on May 10, 2014, 01:33:24 pm

My preferred phrasing is that the average number of points uncovered is less than 1, so that there must exist some configuration where 0 points are uncovered.

This is a prototypical application of the probabilistic method.


Oh, okay. I was trying to phrase it like a pigeonhole principle thing.
Title: Re: Maths thread.
Post by: heron on May 10, 2014, 01:37:25 pm
I will now post a more straightforward problem, from the 2009 Harvard-MIT Maths Tournament.

Let f(x) = x^4 + ax^3 + bx^2 + cx + d be a polynomial with 4 negative integer roots. If a + b + c + d = 2009, what is the value of d?

None of me or my friends were able to solve it fast enough, but the solution is quite clever.
Title: Re: Maths thread.
Post by: qmech on May 10, 2014, 01:49:28 pm
Very nice!
Title: Re: Maths thread.
Post by: SirPeebles on May 10, 2014, 02:00:25 pm
I will now post a more straightforward problem, from the 2009 Harvard-MIT Maths Tournament.

Let f(x) = x^4 + ax^3 + bx^2 + cx + d be a polynomial with 4 negative integer roots. If a + b + c + d = 2009, what is the value of d?

None of me or my friends were able to solve it fast enough, but the solution is quite clever.

f(x) = (x+r1)(x+r2)(x+r3)(x+r4) for positive integers r1, ..., r4.
f(1) = 1 + a + b + c  + d = 1 + 2009 = 2010 = 2*3*5*67. [Each is prime, so this is the only way to write it as a product of four integers greater than one.]
f(1) = (1+r1)(1+r2)(1+r3)(1+r4)

So r1 = 1, r2 = 2, r3 = 4, r4 = 66.

And d = f(0) = r1*r2*r3*r4 = 1*2*4*66 = 528
Title: Re: Maths thread.
Post by: SirPeebles on May 10, 2014, 02:09:25 pm
Here's a question.  When is the next year in which the corresponding variant of heron's problem would have a unique answer?
Title: Re: Maths thread.
Post by: pacovf on May 10, 2014, 02:15:39 pm
Here's a question.  When is the next year in which the corresponding variant of heron's problem would have a unique answer?

Somehow I doubt that there is a smart way to answer this.
Title: Re: Maths thread.
Post by: heron on May 10, 2014, 02:27:27 pm
Fortunately it does not take very many years; 2020 = 2*2*5*101 so the answer is 2019.
Title: Re: Maths thread.
Post by: SirPeebles on May 10, 2014, 02:28:20 pm
Fortunately it does not take very many years; 2020 = 2*2*5*101 so the answer is 2019.

What if the roots are distinct negative integers?

edit:  It's not that much more interesting, so I'll just post it.  2030 = 2*5*7*29, so it would be in 2029.
Title: Re: Maths thread.
Post by: dnkywin on May 12, 2014, 12:09:47 am
Heh, as someone who's working behind the scenes, it's nice to see HMMT problems being discussed here.

Here's one of my favorite math competition problems of all time (bonus points if you can find the source):

We have a sequence of real numbers a(0), a(1), a(2), ... that satisfies a(n) = r * a(n-1) + s * a(n-2) for some real numbers r,s. Is it possible that a(n) is never 0, but for any positive real number x we can find integers i and j such that |a(i)|< x < |a(j)| ?
Title: Re: Maths thread.
Post by: DStu on May 12, 2014, 02:22:48 am
Heh, as someone who's working behind the scenes, it's nice to see HMMT problems being discussed here.

Here's one of my favorite math competition problems of all time (bonus points if you can find the source):

We have a sequence of real numbers a(0), a(1), a(2), ... that satisfies a(n) = r * a(n-1) + s * a(n-2) for some real numbers r,s. Is it possible that a(n) is never 0, but for any positive real number x we can find integers i and j such that |a(i)|< x < |a(j)| ?
my guess is    no   
as

For this to be true, you need a subsequence which converges to 0, and a subsequence that convergece to +inf or -inf.  But the recursion formula should lead to an exponential behaviour like with the Fibonacci sequence (write it in 2d linear recursion, find the eigenvalues/vectors) which leads to exponential behaviour (as long as the absolute value of all eigenvalues does not equal 1. In which case you might have oscillating behaivour depending of the second eigenvalue, but the absolute value stays constant).
In any case you can write a(n) as sum of two complex exponetials, and I don't see how this sum can have both subsequences converging to 0 and to +-inf.

Maybe I'm missing something without writing it down, but in this case this method is exactly what you need to find how it is possible.
Title: Re: Maths thread.
Post by: Ozle on May 12, 2014, 02:40:45 am
Heh, as someone who's working behind the scenes, it's nice to see HMMT problems being discussed here.

Here's one of my favorite math competition problems of all time (bonus points if you can find the source):

We have a sequence of real numbers a(0), a(1), a(2), ... that satisfies a(n) = r * a(n-1) + s * a(n-2) for some real numbers r,s. Is it possible that a(n) is never 0, but for any positive real number x we can find integers i and j such that |a(i)|< x < |a(j)| ?

Moat?
Title: Re: Maths thread.
Post by: pacovf on May 12, 2014, 05:53:44 am
Heh, as someone who's working behind the scenes, it's nice to see HMMT problems being discussed here.

Here's one of my favorite math competition problems of all time (bonus points if you can find the source):

We have a sequence of real numbers a(0), a(1), a(2), ... that satisfies a(n) = r * a(n-1) + s * a(n-2) for some real numbers r,s. Is it possible that a(n) is never 0, but for any positive real number x we can find integers i and j such that |a(i)|< x < |a(j)| ?
my guess is    no   
as

For this to be true, you need a subsequence which converges to 0, and a subsequence that convergece to +inf or -inf.  But the recursion formula should lead to an exponential behaviour like with the Fibonacci sequence (write it in 2d linear recursion, find the eigenvalues/vectors) which leads to exponential behaviour (as long as the absolute value of all eigenvalues does not equal 1. In which case you might have oscillating behaivour depending of the second eigenvalue, but the absolute value stays constant).
In any case you can write a(n) as sum of two complex exponetials, and I don't see how this sum can have both subsequences converging to 0 and to +-inf.

Maybe I'm missing something without writing it down, but in this case this method is exactly what you need to find how it is possible.


Had arrived to the same conclusion as DStu, but hadn't thought about complex solutions, for some reason. If both "eigenvalues" (e1, e2) have same absolute value larger than one, but their arguments cannot be transformed from one to the other by multiplication by a rational number, it should work.

The idea is that sometimes e1^n and e2^n will have a very similar argument, and hence a(n) will have a very high absolute value, and sometimes their argument will differ by more or less Pi, and hence they will mostly cancel each other, and can get arbitrarily close to zero in absolute value.

EDIT: or maybe not. The absolute value of ei^n might grow fast enough that it can't be cancelled by the nearly opposing arguments. Don't know how to prove it either way.


Scratch that, a(n) has to be real. I agree with DStu, then.
Title: Re: Maths thread.
Post by: SirPeebles on May 12, 2014, 06:18:56 am
I agree with pacovf that it may be possible.  You can get a(n) to look something like (2^n)*cos(n).  But I'm not sure whether such a sequence will have a subsequence converging to zero or not.  I seem to recall this question coming up in my thesis, and I think I abandoned it for a different approach.
Title: Re: Maths thread.
Post by: pacovf on May 12, 2014, 10:19:11 am
Been thinking about it for a while. My gut instinct tells me that minn<N [cos(n)] ~ 1/N, but I can't manage to prove it. I've been working around the fact that cos(x+e) ~ e when cos(x) = 0, so the question is how "quickly" n approaches N*Pi, but I've only managed to compare it to things that go slower, not faster...
Title: Re: Maths thread.
Post by: SirPeebles on May 12, 2014, 10:23:09 am
Been thinking about it for a while. My gut instinct tells me that minn<N [cos(n)] ~ 1/N, but I can't manage to prove it

Yeah, that's what I've been thinking too.
Title: Re: Maths thread.
Post by: SirPeebles on May 12, 2014, 10:38:33 am
Been thinking about it for a while. My gut instinct tells me that minn<N [cos(n)] ~ 1/N, but I can't manage to prove it. I've been working around the fact that cos(x+e) ~ e when cos(x) = 0, so the question is how "quickly" n approaches N*Pi, but I've only managed to compare it to things that go slower, not faster...

So here's my line of reasoning.  Let's say the cosine has a frequency f.  Instead of looking at cos(2*pi*f*n), let's look at the points traced out on the unit circle and see how close they get to the y-axis.  Well, if f is rational then there are only finitely many points, so assume f is irrational.  Then they form a dense subset of the unit circle.  In fact, I suspect that for large N, the first N points should be close to uniformly distributed around the unit circle.  If so, then we would expect that for large N, the point closest to the y-axis is off by an angle of about 2pi/N, which would give a value for cosine of about 2pi/N.
Title: Re: Maths thread.
Post by: pacovf on May 12, 2014, 11:14:24 am
Been thinking about it for a while. My gut instinct tells me that minn<N [cos(n)] ~ 1/N, but I can't manage to prove it. I've been working around the fact that cos(x+e) ~ e when cos(x) = 0, so the question is how "quickly" n approaches N*Pi, but I've only managed to compare it to things that go slower, not faster...

So here's my line of reasoning.  Let's say the cosine has a frequency f.  Instead of looking at cos(2*pi*f*n), let's look at the points traced out on the unit circle and see how close they get to the y-axis.  Well, if f is rational then there are only finitely many points, so assume f is irrational.  Then they form a dense subset of the unit circle.  In fact, I suspect that for large N, the first N points should be close to uniformly distributed around the unit circle.  If so, then we would expect that for large N, the point closest to the y-axis is off by an angle of about 2pi/N, which would give a value for cosine of about 2pi/N.

Ah, this should be true, and constitute a proof if using the proper formalism.

The points should be distributed uniformly on the circle for N large enough, I think three years ago one of my teachers did a 10 minute aside to kinda prove it, but I don't remember how he did it... I think it's a bit tricky to demonstrate rigourously.
Title: Re: Maths thread.
Post by: Cuzz on May 12, 2014, 03:08:34 pm
Been thinking about it for a while. My gut instinct tells me that minn<N [cos(n)] ~ 1/N, but I can't manage to prove it. I've been working around the fact that cos(x+e) ~ e when cos(x) = 0, so the question is how "quickly" n approaches N*Pi, but I've only managed to compare it to things that go slower, not faster...

So here's my line of reasoning.  Let's say the cosine has a frequency f.  Instead of looking at cos(2*pi*f*n), let's look at the points traced out on the unit circle and see how close they get to the y-axis.  Well, if f is rational then there are only finitely many points, so assume f is irrational.  Then they form a dense subset of the unit circle.  In fact, I suspect that for large N, the first N points should be close to uniformly distributed around the unit circle.  If so, then we would expect that for large N, the point closest to the y-axis is off by an angle of about 2pi/N, which would give a value for cosine of about 2pi/N.

I don't think any irrational value gives a dense orbit, but a full measure set should. In fact I think a full-measure set of f will give you uniform distribution by the Birkhoff ergodic theorem.
Title: Re: Maths thread.
Post by: soulnet on May 12, 2014, 03:35:03 pm
This is one of the best pure-math (i.e., no computability or algorithmic considerations) problems I have encountered:

Are there polynomials in two variables p,q such that given f(x,y) = (p(x,y),q(x,y)) f's range is R^2 - {(0,0)}?
Title: Re: Maths thread.
Post by: SirPeebles on May 12, 2014, 03:38:18 pm
Been thinking about it for a while. My gut instinct tells me that minn<N [cos(n)] ~ 1/N, but I can't manage to prove it. I've been working around the fact that cos(x+e) ~ e when cos(x) = 0, so the question is how "quickly" n approaches N*Pi, but I've only managed to compare it to things that go slower, not faster...

So here's my line of reasoning.  Let's say the cosine has a frequency f.  Instead of looking at cos(2*pi*f*n), let's look at the points traced out on the unit circle and see how close they get to the y-axis.  Well, if f is rational then there are only finitely many points, so assume f is irrational.  Then they form a dense subset of the unit circle.  In fact, I suspect that for large N, the first N points should be close to uniformly distributed around the unit circle.  If so, then we would expect that for large N, the point closest to the y-axis is off by an angle of about 2pi/N, which would give a value for cosine of about 2pi/N.

I don't think any irrational value gives a dense orbit, but a full measure set should. In fact I think a full-measure set of f will give you uniform distribution by the Birkhoff ergodic theorem.

The unit circle is compact.  If the frequency is irrational, then the orbit never repeats, and there will be an infinite subset of the unit circle, and therefore it will have an accumulation point.  This means that for any positive epsilion, one can find two points in the orbit whose angles differ by less than epsilon.  But one of these points comes sooner than the other, so this means that there is some N(epsilon) such that if you take a point in the orbit and move forward N(epsilion) steps, then you will have moved forward by this same angle less than epsilon.  It follows that the orbit is dense.
Title: Re: Maths thread.
Post by: Cuzz on May 12, 2014, 03:51:27 pm
Been thinking about it for a while. My gut instinct tells me that minn<N [cos(n)] ~ 1/N, but I can't manage to prove it. I've been working around the fact that cos(x+e) ~ e when cos(x) = 0, so the question is how "quickly" n approaches N*Pi, but I've only managed to compare it to things that go slower, not faster...

So here's my line of reasoning.  Let's say the cosine has a frequency f.  Instead of looking at cos(2*pi*f*n), let's look at the points traced out on the unit circle and see how close they get to the y-axis.  Well, if f is rational then there are only finitely many points, so assume f is irrational.  Then they form a dense subset of the unit circle.  In fact, I suspect that for large N, the first N points should be close to uniformly distributed around the unit circle.  If so, then we would expect that for large N, the point closest to the y-axis is off by an angle of about 2pi/N, which would give a value for cosine of about 2pi/N.

I don't think any irrational value gives a dense orbit, but a full measure set should. In fact I think a full-measure set of f will give you uniform distribution by the Birkhoff ergodic theorem.

The unit circle is compact.  If the frequency is irrational, then the orbit never repeats, and there will be an infinite subset of the unit circle, and therefore it will have an accumulation point.  This means that for any positive epsilion, one can find two points in the orbit whose angles differ by less than epsilon.  But one of these points comes sooner than the other, so this means that there is some N(epsilon) such that if you take a point in the orbit and move forward N(epsilion) steps, then you will have moved forward by this same angle less than epsilon.  It follows that the orbit is dense.

Ahh, of course, nevermind. You're talking about circle rotation (theta -> theta + alpha), and I was thinking of angle k-tupling instead for some reason (theta -> k*theta).
Title: Re: Maths thread.
Post by: SirPeebles on May 12, 2014, 03:57:42 pm
Yeah, I'm thinking of the powers of e^(i*alpha).
Title: Re: Maths thread.
Post by: SirPeebles on May 12, 2014, 05:02:37 pm
This is one of the best pure-math (i.e., no computability or algorithmic considerations) problems I have encountered:

Are there polynomials in two variables p,q such that given f(x,y) = (p(x,y),q(x,y)) f's range is R^2 - {(0,0)}?

That is a nice one.  I like topological proofs.
Title: Re: Maths thread.
Post by: soulnet on May 12, 2014, 05:38:22 pm
That is a nice one.  I like topological proofs.

The only proof I know is not topological.
Title: Re: Maths thread.
Post by: SirPeebles on May 12, 2014, 06:25:57 pm
That is a nice one.  I like topological proofs.

The only proof I know is not topological.

Oh, I see that I made a mistake.
Title: Re: Maths thread.
Post by: pacovf on May 12, 2014, 08:10:41 pm
This is one of the best pure-math (i.e., no computability or algorithmic considerations) problems I have encountered:

Are there polynomials in two variables p,q such that given f(x,y) = (p(x,y),q(x,y)) f's range is R^2 - {(0,0)}?

Does this work? I tend to skip stuff with multivariate problems...

By reductio at absurdo

Let's define F(x,y) = p(x,y)^2+q(x,y)^2

There exists R such that for x^2+y^2 > R^2, F(x,y) > 1. We study the restriction of F to (x,y) such that x^2+y^2 =< R^2

F (restricted) is continuous over a closed space, and admits values arbitrarily close to 0. Hence it reaches 0 at some point, contradiction.

Hence there aren't any such polynomials.


Will we ever get a problem where we actually get to find a counter-example?  :P
Title: Re: Maths thread.
Post by: florrat on May 12, 2014, 08:41:00 pm
There exists R such that for x^2+y^2 > R^2, F(x,y) > 1.
Why?
Title: Re: Maths thread.
Post by: soulnet on May 12, 2014, 09:07:30 pm
Will we ever get a problem where we actually get to find a counter-example?  :P

I won't answer that, but I will just say, your proof is wrong.
Title: Re: Maths thread.
Post by: pacovf on May 12, 2014, 09:13:40 pm
There exists R such that for x^2+y^2 > R^2, F(x,y) > 1.
Why?

Now that you mention it, that is indeed harder to prove than I thought at first (my idea was that even polynomials tend towards infinity, but that doesn't trivially imply what I wrote). Hmmm...

Will we ever get a problem where we actually get to find a counter-example?  :P

I won't answer that, but I will just say, your proof is wrong.

Hmmm... indeed. So, the answer is yes, such a polynomial exists, right?  ;)
I guess that my mistake was the one pointed by florrat?
Title: Re: Maths thread.
Post by: dnkywin on May 13, 2014, 01:02:07 am
Will we ever get a problem where we actually get to find a counter-example?  :P

I won't answer that, but I will just say, your proof is wrong.
Try my problem maybe?  :P I'll post a solution after a while if nobody gets it.
Title: Re: Maths thread.
Post by: Kirian on May 13, 2014, 10:50:38 am
I'm thinking of a number between 1 and 100.  What is it?  Show your work.

I think I'm turning into Ozle.
Title: Re: Maths thread.
Post by: SirPeebles on May 13, 2014, 10:56:18 am
12.7
Title: Re: Maths thread.
Post by: Awaclus on May 13, 2014, 11:48:27 am
I'm thinking of a number between 1 and 100.  What is it?  Show your work.

I think I'm turning into Ozle.
You are Ozle. Or rather, we all are Wandering Winder.
Title: Re: Maths thread.
Post by: pacovf on May 13, 2014, 12:14:20 pm
I am Spartacus.

EDIT: I think we should start a new thread where we could just post any little random tidbit that doesn't deserve its own topic
Title: Re: Maths thread.
Post by: navical on May 13, 2014, 05:41:44 pm
Love this solution, but I think there is a minor bug:
Ah, good point.

I agree your fix does work.

I think the easiest way to define "opposite points" is to draw a line through one point that's otherwise outside the convex hull, then drawing a perpendicular to that, calling that the y-axis and using a point with the highest y-coordinate. But your way is neater.

I did wonder about the complexity of the algorithm, but it's not something I know much about, so thankyou for working it out :) Although the thing I like most about this solution is that it's constructable with straight edge and compass - interesting the different attitudes.
Title: Re: Maths thread.
Post by: liopoil on May 13, 2014, 05:57:18 pm
I'm thinking of a number between 1 and 100.  What is it?  Show your work.
((x^2)-1)/2 where x is the base you are using. Work:

let x represent the base you are using. I interpret that for a number n to be between two numbers a and b means that abs(n-a)=abs(n-b). 1 = 1 base 10 for any base because x^0 always equals 1. 100 is equal to x^2 in any base. In representing numbers in my experience one always uses an integer base (how would a non-integer base work?), and this is clearly a base greater than 1 because you used both 1s and 0s. For any integer greater than 1, x^2>1. That means that for a number n between 1 and x^2, n-1=x^2-n. From there we can get that n = ((x^2)-1)/2.

Ask a silly question and ask for work to be shown, get a silly answer with some sloppy reasoning.
Title: Re: Maths thread.
Post by: soulnet on May 14, 2014, 11:02:56 am
Polynomial's problem actual proof:

p(x,y) = xy - 1
q(x,y) = (xy-1) x^2 - y

Verification is left as exercise for the reader (it is not hard at all).

This is an additional line to make it seem like it might be a proof instead of just the counterexample.


Haha, I made you look
Title: Re: Maths thread.
Post by: SirPeebles on May 14, 2014, 11:19:40 am
Well what do you know.  I didn't think it would be possible, but that works.
Title: Re: Maths thread.
Post by: soulnet on May 14, 2014, 11:51:50 am
Well what do you know.  I didn't think it would be possible, but that works.

For your peace of mind, nobody actually solved it during the contest.
Title: Re: Maths thread.
Post by: pacovf on May 14, 2014, 12:10:45 pm
Well what do you know.  I didn't think it would be possible, but that works.

For your peace of mind, nobody actually solved it during the contest.

I guess you don't know what the logic to construct the counter example is? I'm kinda... unsatisfied, right now.
Title: Re: Maths thread.
Post by: soulnet on May 14, 2014, 12:44:20 pm
I guess you don't know what the logic to construct the counter example is? I'm kinda... unsatisfied, right now.

I don't. And as you can imagine, the dimension and cardinality of the space of counterexamples is the same as the dimension and cardinality of all polynomials, so it is hard to say there is something "special".
Title: Re: Maths thread.
Post by: SirPeebles on May 14, 2014, 02:07:29 pm
Well what do you know.  I didn't think it would be possible, but that works.

For your peace of mind, nobody actually solved it during the contest.

I guess you don't know what the logic to construct the counter example is? I'm kinda... unsatisfied, right now.

A cubic polynomial always has a real root.  So consider px^3 + qx + r = 0. This always has a solution unless both p and q are zero while r is nonzero, so let's just choose r = p+1 to avoid all three being zero.  Solve for q and you find -q = px^2 + r/x.  We want q to be a polynomial, so let's add a new variable y = r/x.  Voila.  Now p = r - 1 = xy - 1, and -q = p x^2 + r/x = (xy - 1) x^2 + y.
Title: Re: Maths thread.
Post by: dominator 123 on May 15, 2014, 10:25:36 am
Well what do you know.  I didn't think it would be possible, but that works.

For your peace of mind, nobody actually solved it during the contest.

I guess you don't know what the logic to construct the counter example is? I'm kinda... unsatisfied, right now.

A cubic polynomial always has a real root.  So consider px^3 + qx + r = 0. This always has a solution unless both p and q are zero while r is nonzero, so let's just choose r = p+1 to avoid all three being zero.  Solve for q and you find -q = px^2 + r/x.  We want q to be a polynomial, so let's add a new variable y = r/x.  Voila.  Now p = r - 1 = xy - 1, and -q = p x^2 + r/x = (xy - 1) x^2 + y.
Or simply the cubic graph ranges from -infinity to infinity so it must cross the line x=0 somewhere.
Title: Re: Maths thread.
Post by: heron on May 15, 2014, 07:21:31 pm
I think I will post a well-known combinatorics question now:

17 students take a 9-question test. For each question on the test, at least 11 students answered the question correctly. Prove there there exist 2 students such that between them they have answered each question correctly.
Title: Re: Maths thread.
Post by: SirPeebles on May 16, 2014, 09:09:15 am
I just read a headline asking whether a certain national health policy would lead to fewer deaths.  I wish news reporters were better at mathing :(

(I'm not giving further details because I don't want a political/policy discussion)
Title: Re: Maths thread.
Post by: Jack Rudd on May 16, 2014, 12:53:50 pm
I think I will post a well-known combinatorics question now:

17 students take a 9-question test. For each question on the test, at least 11 students answered the question correctly. Prove there there exist 2 students such that between them they have answered each question correctly.
With at least 99 correct answers and only 17 students, at least one student must have at least six answers right. Let us concentrate on that student and the three questions he got wrong (if he got 7 or more right, the same types of arguments work but are significantly more trivial to see). Then each of those three questions can only have been got wrong by five of the other students. Even if no two of those students got the same question wrong, that accounts for only fifteen students. The other student therefore got them all right.
Title: Re: Maths thread.
Post by: sudgy on June 16, 2014, 12:12:30 am
(This is probably actually not the best way to go about things, and is half in jest.  You'll see my point at the end.)

Alright, so I decided to try to extend the divisor function σ(n) to the Gaussian Integers.  I realized that the best way to do this is to make it so that only certain numbers can be divisors, because making them all divisors makes the divisor function equal to 0.  After much trial and error, I figured out what would make the best sections.  The two sections are:

Section 1: All numbers in the first and second quadrants of the Cartesian Plane, including the negative reals and not including the positive reals.

Section 2: All numbers in the third and fourth quadrants, including the positive reals and not including the negative reals.

All of the divisors of a Gaussian Integer Z are defined as the Gaussian Integers x in the same section as Z, that, when multiplied by another Gaussian Integer y in the same section, equal Z.

Using this definition, we can find the value of the divisor function for a few different complex numbers:

σ(i) = 0
σ(1 + i) = 0 (I think)
σ(-2i) = (-2i) + (1) + (1 - i) + (2) + (-i) = 4 - 4i
σ(3i) = 0

Wait, let's look at the abundancy at a couple of those.  i and 3i both have an abundancy of 0.  That means they are friendly.  You might not notice, but this has huge ramifications.

...I just proved the existence of imaginary friends.  ;)

(Yes, this was inspired by this xkcd (http://xkcd.com/410/))
Title: Re: Maths thread.
Post by: heron on June 17, 2014, 11:54:15 pm
I am stumped by the following combinatorics question:

In a mathematical competition some competitors are friends. Friendship is always mutual. Call a group of competitors a clique if each two of them are friends. (In particular, any group of fewer than two competitors is a clique.) The number of members of a clique is called its size.

Given that, in this competition, the largest size of a clique is even, prove that the competitors can be arranged into two rooms such that the largest size of a clique contained in one room is the same as the largest size of a clique contained in the other room.

(ISL 2007, Vasily Astakhov)

I have so far tried induction of various forms, none of which proved successful. I also thought that maybe proving the contrapositive would be easier, but it wasn't. My current tactic is to try to create an algorithm to produce the two rooms with equally sized cliques. This path shows some progress, but there are many cases.

Maybe one of you guys will have better luck.
Title: Re: Maths thread.
Post by: DStu on June 18, 2014, 01:33:57 am
"size of a clique contained in one room" is now only the size on the subset of competitors that are in this room, ignoring the other room? Or do you have to place cliques in one room? Obviously not, because in this case the result would be false...
Title: Re: Maths thread.
Post by: florrat on June 18, 2014, 02:47:16 am
This problem is very very hard. I recognize it for being problem IMO 2007-3 (http://imo-official.org/problems.aspx) which should give an indication of the difficulty. (what does ISL mean? IMO shortlist?)

I have never solved this problem, but I've read the solution when I participated in that IMO a couple years back. You indeed construct an algorithm to make the clique sizes equal.
IIRC, you start with everyone in room A, and then send persons to room B one by one. The nice thing about this is that when you send a person from room A to room B, the max clique size in room A goes down by at most one and the max clique size in room B goes up by one. So the only way this can go wrong is when at some point the difference in max clique size is one, and when you send a person to room B which changes the clique size in both rooms. Unfortunately, you cannot avoid this case in general, so you have to do some more work by sending the right people in room B back to room A.
I forgot the details. If you want to know the solution, you can find it here (http://imo-official.org/problems/IMO2007SL.pdf) [pdf].

"size of a clique contained in one room" is now only the size on the subset of competitors that are in this room, ignoring the other room?
Yes
Title: Re: Maths thread.
Post by: heron on June 18, 2014, 07:49:43 pm
This problem is very very hard. I recognize it for being problem IMO 2007-3 (http://imo-official.org/problems.aspx) which should give an indication of the difficulty. (what does ISL mean? IMO shortlist?)

I have never solved this problem, but I've read the solution when I participated in that IMO a couple years back. You indeed construct an algorithm to make the clique sizes equal.
IIRC, you start with everyone in room A, and then send persons to room B one by one. The nice thing about this is that when you send a person from room A to room B, the max clique size in room A goes down by at most one and the max clique size in room B goes up by one. So the only way this can go wrong is when at some point the difference in max clique size is one, and when you send a person to room B which changes the clique size in both rooms. Unfortunately, you cannot avoid this case in general, so you have to do some more work by sending the right people in room B back to room A.
I forgot the details. If you want to know the solution, you can find it here (http://imo-official.org/problems/IMO2007SL.pdf) [pdf].

"size of a clique contained in one room" is now only the size on the subset of competitors that are in this room, ignoring the other room?
Yes

Thanks for the link. Yes, ISL stands for IMO Shortlist. Nested acronyms ftw.

I see that if I had continued down that path I might have finished. Oh well. Maybe if I had used the same style of diagram they used in the solution I would have been able to envision the cases better.

It's cool that you went to IMO though! I hope to be able to go in two years, but I will need to make a lot of improvement.
Title: Re: Maths thread.
Post by: scott_pilgrim on June 18, 2014, 08:15:15 pm
Nested acronyms ftw.

NAF!
Title: Re: Maths thread.
Post by: ConMan on June 18, 2014, 11:29:12 pm
Nested acronyms ftw.

NAF!
I prefer recursive acronyms. For example, TIARA is a recursive acronym.
Title: Re: Maths thread.
Post by: Tables on June 27, 2014, 08:17:12 am
Consider the complete graph on 7 vertices (that is, 7 points, all of which have an edge connecting them to every other point). It has 21 edges. It's possible to pick 7 triangles of 3 edges such that the edges form a triangle, and each edge is part of only one triangle (an example is shown below).

How many different sets of triangles can be picked like this?

(http://i.imgur.com/Xd98DOc.png)

My answer: I made the answer 30, which I think is correct, but I think it's an interesting enough question to have a go at.
Title: Re: Maths thread.
Post by: Kirian on June 27, 2014, 08:40:38 am
OK, strange question: in UK and non-US post-colonies, you shorten "mathematics" to "maths."  Do you also shorten "economics" to "econs"?
Title: Re: Maths thread.
Post by: Kirian on June 27, 2014, 08:44:48 am
Consider the complete graph on 7 vertices (that is, 7 points, all of which have an edge connecting them to every other point). It has 21 edges. It's possible to pick 7 triangles of 3 edges such that the edges form a triangle, and each edge is part of only one triangle (an example is shown below).

How many different sets of triangles can be picked like this?

My answer: I made the answer 30, which I think is correct, but I think it's an interesting enough question to have a go at.

Do rotations and reflections count as unique sets?  I'm assuming not, but maybe you counted them.
Title: Re: Maths thread.
Post by: navical on June 27, 2014, 08:46:34 am
OK, strange question: in UK and non-US post-colonies, you shorten "mathematics" to "maths."  Do you also shorten "economics" to "econs"?
If it gets shortened at all, it would be "econ", but I've not really heard that from people other than economics students (or at least, students who study some economics)
Title: Re: Maths thread.
Post by: Tables on June 27, 2014, 09:03:33 am
Consider the complete graph on 7 vertices (that is, 7 points, all of which have an edge connecting them to every other point). It has 21 edges. It's possible to pick 7 triangles of 3 edges such that the edges form a triangle, and each edge is part of only one triangle (an example is shown below).

How many different sets of triangles can be picked like this?

My answer: I made the answer 30, which I think is correct, but I think it's an interesting enough question to have a go at.

Do rotations and reflections count as unique sets?  I'm assuming not, but maybe you counted them.

Yes, provided it's actually unique and not just a recolouring (e.g. if you'd be rotating/reflecting in a way that made the 7 same triangles I did but with different colours, that doesn't count).

OK, strange question: in UK and non-US post-colonies, you shorten "mathematics" to "maths."  Do you also shorten "economics" to "econs"?

I don't think I've ever heard economics shortened, but econ would seem the natural way to shorten it if it were.
Title: Re: Maths thread.
Post by: Kirian on June 27, 2014, 10:56:02 am
Consider the complete graph on 7 vertices (that is, 7 points, all of which have an edge connecting them to every other point). It has 21 edges. It's possible to pick 7 triangles of 3 edges such that the edges form a triangle, and each edge is part of only one triangle (an example is shown below).

How many different sets of triangles can be picked like this?

My answer: I made the answer 30, which I think is correct, but I think it's an interesting enough question to have a go at.

Do rotations and reflections count as unique sets?  I'm assuming not, but maybe you counted them.

Yes, provided it's actually unique and not just a recolouring (e.g. if you'd be rotating/reflecting in a way that made the 7 same triangles I did but with different colours, that doesn't count).

Let me rephrase: Your solution contains triangles 123, 145, 167, 246, 257, 347, and 357.  A tau/7 rotation clockwise is the set of triangles 234, 256, 127, 357, 136, 145, and 146.

If these are unique solutions, then you've provided seven solutions with your diagram, because it doesn't have sevenfold symmetry.  Is it correct that your diagram is really seven unique solutions?

Title: Re: Maths thread.
Post by: sudgy on June 27, 2014, 03:13:40 pm
Consider the complete graph on 7 vertices (that is, 7 points, all of which have an edge connecting them to every other point). It has 21 edges. It's possible to pick 7 triangles of 3 edges such that the edges form a triangle, and each edge is part of only one triangle (an example is shown below).

How many different sets of triangles can be picked like this?

(http://i.imgur.com/Xd98DOc.png)

My answer: I made the answer 30, which I think is correct, but I think it's an interesting enough question to have a go at.

I remember my mathbook last year had a formula for this, but I can't remember it...
Title: Re: Maths thread.
Post by: heron on June 27, 2014, 03:17:59 pm
I agree with Tables' answer.
Title: Re: Maths thread.
Post by: soulnet on June 28, 2014, 02:44:49 am
I agree with Kirian's request for clarification. Are the nodes labeled or indistinguishable? Rotations and symmetry in graphs are strange, because it is not just rotating and symmetry, since the topology is not geometric.
Title: Re: Maths thread.
Post by: florrat on June 28, 2014, 08:42:47 am
Assuming the two colorings Kirian gives count as different solutions, I get -135- colorings (I can write an explanation later)
Title: Re: Maths thread.
Post by: silverspawn on June 28, 2014, 10:19:12 am
i have this task I'm struggling with. I'm sure I can selfishly abuse this thread to get some help... right?

so the growth rate of a plant is proportional to its height and anti proportional to the third power (do you say it like that?) of the time passed. the height is y and y(1) = 5.

so I made the equation y'(t) = y * 1/t³ * K

and I have this formula that says
Quote
y' = g(t)*h(y) => INTEGRAL(1/h(y)) = INTEGRAL(g(t))

so i define g(t) := K/t³ and h(y) := y, and use the formula and then I get

INTEGRAL(1/y) = INTEGRAL(1/t³*K)
and so
ln(y) = K * (-1/2 (t^-2)) | e^
y = e^(-1/2 K*(t^-2))

so y(1) = e^(-1/2K) = 5 | ln
-1/2 K = ln(5) | *(-2)
K = -2ln(5)

and so

y(t) = e^[-1/2(-2ln(5)) * t^-2)]
y(t) = [e^(ln(5))]^(t^-2)
y(t) = 5^(t^-2)
y(t) = 5^(1/t²)

so the plant has infinite height right after it spawns and then shrinks really fast? that doesn't sound right  ???
Title: Re: Maths thread.
Post by: Kirian on June 28, 2014, 10:34:13 am
Assuming the two colorings Kirian gives count as different solutions, I get -135- colorings (I can write an explanation later)

If all seven rotations are unique, the final answer has to be divisible by 7, doesn't it?
Title: Re: Maths thread.
Post by: pacovf on June 28, 2014, 11:32:30 am
i have this task I'm struggling with. I'm sure I can selfishly abuse this thread to get some help... right?

so the growth rate of a plant is proportional to its height and anti proportional to the third power (do you say it like that?) of the time passed. the height is y and y(1) = 5.

so I made the equation y'(t) = y * 1/t³ * K

and I have this formula that says
Quote
y' = g(t)*h(y) => INTEGRAL(1/h(y)) = INTEGRAL(g(t))

so i define g(t) := K/t³ and h(y) := y, and use the formula and then I get

INTEGRAL(1/y) = INTEGRAL(1/t³*K)
and so
ln(y) = K * (-1/2 (t^-2)) | e^
y = e^(-1/2 K*(t^-2))

so y(1) = e^(-1/2K) = 5 | ln
-1/2 K = ln(5) | *(-2)
K = -2ln(5)

and so

y(t) = e^[-1/2(-2ln(5)) * t^-2)]
y(t) = [e^(ln(5))]^(t^-2)
y(t) = 5^(t^-2)
y(t) = 5^(1/t²)

so the plant has infinite height right after it spawns and then shrinks really fast? that doesn't sound right  ???

Setting t = 0 doesn't make any sense because of your differential equation. It spawns at t = 1 (or t0 =/= 0, whatever) in the model you are using, so it has a limited height when it "spawns". And for t very large, the plant is actually decreasing in size very slowly...

On the other hand, if you choose y(t0) <  1, K becomes positive. Your plant then increases in size, but never getting larger than 1. I would guess that makes more intuitive sense (since we are working in arbitrary units, you can choose 1 to be anything you like with the relevant rescaling).
Title: Re: Maths thread.
Post by: Kirian on June 28, 2014, 11:34:09 am
Silverspawn, the problem as given needs a second initial condition; you've forgotten to introduce a constant of integration, but once you have that there's no second initial condition.

Are we supposes to assume that y(0)=0?
Title: Re: Maths thread.
Post by: pacovf on June 28, 2014, 11:38:12 am
Silverspawn, the problem as given needs a second initial condition; you've forgotten to introduce a constant of integration, but once you have that there's no second initial condition.

Are we supposes to assume that y(0)=0?

AFAIK, he's not missing any condition. It's a first order differential equation, one condition is enough. His integration is somewhat dirty (lacks integration constant indeed), but the result is correct.
inb4 I am showed the error in my ways.

y(0) = 0 is not a very interesting case though :P
Title: Re: Maths thread.
Post by: Kirian on June 28, 2014, 11:45:29 am
Silverspawn, the problem as given needs a second initial condition; you've forgotten to introduce a constant of integration, but once you have that there's no second initial condition.

Are we supposes to assume that y(0)=0?

AFAIK, he's not missing any condition. It's a first order differential equation, one condition is enough.
inb4 I am showing the error in my ways.

y(0) = 0 is not a very interesting case though :P

Then it's not a completely defined equation... because we don't know the initial rate.  We have y' = ky/t^3 and not y' = y/t^3
Title: Re: Maths thread.
Post by: WalrusMcFishSr on June 28, 2014, 11:46:06 am
i have this task I'm struggling with. I'm sure I can selfishly abuse this thread to get some help... right?

so the growth rate of a plant is proportional to its height and anti proportional to the third power (do you say it like that?) of the time passed. the height is y and y(1) = 5.

so I made the equation y'(t) = y * 1/t³ * K

and I have this formula that says
Quote
y' = g(t)*h(y) => INTEGRAL(1/h(y)) = INTEGRAL(g(t))

so i define g(t) := K/t³ and h(y) := y, and use the formula and then I get

INTEGRAL(1/y) = INTEGRAL(1/t³*K)
and so
ln(y) = K * (-1/2 (t^-2)) | e^
y = e^(-1/2 K*(t^-2))

so y(1) = e^(-1/2K) = 5 | ln
-1/2 K = ln(5) | *(-2)
K = -2ln(5)

and so

y(t) = e^[-1/2(-2ln(5)) * t^-2)]
y(t) = [e^(ln(5))]^(t^-2)
y(t) = 5^(t^-2)
y(t) = 5^(1/t²)

so the plant has infinite height right after it spawns and then shrinks really fast? that doesn't sound right  ???

It's been a while, but I'll try...

I think part of the problem is after

INTEGRAL(1/y) = INTEGRAL(1/t³*K)

we need an integration constant C. So

ln(y) = K * (-1/2 (t^-2)) + C

or going to the more usual way

y = C * e^(-1/2 K*(t^-2))

The problem is I'm not sure you can solve C and K at the same time without some extra information. Even with y(1)=5 you get different answers for different values of K.

Solving in terms of K you end up with a solution like

y = 5e ^ ((K * (t^2 - 1)) / 2t^2)

which for positive K gives a behavior more like what you'd expect for a plant. You might want to wait for one of the real mathematicians to chime in though.

PPE: I agree with Kirian
Title: Re: Maths thread.
Post by: Tables on June 28, 2014, 11:48:43 am
I agree with Kirian's request for clarification. Are the nodes labeled or indistinguishable? Rotations and symmetry in graphs are strange, because it is not just rotating and symmetry, since the topology is not geometric.

Yeah, sorry, I knew it wasn't entirely clear, I hoped numbering the vertices made it clearer but apparently not. The two examples Kirian gave would be distinct.

Assuming the two colorings Kirian gives count as different solutions, I get -135- colorings (I can write an explanation later)

If all seven rotations are unique, the final answer has to be divisible by 7, doesn't it?

No, not necessarily. Some rotations could give solutions that had already been counted, I believe.

(Also I'm just going to throw this here, how I came up with the question. I'm currently playing a game called Xenoblade Chronicles, for about the 10th time, and it has 7 playable characters. You always have 3 active characters at a time, which are the ones who participate in battles and stuff. I noticed you could form 7 parties of characters such that everyone was in a party with everyone else, exactly once. I then started wondering how many possible ways you could arrange the people into 7 battle parties, as above. And so the question was born. Hopefully if you get what I'm saying here you'll also get what things I'm looking for that count and what doesn't).
Title: Re: Maths thread.
Post by: sudgy on June 28, 2014, 11:49:19 am
Here's an integral symbol for you all to be able to copy and paste: ∫

(I'm getting tired of seeing INTEGRAL everywhere)
Title: Re: Maths thread.
Post by: Tables on June 28, 2014, 11:54:22 am
Here's an integral symbol for you all to be able to copy and paste: ∫

(I'm getting tired of seeing INTEGRAL everywhere)

Nice, thanks. This seems integral to keeping the thread readable.
Title: Re: Maths thread.
Post by: SirPeebles on June 28, 2014, 11:55:29 am
Here's an integral symbol for you all to be able to copy and paste: ∫

(I'm getting tired of seeing INTEGRAL everywhere)

Nice, thanks. This seems integral to keeping the thread readable.

 ::) I knew sum one would make that joke.
Title: Re: Maths thread.
Post by: pacovf on June 28, 2014, 11:55:48 am
y' = dy/dt = K*y/t3

=> dy/y = K * dt/t3  (yes yes physicists are eeevil)

=> ∫y(1)y(t) dy/y = ∫1t K*dt/t3

=> ln(y(t)/y(1)) = K/2 * (1-1/t2)

Somehow when I did this in my mind knowing y(1) actually helped me find K. So once again I bow to the wisdom of Kirian.
I stand by my previous result that you need K positive to get a sensible progression for the plant, though.

EDIT: groan...
Title: Re: Maths thread.
Post by: SirPeebles on June 28, 2014, 11:58:05 am
I think we've given plenty of hints towards how to do his homework problem already, we don't need to present a detailed write up.
Title: Re: Maths thread.
Post by: silverspawn on June 28, 2014, 01:10:14 pm
I think we've given plenty of hints towards how to do his homework problem already, we don't need to present a detailed write up.
it's not a homework. i've had maths 2 semesters ago, but the lecture was at 8am, and i wasn't capable of standing up at 6am regularly, so I stopped visiting it at some point, and then I didn't want to visit it again because I had already skipped too many lectures (and the lecture was kind of bad too); now I want to write the exam at the end of this semester. unfortunately, I now have just a script to learn from.

which means I don't have get something done or anything, I just need to be able to do it properly.


I think what you're supposed to do is not calculate K but do it relative to K instead, like so

Quote
Solving in terms of K you end up with a solution like

y = 5e ^ ((K * (t^2 - 1)) / 2t^2)

which for positive K gives a behavior more like what you'd expect for a plant. You might want to wait for one of the real mathematicians to chime in though.

based on how it's formulated

thanks *)
Title: Re: Maths thread.
Post by: florrat on June 28, 2014, 06:06:22 pm
[note: spoilers for triangle puzzle below]

@silverspawn: Not sure if the integral problem was already sorted out completely, but Kirian is right, you need an constant of integration. So the equation you get is (ln is for barbarians, I use log with base e):

log(y) = K * (-1/2 (t^-2)) + C

(note that you only need a constant on one side of the equation, since if you have constants on both sides, you could just define a new constant as the difference between the two constants you had, and use that instead)

Now you want to use the information y(1) = 5 to eliminate the constant C, and then you'll be able to get a formula

y(t) = *something which depends on t and K*

If all seven rotations are unique, the final answer has to be divisible by 7, doesn't it?
As Tables said, some solutions will be rotated to themselves. However, this is only possible if every rotation of that solution will be identical to it.

[sidenote]You can see this as follows. Suppose that if by rotating 3 times (3/7tau) you get to the same solution, then if you rotate 3*5 times, you'll get to the same solution as well (because you did 3 rotations 5 times, which doesn't change anything), but rotating 15 times is the same as rotating once. And if rotating once doesn't change anything, any rotation doesn't change anything. On a more technical note: the reason is that since 7 is prime, (Z/7Z,+) is a group.[/sidenote]

Indeed, there are two solutions which are rotated to themselves, namely:
124 and its rotations (124,235,346,457,561,672,713)
134 and its rotations (134,245,356,467,571,612,723)
And the remaining number of solutions - 133 - is indeed divisible by 7.

---

Back to the original puzzle, to see that the answer is 135, consider the following. First note that the problem is equivalent to finding the number of ways to pick 7 triangles such that no two triangles have 2 nodes in common (since a triangle has an edge in common if and only if it has 2 nodes in common).

For convenience we don't have names for the 7 nodes yet. Pick two arbitrary nodes, and call them node 1 and node 2. First let's see how many ways there are to put node 1 in three triangles with the other six nodes. There has to be a triangle with both nodes 1 and 2, and there are 5 possibilities for that. Call the third node of this triangle node 3, and call the other four nodes 4-7 in any order. For the triangle with both nodes 1 and nodes 4, there are 3 possibilities (by picking any of nodes 5-7), and for the remaining triangle with 1 as node there's just 1 possibility (picking the remaning two nodes).

Now every node other than node 1 still needs two more triangles. Let's focus on node 2, which still needs triangles with nodes 4,5,6,7. There are 3 ways to split these four nodes in two groups of two nodes, which is the number of ways to pick the remaining two triangles containing node 2. Also node 3 needs two more triangles with nodes 4,5,6,7, so there are also 3 possibilities for that.

In total there are 5*3*3*3=135 possible colorings.
Title: Re: Maths thread.
Post by: heron on June 28, 2014, 10:12:04 pm
Now every node other than node 1 still needs two more triangles. Let's focus on node 2, which still needs triangles with nodes 4,5,6,7. There are 3 ways to split these four nodes in two groups of two nodes, which is the number of ways to pick the remaining two triangles containing node 2.

Except, one of the ways you split those four nodes will result in a triangle with two nodes that were used in one of the triangles with node one.
(e.g. if 145 is a triangle, then then the other triangles with node 2 must be 246 and 257 or 247 and 256, but not 245 and 267.)
So, in fact there are just two ways to pick the remaining two triangles for node 2.

Similarly, there is just 1 way to pick all of the remaining triangles, so I stand by my answer of thirty.
Title: Re: Maths thread.
Post by: florrat on June 29, 2014, 02:39:56 pm
That's a good point, I stand corrected.
Title: Re: Maths thread.
Post by: heron on July 08, 2014, 11:58:51 pm
Well, the problems for day 1 of the international mathematical olympiad are released today. http://www.artofproblemsolving.com/Forum/resources.php?c=1&cid=16&year=2014&sid=e94cbd1547c0c955ad8ef37cf50e71a0

I solved #1 and #2 (with some help from friends) in just under 2 hours, and am reasonably sure that I could solve #3 with complex numbers in the remaining 150 minutes if I were actually participating in the IMO, but it did not sound very fun to do for practice. I guess I will try to see if I can bash out that solution tomorrow.

I think that the problems are relatively easy for the IMO though, especially #2. What do you guys think?
Title: Re: Maths thread.
Post by: SirPeebles on July 29, 2014, 03:02:29 pm
(http://www.somethingofthatilk.com/comics/503.png)
Title: Re: Maths thread.
Post by: Kirian on July 29, 2014, 03:30:51 pm
...because they're uncountable?
Title: Re: Maths thread.
Post by: Joseph2302 on September 26, 2014, 12:37:15 pm
I reckon P=NP, would be so cool if it did.
Title: Re: Maths thread.
Post by: florrat on November 28, 2014, 06:34:07 pm
(continued from discussion in random stuff thread)
Mathematicians rarely prove things in a logic where proof-checking is decidable. They prove things in some form of intuitionisitic logic, usually with higher-order functions. SOME (possibly most, but I don't know) of those proofs COULD be translated into a proof in a logical system with computable proof-checking available, but (almost) nobody does it. And few people care enough to even have a sentence that says "this proof can *clearly* be made using this amount of logical power, so, we are cool".
Can you elaborate what you mean with the first sentence? Can you give a specific undecidable logic where you think mathematicians work in?
I think most mathematician have faith that both their theorems and their proofs can be encoded in - for example - ZFC in classical first order logic, which is AFAIK the most accepted foundation of mathematics under mathematicians. Checking a formal proof in this logic is super decidable (I think linear in the length of the proof). Higher-order logics (intuitionistic or not) can also be decidable, such as the intentional Martin-Löf type theory (http://ncatlab.org/nlab/show/intensional+type+theory#Decidability). True, extensional type theory is undecidable, but I'm claiming that mathematicians rarely work specifically in extensional type theory (if only because they don't specify in which logic they work, and hence their informal proof can be formalized in many logics, some of which are decidable).

Or are you talking about another problem: translating mathematical proofs on paper accepted by other mathematicians to rigorous formal proofs in some (decidable) logic? I agree that such a translation is infeasibly hard, but I think this problem is too vague to say that it is undecidable. I think that if a proof contains enough details, it should be possible to translate it into a formal proof. This is what happens with proof assistants all the time.
There is some value in the generalization, of course, which is mostly connecting things that were seemingly disconnected. My point is that there is also a loss in value because the proof done directly on the subject at hand is much more illustrating on the phenomena the person reading the theorem is interested in. So, my point is not that category theory is useless (although I think category theory is a drug at this point, kind of like string theory for mathematicians), but that it is over-praised as the ultimate tool and even the only thing that is worthy (or legit...).

So, to come back to my original post, more general is not always better. I agree with you that it is sometimes better and I would add that it is usually incomparable.

Caveat + example: My very first paper on my PhD topic is a simple combinatorial proof of a fact that was already known, but required to combine more general results from three different papers. Doing that lead to the ability to produce results for similar scenarios which an author of one of those papers was unable to get despite working in the question for some time.
I agree that a simple elementary proofs has a lot of merits. However, I do prefer a simple general proofs over complicated elementary proofs. And it is pretty common that a proof becomes simpler in a general setting. For example in category theory, there's often just one thing you can do in a proof, which makes proofs not that hard to find. More specifically about category theory: I'm neither saying that it is "the ultimate tool" or that it's the only worthy thing. However, I do think it's a very useful and very important tool. You might be interested in this (short) answer (http://math.stackexchange.com/questions/810706/examples-of-useful-category-theory-results/810736#810736) on stackexchange which gives examples where category theory has been useful for other fields of mathematics.

And yes, in the end, a general theory is not strictly better, so a more general and a less general theory are incomparable, but I think the more general theory is better in 9 out of 10 aspects.
Title: Re: Maths thread.
Post by: soulnet on November 29, 2014, 12:41:01 pm
Can you elaborate what you mean with the first sentence? Can you give a specific undecidable logic where you think mathematicians work in?
http://en.wikipedia.org/wiki/Higher-order_logic

I think most mathematician have faith that both their theorems and their proofs can be encoded in - for example - ZFC in classical first order logic, which is AFAIK the most accepted foundation of mathematics under mathematicians.
My point is precisely that most mathematicians (barring those working in logic) do not. They usually do things like "let f be a function" or "consider the smallest subset such that", and those are second-order logic statements. And in category theory it is probably worse, as you are constantly using functions as the domain of functions, which takes you to third-order already, and then you are done with full-decidability.

First order is extremely weak, you cannot even define the natural numbers or the real numbers with it.

One possible thing is that all the proofs that use higher-order logic can be translated into weaker logics. That seems completely plausible to me. However, it would be extremely difficult to do, and quite likely, a waste of time. I don't care that math works by consensus, I actually like that it behaves like this, I like math being a science.

Checking a formal proof in this logic is super decidable (I think linear in the length of the proof). Higher-order logics (intuitionistic or not) can also be decidable, such as the intentional Martin-Löf type theory (http://ncatlab.org/nlab/show/intensional+type+theory#Decidability). True, extensional type theory is undecidable, but I'm claiming that mathematicians rarely work specifically in extensional type theory (if only because they don't specify in which logic they work, and hence their informal proof can be formalized in many logics, some of which are decidable).

Any FOL with finitely many symbols is decidable. I never thought about linearity, but I guess you are probably right (if you count as "length of the proof" the sum of the lengths of each step). However, the size of a formal proof in an extension of a formal system like SP is probably enormous compared with the actual proof people write in a paper using a mixture of higher-order symbols (like functions) and natural language. Any quantification I can make here is no better than a wild guess, but if someone proofs that actual theorems can be proof with manageable-size proofs in a formal decidable system I would be amazed.

Or are you talking about another problem: translating mathematical proofs on paper accepted by other mathematicians to rigorous formal proofs in some (decidable) logic? I agree that such a translation is infeasibly hard, but I think this problem is too vague to say that it is undecidable. I think that if a proof contains enough details, it should be possible to translate it into a formal proof. This is what happens with proof assistants all the time.

I guess this is kind-of answered above. I think the problem is unfeasible hard even for computer/human teams.

You might be interested in this (short) answer (http://math.stackexchange.com/questions/810706/examples-of-useful-category-theory-results/810736#810736) on stackexchange which gives examples where category theory has been useful for other fields of mathematics.

I may get to read that eventually. I have some grasp on category theory: my best friend and two other friends did their masters' thesis on it, and two of them are currently finishing their PhDs on it as well. I was never too impressed I am afraid. That being said, with the current immense subdivision of fields of math, is hard to be really impressed by anything in which you are not an expert, so that's not really a meaningful statement. I am not claiming that category theory is worthless, I just think that people are too eager for an all-encompassing theory of things that they will praise anything that sounds like it may be it. I believe such a thing does not exist, and moreover, we are getting far away from it. And I don't think there is a problem with that. Gödel, man. Same thing will likely happen at every level.

And yes, in the end, a general theory is not strictly better, so a more general and a less general theory are incomparable, but I think the more general theory is better in 9 out of 10 aspects.

I probably disagree with you in which constitutes an "aspect".
Title: Re: Maths thread.
Post by: florrat on November 30, 2014, 01:06:30 am
http://en.wikipedia.org/wiki/Higher-order_logic
But is proof checking undecidable in higher order logic? I tried to google it, but didn't find anything meaningful. The only thing the wikipedia article states about undecidability is about higher order unification, which is not needed to check a fully annotated proof.

My point is precisely that most mathematicians (barring those working in logic) do not. They usually do things like "let f be a function" or "consider the smallest subset such that", and those are second-order logic statements.
First order is extremely weak, you cannot even define the natural numbers or the real numbers with it.
In set theory (in particular first order ZFC) all these statements can be expressed in first order logic. "f is a function from A to B" can be defined as "f is a subset of the cartesian product A * B and for all a in A there is a unique b in B such that the ordered pair (a,b) is in f." All these notions themselves can be also defined until you only have elementhood as primitive notion (and of course the logical notions (connectives and quantifiers)). After this, you can use this to quantify over functions, and similarly for subsets. And (of course) you can define the real numbers and natural numbers in set theory.

I guess this is kind-of answered above. I think the problem is unfeasible hard even for computer/human teams.
Well, if you allow humans, this already happens today. Proofs are provided by a human to a computer program called a proof assistant, which can then fill in the remaining gaps, and produce a formal proof. This is called interactive theorem proving, and I'm currently doing a PhD related to this :-) It currently is much more work to write down a proof which will be accepted by the proof assistant than it is to write a proof on paper (hopefully this will change in the future).
However, many impressive results have already been formally proved this way. Perhaps most notably the Kepler conjecture (http://en.wikipedia.org/wiki/Kepler_conjecture), which asks what is the densest way to place spheres in space. This problem has been open for almost 400 years, until Thomas Hales claimed he found a proof in 1998. However, this proof was so complicated (and involved a lot of calculations performed by a computer) that it could not be verified by other mathematicians. Since then Hales has worked on a formalization in a proof assistant, which he completed this summer.

These proof assistants can output a formal proof. Usually those logical systems are more complicated than just first (or higher) order logic (allowing things like definitions or inductively defined structures), but it is definitely a logical system you can write down in a couple of pages, and which has decidable proof checking.

I just think that people are too eager for an all-encompassing theory of things that they will praise anything that sounds like it may be it. I believe such a thing does not exist, and moreover, we are getting far away from it. And I don't think there is a problem with that. Gödel, man. Same thing will likely happen at every level.
Yeah, people tend to advocate too much for they like or belief in, including mathematical foundations. I also don't think there is a unique "best" foundation.
Title: Re: Maths thread.
Post by: qmech on November 30, 2014, 05:04:28 am
Well, if you allow humans, this already happens today. Proofs are provided by a human to a (computer program called a) proof assistant, which can then fill in the remaining gaps, and produce a formal proof. This is called a PhD student.

is how I expected this to go.

Title: Re: Maths thread.
Post by: blueblimp on November 30, 2014, 10:11:47 am
However, many impressive results have already been formally proved this way. Perhaps most notably the Kepler conjecture (http://en.wikipedia.org/wiki/Kepler_conjecture), which asks what is the densest way to place spheres in space. This problem has been open for almost 400 years, until Thomas Hales claimed he found a proof in 1998. However, this proof was so complicated (and involved a lot of calculations performed by a computer) that it could not be verified by other mathematicians. Since then Hales has worked on a formalization in a proof assistant, which he completed this summer.
Cool. I knew of formal proof methods being applied to the Four Colour Theorem, which states that any planar graph may have its faces coloured with four colors such that no two adjacent faces have the same colour. That is a similar situation in that the theorem was reduced to a bunch of computational case checking.

Here's a crazy idea I had related to proof assistants. There are many online programming contests, such as Topcoder, where you're asked to write program solving some algorithmic problem. An analogous competition wouldn't be feasible for math proofs, because the solutions require human judging, which would be impractical at that scale. An automated proof checker could fix that problem by allowing automated checking of the proofs, at the cost of requiring competitors to write formal proofs.

My question is whether there's a formal proof system that would be appropriate for that application. The main requirement would be that formalizing the proof, once you're familiar with the proof system, needs to be significantly easier than thinking of the informal proof in the first place. For example, ideally an hour or so would be enough for a skilled competitor to solve and formalize a problem of difficulty comparable to an easy Putnam problem. Is there any system capable of that today?
Title: Re: Maths thread.
Post by: florrat on November 30, 2014, 05:41:20 pm
Yes, the Four Colour Theorem is also an impressive result that has been formally proven in a proof assistant.

I'm afraid that currently, you'll have no chance to give a proof in a proof assistant in similar time to giving it on paper. The problem is just that you have to give much more detail in the proof assistant. You can call some automated procedures for some basic steps, but it doesn't come near the steps mathematicians leave out in written proofs. To give you a rough idea about which level of detail is required, see for example this proof (http://en.wikipedia.org/wiki/Isabelle_(proof_assistant)#Example_proof) that the square root of 2 is not rational.

Still, it would be a pretty cool idea. It would be already feasible to do now, but currently you'll be mostly checking how well someone can formalize proofs in a proof assistant, rather than how well someone can come up with the proofs in the first place.
Title: Re: Maths thread.
Post by: Trogdor the Burninator on November 30, 2014, 08:50:47 pm
How did the constipated mathematician solve his problem?
He worked it out with a pencil...

Title: Re: Maths thread.
Post by: AndrewisFTTW on December 01, 2014, 02:39:26 pm
How did the constipated mathematician solve his problem?
He worked it out with a pencil...

Where's the "unsubscribe" button?
Title: Re: Maths thread.
Post by: Trogdor the Burninator on December 03, 2014, 11:39:35 am
How did the constipated mathematician solve his problem?
He worked it out with a pencil...

Where's the "unsubscribe" button?

Mwa ha ha! Trogdor strikes again!!
Title: Re: Maths thread.
Post by: sudgy on December 03, 2014, 05:12:33 pm
I always feel amazing when I figure out some new (for me) math thing on my own...  I just realized that the derivative of the volume of a sphere is the surface area of the sphere...  I have no idea of the implications, but it's still really cool.
Title: Re: Maths thread.
Post by: liopoil on December 03, 2014, 05:17:49 pm
I always feel amazing when I figure out some new (for me) math thing on my own...  I just realized that the derivative of the volume of a sphere is the surface area of the sphere...  I have no idea of the implications, but it's still really cool.
That's true?

Let's see.... 4/3 pi r^3.... 4 pi r^2.

Is 4 pi r^2 the surface area of a sphere? I honestly don't know. If so, that is pretty cool.

Now that I think about it, the same is true for a circle; the derivative of pi r^2 is 2 pi r.

Is it true for an n-sphere? I don't know why you would ever take the derivative of a volume anyway though.
Title: Re: Maths thread.
Post by: WalrusMcFishSr on December 03, 2014, 05:19:55 pm
Yep...it makes perfect sense if you think about "growing" a sphere by stacking lots of thin shell "surface areas" on each other.
Title: Re: Maths thread.
Post by: Kirian on December 03, 2014, 05:25:14 pm
I always feel amazing when I figure out some new (for me) math thing on my own...  I just realized that the derivative of the volume of a sphere is the surface area of the sphere...  I have no idea of the implications, but it's still really cool.
That's true?

Let's see.... 4/3 pi r^3.... 4 pi r^2.

Is 4 pi r^2 the surface area of a sphere? I honestly don't know. If so, that is pretty cool.

Now that I think about it, the same is true for a circle; the derivative of pi r^2 is 2 pi r.

Is it true for an n-sphere? I don't know why you would ever take the derivative of a volume anyway though.

The volume of an n-sphere is the integral from 0 to r of the surface area (concentric spherical shells).

So the answers are yes, and, you wouldn't, but you'd integrate the surface area.
Title: Re: Maths thread.
Post by: Kirian on December 03, 2014, 05:25:50 pm
And, ninja'd.
Title: Re: Maths thread.
Post by: soulnet on December 03, 2014, 06:33:04 pm
But is proof checking undecidable in higher order logic? I tried to google it, but didn't find anything meaningful. The only thing the wikipedia article states about undecidability is about higher order unification, which is not needed to check a fully annotated proof.
I guess I always thought unification < proof checking because, you know, who fully annotates proofs? I guess fully annotated proof checking is always computable in a "reasonable" proof system, because that is a pretty good definition for the intuitive idea of a "reasonable" proof system.

In set theory (in particular first order ZFC) all these statements can be expressed in first order logic. "f is a function from A to B" can be defined as "f is a subset of the cartesian product A * B and for all a in A there is a unique b in B such that the ordered pair (a,b) is in f." All these notions themselves can be also defined until you only have elementhood as primitive notion (and of course the logical notions (connectives and quantifiers)). After this, you can use this to quantify over functions, and similarly for subsets. And (of course) you can define the real numbers and natural numbers in set theory.
Maybe we have different ideas of what a "definition" entails. For me, if your definition accept non-standard models (i.e., models other than isomorphisms of the idea you have in your head), then, it is not a good definition. And I think any first order theory that includes the natural numbers always accepts non-standard models (and similarly for the reals).

These proof assistants can output a formal proof. Usually those logical systems are more complicated than just first (or higher) order logic (allowing things like definitions or inductively defined structures), but it is definitely a logical system you can write down in a couple of pages, and which has decidable proof checking.

I did not know it was a common practice to "re-prove" things with proof assistants. I knew about the four color theorem case and I have heard recently of the Kepler conjecture in the "news", but not that it was widely done. I am still willing to bet it is only a negligible percentage of the theorems done (and with good reason).

I also don't think there is a unique "best" foundation.

How about this one (http://en.wikipedia.org/wiki/Foundation_series)?
Title: Re: Maths thread.
Post by: qmech on December 04, 2014, 04:06:58 am
Maybe we have different ideas of what a "definition" entails. For me, if your definition accept non-standard models (i.e., models other than isomorphisms of the idea you have in your head), then, it is not a good definition. And I think any first order theory that includes the natural numbers always accepts non-standard models (and similarly for the reals).

Yes, that's Löwenheim–Skolem (https://en.wikipedia.org/w/index.php?title=Löwenheim–Skolem_theorem).  And I'm not sure how disturbing I find it.  At least everything you can prove about the natural numbers is true there.

I always feel amazing when I figure out some new (for me) math thing on my own...  I just realized that the derivative of the volume of a sphere is the surface area of the sphere...  I have no idea of the implications, but it's still really cool.

This hints at why the similarity of the notation ∂A for the boundary of a set A to a derivative is not entirely coincidental.
Title: Re: Maths thread.
Post by: heron on January 02, 2015, 08:28:27 pm
Here's a classic problem:

What is the least prime factor of 63^128 + 1?
No cheating with computers please!

Edit: Um, made an error here. More difficult version found a few posts below.

Title: Re: Maths thread.
Post by: silverspawn on January 02, 2015, 09:14:43 pm
Here's a classic problem:

What is the least prime factor of 63^128 + 1?
No cheating with computers please!

Moat?
Title: Re: Maths thread.
Post by: liopoil on January 02, 2015, 09:26:09 pm
Here's a classic problem:

What is the least prime factor of 63^128 + 1?
No cheating with computers please!
Does this work?

63 = 7*3^2, so 63^128 + 1 = 7^128*3^256 + 1

The last digits of powers of 3 are 3, 9, 7, 1, repeat. 256 is divisible by 4 so the power of 3 term ends in 1.

The last digits of powers of 7 end in 7, 9, 3, 1, repeat. 128 is divisible by 4 so the power of 7 term ends in 1. Their product must also end in 1 then. Add one and the expression ends in 2. Therefore the number is divisible by 2, which is the smallest prime that there is. So the answer is 2.
Title: Re: Maths thread.
Post by: heron on January 02, 2015, 09:56:31 pm
Oh whoops, made an error with the problem. Um, we'll call that easy mode. But yea, liopoil has it right.
Okay, hard mode:

What is the least prime factor of 252^128 + 1?
Title: Re: Maths thread.
Post by: liopoil on January 02, 2015, 10:30:31 pm
Oh whoops, made an error with the problem. Um, we'll call that easy mode. But yea, liopoil has it right.
Okay, hard mode:

What is the least prime factor of 252^128 + 1?
So, uhh, the last digit is 7... and so the least prime factor is at the lowest 11...

252 is 10 mod 11. 10^128 + 1 is 127 0s with 1s at either end, so odd number of digits and the 1s are both in 'odd' digits, so the expression is not divisible by 11.

252 is 5 mod 13. Cycle of powers of 5 mod 13 is 5, 12, 8, 1, repeat. 128 is divisible by 4, so the expression is 2 mod 13, not divisible by 13.

252 is 12 mod 17... and I'm starting to get the feeling I need a better approach to solve this.
Title: Re: Maths thread.
Post by: heron on January 02, 2015, 10:58:12 pm
Oh whoops, made an error with the problem. Um, we'll call that easy mode. But yea, liopoil has it right.
Okay, hard mode:

What is the least prime factor of 252^128 + 1?
So, uhh, the last digit is 7... and so the least prime factor is at the lowest 11...

252 is 10 mod 11. 10^128 + 1 is 127 0s with 1s at either end, so odd number of digits and the 1s are both in 'odd' digits, so the expression is not divisible by 11.

252 is 5 mod 13. Cycle of powers of 5 mod 13 is 5, 12, 8, 1, repeat. 128 is divisible by 4, so the expression is 2 mod 13, not divisible by 13.

252 is 12 mod 17... and I'm starting to get the feeling I need a better approach to solve this.


Yea, I wanted to make the answer big enough that you wouldn't want to just check all of the primes in order, but small enough that you can check that the number is actually prime pretty quickly.
Title: Re: Maths thread.
Post by: liopoil on January 02, 2015, 11:49:42 pm
Call the value of the expression x and its least prime factor n. x is 0 mod n, so 252^128 is n - 1 mod n. Assume n < 128. Since n is prime I think (not sure) that means those cycles must have a length which is a factor of n - 1. Then (252 mod n)^ (128 mod n - 1) is n - 1 mod n. This rules out 17. Plugging in 19 we get 5 squared which is not 18 mod 19. For 23 we get 22 ^ 18, but since 22 is the first term in the cycle and 18 isn't anywhere near a factor of 22 we see it doesn't work without computation. 29 yields 20 ^ 16. Yikes. 31 yields 4 ^ 4 = 256, which is congruent to 10 (mod 31) which is not 30. Okay back to thinking more generally...

Okay maybe n > 128. I think all my statements are still true, just less useful.  I don't know what I'm doing, and am increasingly feeling like I'm entirely on the wrong track. I don't know anything about these cycles!
Title: Re: Maths thread.
Post by: heron on January 02, 2015, 11:58:04 pm
You are more on the right track than you think.

Some things you might want to consider/hints:

I'll call the least prime factor p.
Yes, 252^128 = -1 (mod p). And yes, 252^n is periodic modulo p, where the period is a factor of p-1. Make sure you know why it is a factor of p-1.
In other words, p-1 is a multiple of the period. Now, if only you knew what the period was...
Title: Re: Maths thread.
Post by: GeoLib on January 03, 2015, 01:47:53 am
Here's a classic problem:

What is the least prime factor of 63^128 + 1?
No cheating with computers please!
Does this work?

63 = 7*3^2, so 63^128 + 1 = 7^128*3^256 + 1

The last digits of powers of 3 are 3, 9, 7, 1, repeat. 256 is divisible by 4 so the power of 3 term ends in 1.

The last digits of powers of 7 end in 7, 9, 3, 1, repeat. 128 is divisible by 4 so the power of 7 term ends in 1. Their product must also end in 1 then. Add one and the expression ends in 2. Therefore the number is divisible by 2, which is the smallest prime that there is. So the answer is 2.


So for the easy version, Can't we just say 3^256*7^128 is odd, so add one and it must be even, so 2?
Title: Re: Maths thread.
Post by: Titandrake on January 03, 2015, 03:35:19 am
Ooh, I do so love a number theory puzzle. I think it's the correct answer but there are gaps in my proof that I'm working on fixing.


We want the smallest prime p such that 252^128 = -1 mod p.

Since we're always going to work mod some prime p, by Fermat's Little Theorem a^{p-1} = 1 mod p. In particular, this gives that for any k such that a^k = 1 mod p, k must be a factor of p-1. I'm sure there's a way to prove this without too much machinery, but I'll just cite Lagrange's Theorem and move on.

We know a^n is periodic in mod p. First, we need to show a^n = -1 for some n mod p.  Here's the hole: not sure how you do this.

Let k be the period, meaning the smallest positive exponent where a^k = 1. Let k' be the power such that a^k' = -1, where k' < k. Then since a^{2k'} = (-1)^2 = 1, we must have k' = k / 2. Quick proof: if k' < k/2, then 2k' < k and k cannot be the period since a^{2k'} = a^0 = 1, a contradiction. If k' > k/2, then a^{2k' - k} = 1 as well, and 2k' - k < k, also a contradiction. Therefore, we must have k' = k / 2.

So, in particular, this gives that the powers such that a^n = -1 mod p are k/2, 3k/2, 5k/2, 7k/2, ... or equivalently some odd multiple of k'. But 128 is a power of 2. Therefore, we must have k' = 128 => k = 256. So, 256 is a factor of p-1. Luckily, it turns out 257 is prime, so the answer is 257.


Edit: Have verified with computer my answer is correct. Working on the hole-filling now.

Edit 2: Some general cleaning up.
Title: Re: Maths thread.
Post by: heron on January 03, 2015, 11:08:06 am
You have the correct answer there, here is a comment and a method to prove that your answer is indeed a factor:


Yea, it is much more annoying to work with -1 mod p than with 1 mod p. It gets a lot less messy if you multiply by 252^128-1 to get 252^256 - 1. Then you know a^n = 1 mod p where n is a factor of 256, and you can quickly ascertain that n is not a factor of 128, because then p|252^128 - 1.
So 256|p-1, and as you noted, 257 is prime.

Probably the fastest way to check that 257|252^128 + 1 is via Euler's criterion for quadratic residues and quadratic reciprocity. Euler's criterion tells us that a^((p-1)/2) = 1 (mod p) if a is a quadratic residue mod p and -1 if it is a nonresidue. 252 = 7*6^2, and so (6^((257-1)/2))^2 = 1 (mod 257). So we want that 7^128 = -1 (mod 257). From the quadratic reciprocity law, 7^128 (mod 257) and 257^3 (mod 7) are either both +1 or both -1, since 7 and 257 are not both 3 (mod 4). So, 257^3 = 5^3 = -1 (mod 7), so 7^128 = -1 (mod 257). So that's it, 252^128 + 1 = 0 (mod 257). 
Title: Re: Maths thread.
Post by: liopoil on January 03, 2015, 11:39:23 am
Here's a classic problem:

What is the least prime factor of 63^128 + 1?
No cheating with computers please!
Does this work?

63 = 7*3^2, so 63^128 + 1 = 7^128*3^256 + 1

The last digits of powers of 3 are 3, 9, 7, 1, repeat. 256 is divisible by 4 so the power of 3 term ends in 1.

The last digits of powers of 7 end in 7, 9, 3, 1, repeat. 128 is divisible by 4 so the power of 7 term ends in 1. Their product must also end in 1 then. Add one and the expression ends in 2. Therefore the number is divisible by 2, which is the smallest prime that there is. So the answer is 2.


So for the easy version, Can't we just say 3^256*7^128 is odd, so add one and it must be even, so 2?
Or just Odd number to natural power is odd, so add one and it must be even, so 2. I didn't expect it to be so easy, so I wrote more.

Still working on the real problem, haven't read Titandrake's solution or heron's comment on it.
Title: Re: Maths thread.
Post by: Kirian on January 04, 2015, 09:33:31 am
Here's a classic problem:

What is the least prime factor of 63^128 + 1?
No cheating with computers please!

Moat?

For some reason, this joke never gets old.
Title: Re: Maths thread.
Post by: Awaclus on January 04, 2015, 09:47:31 am
For some reason

Is it Moat?
Title: Re: Maths thread.
Post by: liopoil on January 04, 2015, 10:38:39 am
I think we need to get more creative. Whenever I see ~5 characters of spoiler-ed text I immediately know what it says. Add some spaces at one end or something! That would make it funnier.
Title: Re: Maths thread.
Post by: SwitchedFromStarcraft on January 04, 2015, 10:53:34 am
I think we need to get more creative. Whenever I see ~5 characters of spoiler-ed text I immediately know what it says. Add some spaces at one end or something! That would make it funnier.

Like I did in the first spoiler here:


Title: Re: Maths thread.
Post by: Awaclus on January 04, 2015, 11:14:21 am
I think we need to get more creative. Whenever I see ~5 characters of spoiler-ed text I immediately know what it says. Add some spaces at one end or something! That would make it funnier.

But you still have to check every time.
Title: Re: Maths thread.
Post by: sudgy on January 04, 2015, 11:44:14 am
I think we need to get more creative. Whenever I see ~5 characters of spoiler-ed text I immediately know what it says. Add some spaces at one end or something! That would make it funnier.

But you still have to check every time.

You see the spoiler, and the first thing you think when you see it, is "Is it Haha!"
Title: Re: Maths thread.
Post by: SwitchedFromStarcraft on January 04, 2015, 11:47:36 am
I always check, on the theory that one day it will read "Is it Ozle?"
Title: Re: Maths thread.
Post by: sudgy on January 15, 2015, 03:28:02 pm
So, there's something I've been wondering.  As far as I understand, here's how you solve the differential equation y' = y:

y' = y
dy/dx = y
dy/y = dx
∫dy/y = ∫dx
ln |y| = x + C
|y| = e^(x + C)
|y| = (e^x)*(e^C)
Since e^C is any positive number:
|y| = Ce^x (C > 0)
Getting rid of the absolute value allows the right side to be negative:
y = Ce^x (C ≠ 0)

The problem is, C = 0 is a solution, but I don't see how to make it a part of the process of getting the solution.
Title: Re: Maths thread.
Post by: Witherweaver on January 15, 2015, 03:32:57 pm
Is it your mom?
Title: Re: Maths thread.
Post by: heron on January 15, 2015, 03:33:44 pm
I think the problem is that when you go from dy/dx = y to dy/y = dx, you assume that y ≠ 0.
Title: Re: Maths thread.
Post by: Witherweaver on January 15, 2015, 03:34:39 pm
So, there's something I've been wondering.  As far as I understand, here's how you solve the differential equation y' = y:

y' = y
dy/dx = y
dy/y = dx
∫dy/y = ∫dx
ln |y| = x + C
|y| = e^(x + C)
|y| = (e^x)*(e^C)
Since e^C is any positive number:
|y| = Ce^x (C > 0)
Getting rid of the absolute value allows the right side to be negative:
y = Ce^x (C ≠ 0)

The problem is, C = 0 is a solution, but I don't see how to make it a part of the process of getting the solution.

C=0 => y=0 => y'/y does not make many senses.

Edit: Ninja'd :(
Title: Re: Maths thread.
Post by: sudgy on January 15, 2015, 03:37:50 pm
So, even though d/dx 0 = 0 it doesn't satisfy the equation y' = y?
Title: Re: Maths thread.
Post by: Witherweaver on January 15, 2015, 03:42:26 pm
So, even though d/dx 0 = 0 it doesn't satisfy the equation y' = y?

It satisfies the equation, but if you're going to tell me that 1 = kx (for some finite real k) and therefore 1/x = k, you're also implicitly telling me that x is not zero.
Title: Re: Maths thread.
Post by: scott_pilgrim on January 15, 2015, 03:43:34 pm
So, even though d/dx 0 = 0 it doesn't satisfy the equation y' = y?

Yes it does, it's an alternate solution.  Whenever you divide by a variable (this applies to basic algebra as well), you have to check whether that variable could be 0; in this case, it can.  For example, 0 is a solution of x=x^3, even though you only get 1 or -1 when you divide both sides by x.
Title: Re: Maths thread.
Post by: Polk5440 on January 15, 2015, 03:43:55 pm
So, there's something I've been wondering.  As far as I understand, here's how you solve the differential equation y' = y:

y' = y
dy/dx = y
dy/y = dx

You rule out y = 0 as a solution here because you divide by y and then integrate. You can't do this if y is identically equal to zero. So the solution method misses the trivial solution (y = 0 implies y' = 0 so that works as a solution). But normally people don't care about the trivial solutions, so it's not a big deal in this case.


[analytic details about integration go here]

Ninja'd...

Edit: scott says it better...
Title: Re: Maths thread.
Post by: Witherweaver on January 15, 2015, 03:45:06 pm
In other words, your solution technique only finds nonzero y that solves y' = y.

Then you can simply observe that y=0 solves the equation as well, so that

y(x) = Ce^x

describes a family of solutions for all real C.
Title: Re: Maths thread.
Post by: sudgy on January 15, 2015, 03:45:53 pm
Ah, I get it now.  Thanks!
Title: Re: Maths thread.
Post by: pacovf on January 15, 2015, 03:46:40 pm
You could also prove that all the solutions to y' = y are proportional to each other, and then prove that exp is a solution. Then you find that 0 is also a solution. You don't even need to define ln to prove this.

PPE ~317: geez people you're like a pack of hungry wolves.
Title: Re: Maths thread.
Post by: sudgy on January 15, 2015, 03:56:19 pm
You could also prove that all the solutions to y' = y are proportional to each other, and then prove that exp is a solution. Then you find that 0 is also a solution. You don't even need to define ln to prove this.

PPE ~317: geez people you're like a pack of hungry wolves.

Well, there are like 317 different ways to solve differential equations...
Title: Re: Maths thread.
Post by: sudgy on February 11, 2015, 03:36:21 pm
Is there any website like wolframalpha that will give me a step-by-step solution to whatever I put in without making me pay money?
Title: Re: Maths thread.
Post by: scott_pilgrim on February 11, 2015, 03:40:37 pm
But wolfram has the best step-by-step solutions!

(http://i.imgur.com/AzCo6pP.png)
Title: Re: Maths thread.
Post by: Ozle on February 11, 2015, 03:48:33 pm
Post it here, i'll do it for you!
Title: Re: Maths thread.
Post by: sudgy on February 11, 2015, 03:53:26 pm
But wolfram has the best step-by-step solutions!

But you have to pay money...
Title: Re: Maths thread.
Post by: pacovf on February 11, 2015, 03:59:03 pm
Pretty sure scotty was being sarcastic there, or at the very least facetious.
Title: Re: Maths thread.
Post by: Witherweaver on February 11, 2015, 04:00:16 pm
Pretty sure scotty was being sarcastic there, or at the very least facetious.

Maybe even sarcetious.  Or facastic.
Title: Re: Maths thread.
Post by: sudgy on February 11, 2015, 04:13:20 pm
Also, that example is really easy...
Title: Re: Maths thread.
Post by: Witherweaver on February 11, 2015, 04:25:35 pm
Is there any website like wolframalpha that will give me a step-by-step solution to whatever I put in without making me pay money?

Step 1: Integrate by parts
Step 2: Profit
Title: Re: Maths thread.
Post by: pacovf on February 11, 2015, 04:29:36 pm
Personally, I prefer the Feynman method:

1. You write down the problem.
2. You think very hard.
3. You write down the answer.
Title: Re: Maths thread.
Post by: sudgy on February 11, 2015, 04:33:38 pm
Is there any website like wolframalpha that will give me a step-by-step solution to whatever I put in without making me pay money?

Step 1: Integrate by parts
Step 2: Profit

Personally, I prefer the Feynman method:

1. You write down the problem.
2. You think very hard.
3. You write down the answer.

Already tried both of these for the past hour or two.
Title: Re: Maths thread.
Post by: pacovf on February 11, 2015, 04:40:11 pm
I don't know of any free automatic solver, sorry...

In the meantime, you could try posting the problem that is bothering you. Ozle has already offered to write the proof down!
Title: Re: Maths thread.
Post by: sudgy on February 11, 2015, 06:38:06 pm
∫sqrt(1-x2) dx

I've tried a bajillion methods.  I know the answer from wolframalpha, but still can't figure it out.
Title: Re: Maths thread.
Post by: Witherweaver on February 11, 2015, 06:45:01 pm
∫sqrt(1-x2) dx

I've tried a bajillion methods.  I know the answer from wolframalpha, but still can't figure it out.

Well, sqrt{1-x^2} is naturally the length of a leg of a right triangle if the other leg is x and the hypotenuse is 1.  So draw that triangle.  Call one of the angles theta.  Make a natural substitution (i.e., x = trigfunction(theta)).  Take differentials and plug it into the integral.  Then you have an integral of trig functions, and you can do that.

Edit: The integrand itself, \sqrt{1-x^2}, is also a convenient trig function of theta.  (Also, fixed a typo above.)
Title: Re: Maths thread.
Post by: liopoil on February 11, 2015, 06:50:14 pm
Disclaimer: I am currently taking Calc. A, so fair chance I have no clue what I'm talking about

-1/3x(1 - x2)3/2 + c

Thinking about what gives sqrt(1 - x2) when you take it's derivative... this is what I get. First I increased the exponent on the outside by one, then multiplied by the reciprocal of the inside function (1 - x2). Then I multiplied by the reciprocal of the new outer exponent, and added the constant of integration.

PPE: It seems witherweaver knows what he's talking about and I don't. That is an integral sign, right? Mind explaining where I err? Something tells me it shouldn't be this simple.
Title: Re: Maths thread.
Post by: sudgy on February 11, 2015, 06:56:45 pm
-1/3x(1 - x2)3/2 + c

Differentiating this involves a product rule, making its derivative 1/3 sqrt(1-x2) (4 x2-1), not sqrt(1-x2)
Title: Re: Maths thread.
Post by: liopoil on February 11, 2015, 06:58:39 pm
-1/3x(1 - x2)3/2 + c

Differentiating this involves a product rule, making its derivative 1/3 sqrt(1-x2) (4 x2-1), not sqrt(1-x2)
ah yes, thank you... not so simple when the power on the inside is greater than 1. And wolfram disagrees with me too, so looks like I have no clue.
Title: Re: Maths thread.
Post by: heron on February 11, 2015, 07:01:52 pm
Okay hint: sqrt(1 - x^2) is hard to integrate, darn. Good thing we have techniques for getting around that, namely substitution. What sort of substitution could you make so that sqrt(1 - x^2) turns into something nicer?

Alternative strategy: Apply geometry.
Title: Re: Maths thread.
Post by: sudgy on February 11, 2015, 07:10:48 pm
Okay hint: sqrt(1 - x^2) is hard to integrate, darn. Good thing we have techniques for getting around that, namely substitution. What sort of substitution could you make so that sqrt(1 - x^2) turns into something nicer?

I tried all sorts of things like this, to no avail.  I tried u = 1 - x2, but that makes du = -2x dx, making it even more confusing.  I tried crazy forms of integration by parts but that didn't work either.

Quote
Alternative strategy: Apply geometry.

I just did what Witherweaver said and it worked.  Yay!
Title: Re: Maths thread.
Post by: Witherweaver on February 11, 2015, 07:48:40 pm
"Geometry" mean "trigonometry" here :)
Title: Re: Maths thread.
Post by: silverspawn on February 11, 2015, 08:20:54 pm
I actually have a math exam coming up in a few days. So, I'll also try this (without using geometry)

So, there is this formula which I think works

(http://fs2.directupload.net/images/150212/ug4kwaef.png)

which you have to read from the right side. So you have
(http://latex.codecogs.com/gif.latex?f%28x%29%20%3D%20%5Csqrt%7B1-x%5E2%7D)

 you define (http://latex.codecogs.com/gif.latex?g%28x%29%20%3D%20sin%28x%29) and

(http://latex.codecogs.com/gif.latex?f%28g%28x%29%29%20*%20g%27%28x%29%20%3D%20%5Csqrt%7B1-sin%5E2%28x%29%7D%20*%20cos%28x%29%20%3D%20%5Csqrt%7Bcos%5E2%28x%29%29%7D%20*%20cos%28x%29%20%3D%20cos%5E2%28x%29)

which according to my list of common integrals I made to use in the exam is the derivation of

(http://latex.codecogs.com/gif.latex?%5Cfrac%7Bx&plus;%5Cfrac%7Bsin%282x%29%7D%7B2%7D%7D%7B2%7D)

and so

(http://latex.codecogs.com/gif.latex?%5Cint_%7Bb%7D%5E%7Ba%7D%20%5Csqrt%7B1-x%5E2%7D%20%3D%20%5Cint_%7B%5Carcsin%20b%7D%5E%7B%5Carcsin%20a%7D%20%5Cfrac%7Bx%20&plus;%20%5Cfrac%7Bsin%282x%29%7D%7B2%7D%7D%7B2%7D)

edit: ehhm that's of course not an integral anymore on the right side

so... is that correct?

Title: Re: Maths thread.
Post by: heron on February 11, 2015, 09:11:39 pm
Okay hint: sqrt(1 - x^2) is hard to integrate, darn. Good thing we have techniques for getting around that, namely substitution. What sort of substitution could you make so that sqrt(1 - x^2) turns into something nicer?

I tried all sorts of things like this, to no avail.  I tried u = 1 - x2, but that makes du = -2x dx, making it even more confusing.  I tried crazy forms of integration by parts but that didn't work either.

Quote
Alternative strategy: Apply geometry.

I just did what Witherweaver said and it worked.  Yay!

You never tried sinu = x though did you ;)
In calc AB class, the teacher never told us that you could do u-substitutions like that, but when you think about it, it is a natural extension of the technique.

As for geometry, I just meant use the area under a curve definition of the integral. It's not too difficult to find the area of those bits of circle.
Title: Re: Maths thread.
Post by: heron on February 11, 2015, 09:18:06 pm
For additional integration practice, here is a problem:

Given two randomly selected points in a unit square, what is the probability that the distance between them is greater than 1/2?
(2015 AMC A, modified)

The original problem specified that the points lie on the perimeter of the square, which makes the problem significantly easier, and allows you to use geometry rather than calculus.

Edit: Also, sqrt(1 - x^2) would be one of the integrals you would need to evaluate in the original problem.
Title: Re: Maths thread.
Post by: sudgy on February 11, 2015, 10:19:54 pm
As for geometry, I just meant use the area under a curve definition of the integral. It's not too difficult to find the area of those bits of circle.

Well, I knew that, I was trying to find a better reason though.
Title: Re: Maths thread.
Post by: Witherweaver on February 11, 2015, 10:33:56 pm
Any time you have terms like

sqrt{a^2+b^2x^2}
sqrt{a^2-b^2x^2}
sqrt{a^2x^2-b^2}

draw a relevant triangle and make the same kind of argument.  The "correct" substitution to make will simply fall out of labeling the sides/angles.

And note that {a^2+b^2}^{n/2} for any integer n is just a nice monomial of those expressions, so you can expect an integrand that looks like powers of trig functions.
Title: Re: Maths thread.
Post by: DStu on February 12, 2015, 03:32:36 am
Given two randomly selected points in a unit square, what is the probability that the distance between them is greater than 1/2?
(2015 AMC A, modified)

Which probability distribution, and which distance?
Title: Re: Maths thread.
Post by: Titandrake on February 12, 2015, 05:05:58 am
Given two randomly selected points in a unit square, what is the probability that the distance between them is greater than 1/2?
(2015 AMC A, modified)

Which probability distribution, and which distance?

It's a high school math competition, come on :P

(Uniform and Euclidean, although you're free to try other parameters if you want to.)
Title: Re: Maths thread.
Post by: DStu on February 12, 2015, 05:15:14 am
Given two randomly selected points in a unit square, what is the probability that the distance between them is greater than 1/2?
(2015 AMC A, modified)

Which probability distribution, and which distance?

It's a high school math competition, come on :P

(Uniform and Euclidean, although you're free to try other parameters if you want to.)

If I wouldn't have asked this I would have to think about it, and I don't have time for this...
Title: Re: Maths thread.
Post by: Ozle on February 12, 2015, 08:43:45 am
I believe the answer is.......6
Title: Re: Maths thread.
Post by: Witherweaver on February 12, 2015, 09:20:29 am
I believe the answer is.......6

6 Moats?
Title: Re: Maths thread.
Post by: Polk5440 on February 12, 2015, 09:28:21 am
This is an integral we would ask when I was a student instructor for calculus when we wanted to identify who the A students really were. Those that can make progress on this integral have really internalized integration methods and trig identities (you have to want to see a trig identity instead of what you have; a tall order for B students) or can reason at a high level of insight/intuition. 
Title: Re: Maths thread.
Post by: Watno on February 12, 2015, 09:32:15 am
This is an integral we would ask when I was a student instructor for calculus when we wanted to identify who the A students really were. Those that can make progress on this integral have really internalized integration methods and trig identities (you have to want to see a trig identity instead of what you have; a tall order for B students) or can reason at a high level of insight/intuition.
Basically you need to know the answer already.
Title: Re: Maths thread.
Post by: Witherweaver on February 12, 2015, 09:33:31 am
This is an integral we would ask when I was a student instructor for calculus when we wanted to identify who the A students really were. Those that can make progress on this integral have really internalized integration methods and trig identities (you have to want to see a trig identity instead of what you have; a tall order for B students) or can reason at a high level of insight/intuition.

Which one?  The \sqrt{1-x^2} one?
Title: Re: Maths thread.
Post by: sudgy on February 12, 2015, 11:22:31 am
I believe the answer is.......6

Probability has to be from 0 to 1...
Title: Re: Maths thread.
Post by: Kirian on February 12, 2015, 12:01:18 pm
I believe the answer is.......6

Probability has to be from 0 to 1...

This is do likely it happens more than 100% of the time.
Title: Re: Maths thread.
Post by: Ozle on February 12, 2015, 01:49:10 pm
I believe the answer is.......6

Probability has to be from 0 to 1...

6 1's then. Sorry should have been slightly more specific.

Whats next?
Title: Re: Maths thread.
Post by: Polk5440 on February 12, 2015, 08:56:27 pm
This is an integral we would ask when I was a student instructor for calculus when we wanted to identify who the A students really were. Those that can make progress on this integral have really internalized integration methods and trig identities (you have to want to see a trig identity instead of what you have; a tall order for B students) or can reason at a high level of insight/intuition.

Which one?  The \sqrt{1-x^2} one?

Yes.
Title: Re: Maths thread.
Post by: silverspawn on February 12, 2015, 09:24:51 pm
This is an integral we would ask when I was a student instructor for calculus when we wanted to identify who the A students really were. Those that can make progress on this integral have really internalized integration methods and trig identities (you have to want to see a trig identity instead of what you have; a tall order for B students) or can reason at a high level of insight/intuition.

Which one?  The \sqrt{1-x^2} one?

Yes.

yea I am good aren't I? ^_^
Title: Re: Maths thread.
Post by: liopoil on February 16, 2015, 03:48:34 pm
Here's a game theory problem I made and solved yesterday. It's relatively easy compared to the other problems posted here.

We're playing a game of Rock, Paper, Scissors, with a twist; I am never allowed to throw paper. Throwing scissors is not recommended for you. In the case where we both throw the same thing, there are no payoffs and we simply throw again.  If there are some whole number n throws in a row where we both throw the same thing, I win the throw. The winner of a throw has a payoff of 1 and the loser a payoff of -1. What is the optimal strategy for each player and what is your expected payoff for this game, in terms of n?
Title: Re: Maths thread.
Post by: XerxesPraelor on February 16, 2015, 06:04:55 pm
Well, it's going to be Rock most of the time, Paper every once in a while, I think.
Title: Re: Maths thread.
Post by: liopoil on February 16, 2015, 06:22:34 pm
Well, it's going to be Rock most of the time, Paper every once in a while, I think.
Correct! Now, just how often?
Title: Re: Maths thread.
Post by: Kirian on February 16, 2015, 06:22:39 pm
Here's a game theory problem I made and solved yesterday. It's relatively easy compared to the other problems posted here.

We're playing a game of Rock, Paper, Scissors, with a twist; I am never allowed to throw paper. Throwing scissors is not recommended for you. In the case where we both throw the same thing, there are no payoffs and we simply throw again.  If there are some whole number n throws in a row where we both throw the same thing, I win the throw. The winner of a throw has a payoff of 1 and the loser a payoff of -1. What is the optimal strategy for each player and what is your expected payoff for this game, in terms of n?

The best strategy is                                                                         Moat                                                                                                                                            .

I'm not sure about the expected payoff, but I'm certain it's close to                 42               
Title: Re: Maths thread.
Post by: scott_pilgrim on February 16, 2015, 06:43:39 pm
I'm not sure I understand the game.  Do I get -1 for an entire sequence of consecutive drawn throws?  Or is it -1 for each consecutive drawn throw after the first?  And shouldn't the expected payoff be independent of n, since we would need to be finding the optimal strategy for both players anyway?
Title: Re: Maths thread.
Post by: liopoil on February 16, 2015, 06:47:49 pm
I'm not sure I understand the game.  Do I get -1 for an entire sequence of consecutive drawn throws?  Or is it -1 for each consecutive drawn throw after the first?  And shouldn't the expected payoff be independent of n, since we would need to be finding the optimal strategy for both players anyway?
You get -1 for the last throw only. All drawn throws except the last have no payoffs at all. You could say that when there's a draw, decrease n by one, then play again, and if n = 0, I win.

Neither the expected payoff nor the optimal strategy is independent of n.
Title: Re: Maths thread.
Post by: scott_pilgrim on February 16, 2015, 08:02:09 pm
Okay, the reason I'm confused is because, the way I'm reading it, n is dependent on how you play, not vice versa.  So I could (maybe) answer the questions you asked, and then give you an expected value of n, but you're saying the answer should be dependent on n.

I think I get it now though.  The game is, we play "weird rock paper scissors" n times.  I thought the game was, we play it an arbitrary number of times, and then n is "the number of consecutive drawn throws".

Is that right?  Honestly the problem really reads like my original interpretation...
Title: Re: Maths thread.
Post by: Witherweaver on February 16, 2015, 08:18:29 pm
Okay, the reason I'm confused is because, the way I'm reading it, n is dependent on how you play, not vice versa.  So I could (maybe) answer the questions you asked, and then give you an expected value of n, but you're saying the answer should be dependent on n.

I think I get it now though.  The game is, we play "weird rock paper scissors" n times.  I thought the game was, we play it an arbitrary number of times, and then n is "the number of consecutive drawn throws".

Is that right?  Honestly the problem really reads like my original interpretation...

I think fix an n ahead of time.  Say, n=2.  Then the game is:

1) Play Rock, Paper, Scissors, Player A cannot throw Paper.
2) On a tie, replay
3) Player A win condition: Tie twice in a row
4) Player B win condition: Win any single throw
5) Play until a winner

Winner gets +1, Loser gets -1. 
Title: Re: Maths thread.
Post by: Titandrake on February 16, 2015, 08:24:58 pm
Finding an optimal strategy is easier if you frame it this way.

1) Let's play Rock, Paper, Scissors, n.
2) Both players make a throw, player A cannot throw paper.
3) If player B wins, player B gets +1, player A gets -1, done
4) If player A wins, player A gets +1, player B gets -1, done
5) If a draw happens, and n = 1, player A gets +1, player B gets -1, done
6) Otherwise, play a game of Rock, Paper, Scissors, n-1, and use the payout from that instead.

From here you can try some inductive/recursive definition of the winning strategy based on n. Don't have the time to actually work it out, but there's the framework.
Title: Re: Maths thread.
Post by: liopoil on February 16, 2015, 09:22:09 pm
Okay, the reason I'm confused is because, the way I'm reading it, n is dependent on how you play, not vice versa.  So I could (maybe) answer the questions you asked, and then give you an expected value of n, but you're saying the answer should be dependent on n.

I think I get it now though.  The game is, we play "weird rock paper scissors" n times.  I thought the game was, we play it an arbitrary number of times, and then n is "the number of consecutive drawn throws".

Is that right?  Honestly the problem really reads like my original interpretation...
We only play one game. If there's a tie, that game didn't count and we play the game again, except n is decreased by one. Witherweaver and Titandrake have it right. I didn't make it clear that n is defined beforehand. n = 0 is a game, in that game I always win immediately. n = 1 is a different game, where I win ties. n = 2 is a game where if we tie, we instead play a game where I win ties, and so on. How best to play depends on which game we are playing, that is, the value of n. So we can define our strategy and expected payoff in terms of n.
Title: Re: Maths thread.
Post by: scott_pilgrim on February 17, 2015, 02:02:05 am
Okay, so I think both players throw rock with probability n/(n+1), and the expected payout is (n-1)/(n+1).

Here's a proof by induction:

For n=1, the problem is trivial.  I would make a payoff matrix but I'm too lazy to figure out how tables work.  It's -1 for rock/rock, +1 for rock/paper, +1 for rock/scissors, and -1 for paper/scissors.  So each player should choose between their two options with probability 0.5, and the expected payout is 0.

Now suppose the solution holds for n.  We argue it holds for n+1.  The payoff matrix for n+1 will look the same as it did for n=1 for rock/paper, rock/scissors, and paper/scissors, but the rock/rock element will have the expected payout for n, which is (n-1)/(n+1).  So if p is player 1's probability of choosing rock and q is player 2's probability of choosing rock, then player 2 wants to maximize pq(n-1)/(n+1)+p(1-q)+(1-p)q-(1-p)(1-q).  So take the derivative with respect to q and set it equal to 0, to get p(n-1)/(n+1)-p+1-p+1-p=0, so p(n-1)/(n+1)-3p+2=0, so p=(n+1)/(n+2), as desired.  Since the equation is symmetric for p and q, we can make the same argument for q.

So now the expected payout (for n+1) will be ((n+1)/(n+2))^2*(n-1)/(n+1)+2((n+1)/(n+2))(1-(n+1)/(n+2))-(1-(n+1)/(n+2))^2 which is awful to simplify by hand.  But wolfram says it's n/(n+2) so it's right.

Cool problem!
Title: Re: Maths thread.
Post by: liopoil on February 17, 2015, 09:39:21 am
Correct! I assume you tested the first few n by hand to find the pattern?

It's also neat to observe that as n gets large, your winrate approaches 1. At first this problem did not have a limit on how many ties there can be but then the optimal strategy is for both players to always play rock and you always win... so I added n.
Title: Re: Maths thread.
Post by: GeoLib on February 17, 2015, 12:57:42 pm
Cool Problem. I got the same solution as scott. You can solve the general case by drawing a payoff matrix and then using the argument that an optimal mixed strategy must be composed of pure strategies that perform equally well against whatever the opponent chooses, then simplify to get a recursive expression for the payout. At which point, I had mathematica calculate the first 10 expected values, noticed the pattern, and proved by induction.
Title: Re: Maths thread.
Post by: scott_pilgrim on February 17, 2015, 02:53:28 pm
Okay, here are some cool hat problems:

1. There are 100 perfectly rational people on an island, each with either a red or a green party hat glued to his head.  Each person can see everyone else's party hat, but not his own.  No one can communicate with each other.  Everyone is informed that everyone is wearing either a red or green hat, and that at least one person is wearing a red hat.  Each day at noon, a ship comes around, and the captain will let anyone leave the island if they can correctly guess their hat color; but if they guess incorrectly they die.  These guesses are publicly known by everyone after the ship leaves.  If there are x people wearing red hats, who will leave the island and when, in terms of x?

2. There are a finite number of people.  Before the game starts, they may discuss a plan with each other, but after the game begins they cannot communicate (except through their guesses).  After the game begins, they stand in a single file line and have a red or green party hat glued to their head, so that each person can see all and only those hats in front of him.  Then the executioner asks each person, starting from the back of the line, what color his hat is, and kills him if he is wrong.  Everyone else in the line hears the guess, but not whether it was correct.  What plan can they come up with to minimize the number of people that die in the worst case scenario?  (Note that not everyone is necessarily acting in the interest of his own survival, just in the interest of minimizing the number of deaths in the worst case scenario.)

3. The situation is the same as in #2, except that there are now a countably infinite number of people, and they cannot hear each other's guesses.  Is it possible for them to come up with a plan that guarantees that only a finite number of people die?
Title: Re: Maths thread.
Post by: pacovf on February 17, 2015, 03:00:42 pm
I'll let other people think about these problems, I remember seeing them in the Logic problems thread (http://forum.dominionstrategy.com/index.php?topic=6426.0), among many others. Shame that thread died, it was great fun.
Title: Re: Maths thread.
Post by: sudgy on February 17, 2015, 03:08:45 pm
1. There are 100 perfectly rational people on an island, each with either a red or a green party hat glued to his head.  Each person can see everyone else's party hat, but not his own.  No one can communicate with each other.  Everyone is informed that everyone is wearing either a red or green hat, and that at least one person is wearing a red hat.  Each day at noon, a ship comes around, and the captain will let anyone leave the island if they can correctly guess their hat color; but if they guess incorrectly they die.  These guesses are publicly known by everyone after the ship leaves.  If there are x people wearing red hats, who will leave the island and when, in terms of x?

I'm guessing that the rational people know the others are rational?  Them not knowing could change quite a bit...
Title: Re: Maths thread.
Post by: liopoil on February 17, 2015, 03:13:34 pm
I remember these too. I do like the first better with party hats than with eyes though!

1. There are 100 perfectly rational people on an island, each with either a red or a green party hat glued to his head.  Each person can see everyone else's party hat, but not his own.  No one can communicate with each other.  Everyone is informed that everyone is wearing either a red or green hat, and that at least one person is wearing a red hat.  Each day at noon, a ship comes around, and the captain will let anyone leave the island if they can correctly guess their hat color; but if they guess incorrectly they die.  These guesses are publicly known by everyone after the ship leaves.  If there are x people wearing red hats, who will leave the island and when, in terms of x?

I'm guessing that the rational people know the others are rational?  Them not knowing could change quite a bit...
Yep. And they know that the rational people know that the other people are not only rational but also know that the rational people I mentioned first know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they know that they are rational. Or something like that.
Title: Re: Maths thread.
Post by: qmech on February 17, 2015, 04:27:02 pm

I still find this vaguely mysterious.
Title: Re: Maths thread.
Post by: GeoLib on February 17, 2015, 07:24:33 pm
Okay, here are some cool hat problems:

1. There are 100 perfectly rational people on an island, each with either a red or a green party hat glued to his head.  Each person can see everyone else's party hat, but not his own.  No one can communicate with each other.  Everyone is informed that everyone is wearing either a red or green hat, and that at least one person is wearing a red hat.  Each day at noon, a ship comes around, and the captain will let anyone leave the island if they can correctly guess their hat color; but if they guess incorrectly they die.  These guesses are publicly known by everyone after the ship leaves.  If there are x people wearing red hats, who will leave the island and when, in terms of x?


Ok, so if there's only one person with a red hat, they know day 1 and guess. Then everyone else knows that they all have a green hat and guess and leave.

If there are two people, then on the first day no one guesses, but on the second day both people with red hats realize that the other guy didn't guess and so they must also have a red hat. They guess and then everyone knows day 3, guess and leave.

This pattern continues. It takes x+1 days to get everyone off the island.


2. There are a finite number of people.  Before the game starts, they may discuss a plan with each other, but after the game begins they cannot communicate (except through their guesses).  After the game begins, they stand in a single file line and have a red or green party hat glued to their head, so that each person can see all and only those hats in front of him.  Then the executioner asks each person, starting from the back of the line, what color his hat is, and kills him if he is wrong.  Everyone else in the line hears the guess, but not whether it was correct.  What plan can they come up with to minimize the number of people that die in the worst case scenario?  (Note that not everyone is necessarily acting in the interest of his own survival, just in the interest of minimizing the number of deaths in the worst case scenario.)


I can guarantee at most one death.

First person says green if there are an odd number of greens in front of him, red if there are an even. This guy takes one for the team, and may die. Person 2 knows the parity of the green hats in front of the person behind them. If it's the same as the parity in front of them, then they know their hat is red; if not, it's green. Etc.


3. The situation is the same as in #2, except that there are now a countably infinite number of people, and they cannot hear each other's guesses.  Is it possible for them to come up with a plan that guarantees that only a finite number of people die?

Do they hear whether the other people die?
Title: Re: Maths thread.
Post by: scott_pilgrim on February 18, 2015, 01:31:04 am
3. The situation is the same as in #2, except that there are now a countably infinite number of people, and they cannot hear each other's guesses.  Is it possible for them to come up with a plan that guarantees that only a finite number of people die?

Do they hear whether the other people die?

I don't think so, but the original problem statement I'm looking at doesn't specify...
Title: Re: Maths thread.
Post by: Ratsia on February 18, 2015, 01:40:56 am
I'm guessing that the rational people know the others are rational?  Them not knowing could change quite a bit...
Besides rationality, I guess you need to assume a specific utility function for them. In particular, they have to value life over death so much that needing to spend several, potentially close to a hundred, days on an island where everyone else is perfectly rational does not warrant an early guess with some non-zero probability of dying. Perhaps not being able to talk with them helps to endure it.
Title: Re: Maths thread.
Post by: Titandrake on February 18, 2015, 01:53:37 am
3. The situation is the same as in #2, except that there are now a countably infinite number of people, and they cannot hear each other's guesses.  Is it possible for them to come up with a plan that guarantees that only a finite number of people die?

Do they hear whether the other people die?

You can solve it assuming no one hears any other guesses, and assuming a sufficient mathematical belief system.

Edit: I looked up the solution for the case where they are allowed to hear each other's guesses. In this scenario, you can limit the deaths to at most          one           .
Title: Re: Maths thread.
Post by: DStu on February 18, 2015, 02:34:02 am

3. The situation is the same as in #2, except that there are now a countably infinite number of people, and they cannot hear each other's guesses.  Is it possible for them to come up with a plan that guarantees that only a finite number of people die?
the answer is somewhere in this forum
Title: Re: Maths thread.
Post by: SwitchedFromStarcraft on February 18, 2015, 10:21:51 am

3. The situation is the same as in #2, except that there are now a countably infinite number of people, and they cannot hear each other's guesses.  Is it possible for them to come up with a plan that guarantees that only a finite number of people die?
the answer is somewhere in this forum
Incorrect.  Given a "countably infinite" starting population, the answer is actually                                      moat                                                                                     .
Title: Re: Maths thread.
Post by: Witherweaver on February 18, 2015, 10:24:23 am
Incorrect.  Given a countably infinite number of people, and if only finitely many of them die, then clearly the remaining countably infinite people will sink the ship.
Title: Re: Maths thread.
Post by: Watno on February 18, 2015, 10:24:37 am
It's also                         yes                         
Title: Re: Maths thread.
Post by: pacovf on February 18, 2015, 10:37:29 am
Gentlemen, you can't meme in here, this is the Maths room!
Title: Re: Maths thread.
Post by: Witherweaver on February 18, 2015, 10:38:49 am
Gentlemen, you can't meme in here, this is the Maths room!

Can we (me)^n for other values of n?
Title: Re: Maths thread.
Post by: SwitchedFromStarcraft on February 18, 2015, 01:08:57 pm
Gentlemen, you can't meme (m)^e(n)^e in here, this is the Maths room!
FTFY
Title: Re: Maths thread.
Post by: heron on February 18, 2015, 06:36:39 pm
Wait you need the axiom of choice for #3 right?
Title: Re: Maths thread.
Post by: SwitchedFromStarcraft on February 18, 2015, 08:12:15 pm
Wait you need the axiom of choice for #3 right?
For some reason the phrase hit me oddly, and conjured card names, or sci-fi movie artifacts, or something.

Axiom of choice
Chalice of harmony
Wand of opprobrium
Scepter of apportionment
Construct of delight
Title: Re: Maths thread.
Post by: Watno on February 18, 2015, 08:37:37 pm
Wait you need the axiom of choice for #3 right?
You don't. You need countable choice though, I think.
Title: Re: Maths thread.
Post by: heron on February 18, 2015, 08:56:08 pm
Okay well for #3 then

Call two colorings of hats similar if they different in finitely many hats. Similarity is an equivalence relation, so the sets of similar colorings partition the set of all colorings. The people choose a coloring from each set of similar colorings (this is the part where the axiom of choice is used). So, everyone looks at all the hats ahead of them and sees which set of similar colorings they belong to (which is possible because they can see all the hats somehow), and then they assume that the actual coloring of hats is the one that they chose earlier. Since these colorings are similar, only finitely many people will die.

This sort of thing is why I don't like the axiom of choice; it leads to all sorts of nonsense.
Edit: So apparently choice and countable choice are different, I didn't know that. They both seem kind of not true sounding to me though.
Title: Re: Maths thread.
Post by: DStu on February 19, 2015, 02:18:24 am
Okay well for #3 then


This sort of thing is why I don't like the axiom of choice; it leads to all sorts of nonsense.
Edit: So apparently choice and countable choice are different, I didn't know that. They both seem kind of not true sounding to me though.

Maybe the cause of the nonsene is also that the solution disregards relativity theory.

:e the diference between original an and countable is that the original states choice for all set of sets, what we clearly don't need here in this extreme form, as we only have countably many sets to chose from
:e2 wait, thats not true, there should be uncountble many colorings, and the shouldnt make it much better...
Title: Re: Maths thread.
Post by: qmech on February 19, 2015, 02:30:28 am
Are you sure this is countable choice?  Each equivalence class is countable, but there are uncountably many equivalence classes.
Title: Re: Maths thread.
Post by: DStu on February 19, 2015, 02:57:03 am
Also, how can you know in which class you are if you can just see the hats in front of you, but not the infinitely many behind? Or can you?
Title: Re: Maths thread.
Post by: qmech on February 19, 2015, 03:39:24 am
In the version I'm familiar with I think you probably need to see the infinite half of the line, but the set up is slightly different here as the guesses aren't made simultaneously.

Here's a variant that I hopefully haven't posted before.  You still have countably infinitely many people, who will be lined up along the natural numbers facing towards infinity.  Everybody guesses their hat colour simultaneously, but doesn't know which position they will be placed in.  Can they ensure that only finitely many people guess incorrectly?
Title: Re: Maths thread.
Post by: Watno on February 19, 2015, 09:31:01 am
Ok, that's right I guess. You still only need a weakened form of choice, since there are <=|P(N)| classes.
Title: Re: Maths thread.
Post by: Witherweaver on February 19, 2015, 09:40:26 am
Just accept the Axiom of Choice, you bloody heathens. 
Title: Re: Maths thread.
Post by: Kirian on February 19, 2015, 09:55:07 am
Just accept the Axiom of Choice, you bloody heathens. 

I choose not to!
Title: Re: Maths thread.
Post by: heron on February 19, 2015, 03:31:11 pm
Also, how can you know in which class you are if you can just see the hats in front of you, but not the infinitely many behind? Or can you?

Well, there are only finitely many hats behind you, so this is not an issue. I guess for my solution you still need to know how many hats are behind you though. It's not clear whether the prisoners know that or not.
Title: Re: Maths thread.
Post by: sudgy on February 19, 2015, 04:23:11 pm
Uh, how in the world does 1 + x + x2 + x3 + ... equal 1/(1-x)?
Title: Re: Maths thread.
Post by: Witherweaver on February 19, 2015, 04:26:03 pm
Uh, how in the world does 1 + x + x2 + x3 + ... equal 1/(1-x)?

Formally set

F(x) = 1+x + x^2 + ...

then

xF(x) = x+x^2 + x^3 + ...

so

F(x) -xF(x) = 1,

or

F(x)(1-x) = 1,

or

F(x) = 1/(1-x).

Now this cheats a little as it's only a formal computation and doesn't deal with convergence.  But that's not hard to deal with.  I'll do it in the next post.
Title: Re: Maths thread.
Post by: Witherweaver on February 19, 2015, 04:31:13 pm
A series x_0+x_1+x_2+x_3+... converges if the sequence of partial sums

{x_0, x_0+x_1, x_0+x_1+x_2, x_0+x_1+x_2+x_3, ....}

converges.  That is, if the sequence S_N = \sum_{n=0}^N x_n converges.  Each partial sum S_N is just a finite sum, so nothing confusing.  For this, x_n = x^n.  So

S_N = \sum_{n=0}^N x^n = 1+x+x^2+x^3+...+x^N

Then by the same trick,

xS_N = x+x^2+...+x^{N+1},

so

S_N - xS_N = 1- x^{N+1}, or

S_N (1-x) = 1-x^{N+1}, os

S_N = 1/(1-x) - x^{N+1}/(1-x).

Now take limits as N->\infty.  It's not hard to see that

S_N -> 1/(1-x) as long as \abs{x} < 1.

Hooray.
Title: Re: Maths thread.
Post by: Witherweaver on February 19, 2015, 04:41:43 pm
While we're at it, let's suppose you have the following problem.

You have a function, but you really like polynomials.  You wish the function was a polynomial instead.  So approximate it by one, but which one?  Well, it depends on what kind of shape you want.  Maybe you only need the approximation near a point (say x=0).  So what to do?  Well, make sure the functions match.  But the shape should stay the same, too.  So the derivatives should match as well.  What degree of polynomial?  Well, however many derivatives you want to match.  If you want to match all the derivatives, then you need a polynomial of all the degrees (i.e., a series).

How do you match up a series with a function such that all the derivatives agree at a single point?  Well do the obvious calculation, and you get the Taylor series, and low and behold the Taylor series for 1/(1-x) is just 1+x+x^2+...

I'll put details when I'm back from phone posting.\

Edit:

Let f:R->R be a smooth (infinitely differentiable) function and fix some x0 in R.  Consider the power series

F(x) = a_0+a_1 (x-x0)+ a_2 (x-x0)^2 + ... + a_n(x-x0)^n + ...

We want F to be the "best" approximation to f "near" x0, in the sense that F agrees with f at x0 in function value and in all derivatives of arbitrary order.  Then we simply require:

F(x0) = f(x0)
F'(x0) = f'(x0)
F''(x0) = f''(x0)
...
F^[n](x0) = f^[n](x0), (this means nth derivative)
...

Well, what is F(x0)?  It's just

F(x0) = a_0 + a_1(x0-x0)+ a_2(x0-x0)^2 + .... = a_0 + 0 = a_0

What is F'(x0)?

F'(x) = a_1 + 2a_2(x-x0) + 3a_3(x-x0)^2 + ... + na_n (x-x0)^(n-1) + ...
F'(x0) = a_1 + 2a_2(x0-x0) + 3a_3(x0-x0)^2 + ... + na_n (x0-x0)^(n-1) + ... = a_1 + 0 = a_1

Continuing,

F''(x) = 2a_2 + 6a_3(x-x0) + ... + n(n-1)a_n (x-x0)^(n-2) + ...
F''(x0) = 2a_2+ 0 + 0 + ... = 2a_2

And in general

F^[n](x) = n! a_n + ((n+1)!/1!) a_{n+1}(x-x0) + ((n+2)!/2!) a_{n+2}(x-x0)^2 + ...
so that
F^[n](x0) = n! a_n.


Then we simply require

F(x0) = a_0 = f(x0)
F'(x0) = a_1 = f'(x0)
F''(x0) = 2a_2 = f''(x0)
F'''(x0) = 6a_3 = f'''(x0)
...
F^[n](x0) = n!a_n = f^[n](x0)
...

So in general,

a_n = f^[n](x0)/n!.

Then the series F is

F(x) = \sum_{n=0}^\infty  (f^[n](x0)/n!) (x-x0)^n

Now, when f(x) = 1/(1-x) and x0 = 0, what are the derivatives?  Well,

f(0) = 1
f'(x)= -(1-x)^(-2)*(-1) = (1-x)^(-2), f'(0) = 1
f''(x) = 2(1-x)^(-3), f''(0) = 2
f'''(x) = 6 (1-x)^(-4), f'''(0) = 6,
...

pattern is you multiply by 1,2,3,4, ...., etc. (every derivative has an extra -1 from the chain rule applied to (1-x)), so you just end up with

f^[n](x) = n! (1-x)^(-(n+1)),

so

f^[n](0) = n!

Then

a_n = (f^[n](x0)/n!)  = n!/n! = 1,

so

F(x) = \sum_{n=0}^\infty x^n

is the Taylor series approximation of 1/(1-x).

Then you can prove that indeed convergence occurs (and is uniform) for \abs{x} < 1.
Title: Re: Maths thread.
Post by: sudgy on February 19, 2015, 05:19:55 pm
I understand these formal proofs, but more what I'm wondering is that, for example, the infinite sum 1 + 2 + 4 + 8 + 16 + 32 + ... (which is x = 2 for this sum) doesn't converge.  So, how does it equal -1?
Title: Re: Maths thread.
Post by: Witherweaver on February 19, 2015, 05:23:11 pm
I understand these formal proofs, but more what I'm wondering is that, for example, the infinite sum 1 + 2 + 4 + 8 + 16 + 32 + ... (which is x = 2 for this sum) doesn't converge.  So, how does it equal -1?

It doesn't.  Convergence only holds for -1 < x < 1.

But move to the complex plane, analytic continuation, blah blah blah, didn't we talk about this before?
Title: Re: Maths thread.
Post by: liopoil on February 19, 2015, 05:36:52 pm
So, uh, Witherweaver, hate to break it to you, but LateX doesn't work here... no matter how much syntax you put in.
Title: Re: Maths thread.
Post by: pacovf on February 19, 2015, 05:39:01 pm
I understand these formal proofs, but more what I'm wondering is that, for example, the infinite sum 1 + 2 + 4 + 8 + 16 + 32 + ... (which is x = 2 for this sum) doesn't converge.  So, how does it equal -1?

The relevant (prettified) formula:

SN = 1/(1-x) - xN+1/(1-x)

This is as far as you can get without making any assumptions about your real x =/= 1. To keep going, you need xN+1 to converge when N -> inf. That's only true for |x| < 1.
Title: Re: Maths thread.
Post by: Witherweaver on February 19, 2015, 05:39:20 pm
So, uh, Witherweaver, hate to break it to you, but LateX doesn't work here... no matter how much syntax you put in.

It makes it the most readable, I think.  It's pretty standard among everyone I know to use pseudo LaTeX code when writing out math in a generic editor (like email).
Title: Re: Maths thread.
Post by: Witherweaver on February 19, 2015, 05:44:58 pm
For reference on summing this divergent series: http://en.wikipedia.org/wiki/1_%2B_2_%2B_4_%2B_8_%2B_%E2%8B%AF

Edit:

Oh, and of course there's a similar kind of trick:

Pretend S = 1+2 +4 + 8 + ....

Then

S = 1+2(1+2+4+8+...
   = 1+2(S),

so S must be -1.

Of course it's not true that the series converges in the regular sense of convergent series (i.e., limits of partial sums), BUT if you were going to define a notion of convergence of this series, this calculation shows you should get -1.  (That is, if it obeys regular arithmatic stuff, like linearity.) 
Title: Re: Maths thread.
Post by: sudgy on February 19, 2015, 05:48:16 pm
Oh yeah, just so you know, I could barely read what you were typing with the LateX, but still got the general gist of it...

I'm more surprised because I saw something that generally doesn't like any types of summing divergent series (or even 1 - 1 + 1 - 1 + ...) state this.
Title: Re: Maths thread.
Post by: sudgy on February 19, 2015, 05:49:48 pm
More, what I'm trying to say is, I thought this couldn't be one of those analytical continuations or whatever because of the place I read it.
Title: Re: Maths thread.
Post by: Witherweaver on February 19, 2015, 05:52:32 pm
More, what I'm trying to say is, I thought this couldn't be one of those analytical continuations or whatever because of the place I read it.

Oh, no, it's definitely one of those.  I mean, the person that brought it up may not have been thinking of it that way, or they could have just been stating something that's wrong, but it's definitely implicit in the standard treatment of it.
Title: Re: Maths thread.
Post by: qmech on February 20, 2015, 02:28:43 am
1 - 1 + 1 - 1 + ...

The algebraists and geometers sometimes get up to something a bit like this (http://en.wikipedia.org/wiki/Eilenberg%E2%80%93Mazur_swindle).
Title: Re: Maths thread.
Post by: qmech on February 20, 2015, 02:49:52 am
Ok, that's right I guess. You still only need a weakened form of choice, since there are <=|P(N)| classes.

If you reject choice then this is a slightly problematic statement.  With choice, given any two sets S and T, either S injects into T or T injects into S, but that needn't hold if choice is false.  So it's not always obvious which sets have cardinality below that of the continuum.

I find set theory slightly disturbing.  I'm not entirely comfortable with what it means for ZFC to have a countable model yet.  (Today's best guess is that theories that we can write down tend not to capture our intent.)
Title: Re: Maths thread.
Post by: DStu on February 20, 2015, 02:59:15 am
Ok, that's right I guess. You still only need a weakened form of choice, since there are <=|P(N)| classes.
You can probably weaken it a bit further by only having choice if you are standing in a line trying to guess the color of your hat to prevent getting murdered.
Title: Re: Maths thread.
Post by: Witherweaver on February 20, 2015, 09:57:42 am
Ok, that's right I guess. You still only need a weakened form of choice, since there are <=|P(N)| classes.
You can probably weaken it a bit further by only having choice if you are standing in a line trying to guess the color of your hat to prevent getting murdered.

You can reject the Axiom of Choice all you want, but gun to your head, you're going to believe it.
Title: Re: Maths thread.
Post by: pacovf on February 20, 2015, 10:06:14 am
Ok, that's right I guess. You still only need a weakened form of choice, since there are <=|P(N)| classes.
You can probably weaken it a bit further by only having choice if you are standing in a line trying to guess the color of your hat to prevent getting murdered.

You can reject the Axiom of Choice all you want, but gun to your head, you're going to believe it.

Some would say that they leave you no choice.
Title: Re: Maths thread.
Post by: Polk5440 on February 20, 2015, 10:34:48 am
I get the feeling that those uncomfortable with the axiom of choice are really just uncomfortable with infinities. It sometimes goes against "intuition" but really, what is intuition? It's mostly learned. What's intuitive to us is very different than what was intuitive to a mathematician 500 years ago and is different than what will be intuitive for a mathematician 500 years from now.

Also, to really be uncomfortable with the axiom of choice, don't you have to be equally uncomfortable with all of the equivalent statements? Are you really also so uncomfortable with assumption that the Cartesian product of any family of nonempty sets is nonempty? 
Title: Re: Maths thread.
Post by: Witherweaver on February 20, 2015, 10:44:03 am
I get the feeling that those uncomfortable with the axiom of choice are really just uncomfortable with infinities. It sometimes goes against "intuition" but really, what is intuition? It's mostly learned. What's intuitive to us is very different than what was intuitive to a mathematician 500 years ago and is different than what will be intuitive for a mathematician 500 years from now.

Also, to really be uncomfortable with the axiom of choice, don't you have to be equally uncomfortable with all of the equivalent statements? Are you really also so uncomfortable with assumption that the Cartesian product of any family of nonempty sets is nonempty?

Let's take this to the man on the street.
Title: Re: Maths thread.
Post by: WalrusMcFishSr on February 20, 2015, 01:17:32 pm
The Axiom of Choice is MURDER!!!
Title: Re: Maths thread.
Post by: SwitchedFromStarcraft on February 20, 2015, 02:27:33 pm
1 - 1 + 1 - 1 + ...

The algebraists and geometers sometimes get up to something a bit like this (http://en.wikipedia.org/wiki/Eilenberg%E2%80%93Mazur_swindle).
Is the Eilenberg swindle what made Heisenberg uncertain?
Title: Re: Maths thread.
Post by: Kirian on February 20, 2015, 02:58:07 pm
I get the feeling that those uncomfortable with the axiom of choice are really just uncomfortable with infinities. It sometimes goes against "intuition" but really, what is intuition? It's mostly learned. What's intuitive to us is very different than what was intuitive to a mathematician 500 years ago and is different than what will be intuitive for a mathematician 500 years from now.

Also, to really be uncomfortable with the axiom of choice, don't you have to be equally uncomfortable with all of the equivalent statements? Are you really also so uncomfortable with assumption that the Cartesian product of any family of nonempty sets is nonempty? 

Any chance of a layman's explanation of the Axiom of Choice?  I choose to ask this...
Title: Re: Maths thread.
Post by: Witherweaver on February 20, 2015, 03:09:48 pm
There are a lot of formulations, and a lot of things to which it is equivalent, but I think of it as:

If you have any collection of nonempty sets, you can form a new set by taking one element from each set in the collection.  It seems kind of straightforward, but it's a bit confusing because "you can form a new set" makes us think "Okay I'll take one from this one, then one from this other one, then one from this other other one, then...".  Certainly okay if the collection is finite, but confusing when the collection becomes infinite, especially uncountably infinite. 

The wikipedia page (http://en.wikipedia.org/wiki/Axiom_of_choice) gives some layman explanations, I think.
Title: Re: Maths thread.
Post by: Polk5440 on February 20, 2015, 03:49:21 pm
If you have any collection of nonempty sets, you can form a new set by taking one element from each set in the collection.

Yep.
Title: Re: Maths thread.
Post by: qmech on February 21, 2015, 04:54:59 am
Any chance of a layman's explanation of the Axiom of Choice?  I choose to ask this...

You have a drawer full of pairs of socks.  Can you choose one sock from each pair?  Yes: just take the pairs out one by one and choose a sock arbitrarily. 

You have an infinite cupboard full of pairs of shoes.  Can you choose one shoe from each pair?  Yes: just choose the left shoe of each pair.

You have an infinite drawer full of pairs of socks.  Can you choose one sock from each pair?  Yes: just take the pairs out one by one and—

Wait—what does it mean to take the infinitely many pairs of socks out "one by one"?    In what order?  Might there even be too many socks to put them in any order?

The axiom of choice says that you don't have to worry about the details: you have infinitely many choices to make, and you can just make them.  There are lots of statements that are equivalent to the axiom of choice, though not always obviously.  One says that every set can be put in a very nice order, one where at every stage (even if you've just taken infinitely many steps) there's guaranteed to be a well-defined "next" element in the order.  (If you're wondering how this could possibly fail, imagine asking for the next integer after minus infinity, or the next real number after zero.)

People sometimes get hung up on consequences of the axiom of choice like the Banach–Tarski "paradox", which says that you can break two spheres into 5 "pieces" and reassemble them to get two spheres.  But usually the problem is that you were thinking about something in the wrong way.

For example, the naive objection to Banach–Tarski is that you seem to be getting "more stuff" out of nowhere.  But it turns out that Banach–Tarski is really just a cheat.  You start by doing something essentially equivalent to saying that an infinite binary tree is basically two copies of itself glued together, then somehow embed this picture into 3D space.  But the way the embedding is done means that all of the "pieces" are such a horribly mixed up collection of dust that we can't even sensibly talk about their size, so it's not clear that you have any "stuff" at all, never mind extra stuff.
Title: Re: Maths thread.
Post by: DStu on February 21, 2015, 09:16:27 am
I get the feeling that those uncomfortable with the axiom of choice are really just uncomfortable with infinities. It sometimes goes against "intuition" but really, what is intuition? It's mostly learned. What's intuitive to us is very different than what was intuitive to a mathematician 500 years ago and is different than what will be intuitive for a mathematician 500 years from now.

Also, to really be uncomfortable with the axiom of choice, don't you have to be equally uncomfortable with all of the equivalent statements? Are you really also so uncomfortable with assumption that the Cartesian product of any family of nonempty sets is nonempty?

yepp, also came to  my mind.

For me it's best illustrated (or acts as an reminder for me) at the non-lebessque-measureable sets.  Is it really necessary that each operation we are allowed to do on sets also has to preserve the well-definiedness of something like a volume?

:e ninjad of Banac-Tarski.  Anyway, I think the paradox with the finite deaths for infinite hats is quite similar to Banach-Tarski. In the end, our intuition says that should be impossible, because the probability of guessing incorrect only finite times should be 0.  But what you do is operating with non-measurable sets, so you can't apply probability theorey any more.  And no matter how bad the human intutions on probabilities are, they get worse if the whole theory is not applicable.
Title: Re: Maths thread.
Post by: scott_pilgrim on February 23, 2015, 02:18:18 am
I checked the logic puzzles thread first this time, and I don't think this one has been done yet (though there was something similar).  Two warm-up questions first.

1. You have three coins, which all look identical.  One is a counterfeit, which weighs more than the others (but you don't know by how much); the other two weigh the same.  You have a balance, so you can put any number of coins on each side and see which group weighs more (or if they weigh the same).  How many weighings do you need to do to find the counterfeit?

2. Same as #1, except now you have nine coins with one counterfeit.

3. Now you have nine coins with one counterfeit, and three balances, one of which is demon-possessed (you don't know which one is demon-possessed).  The demon-possessed balance will always give you a result to try to trick you, so it may give you the correct result, or an incorrect result.  How many weighings are needed in the worst case scenario to find the counterfeit?
Title: Re: Maths thread.
Post by: Titandrake on February 23, 2015, 03:42:14 am
I checked the logic puzzles thread first this time, and I don't think this one has been done yet (though there was something similar).  Two warm-up questions first.
3. Now you have nine coins with one counterfeit, and three balances, one of which is demon-possessed (you don't know which one is demon-possessed).  The demon-possessed balance will always give you a result to try to trick you, so it may give you the correct result, or an incorrect result.  How many weighings are needed in the worst case scenario to find the counterfeit?

What counts as a weighing in this puzzle? Do you only get to use one balance per weighing?
Title: Re: Maths thread.
Post by: Jack Rudd on February 23, 2015, 05:49:47 am
Question 1: one weighing. Weigh two coins against each other. If they weigh different amounts, the heavier one is the counterfeit. If they weigh the same amount, the third coin is the counterfeit.

Question 2: two weighings. Put three coins on each side of the balance. If they weigh different amounts, the counterfeit is on the heavier side. If they weigh the same amount, the counterfeit is not on the balance. You now have a set of three coins containing a counterfeit, and the problem has been reduced to the previously solved one.
Title: Re: Maths thread.
Post by: pacovf on February 23, 2015, 08:07:30 am
3. Now you have nine coins with one counterfeit, and three balances, one of which is demon-possessed (you don't know which one is demon-possessed).  The demon-possessed balance will always give you a result to try to trick you, so it may give you the correct result, or an incorrect result.  How many weighings are needed in the worst case scenario to find the counterfeit?

(http://imgs.xkcd.com/comics/labyrinth_puzzle.png)

Is it one plus the number of letters of the word you expected to find in this spoiler?
Title: Re: Maths thread.
Post by: Ozle on February 23, 2015, 02:11:46 pm
Question 1: one weighing. Weigh two coins against each other. If they weigh different amounts, the heavier one is the counterfeit. If they weigh the same amount, the third coin is the counterfeit.

Question 2: two weighings. Put three coins on each side of the balance. If they weigh different amounts, the counterfeit is on the heavier side. If they weigh the same amount, the counterfeit is not on the balance. You now have a set of three coins containing a counterfeit, and the problem has been reduced to the previously solved one.

Am I allowed to chew them?
Title: Re: Maths thread.
Post by: scott_pilgrim on February 23, 2015, 02:40:37 pm
3. Now you have nine coins with one counterfeit, and three balances, one of which is demon-possessed (you don't know which one is demon-possessed).  The demon-possessed balance will always give you a result to try to trick you, so it may give you the correct result, or an incorrect result.  How many weighings are needed in the worst case scenario to find the counterfeit?

(http://imgs.xkcd.com/comics/labyrinth_puzzle.png)

Is it one plus the number of letters of the word you expected to find in this spoiler?

No, but it would have been if Ozle had posted that.

I checked the logic puzzles thread first this time, and I don't think this one has been done yet (though there was something similar).  Two warm-up questions first.
3. Now you have nine coins with one counterfeit, and three balances, one of which is demon-possessed (you don't know which one is demon-possessed).  The demon-possessed balance will always give you a result to try to trick you, so it may give you the correct result, or an incorrect result.  How many weighings are needed in the worst case scenario to find the counterfeit?

What counts as a weighing in this puzzle? Do you only get to use one balance per weighing?

Yes, one weighing means putting some number of coins on each side of one balance and then checking the result.
Title: Re: Maths thread.
Post by: pacovf on February 23, 2015, 02:48:04 pm
Is it one plus the number of letters of the word you expected to find in this spoiler?

No, but it would have been if Ozle had posted that.

Huh? So is it or is it not five? What did you expect to find in the spoiler?
Title: Re: Maths thread.
Post by: scott_pilgrim on February 23, 2015, 03:10:10 pm
Is it one plus the number of letters of the word you expected to find in this spoiler?

No, but it would have been if Ozle had posted that.

Huh? So is it or is it not five? What did you expect to find in the spoiler?

No, it is five.  I just didn't think you usually made moat jokes.  Well really, I just didn't think about it until I actually read the spoiler.
Title: Re: Maths thread.
Post by: pacovf on February 23, 2015, 03:19:57 pm
I'm full of surprises!

But to be fair, had you expected the real answer, you would still have come up with the same thing. You see, I was planning for every eventuality.
Title: Re: Maths thread.
Post by: heron on March 06, 2015, 05:29:58 pm
Alright, here's an interesting problem:

What is the sum from n = 1 to infinity of s(n)/((n)(n+1))?
Note that s(n) is the sum of the digits of n.

Title: Re: Maths thread.
Post by: ConMan on March 09, 2015, 08:05:57 pm
Alright, here's an interesting problem:

What is the sum from n = 1 to infinity of s(n)/((n)(n+1))?
Note that s(n) is the sum of the digits of n.
That is quite interesting. Things involving digit sums tend to be a bit weird, because they're dependent on the base being used. That said, there are a few things that are quick to note:

In general, s(n) would be of roughly O(log(n)), since an m-digit number will have a digit sum less than or equal to 9m. Hence, the sum is of terms of order log(n)/n^2, which sits somewhere between 1/n and 1/n^2, so at a guess it will converge but very, very slowly.

Also, since as I already said, the digit sum depends on the base, so presumably this sum will also be some function of b (where for decimal, b = 10).

In looking for some trick to help work out the value of the sum, I stumbled across the answer (but not the proof because it seems to be in a paywalled journal that I don't have access to). I was basically right, and that's pretty cool, and now I want to see the proof - I can kind of see what the outline of the proof would be for binary, but the general proof looks like it will be a bit fiddly.
Title: Re: Maths thread.
Post by: Polk5440 on March 09, 2015, 11:53:45 pm
Alright, here's an interesting problem:

What is the sum from n = 1 to infinity of s(n)/((n)(n+1))?
Note that s(n) is the sum of the digits of n.

Nice one. Don't reveal the answer yet. Still thinking......
Title: Re: Maths thread.
Post by: sudgy on March 18, 2015, 07:54:49 pm
So, my brother and I are trying to figure out a question for a practice exam, and are having a hard time with it.  The question is, "Use the method of cylindrical shells to find the volume of the solid of revolution obtained by revolving the region between the graph of the function y = x-1 and the x-axis over the interval [1, 2]."

The problem is that this isn't starting at 0 so you can't simply use the value of the function at a point as the height of the cylinder, and it's also hard because it's rotating around the x-axis, not the y-axis.  We know how to do it through other methods, but the question specifically asks for cylindrical shells.  Any help?
Title: Re: Maths thread.
Post by: scott_pilgrim on March 18, 2015, 08:10:31 pm
Assuming you mean as x (rather than y) goes from 1 to 2, then yes, shells is a really awkward method to use for that problem.  The height will be a piecewise function in terms of y (and it needs to be in terms of y, since it's shells and it's going around the x-axis), so you'll need to do two separate integrals.

Going from y=0 to y=1/2, the height will just be a constant 1 (2 minus 1).  Then going from y=1/2 to y=1, the height will be 1/y (the x-value) minus 1, because the total distance from the graph to the line x=1 is the same as the distance from the graph to the y-axis (which is the x-value, 1/y), minus the distance from x=1 to the y-axis (which is just 1).  The radius for both parts will just be y.

Therefore, you want to do (2pi)*[(integral from 0 to 0.5 of y)+(integral from 0.5 to 1 of y*((1/y)-1))].
Title: Re: Maths thread.
Post by: Witherweaver on March 18, 2015, 08:25:58 pm
The best thing to do to answer all these problems is to:

1) Draw the shape
2) Draw a representative cross-section
3) Label the cross-section in terms of the relevant geometry to find its volumes. 

For "shells" about the y-axis, the "width" of a shell is like a "dx", the radius is along the x-axis, and the height is along the y-axis.  For "shells" about the x-axis, it's flipped (width dy, radius y, height x). 

For discs/washers/whatever you call them, the height/width is like a dx or dy (dx about x-axis and dy about y-axis).  The radius is along the x-direction if you rotate about the y-axis and the y-direction if you rotate about the x-axis. 

4) Write out the volume in terms of these variables.  This is for a small cross section, so it's like a "dV".
5) Add up all the "dV"s over the relevant range.  This become an integral in the limit as everything is small.
6) Perform the integration.

I would recommend never ever solving one of these problems without drawing the picture, including the "dV" cross section.  In my opinion, that's the essence of the problem.  Your Calc book should have a lot of such pictures. 
Title: Re: Maths thread.
Post by: heron on March 18, 2015, 09:06:10 pm
So, should I give my solution to my problem then? It's been awhile.
Title: Re: Maths thread.
Post by: Polk5440 on March 18, 2015, 09:16:06 pm
So, should I give my solution to my problem then? It's been awhile.

I got stuck, so, yeah, I would appreciate it.
Title: Re: Maths thread.
Post by: sudgy on March 18, 2015, 09:28:23 pm
Assuming you mean as x (rather than y) goes from 1 to 2, then yes, shells is a really awkward method to use for that problem.  The height will be a piecewise function in terms of y (and it needs to be in terms of y, since it's shells and it's going around the x-axis), so you'll need to do two separate integrals.

Going from y=0 to y=1/2, the height will just be a constant 1 (2 minus 1).  Then going from y=1/2 to y=1, the height will be 1/y (the x-value) minus 1, because the total distance from the graph to the line x=1 is the same as the distance from the graph to the y-axis (which is the x-value, 1/y), minus the distance from x=1 to the y-axis (which is just 1).  The radius for both parts will just be y.

Therefore, you want to do (2pi)*[(integral from 0 to 0.5 of y)+(integral from 0.5 to 1 of y*((1/y)-1))].

We pretty much got this, but were stupid and thought a few things were wrong but somehow got the right answer (also, doing it piecewise just seems weird).

Also, Witherweaver, we drew pictures like crazy trying to figure things out.
Title: Re: Maths thread.
Post by: Witherweaver on March 18, 2015, 09:37:41 pm
Assuming you mean as x (rather than y) goes from 1 to 2, then yes, shells is a really awkward method to use for that problem.  The height will be a piecewise function in terms of y (and it needs to be in terms of y, since it's shells and it's going around the x-axis), so you'll need to do two separate integrals.

Going from y=0 to y=1/2, the height will just be a constant 1 (2 minus 1).  Then going from y=1/2 to y=1, the height will be 1/y (the x-value) minus 1, because the total distance from the graph to the line x=1 is the same as the distance from the graph to the y-axis (which is the x-value, 1/y), minus the distance from x=1 to the y-axis (which is just 1).  The radius for both parts will just be y.

Therefore, you want to do (2pi)*[(integral from 0 to 0.5 of y)+(integral from 0.5 to 1 of y*((1/y)-1))].

We pretty much got this, but were stupid and thought a few things were wrong but somehow got the right answer (also, doing it piecewise just seems weird).

Also, Witherweaver, we drew pictures like crazy trying to figure things out.

Hmm.. the pictures should make it clear that you have to break it up.  There are two distinct cases: one when the cylindrical shell's "height" is x=1/y-1, and one when it's "height" is x=2-1. 
Title: Re: Maths thread.
Post by: sudgy on March 18, 2015, 10:03:10 pm
Assuming you mean as x (rather than y) goes from 1 to 2, then yes, shells is a really awkward method to use for that problem.  The height will be a piecewise function in terms of y (and it needs to be in terms of y, since it's shells and it's going around the x-axis), so you'll need to do two separate integrals.

Going from y=0 to y=1/2, the height will just be a constant 1 (2 minus 1).  Then going from y=1/2 to y=1, the height will be 1/y (the x-value) minus 1, because the total distance from the graph to the line x=1 is the same as the distance from the graph to the y-axis (which is the x-value, 1/y), minus the distance from x=1 to the y-axis (which is just 1).  The radius for both parts will just be y.

Therefore, you want to do (2pi)*[(integral from 0 to 0.5 of y)+(integral from 0.5 to 1 of y*((1/y)-1))].

We pretty much got this, but were stupid and thought a few things were wrong but somehow got the right answer (also, doing it piecewise just seems weird).

Also, Witherweaver, we drew pictures like crazy trying to figure things out.

Hmm.. the pictures should make it clear that you have to break it up.  There are two distinct cases: one when the cylindrical shell's "height" is x=1/y-1, and one when it's "height" is x=2-1.

Yeah, I got the breaking it up, it just felt weird to do.  And obsessing over the pictures I got mostly everything, but through some stupid mistakes I thought it was wrong.
Title: Re: Maths thread.
Post by: qmech on March 19, 2015, 05:47:06 am
(also, doing it piecewise just seems weird).

What do you understand by the word "function"?  One of the key realisations people go through is that it's any rule that, given any number, gives you another number in return; it's not just any such rule that can be expressed by a nice formula.  So the function that is 1 on [0,1] and 1/x for x in [1,100] is still a function, even if you can't write it without using some sort of case distinction.
Title: Re: Maths thread.
Post by: sudgy on March 19, 2015, 12:01:31 pm
(also, doing it piecewise just seems weird).

What do you understand by the word "function"?  One of the key realisations people go through is that it's any rule that, given any number, gives you another number in return; it's not just any such rule that can be expressed by a nice formula.  So the function that is 1 on [0,1] and 1/x for x in [1,100] is still a function, even if you can't write it without using some sort of case distinction.

You usually don't need to solve it piecewise for these types of problems, so it felt weird because of that.
Title: Re: Maths thread.
Post by: ghostofmars on March 19, 2015, 05:26:04 pm
I checked the logic puzzles thread first this time, and I don't think this one has been done yet (though there was something similar).  Two warm-up questions first.

1. You have three coins, which all look identical.  One is a counterfeit, which weighs more than the others (but you don't know by how much); the other two weigh the same.  You have a balance, so you can put any number of coins on each side and see which group weighs more (or if they weigh the same).  How many weighings do you need to do to find the counterfeit?

2. Same as #1, except now you have nine coins with one counterfeit.

3. Now you have nine coins with one counterfeit, and three balances, one of which is demon-possessed (you don't know which one is demon-possessed).  The demon-possessed balance will always give you a result to try to trick you, so it may give you the correct result, or an incorrect result.  How many weighings are needed in the worst case scenario to find the counterfeit?
No, it is five.  I just didn't think you usually made moat jokes.  Well really, I just didn't think about it until I actually read the spoiler.
I think it is possible to do it with 4 weighings.

Let's introduce a nomenclature to make talking about the results easier. The results the ith measurement indicate that the coins ri could be the counterfeit and not ri do not agree with the result (they could still be the counterfeit due to a lying demonic balance).
After two measurements on different balances B1 and B2 of 3 coins in each bowl, with a clever shift after the first result, we obtain 5 cases.
a) (r1,r2) a coin that agrees with first and second result
b) (not r1,r2) two coins that agree with the second but not with the first result (for this to be true, the B1 must be demonic)
c) (r1,not r2) two coins analogous to b) that agree with the first result (B2 demonic).

As a third measurement, we weigh the coins of b) vs. the ones of c) on the third balance B3. There are three cases:
i) a) is the solution and B3 doesn't lie => trivial
ii) a) is the solution, but B3 pretends that one side of b/c is heavier
iii) either B1 or B2 lied, and B3 correctly identifies which side is heavier

So now we want to do a fourth measurement that differentiates between ii) and iii). Side b) heavier is compatible with two possibilities (not r1,r2|B1 demon) and (r1,r2|B3 demon). Hence, we know that B2 is not demonic if the two b) coins are heavier, so we weigh them on that balance. If they have the same weight (r1,r2) is the counterfeit, otherwise it is the heavier coin. The alternative that side c) was heavier follows analogously.
Title: Re: Maths thread.
Post by: scott_pilgrim on March 19, 2015, 08:12:44 pm
The friend who gave me that problem never gave me the answer, so it might be possible to do it in 4.  I don't really understand what you're saying though.  Here's how I got 5:

First, weigh ABC against DEF on scales 1 and 2.  If they give a different result, then we know that the third scale is safe, so we just do it again on the third scale, and then whichever group has the counterfeit, test again on the third scale, for 4 total weighings.

The trickier case is if scales 1 and 2 give the same result.  Now any of the scales could be demon-possessed still.  But, we know that the result that the first two scales gave us must be correct.  Therefore, we can choose the group of 3 coins that has the counterfeit in it and test on all three scales to see which one is the counterfeit, for a total of 5 weighings.  (Note that, when we start weighing among the group of three coins which must contain the counterfeit, we still don't know which scale is demon-possessed, so no matter which two scales we test on first, we run into trouble if we get different results, and need to check with the last scale, which is why I think the fifth weighing is required.)


If it is possible to do it in fewer than five weighings, I think you need to try different sets of coins in the first set of 2-3 weighings, but that feels like it would be a lot less efficient (and a lot harder) to me.  That might be what you were trying to describe, but I'm having a lot of trouble following your post.
Title: Re: Maths thread.
Post by: ghostofmars on March 19, 2015, 08:57:36 pm
The first two weighings are ABC vs DEF and ADG vs BEH on two different scales. If the scales were honest, this would tell you exactly which coin is false. With the mapping 1 = left, 2 = right and 3 = equal, we get the following table
11 = A
12 = B
13 = C
21 = D
22 = E
23 = F
31 = G
32 = H
33 = I
Now, we have to take into account that one of the scales may be lying. This leads then to reduction to 5 coins. If you observe 11 for example, the results can be
a) both scales tell the truth => A
b) scale B1 is lying, the true result should be 21 or 31 (D, G)
c) scale B2 is lying, the true result should be 12 or 13 (B, C)
Now we test the BC vs DG on scale 3. The trivial case is that the results are the same. This is only possible, if the counterfeit is A.

If we notice a difference in weight, we know that either B3 is lying (the new result), or one of the first two measurements is wrong. However, D and G are only possible when B1 is lying and vice versa B and C are only possible when B2 is lying. Hence, we know 1 scale that is not demonic, which we use then to test D vs G or B vs C depending on the result of the third measurement. As the scale gives the true result, we can identify the counterfeit. If there is a weight difference it's the heavier coin, otherwise B3 was lying and the original measurement (A) is the counterfeit.
Title: Re: Maths thread.
Post by: pacovf on March 19, 2015, 09:12:37 pm
Very nice.
Title: Re: Maths thread.
Post by: heron on March 20, 2015, 05:28:03 pm
Alright, here's an interesting problem:

What is the sum from n = 1 to infinity of s(n)/((n)(n+1))?
Note that s(n) is the sum of the digits of n.

Alright then, my solution:

The first thing we want to do is rewrite s(n)/((n)(n+1)) as s(n)/(n) - s(n)/(n+1).
Now, we are going to evaluate the sum by looking at each digit individually.
If we let t(n) = the last digit of n, we can evaluate the sum of t(n)/(n) - t(n)/(n+1) as follows:

T = 1/1 - 1/2 + 2/2 - 2/3 + 3/3 - 4/3 + ... + 8/8 - 8/9 + 9/9 - 9/10 + 0/10 - 0/11 + 1/11 - 1/12 + ...
   = 1/1 + 1/2 + 1/3 + ... + 1/8 + 1/9 + 1/10 - 1 + 1/11 + 1/12 + ... + 1/19 + 1/20 - 1/2 + 1/21 + ...
   = limit as k approaches infinity of (1 + 1/2 + 1/3 + ... + 1/(10k)) - (1 + 1/2 + 1/3 + ... + 1/k).

It is well known that 1/1 + 1/2 + 1/3 + ... + 1/n - ln(n) converges to a constant for large n (Notice that H_n - ln(n) is monotonically decreasing but always positive).
So, our limit is equal to ln(10k) - ln(k) = ln(10), and T = ln(10).

Now, consider the other digits. If u(n) is the second to last digit of n, then the sum of u(n)/(n) - u(n)/(n+1) as follows:

U = 1/10 - 1/11 + 1/11 - 1/12 + 1/12 - 1/12 + ... + 1/18 - 1/19 + 1/19 - 1/20 + 2/20 - 2/21 + ... + 9/99 - 9/100 + 1/110 + ...
   = 1/10 + 1/20 + 1/30 + ... + 1/90 + 1/100 - 1/10 + 1/110 + ...
   = T/10

If we define similar values for V, W, etc. we find that each term is one tenth of the previous. So, we can evaluate a geometric series to find that the sum we want is ln(10)/(1 - 1/10) = 10ln(10)/9.

I believe this problem was originally posed by O. Shallit.
Title: Re: Maths thread.
Post by: pacovf on April 16, 2015, 07:12:58 am
There's that Albert, Bernard, Cheryl puzzle going around. Someone shared a harder one that doesn't seem to have a solution. I modified it a bit, and I think it should have a single solution now:

Albert and Bernard, two nerdy logic geniuses, have just become friends with Cheryl, a girl with a very peculiar sense of humour. They ask her when her birthday is, but instead, she tells Albert the sum of the month and the day of her birthday, and she tells Bernard the product, then she scurries off to flirt with a jock while the other two try to outnerd each other.

Albert: I don't know when Cheryl's birthday is, but I know that Bernard does not know too.

Bernard: Not only didn't I know when Cheryl's birthday was before, but I still don't know now, and I don't even know if we will ever be able to know.

Albert: Even after what you just said, I still don't know if we will ever be able to know either.

Bernard: Same here.

Albert: Now I know Cheryl's birthday!

Can you deduce Cheryl's birthday too?
Title: Re: Maths thread.
Post by: Kirian on April 16, 2015, 08:19:50 am
Cheryl's birthday is on Smarch 33.
Title: Re: Maths thread.
Post by: Jack Rudd on April 16, 2015, 10:38:48 am
There's that Albert, Bernard, Cheryl puzzle going around. Someone shared a harder one that doesn't seem to have a solution. I modified it a bit, and I think it should have a single solution now:

Albert and Bernard, two nerdy logic geniuses, have just become friends with Cheryl, a girl with a very peculiar sense of humour. They ask her when her birthday is, but instead, she tells Albert the sum of the month and the day of her birthday, and she tells Bernard the product, then she scurries off to flirt with a jock while the other two try to outnerd each other.

Albert: I don't know when Cheryl's birthday is, but I know that Bernard does not know too.

Bernard: Not only didn't I know when Cheryl's birthday was before, but I still don't know now, and I don't even know if we will ever be able to know.

Albert: Even after what you just said, I still don't know if we will ever be able to know either.

Bernard: Same here.

Albert: Now I know Cheryl's birthday!

Can you deduce Cheryl's birthday too?

Oooh, this looks interesting. Let's start: Albert doesn't know Cheryl's birthday, so it's not 1/1, 30/12 or 31/12, which have unique sums.

He also knows that Bernard doesn't know it, so the date can't have a unique product. Thus the day cannot be 17, 19, 23, 29 or 31 - because those days would generate unique products - and Albert must be able to tell that from the sum. Thus the sum of the day and month must be less than or equal to 17.
Title: Re: Maths thread.
Post by: WanderingWinder on April 16, 2015, 02:01:47 pm
There's that Albert, Bernard, Cheryl puzzle going around. Someone shared a harder one that doesn't seem to have a solution. I modified it a bit, and I think it should have a single solution now:

Albert and Bernard, two nerdy logic geniuses, have just become friends with Cheryl, a girl with a very peculiar sense of humour. They ask her when her birthday is, but instead, she tells Albert the sum of the month and the day of her birthday, and she tells Bernard the product, then she scurries off to flirt with a jock while the other two try to outnerd each other.

Albert: I don't know when Cheryl's birthday is, but I know that Bernard does not know too.

Bernard: Not only didn't I know when Cheryl's birthday was before, but I still don't know now, and I don't even know if we will ever be able to know.

Albert: Even after what you just said, I still don't know if we will ever be able to know either.

Bernard: Same here.

Albert: Now I know Cheryl's birthday!

Can you deduce Cheryl's birthday too?

Oooh, this looks interesting. Let's start: Albert doesn't know Cheryl's birthday, so it's not 1/1, 30/12 or 31/12, which have unique sums.

He also knows that Bernard doesn't know it, so the date can't have a unique product. Thus the day cannot be 17, 19, 23, 29 or 31 - because those days would generate unique products - and Albert must be able to tell that from the sum. Thus the sum of the day and month must be less than or equal to 17.

We can also rule out 14 - 7/7 would make a product of 49, and no other date makes that product.
Title: Re: Maths thread.
Post by: DStu on April 16, 2015, 03:38:14 pm
There's that Albert, Bernard, Cheryl puzzle going around. Someone shared a harder one that doesn't seem to have a solution. I modified it a bit, and I think it should have a single solution now:

Albert and Bernard, two nerdy logic geniuses, have just become friends with Cheryl, a girl with a very peculiar sense of humour. They ask her when her birthday is, but instead, she tells Albert the sum of the month and the day of her birthday, and she tells Bernard the product, then she scurries off to flirt with a jock while the other two try to outnerd each other.

Albert: I don't know when Cheryl's birthday is, but I know that Bernard does not know too.

Bernard: Not only didn't I know when Cheryl's birthday was before, but I still don't know now, and I don't even know if we will ever be able to know.

Albert: Even after what you just said, I still don't know if we will ever be able to know either.

Bernard: Same here.

Albert: Now I know Cheryl's birthday!

Can you deduce Cheryl's birthday too?

Oooh, this looks interesting. Let's start: Albert doesn't know Cheryl's birthday, so it's not 1/1, 30/12 or 31/12, which have unique sums.

He also knows that Bernard doesn't know it, so the date can't have a unique product. Thus the day cannot be 17, 19, 23, 29 or 31 - because those days would generate unique products - and Albert must be able to tell that from the sum. Thus the sum of the day and month must be less than or equal to 17.

We can also rule out 14 - 7/7 would make a product of 49, and no other date makes that product.

On the other hand, if the sum is too small, they wouldn't be able to figure it out at all.  As d/m and m/d are indistinguishable for both Albert and Bernard, and both are <=12, they can never tell which one is the month and which on the day. So the day must either be larger than 12,  Or d=m.  Where we can't have primes, and 1, and 9. So we are left with 4/4,6/6,8/8,12/12 or 18>d>12.  Where not so much is left anyway.

:e shit 2 and 3 should work, too.
Title: Re: Maths thread.
Post by: Polk5440 on April 16, 2015, 06:49:39 pm
There's that Albert, Bernard, Cheryl puzzle going around. Someone shared a harder one that doesn't seem to have a solution. I modified it a bit, and I think it should have a single solution now:

Albert and Bernard, two nerdy logic geniuses, have just become friends with Cheryl, a girl with a very peculiar sense of humour. They ask her when her birthday is, but instead, she tells Albert the sum of the month and the day of her birthday, and she tells Bernard the product, then she scurries off to flirt with a jock while the other two try to outnerd each other.

Albert: I don't know when Cheryl's birthday is, but I know that Bernard does not know too.

Bernard: Not only didn't I know when Cheryl's birthday was before, but I still don't know now, and I don't even know if we will ever be able to know.

Albert: Even after what you just said, I still don't know if we will ever be able to know either.

Bernard: Same here.

Albert: Now I know Cheryl's birthday!

Can you deduce Cheryl's birthday too?

I think I am a close, but got a little off somewhere; or maybe I am misunderstanding what I am supposed to be inferring.

I get that if B claims "same here" then A cannot choose between 3/12 and 12/3 and they know they will never know. If B instead says, "I know!" the answer is Jan 14.

One step back I eliminate 1/16, 2/15, and 3/14 because A would know that they could eventually know C's birthday.
Title: Re: Maths thread.
Post by: ghostofmars on April 16, 2015, 07:06:55 pm
the answer is Jan 14.
I have that date as well.
Title: Re: Maths thread.
Post by: pacovf on April 16, 2015, 07:08:11 pm
I don't have that date. Could you go into more detail about how you find it?

EDIT: your answer should be eliminated by Bernard's last sentence.
Title: Re: Maths thread.
Post by: ghostofmars on April 16, 2015, 07:18:28 pm
Here a bit longer the way to get there
The first hint excludes all sums equal to 2, 14, 16, or >=18. Otherwise there would be always (at least) one option where Bernard could know the birthdat.
The second hint excludes all dates for which only combinations where product and sum are the same exist, e.g. 5/1 and 1/5.

That reduces everything to the following dates:
product 4: 04/01, 02/02, 01/04
product 9: 09/01, 03/03, 01/09
product 14: 07/02, 02/07, 01/14
product 16: 08/02, 04/04, 02/08, 01/16
product: 36: 12/03, 09/04, 06/06, 04/09, 03/12
product 42: 07/06, 06/07, 03/14

Because Albert still doesn't know, we exclude 02/02, 03/03, 04/04, and 06/06 (unique sums). Bernard could now conclude that the puzzle is insolvable if the product were 4, 9, or 36. As he doesn't do so, we can exclude those dates as well.

Of the remaining dates
product 14: 07/02, 02/07, 01/14
product 16: 08/02, 04/04, 02/08, 01/16
product 42: 07/06, 06/07, 03/14
only 01/14 has a unique sum.


Edit:
I noticed that I forgot the product 30: 10/03, 06/05, 05/06, 03/10, 02/15, but that doesn't change the result.
Title: Re: Maths thread.
Post by: pacovf on April 16, 2015, 07:36:09 pm
Quote
Because Albert still doesn't know, we exclude 02/02, 03/03, 04/04, and 06/06 (unique sums).

While what you are saying is true, what Albert is saying is stronger than just not knowing.

EDIT: damn I just noticed there's a problem here. Let me think.

EDIT 2: Ok, no it's fine, there's still a single solution, only not the one I thought. Keep going!
Title: Re: Maths thread.
Post by: pacovf on April 16, 2015, 08:01:14 pm
Ok, with the current wording of the puzzle, no date leads to that conversation. I hadn't noticed that 2/2, 3/3, 4/4 and 6/6 had unique sums.

Please replace the last two sentences with:

Bernard: Thanks, now I do know Cheryl's birthday.

Albert: So do I!

A shame, the other version was cuter.
Title: Re: Maths thread.
Post by: ghostofmars on April 16, 2015, 08:18:11 pm
I fixed the error in my solution with the new version and get the same date as before.

In addition to 02/02, 03/03, 04/04, and 06/06, Albert excludes all dates that sum up to 5, 9, 10, 11, or 13, because they would lead to an insolvable puzzle. The remaining dates are (sum 15) 01/14, 03/12, and 12/03 and (sum 17) 01/16, 02/15, and 03/14.
Bernard's answer excludes the 03/12 and 12/03 possibility (all other products are unique). Then the only unique sum is 01/14.
Title: Re: Maths thread.
Post by: Polk5440 on April 16, 2015, 08:19:33 pm
This is what I am doing:

Quote
Albert: I don't know when Cheryl's birthday is

Eliminates dates with unique sums (1/1, 12/30, 12/31).

Quote
Albert: ...but I know that Bernard does not know too.

Eliminates sums where one of the potential dates identifies a unique product. Eliminates dates associated with sums 2, 14, 16, and >=18.

Quote
Bernard: Not only didn't I know when Cheryl's birthday was before, but I still don't know now...

Eliminates dates with unique product after eliminating the dates from Albert's declaration. Eliminates 5/5, 2/13, and 4/13.

Quote
Bernard: ... and I don't even know if we will ever be able to know.

If the birthday is such that there are multiple dates with the same (sum, product) then A and B will never know the birthday. From Bernard's perspective, this eliminates products where there is no chance to identify the birthday.

We are left with date with products 4, 9, 14, 16, 30, 36, 42.


Quote
Albert: Even after what you just said, I still don't know if we will ever be able to know either.

If Albert has a sum that is unique in the remaining set, he would know at this point. This eliminates 2/2, 3/3, 4/4, and 6/6.

If the birthday is such that there are multiple dates with the same (sum, product) then A and B will never know the birthday. From Albert's perspective, this eliminates sums where there is no chance to identify the birthday.

This eliminates sums 5, 9, 10, 11, 13, leaving only sums 15 and 17.
The dates are:
sum 15: 1/14, 3/12, 12/3
sum 17: 1/16, 2/15, 3/14.

But sum 17 each has a unique (sum, product), so A would know that they can know the date if they know (sum, product). This eliminates sum 17, leaving sum 15 dates, 1/14, 3/12, 12/3.

Quote
Bernard: Same here.

Eliminates 1/14, but that leaves 3/12 and 12/3 from which A should conclude they will never know.
Title: Re: Maths thread.
Post by: pacovf on April 16, 2015, 08:24:12 pm
I fixed the error in my solution with the new version and get the same date as before.

In addition to 02/02, 03/03, 04/04, and 06/06, Albert excludes all dates that sum up to 5, 9, 10, 11, or 13, because they would lead to an insolvable puzzle. The remaining dates are (sum 15) 01/14, 03/12, and 12/03 and (sum 17) 01/16, 02/15, and 03/14.
Bernard's answer excludes the 03/12 and 12/03 possibility (all other products are unique). Then the only unique sum is 01/14.


Correct!


Yes, the puzzle as posted didn't have any solution. Sorry for that.
Title: Re: Maths thread.
Post by: SwitchedFromStarcraft on April 17, 2015, 08:34:37 am
I fixed the error in my solution with the new version and get the same date as before.

In addition to 02/02, 03/03, 04/04, and 06/06, Albert excludes all dates that sum up to 5, 9, 10, 11, or 13, because they would lead to an insolvable puzzle. The remaining dates are (sum 15) 01/14, 03/12, and 12/03 and (sum 17) 01/16, 02/15, and 03/14.
Bernard's answer excludes the 03/12 and 12/03 possibility (all other products are unique). Then the only unique sum is 01/14.


Correct!


Yes, the puzzle as posted didn't have any solution. Sorry for that.
Is this our first math derphammer?
Title: Re: Maths thread.
Post by: pacovf on April 17, 2015, 10:17:11 am
Could be! The one I've been sent had the following conversation:

A: I don't know the date, but I know that B doesn't know either.
B: I didn't know before, but I do now!
A: So do I!

But that leaves 3 possible dates, so I tried to change it so that it would have only 1. Turns out I ruled out all of them :P
Title: Re: Maths thread.
Post by: liopoil on May 16, 2015, 05:49:36 pm
Here's a problem that I don't know the answer to. I'm trying to solve a problem, and I computed the values for n = 1 to n = 10, then my program starts taking a long time to execute. Listed below are those 10 values. The first one is sort of shaky depending on definition I think, you could make a case for it being 0 instead. They should grow as n!, there may be combinatorial elements to the solution, and I believe that in general it will "grow more" when going from odd n to even n then from even n to odd n. Any idea what the general value is for n?

(1)
1
1
2
4
18
54
471
2246
25989

I can also just post the actual problem if people would rather have that. EDIT: Posted, and my program finally finished for n = 10.
Title: Re: Maths thread.
Post by: pacovf on May 16, 2015, 05:52:38 pm
I don't understand, what is it that you have to do?
Title: Re: Maths thread.
Post by: liopoil on May 16, 2015, 05:56:38 pm
I don't understand, what is it that you have to do?
Find the pattern!
Title: Re: Maths thread.
Post by: Titandrake on May 16, 2015, 06:00:21 pm
Well, OEIS doesn't report anything, so it obviously has no pattern. OEIS knows all.

You should probably just post the problem, there's no guarantee a pattern exists at all and your question is too vague to answer.
Title: Re: Maths thread.
Post by: liopoil on May 16, 2015, 06:05:36 pm
Well, I don't know what OEIS is, but okay...

Consider the n vertices of an n-gon. How many distinct ways are there to draw lines connect the dots such that each dot is used in exactly two lines, and there is a path of lines between any given two points (it is a complete cycle), in terms of n? Two dot-connectings are distinct if they cannot be made to look identical by rotation.

The problem wording is my own, so I'll answer any clarifying questions. And Titandrake is right, there might not be a nice pattern.
Title: Re: Maths thread.
Post by: qmech on May 16, 2015, 06:34:40 pm
OEIS is the Online Encyclopedia of Integer Sequences is a list of ... integer sequences ... compiled so that if you come across a sequence of numbers in the course of solving a problem you can look it up and see if anyone else has found the same sequence before in some other context.  You can then look for connections between their problem and your own.

Counting your objects exactly is probably hard.  My instinctive guess is that the answer is (n-1)!/2 asymptotically, as I expect that most patterns aren't fixed by any non-trivial rotation.

I think what you're counting is cyclic permutations on n elements modulo the taking of inverses and conjugation by powers of the standard cyclic permutation (1 2 ... n).  Conceivably somebody has counted that before.
Title: Re: Maths thread.
Post by: liopoil on May 16, 2015, 06:43:55 pm
Well, I'm not sure what "modulo the taking of inverses and conjugation by powers of the standard cyclic permutation" means, but in my program I find all cyclic sequences of n integers with values in the range 1 to n-1 such that no strict subset of consecutive integers in the cycle add up to a multiple of n and the sum of all the integers is not greater than n * floor(n/2). Is this the same?

EDIT: I also noticed that any such cyclic sequence is a juggling pattern!
Title: Re: Maths thread.
Post by: qmech on May 16, 2015, 07:09:29 pm
I don't immediately see that that corresponds with the description you gave before (but it might do!).  The first condition is equivalent to the fact that you're looking at cycles.  The second says something like "the cycles does not wrap around more than n/2 times", but I can't see what that has to do with rotations.  Is it maybe something to do with reflections/choosing directions?

Sorry for dropping all that jargon without an explanation.  My intention was to indicate that, since these things have names, it's possible that somebody has looked at them before.  I'll risk making things worse by saying more.  Do feel free to ignore.

Go back to your original picture, label the vertices 1 to n and choose a direction for your cycle arbitrarily.  Your picture now defines a function, where the rule is "follow the cycle to the next element".  This function is in fact a permutation (as different inputs map to different outputs) so lives in the "symmetric group" S_n.  Since you don't care about the direction you chose for your cycle, you don't want to count following the cycle forwards and backwards as distinct.  Since following the cycle backwards corresponds to a function that undoes the first function, you want to count permutations and their "inverses" as the same.

Now rotations.  If you rotate your circuit one position then you get a new function.  If you write down the definition of this function then it's the same as the definition of the old function except that you replace x by x+1 everywhere (mod n).  (Or x-1 depending on the direction you rotate compared to the direction in which you labelled the points originally.)  This corresponds to a group theoretic operation called conjugation.

"Modulo X" just means "ignoring differences of the form X".  This is just like saying 1 = 7 mod 3 -- 1 and 7 are "the same" if you ignore 3.

This translation is unlikely to help you with your problem.
Title: Re: Maths thread.
Post by: liopoil on May 16, 2015, 07:28:10 pm
Okay, yes I do think our statements were equivalent. If we have a cycle and its inversion, one of the cycles wraps around more than n/2 times and the other doesn't, so that bit made sure to count each just once. I chose clockwise to be the positive direction, so counted "times going around" as if each line went around the circle clockwise until it got to its destination. Rotations I just checked in my program by making sure each cycle wasn't a rotation of one I already found, by recording all the rotations of a cycle when I found it. I'm sure it was very inefficient, but it works. The xth number in the sequence represents how many dots around from the xth dot in the clockwise direction the dot that the line goes to from the xth dot is.

What if we also ignore reflections? This just makes it even harder, right?
Title: Re: Maths thread.
Post by: qmech on May 16, 2015, 07:57:45 pm
Okay, yes I do think our statements were equivalent. If we have a cycle and its inversion, one of the cycles wraps around more than n/2 times and the other doesn't, so that bit made sure to count each just once. I chose clockwise to be the positive direction, so counted "times going around" as if each line went around the circle clockwise until it got to its destination. Rotations I just checked in my program by making sure each cycle wasn't a rotation of one I already found, by recording all the rotations of a cycle when I found it.

Ah, I see now: that was just enumerating cycles.  The rotations comes in later.

Quote
What if we also ignore reflections? This just makes it even harder, right?

I don't think it makes it easier.
Title: Re: Maths thread.
Post by: heron on May 16, 2015, 08:33:00 pm
I have found a summation which gives the solution for odd numbers (I think).

It is:

(1/n)(Sum of ((d - 1)! / 2)((n / d)^(d - 1))phi(n / d)^2 over all d such that d|n),

where phi(n) is the Euler phi function.

Similar summation for even numbers coming soon, maybe. They are kind of a pain.
Explanation also coming soon, probably. Basically I used Burnside's Lemma and then thought a lot and then decided that even numbers are bad.

Edit: rewrote for clarity, maybe?
Edit2: I think maybe I messed up and this stops working around either n = 15 or n = 27. Not sure yet.
Edit3: Upon further reflection, I am confident that I didn't mess up.
Title: Re: Maths thread.
Post by: liopoil on May 16, 2015, 08:45:12 pm
I am not sure what you mean by d|n of x, where x is that crazy expression. I understand that the vertical line means "is a divisor of", but how it relates to n of x, since x is just a number... that is strangely in terms of d.
Title: Re: Maths thread.
Post by: heron on May 16, 2015, 08:58:14 pm
I am not sure what you mean by d|n of x, where x is that crazy expression. I understand that the vertical line means "is a divisor of", but how it relates to n of x, since x is just a number... that is strangely in terms of d.

Oh sorry if that was confusing. I mean that you plug in all of the divisors of n into x, and add up the results. So if we say x = x(d) for a specific d, then for example the formula for 6 is (1/6)(x(1) + x(2) + x(3) + x(6)). Hopefully that clears it up; I don't really know what the proper way to write this is without using summation notation, which is hard to do on the forum.

I made an edit that hopefully is more clear now.
Title: Re: Maths thread.
Post by: liopoil on May 16, 2015, 09:10:08 pm
Ahh, that makes sense. Okay, I'll test the first few odd n:


1: 0, yeah the problem isn't too well defined for this one.
3: 1/6. Uh....
5: 33/10

Or am I evaluating it wrong?
Title: Re: Maths thread.
Post by: heron on May 16, 2015, 09:16:36 pm
Ahh, that makes sense. Okay, I'll test the first few odd n:


1: 0, yeah the problem isn't too well defined for this one.
3: 1/6. Uh....
5: 33/10

Or am I evaluating it wrong?

Yea, I think so. For 1 you should be getting (1/1)((1/2)(1^0)(1^2)) = 1/2. (which is weird, but 1 is weird).

For 3 you should get (1/3)((1/2)(3^0)(2^2) + (1)(1^2)(1)) = (1/3)(2 + 1) = 1.

For 5 you should get (1/5)((1/2)(5^0)(4^2) + (12)(1^4)(1)) = (1/5)(8 + 12) = 4.
Title: Re: Maths thread.
Post by: liopoil on May 16, 2015, 09:37:15 pm
Ahh, I was evaluating phi(1) = 0, phi(3) = 1, phi(5) = 3, because I wasn't counting 1 as relatively prime to 1, 3, and 5 for some reason. Great! Then 7 gives (1/7)((1/2)(7^0)(6^2) + 360(1^6)(1^2)) = 378/7 = 54, and 9 gives (1/9)((1/2)(9^0)(6^2) + 1(3^2)(2^2) + (8!/2)(1^8)(1^2)) = 1/9(18 + 36 + 20160) = 2 + 4 + 2240 = 2246. Hey, they all fit my brute force answers, cool!
Title: Re: Maths thread.
Post by: heron on May 16, 2015, 09:53:17 pm
And here is an explanation:

First, read this: http://en.wikipedia.org/wiki/Burnside%27s_lemma
If you don't know all of the terms, that's okay, just read the example application and it will probably make sense. Burnside's lemma is pretty intuitive I think.



Anyway, the (1/n) is because there are n possible rotations. Then, the summation term thing (which was being called x earlier, I will probably continue to do this) is the number of cycles with n/d-symmetry. (for example, a regular hexagon has 1-symmetry, 2-symmetry, 3-symmetry, and 6-symmetry).
A cycle is invariant under a rotation by k/n revolutions if and only if the cycle has gcd(k,n) symmetry. The number of k ≤ n such that gcd(k,n) = d is equal to phi(n/d), which explains one of the phi(n/d) in the summation term.

So, we need to count the number of cycles with d-symmetry. For odd n, this is (((d - 1)! / 2)((n / d)^(d - 1))phi(n / d).
Notice that if the graph has d-symmetry, if vertex a is linked to vertex b, then vertex a + d is linked to vertex a + d + b (where the vertices are labeled in order and the labels are taken modulo n). So, we can divide the vertices into d groups of n/d vertices. If d > 1, then no vertex can be linked to any vertex in its own group, because then its group would just become a cycle by itself (this is the step which is false if n is even).

Now, if a vertex in group A is linked to a vertex in group B, then all of the vertices in group A are linked to a vertex in group B. So, the ways all of the groups are linked form a cycle of their own, which I'll call a group-cycle. Since there are d groups, there are (d - 1)! / 2 possible group cycles.

Now we need to count the number of cycles you can form given a certain group-cycle. Say d = 5 and our group cycle is A to B to C to D to E and back to A. Then, starting with a vertex in group A, we have n/d choices of what vertex to link to in B, then n/d choices for what to link to in C, then n/d choices for what to link to in D, and finally n/d choices for what to link to in E, for (n/d)^(d - 1) total possible choices (so far).

Now, how many ways are there to link back to A? If we link back to the wrong vertex in A, for example if we link back to the vertex we started with, then we will get multiple cycles rather than one big cycle. Label the vertices of group A in order as 0, 1, 2, ... n/d - 1, where 0 is the vertex we started with and the labels are taken modulo n/d. Say the vertex we link back to is vertex m. Then, as we go from vertex m to a vertex in B and then a vertex in C and so on, when we get back to group A again, we will land on vertex 2m. And if we do that again, we will land on 3m, 4m, etc. until we land on 0 again. Now, if m is not relatively prime to n/d, there will be some vertices of A which we never landed on, so we would not have a full cycle. Therefore we must pick a vertex m such that m and n/d are relatively prime; there are phi(n/d) ways to do this.

Multiplying all that stuff together, we get ((d - 1)! / 2)((n / d)^(d - 1))phi(n / d) cycles with d-symmetry.

Finally, the case where d = 1 is pretty straightforward and similar to what we just did. Label the vertices 0, 1, 2, ..., n - 1 and the labels are taken modulo n. If 0 is linked to m, then m is linked to 2m, and so on, until we get back to 0. This will only produce a full cycle if m is relatively prime to n, so there are phi(n) valid choices of m. However, linking 0 to m results in the same cycle as linking 0 to -m, so we actually only have phi(n)/2 choices. Fortunately phi(n)/2 = ((1 - 1)! / 2)((n / 1)^0)phi(n / 1), so we don't need to special case this in our summation.

Now, we just apply Burnside's Lemma to get (1/n)(Sum of ((d - 1)! / 2)((n / d)^(d - 1))phi(n / d)^2 over all d such that d|n)   :D

Since that probably was not clear at all, feel free to ask questions.
Title: Re: Maths thread.
Post by: SwitchedFromStarcraft on May 17, 2015, 09:57:49 am
Sometimes I miss being in school.
Title: Re: Maths thread.
Post by: heron on May 18, 2015, 06:19:22 pm
Here is a problem:

How can liopoil's problem (or a special case of it anyway) be used to prove Wilson's Theorem?

Wilson's Theorem states that for any odd prime p, (p - 1)! = -1 (mod p).
Title: Re: Maths thread.
Post by: liopoil on May 18, 2015, 06:29:40 pm
WOAAHH my problem is way more interesting than I expected. Will think about this soon... I've read your solution, understood like the first half and just need to spend a bit more time to work through the rest. One quick question though, how are you forming these groups? If that's specific enough of a question...
Title: Re: Maths thread.
Post by: heron on May 18, 2015, 06:33:52 pm
WOAAHH my problem is way more interesting than I expected. Will think about this soon... I've read your solution, understood like the first half and just need to spend a bit more time to work through the rest. One quick question though, how are you forming these groups? If that's specific enough of a question...

Each group just consists of every d-th vertex. I grouped them this way because if the cycle has d-symmetry, then every d-th vertex is doing the same thing, so I can think about them all at once instead of individually.

Edit: btw the Wilson's theorem thing is much easier than your problem imo.
Title: Re: Maths thread.
Post by: Kirian on May 18, 2015, 07:57:33 pm
Here is a problem:

How can liopoil's problem (or a special case of it anyway) be used to prove Wilson's Theorem?

Wilson's Theorem states that for any odd prime p, (p - 1)! = -1 (mod p).

Isn't this also true for 2?
Title: Re: Maths thread.
Post by: liopoil on May 18, 2015, 08:03:35 pm
Here is a problem:

How can liopoil's problem (or a special case of it anyway) be used to prove Wilson's Theorem?

Wilson's Theorem states that for any odd prime p, (p - 1)! = -1 (mod p).

Isn't this also true for 2?
Yes well that's not what the theorem states apparently :P
Title: Re: Maths thread.
Post by: Titandrake on May 18, 2015, 11:00:24 pm
heron, is the idea you're thinking of the last proof in the Wikipedia page for Wilson's Theorem, using Sylow theorems?
Title: Re: Maths thread.
Post by: heron on May 18, 2015, 11:37:25 pm
heron, is the idea you're thinking of the last proof in the Wikipedia page for Wilson's Theorem, using Sylow theorems?

Well, I was thinking of something much more elementary. I don't actually know group theory, I just basically just know Burnside's Lemma and the Orbit-Stabilizer Theorem.
But I tried to read the wikipedia stuff about that, and I think I understood most of it. The basic idea is the same I think, and the first steps of that proof are identical to the proof I am thinking of. However, the finish is different. If I understood the proof of Sylow theorems then maybe I would be able to tell if it is essentially the same proof or not.

Anyway, the proof I am thinking of relies on nothing other than counting stars. (mild hint spoilered)
Title: Re: Maths thread.
Post by: GeoLib on May 23, 2015, 05:40:28 pm
Ok I have a problem that I don't really know the answer too. Or rather, I have two contradictory answers that I'm trying to reconcile. Perhaps it's more suited to the logic puzzles thread, but I think reconciling the answers might be a math issue. Anyways:

There is a king with a kingdom of countably infinite people. He decides to play a game with his subjects. This game consists of multiple rounds. In the first round, he calls one of his subjects to play. They come to the castle and he flips two coins. If they're both heads then that person wins and the game is over. Otherwise, he calls up two people, flips two coins. If they're both heads those people both win and the game is over. Otherwise, he calls up four people, etc. The game ends as soon as someone wins. In each round twice as many people come up and their fates are still decided by two coin flips.

You are called by the King. What is your probability of winning?
Title: Re: Maths thread.
Post by: liopoil on May 23, 2015, 06:01:26 pm
If I understand right, the answer would be 1/4, simply the probability both are heads. You are called, so you will get a chance at the coins being flipped, and no other chances.
Title: Re: Maths thread.
Post by: GeoLib on May 23, 2015, 06:14:58 pm
If I understand right, the answer would be 1/4, simply the probability both are heads. You are called, so you will get a chance at the coins being flipped, and no other chances.

Yeah this is one answer and I think the right one. So the question is, how do you reconcile this: No matter when the game ends, there are more winners than losers. Say the King flipped all the coins and figured everything out first, and only then started calling people to tell them whether they've won or lost. This seems like exactly the same game, but he calls more people to tell them they've won than he calls people to tell them they've lost.
Title: Re: Maths thread.
Post by: liopoil on May 23, 2015, 06:44:28 pm
Hmm, okay. So if we solve it that way, the question is, what fraction of people are winners? This is always greater than .5 as you say, but it varies. Possible fraction sequence is 1, 2/3, 4/7, 8/15.... and in general if the game ends in the nth round the fraction is 2^(n - 1)/(2^n - 1). What is the probability that it ends in the nth round? 1/4, 3/16, 9/64, 27/256..., or in general (1/4)*((3/4)^(n - 1). So the expected fraction is the infinite series formed from the product of the two:

1/4 + 1/8 + 9/112 + ...

and in general the nth term of the series is 6^(n - 1)/(2^3n - 2^2n), which you can check for yourself by multiplying.

And... I'll let somebody else figure out if the series converges and if so what to. But clearly if it converges it is greater than 1/4, and after just 3 terms it is 5/112 away from 1/2, so my guess is that's where it converges. So I am very confused too, unless this series doesn't converge for some reason.
Title: Re: Maths thread.
Post by: sitnaltax on May 23, 2015, 06:50:24 pm
It looks to me like the apparent paradox is resolved by the fact that in the second scenario, you have an additional piece of information: the knowledge that the experiment is already over.

I am also reminded of the two-envelopes paradox, although I can't put my finger on exactly why.
Title: Re: Maths thread.
Post by: liopoil on May 23, 2015, 06:58:25 pm
It looks to me like the apparent paradox is resolved by the fact that in the second scenario, you have an additional piece of information: the knowledge that the experiment is already over.

I am also reminded of the two-envelopes paradox, although I can't put my finger on exactly why.
Why is that fact relevant?

The envelopes paradox I resolve to myself by reasoning that you can't actually choose a real number (or a rational number?) uniformly at random. That doesn't happen here.
Title: Re: Maths thread.
Post by: scott_pilgrim on May 23, 2015, 07:48:42 pm
I think the problem comes from two different ways of multiplying zero by infinity, basically.  In both cases, you know that you are going to be chosen out of a countably infinite number of people, so there is a 0% chance that that will happen.  You're looking at two different ways of that 0% actually happening, and since the problem doesn't tell you which way is the right one, you could come up with different answers depending on how you look at it.  The difference is between determining how many people are going to be called in first, and then knowing that you're one of them; and having no idea where you are in the line-up, but knowing that you're going to play, and that when you do, you have a 1/4 chance of winning.  So basically, I think sitnaltax has it right.

For some reason it reminds me of this: http://en.wikipedia.org/wiki/Bertrand_paradox_(probability) (http://en.wikipedia.org/wiki/Bertrand_paradox_(probability))
Title: Re: Maths thread.
Post by: GeoLib on May 23, 2015, 07:58:58 pm
Hmm, okay. So if we solve it that way, the question is, what fraction of people are winners? This is always greater than .5 as you say, but it varies. Possible fraction sequence is 1, 2/3, 4/7, 8/15.... and in general if the game ends in the nth round the fraction is 2^(n - 1)/(2^n - 1). What is the probability that it ends in the nth round? 1/4, 3/16, 9/64, 27/256..., or in general (1/4)*((3/4)^(n - 1). So the expected fraction is the infinite series formed from the product of the two:

1/4 + 1/8 + 9/112 + ...

and in general the nth term of the series is 6^(n - 1)/(2^3n - 2^2n), which you can check for yourself by multiplying.

And... I'll let somebody else figure out if the series converges and if so what to. But clearly if it converges it is greater than 1/4, and after just 3 terms it is 5/112 away from 1/2, so my guess is that's where it converges. So I am very confused too, unless this series doesn't converge for some reason.


After 1000 terms its at 0.671837 and it's still there at 10000, so that's probably about right.


It looks to me like the apparent paradox is resolved by the fact that in the second scenario, you have an additional piece of information: the knowledge that the experiment is already over.

I am also reminded of the two-envelopes paradox, although I can't put my finger on exactly why.

Yeah something involving you getting new information might be it.

The other thing is that while the fraction that are winners and the number of rounds are convergent series, the total number of players is not. I don't know if we're losing something in the infinity. Like perhaps it doesn't even make sense to talk about the king finishing choosing everyone and then calling them because he would have to have already picked out an undefined number of people.

PPE: I will check out the Bertrand Paradox
Title: Re: Maths thread.
Post by: Ghacob on May 23, 2015, 08:43:07 pm
http://www.wolframalpha.com/input/?i=0.671837+possible+closed+forms

Definitely one of those is what we're looking at here
Title: Re: Maths thread.
Post by: Titandrake on May 23, 2015, 09:22:19 pm
The envelopes paradox I resolve to myself by reasoning that you can't actually choose a real number (or a rational number?) uniformly at random. That doesn't happen here.

I don't see how that's part of the paradox? I thought the paradox was that you can show that you should switch envelopes indefinitely.

If you're talking about the strategy that gives > 50% chance of picking the envelope with more money, it's not a paradox, it's just an incredibly unintuitive result.
Title: Re: Maths thread.
Post by: liopoil on May 23, 2015, 09:40:09 pm
The envelopes paradox I resolve to myself by reasoning that you can't actually choose a real number (or a rational number?) uniformly at random. That doesn't happen here.

I don't see how that's part of the paradox? I thought the paradox was that you can show that you should switch envelopes indefinitely.

If you're talking about the strategy that gives > 50% chance of picking the envelope with more money, it's not a paradox, it's just an incredibly unintuitive result.
The reasoning behind switching envelopes indefinitely assumes that the other envelope is equally likely to have half or twice as much money, and this is only true if we chose one of the values uniformly at random. I haven't heard of that strategy you mention.
Title: Re: Maths thread.
Post by: pacovf on May 23, 2015, 10:43:13 pm
This problem reminds me of the common Casino get-rich scheme: after any loss, double the bet, and that way you are guaranteed to eventually get the initial bet. Easy money!

Of course, the problem with that scheme is that you can't keep doubling the bet indefinitely, because your money is finite. As sitnaltax said, the source of the paradox here is that in one case you are assuming a finite number of trials, but not in the other.

EDIT: You can use 2^(n-1) < 2^n -1 < 2^n to find a lower and upper bound of the series (2/3 and 4/3, if the cold is not negatively affecting my calculating skills). And since all the terms of the sum are positive, the upper bound also proves the convergence.
Title: Re: Maths thread.
Post by: scott_pilgrim on May 23, 2015, 11:18:21 pm
It also reminds of me of the game where I pay you $k to play, and the we flip a coin.  If tails, the game ends and you pay me $1.  If heads, we flip another coin.  If tails the game ends and you pay me $3.  If heads, we flip another coin.  Repeat until you get tails, and then pay me $3^n, where n is the number of heads flipped.

The funny thing about that game is that the expected payout is infinite, which means in theory I should be willing to pay you any (finite) amount of money to play it.
Title: Re: Maths thread.
Post by: Titandrake on May 23, 2015, 11:20:29 pm
The >50% strategy is actually for a different problem, but I'll share it anyways because it's pretty cool.

In this problem, there are two envelopes. One has more money than the other, but you don't know what the amounts are. You're given an envelope and can see how much money is inside. After doing so, you can either keep this envelope or switch with the other one. You can only do this once.

Given that you don't know the values, it's strange that you can ensure a >50% chance you pick the better envelope. The trick is that you choose whether to switch randomly, in a way that is more likely to switch when you have the smaller envelope.

For simplicity, let the envelope values be A and B, where A < B and both are positive integers. Use the following switching scheme: look at the amount of money in your envelope, let's say that's M. Flip a fair coin M times. If you get all heads, switch envelopes. Otherwise, keep envelopes.

The chance you get the envelope with B is 1/2 * (1 - 1/2^B) + 1/2 * (1/2^A) = 1/2 + 1/2^{A+1} - 1/2^{B+1}. Since A < B, this is very slightly larger than 1/2.

What we're basically doing here is getting a sample from the geometric distribution, the number of trials needed before reaching an ending condition. In this scheme, it's # of flips until first tails. If the sample (the # of flips) is >= M we switch, and otherwise we don't. To generalize this to real numbers, you can use a continuous probability distribution, such as the normal distribution. All you need is P(sample >= A) > P(sample >= B) for A < B, which is always true as long as your distribution has non-zero weight over the range [0, infinity)
Title: Re: Maths thread.
Post by: DStu on May 24, 2015, 02:23:49 am
If I understand right, the answer would be 1/4, simply the probability both are heads. You are called, so you will get a chance at the coins being flipped, and no other chances.

Yeah this is one answer and I think the right one. So the question is, how do you reconcile this: No matter when the game ends, there are more winners than losers. Say the King flipped all the coins and figured everything out first, and only then started calling people to tell them whether they've won or lost. This seems like exactly the same game, but he calls more people to tell them they've won than he calls people to tell them they've lost.

The difference between both scenarios is that you somewhere in between flip an expectation value and a limes, and you can't do this here.

I can't exactly put the finger on it, because I also think it depends a bit on how you want to put it exactly mathematically. This is already not trivial, as there are some other problems in this, too; like for example the non-existence of a uniform distribution on a countable infinite set (you can't just say you are on a random position).  This would be solveable by e.g. assuming #coin tosses < N, in this scenario you could calculate everything (and get to the conclusion that it is more likely to win than lose) and then letting N->\inf, but there you get your problem with swapping expectation and limes.

Edit:
So in abstract the difference between the two approaches is that you are in a situation where you can either have a straightforeward calculation of you odds (two coins -> 1/4), or go back to the broad situation with subtle mathematical problems like infinities and conditional expectiations and such, and try to get your odds from this picture.

/edit

Quote
This problem reminds me of the common Casino get-rich scheme: after any loss, double the bet, and that way you are guaranteed to eventually get the initial bet. Easy money!

Of course, the problem with that scheme is that you can't keep doubling the bet indefinitely, because your money is finite. As sitnaltax said, the source of the paradox here is that in one case you are assuming a finite number of trials, but not in the other.
Even if you could, this is the same "paradox", as your expected win at each time is 0, but at the end is 1.  Again, you swapped expectation and limes somewhere.
Title: Re: Maths thread.
Post by: Witherweaver on May 24, 2015, 07:42:09 am
Again, you swapped expectation and limes somewhere.

You can only swap expectations and limes in the presence of some convergence theorem, e.g., monotone convergence or dominated convergence.  Monotone convergence is when all the limes are in order of color tone.  Dominated convergence is when the limes become sentient and take over Earth as benevolent overlords. 
Title: Re: Maths thread.
Post by: liopoil on May 24, 2015, 08:54:06 am
Okay, what's a lime?
Title: Re: Maths thread.
Post by: Ghacob on May 24, 2015, 09:09:38 am
Okay, what's a lime?
                                                 Moat                                 
Title: Re: Maths thread.
Post by: Witherweaver on May 24, 2015, 09:23:51 am
Okay, what's a lime?

Limit.  I'm not sure if Dstu just says that or it was some weird autocorrect.  But the idea is, suppose you have functions {f_n} and some limiting function f such that f_n -> f pointwise, meaning that for each x in the common domain,

lim_{n-> inf} f_n(x) = f(x).

Now what can we say about int(f_n) vs int(f)?  Well, it is not in general true that the sequence {int(f_n)} converges to int(f).  There is a fairly trivial counterexample, but I'd have to think of what it is, and I don't have the time right now.  I think maybe something like sin(nx)/n.  To get the limit of the integrals to converge to the integral of the limit (i.e., to interchange limits and integrals), you need some more assumptions on the functions.  The Monotone Convergence Theorem and the Dominated Convergence Theorem provide two such conditions for when you can do this.

Expectations are simply integrals, where the integration is done in some probability measure.

Now I have explained my joke, so you may find it very much funny and adorn it with upvotes. 
Title: Re: Maths thread.
Post by: DStu on May 24, 2015, 09:54:38 am
... and to explain the lime, it was early, my English was still half asleep and was under the illusion that the latin word used in German can't be so wrong.
Title: Re: Maths thread.
Post by: Witherweaver on May 24, 2015, 01:11:13 pm
Lime is Latin for limit?  That's interesting.. I wonder how the word came about for the fruit.
Title: Re: Maths thread.
Post by: DStu on May 24, 2015, 01:11:26 pm
Lime is Latin for limit?  That's interesting.. I wonder how the word came about for the fruit.
Limes

edit: lol
Quote from: wikipedia
Limes
From Wikipedia, the free encyclopedia
For the fruit, see Lime (fruit). For the mathematical concept, see Limit (mathematics).

A limes (/ˈlaɪmiːz/;[1] Latin pl. limites) was a border defence or delimiting system of Ancient Rome. It marked the boundaries of the Roman Empire.
Title: Re: Maths thread.
Post by: qmech on May 24, 2015, 05:12:52 pm
There is a fairly trivial counterexample, but I'd have to think of what it is, and I don't have the time right now.

Very tall, very thin spikes, say with height n and width 1/n.
Title: Re: Maths thread.
Post by: sudgy on May 27, 2015, 04:18:24 pm
Random game theory question I was wondering (I don't know any game theory, so your explanations won't make sense, I just want an answer (discuss your explanations with each other of course if you want)):

Think of the candy jar game.  There is a certain amount of candy in a jar and several people guess how much there is.  Whoever guesses the closest wins.  Now, here's the catch:  If two people guess the same amount above and below (say the answer is 207 and two people guessed 205 and 209), then the person with the higher number wins.  How will this affect your strategy?

And, a hard mode I guess: I was thinking of this because of a candy jar I'm making with nerds.  I haven't finished counting, but there will be at least 10,000 nerds in it.  It looks like there's less nerds than there are for some reason, and when I had 7000 in there my brother thought there were 2000.  Would knowing that everybody will guess lower than the actual amount affect the answer to the first question?
Title: Re: Maths thread.
Post by: theory on May 27, 2015, 04:31:27 pm
I think as defined that problem is too vague to admit of a precise answer.  But note that problems very similar to yours have extremely unexpected results. 

http://blog.xkcd.com/2010/02/09/math-puzzle/
http://mathoverflow.net/questions/9037/how-is-it-that-you-can-guess-if-one-of-a-pair-of-random-numbers-is-larger-with
Title: Re: Maths thread.
Post by: scott_pilgrim on May 27, 2015, 04:37:34 pm
I don't think it's a game theory problem, because a candy jar game like that assumes that people aren't perfectly rational (or else they'd just be able to count the number exactly).  If you're just using the overestimate vs. underestimate as a tiebreaker, I think it would have basically no impact on how you play, especially if you're talking about a number around 10,000.  I guess it also depends on how many people are playing (you would prefer to overestimate with more players since a tie is more likely), but you'd need a lot of players I think before you cared about that.

You could do it Price Is Right-style and say whoever guesses closest without going over (or under, since you want people to make bigger guesses) wins.

A fun related game theory problem: You have n people bidding on a $100 bill.  They bid secretly, can't communicate with each other, and can only bid in integer numbers of dollars.  Whoever bids the highest amount without tying with someone else wins.  How much do you bid?  (I remember hearing a problem like this but I have no idea how to solve it...)
Title: Re: Maths thread.
Post by: Kirian on May 27, 2015, 05:12:34 pm
Random game theory question I was wondering (I don't know any game theory, so your explanations won't make sense, I just want an answer (discuss your explanations with each other of course if you want)):

Think of the candy jar game.  There is a certain amount of candy in a jar and several people guess how much there is.  Whoever guesses the closest wins.  Now, here's the catch:  If two people guess the same amount above and below (say the answer is 207 and two people guessed 205 and 209), then the person with the higher number wins.  How will this affect your strategy?

And, a hard mode I guess: I was thinking of this because of a candy jar I'm making with nerds.  I haven't finished counting, but there will be at least 10,000 nerds in it.  It looks like there's less nerds than there are for some reason, and when I had 7000 in there my brother thought there were 2000.  Would knowing that everybody will guess lower than the actual amount affect the answer to the first question?

Yet your jar still has fewer nerds than this thread.
Title: Re: Maths thread.
Post by: sudgy on May 27, 2015, 05:17:49 pm
Okay, think of it this way:  There are p players, whose guesses average the actual number n with a standard deviation σ (this is how your answer is found too, since you can't count the actual number).  With that tiebreaker rule, how different would you want your guess to be from the normal way of guessing?

Hard mode would be where the average guess is lower than n.
Title: Re: Maths thread.
Post by: eHalcyon on May 27, 2015, 05:30:00 pm
And, a hard mode I guess: I was thinking of this because of a candy jar I'm making with nerds.  I haven't finished counting, but there will be at least 10,000 nerds in it.  It looks like there's less nerds than there are for some reason, and when I had 7000 in there my brother thought there were 2000.  Would knowing that everybody will guess lower than the actual amount affect the answer to the first question?

10,000 seems like a lot of people to be making just one candy jar.  Is it a really big jar?  That's a pretty impressive turnout though.  Be careful with fire codes, especially if your brother is so bad at counting that he loses 5000 RSVPs.  Make sure your location can safely hold such a mass of people.

Edit: didn't see there was a second page where Kirian sort of made this joke already...
Title: Re: Maths thread.
Post by: eHalcyon on May 27, 2015, 05:56:14 pm
A fun related game theory problem: You have n people bidding on a $100 bill.  They bid secretly, can't communicate with each other, and can only bid in integer numbers of dollars.  Whoever bids the highest amount without tying with someone else wins.  How much do you bid?  (I remember hearing a problem like this but I have no idea how to solve it...)

Reminds me of the Dollar Auction (http://en.wikipedia.org/wiki/Dollar_auction), which is hilarious.
Title: Re: Maths thread.
Post by: liopoil on May 27, 2015, 09:32:01 pm
A fun related game theory problem: You have n people bidding on a $100 bill.  They bid secretly, can't communicate with each other, and can only bid in integer numbers of dollars.  Whoever bids the highest amount without tying with someone else wins.  How much do you bid?  (I remember hearing a problem like this but I have no idea how to solve it...)
This is super-dependent on n. For n = 2, both bid 99. For other n...
Title: Re: Maths thread.
Post by: eHalcyon on May 27, 2015, 09:40:23 pm
A fun related game theory problem: You have n people bidding on a $100 bill.  They bid secretly, can't communicate with each other, and can only bid in integer numbers of dollars.  Whoever bids the highest amount without tying with someone else wins.  How much do you bid?  (I remember hearing a problem like this but I have no idea how to solve it...)
This is super-dependent on n. For n = 2, both bid 99. For other n...

n = 3.  If the other two bid 99, I should just bid 98.  But if somebody else bids 98, then 99 is the place to be again...
Title: Re: Maths thread.
Post by: Kirian on May 27, 2015, 09:53:16 pm
A fun related game theory problem: You have n people bidding on a $100 bill.  They bid secretly, can't communicate with each other, and can only bid in integer numbers of dollars.  Whoever bids the highest amount without tying with someone else wins.  How much do you bid?  (I remember hearing a problem like this but I have no idea how to solve it...)
This is super-dependent on n. For n = 2, both bid 99. For other n...

n = 3.  If the other two bid 99, I should just bid 98.  But if somebody else bids 98, then 99 is the place to be again...

I feel like this must be related at least somewhat to this:

http://en.wikipedia.org/wiki/Unexpected_hanging_paradox
Title: Re: Maths thread.
Post by: Ghacob on May 27, 2015, 09:54:17 pm
A fun related game theory problem: You have n people bidding on a $100 bill.  They bid secretly, can't communicate with each other, and can only bid in integer numbers of dollars.  Whoever bids the highest amount without tying with someone else wins.  How much do you bid?  (I remember hearing a problem like this but I have no idea how to solve it...)
This is super-dependent on n. For n = 2, both bid 99. For other n...

n = 3.  If the other two bid 99, I should just bid 98.  But if somebody else bids 98, then 99 is the place to be again...
If the two others bid 99, you should bid 1... or 0... or -1 dollars as that too is an integer
For odd numbered n, I would just bid a negative number high in magnitude and hope everyone else cancels out, which, assuming that they are "perfectly rational" people, that should happen probably
Title: Re: Maths thread.
Post by: liopoil on May 27, 2015, 09:54:51 pm
A fun related game theory problem: You have n people bidding on a $100 bill.  They bid secretly, can't communicate with each other, and can only bid in integer numbers of dollars.  Whoever bids the highest amount without tying with someone else wins.  How much do you bid?  (I remember hearing a problem like this but I have no idea how to solve it...)
This is super-dependent on n. For n = 2, both bid 99. For other n...

n = 3.  If the other two bid 99, I should just bid 98.  But if somebody else bids 98, then 99 is the place to be again...
No, if the other two people bid the same amount, I want to bid 0 dollars. Or, since he didn't specify positive integer, a  negative number with very large absolute value.

PPE: ninja'd :(
Title: Re: Maths thread.
Post by: liopoil on May 27, 2015, 09:56:07 pm
For odd numbered n, I would just bid a negative number high in magnitude and hope everyone else cancels out, which, assuming that they are "perfectly rational" people, that should happen probably
This is flawed. Since this game is symmetric, all players ought to adopt the same strategy, and for n > 2 I am almost certain that it is a mixed strategy.
Title: Re: Maths thread.
Post by: Ghacob on May 27, 2015, 10:11:57 pm
For odd numbered n, I would just bid a negative number high in magnitude and hope everyone else cancels out, which, assuming that they are "perfectly rational" people, that should happen probably
This is flawed. Since this game is symmetric, all players ought to adopt the same strategy, and for n > 2 I am almost certain that it is a mixed strategy.

The flaw comes with how victory isn't well defined here. If the goal is to maximize profit*P(victory), as might seem reasonable, the winning strategy is the bet as large (in magnitude) a negative number as you can fit on the page (unfortunately negative infinity is not an integer)

A more reasonable goal(which I'll be thinking in terms of from now on) might be to maximize P(victory) where victory will net you a positive profit (someone betting $100 dollars or more would surely increase your chances of winning, but seems a bit... hmm...

I feel like there's some way you could improve that so that we could remove the cap but regardless

I feel like the correct answer relies on a normal curve centered at 100-n/2, although using n or n/4 seem not unreasonable
..
Can anyone else tell that I'm not doing real math, just relying on intuition?
Title: Re: Maths thread.
Post by: GendoIkari on May 27, 2015, 10:28:22 pm

A fun related game theory problem: You have n people bidding on a $100 bill.  They bid secretly, can't communicate with each other, and can only bid in integer numbers of dollars.  Whoever bids the highest amount without tying with someone else wins.  How much do you bid?  (I remember hearing a problem like this but I have no idea how to solve it...)

This is the same game that I tried to start in the forum games section, unsuccessfully: http://forum.dominionstrategy.com/index.php?topic=6372.0
Title: Re: Maths thread.
Post by: Titandrake on May 27, 2015, 10:32:50 pm
Under the following assumptions + simplifications:

Then for n = 3 the optimal strategy ends up being bidding $0 10/11 of the time and $99 1/11 of the time.

Suppose two players bet $0 with probability p and $99 with probability 1-p. The third bets with probabilities q, 1-q respectively. Then, the expected profit is

100 * q * (1-p)^2 + (1-q) * p^2

Now, we want to maximize this profit with respect to q. Note that this is linear in q - it equals

(99p^2 - 200p + 100) q + (constant with respect to q)

For p < 10/11, this coefficient is positive, and q = 1 outperforms p
For 1 >= p > 10/11, this coefficent is negative, and q = 0 outperforms p

So, the only value of p for which no deviation can improve expected profit is p = 10/11.

Now, in principle you can generalize this to the game where you can make any bet from $0 to $99, if you add more variables, but at that point this approach quickly becomes infeasible. I think even with a computer it's not solvable exactly, since I think you'd end up with non-linear constraints, but I could be wrong.
Title: Re: Maths thread.
Post by: liopoil on May 27, 2015, 10:36:00 pm
Yeah, I don't know about that. In any game, the goal is to maximize expected payoff, not 'P(victory)', because not all victories as you call them are equal. Your payoff is 0 if you don't get the $100, or if you bet $100. If you do get the $100, your payoff is 100 - your bid. The game where we are trying to name the greatest uniquely named integer less than or equal to x is an entirely different game.

PPE: Titandrake figured something out! Yeah, with 100 pure strategies I don't see this having a nice answer.
Title: Re: Maths thread.
Post by: GendoIkari on May 27, 2015, 10:37:43 pm
Under the following assumptions + simplifications:
  • The goal of each player is to maximize their expected profit.
  • The only valid bids are $0 and $99
  • For the optimal strategy, no one person can deviate and perform better.
  • The players are greedy - if there exist multiple strategies that satisfy the deviation policy, then each player chooses the strategy that maximizes the probability of a winner.

Then for n = 3 the optimal strategy ends up being bidding $0 10/11 of the time and $99 1/11 of the time.

Suppose two players bet $0 with probability p and $99 with probability 1-p. The third bets with probabilities q, 1-q respectively. Then, the expected profit is

100 * q * (1-p)^2 + (1-q) * p^2

Now, we want to maximize this profit with respect to q. Note that this is linear in q - it equals

(99p^2 - 200p + 100) q + (constant with respect to q)

For p < 10/11, this coefficient is positive, and q = 1 outperforms p
For 1 >= p > 10/11, this coefficent is negative, and q = 0 outperforms p

So, the only value of p for which no deviation can improve expected profit is p = 10/11.

Now, in principle you can generalize this to the game where you can make any bet from $0 to $99, if you add more variables, but at that point this approach quickly becomes infeasible. I think even with a computer it's not solvable exactly, since I think you'd end up with non-linear constraints, but I could be wrong.

I've never thought of this as a solvable game with an optimal solution. Logically, if there were an optimal solution, then all players could follow that optimal solution, which would mean that all players bid the same amount, leaving no winner. Therefore there cannot exist an optimal solution. It's a mix of luck and mind games.
Title: Re: Maths thread.
Post by: liopoil on May 27, 2015, 10:39:38 pm

A fun related game theory problem: You have n people bidding on a $100 bill.  They bid secretly, can't communicate with each other, and can only bid in integer numbers of dollars.  Whoever bids the highest amount without tying with someone else wins.  How much do you bid?  (I remember hearing a problem like this but I have no idea how to solve it...)

This is the same game that I tried to start in the forum games section, unsuccessfully: http://forum.dominionstrategy.com/index.php?topic=6372.0
Well, this is Gherald's game. Hey, I see I signed up for that, over two years ago, wow! Have I won yet?

I've never thought of this as a solvable game with an optimal solution. Logically, if there were an optimal solution, then all players could follow that optimal solution, which would mean that all players bid the same amount, leaving no winner. Therefore there cannot exist an optimal solution. It's a mix of luck and mind games.
No, all games are solvable. The solution is not to bid the same thing every time, it is to bid different amounts with different probabilities, just like in rock-paper-scissors the solution is to throw each with 1/3 probability.
Title: Re: Maths thread.
Post by: GendoIkari on May 27, 2015, 10:41:39 pm
Yeah, I don't know about that. In any game, the goal is to maximize expected payoff, not 'P(victory)', because not all victories as you call them are equal. Your payoff is 0 if you don't get the $100, or if you bet $100. If you do get the $100, your payoff is 100 - your bid. The game where we are trying to name the greatest uniquely named integer less than or equal to x is an entirely different game.

PPE: Titandrake figured something out! Yeah, with 100 pure strategies I don't see this having a nice answer.

Hmm, ok the idea of wanting to not only win, but win by the most, does factor into your decision. But it's still the same game with the same rules. Just reverse the numbers in my game:

"You have to name an integer that is less than 100. Whoever names the largest unique integer wins." You can say "less than 100" in the rules, because bidding 100 or more is like automatically losing; even if you technically would "win" the game in that case, you wouldn't want to. So the only difference is that with my game, there's no incentive given to winning with a larger number instead of winning with a smaller number. But you can easily decide that you want to win with a larger number instead of just winning period.
Title: Re: Maths thread.
Post by: GendoIkari on May 27, 2015, 10:45:01 pm

A fun related game theory problem: You have n people bidding on a $100 bill.  They bid secretly, can't communicate with each other, and can only bid in integer numbers of dollars.  Whoever bids the highest amount without tying with someone else wins.  How much do you bid?  (I remember hearing a problem like this but I have no idea how to solve it...)

This is the same game that I tried to start in the forum games section, unsuccessfully: http://forum.dominionstrategy.com/index.php?topic=6372.0
Well, this is Gherald's game. Hey, I see I signed up for that, over two years ago, wow! Have I won yet?

I've never thought of this as a solvable game with an optimal solution. Logically, if there were an optimal solution, then all players could follow that optimal solution, which would mean that all players bid the same amount, leaving no winner. Therefore there cannot exist an optimal solution. It's a mix of luck and mind games.
No, all games are solvable. The solution is not to bid the same thing every time, it is to bid different amounts with different probabilities, just like in rock-paper-scissors the solution is to throw each with 1/3 probability.

Not sure what you mean by all games are solvable. Many games, including this one, have a large portion of mind-games built in. There isn't simply a "single best possible move". And the idea of not doing the same thing every time only matters when playing multiple times in a row. For a single game being played, what you should bid is going to be based on what you know about the players you are playing against, and will still rely on a lot of luck. There's no logical/mathematical way to make the "best" move.

Rock-Paper-Scissors is a great example. Doing each thing at complete random might be the best strategy when playing against a computer who knows human habits. But when playing against a human, the best strategy is to use what you know about human habits, like a computer can do. Which is why a trained computer will beat a human most of the time.
Title: Re: Maths thread.
Post by: liopoil on May 27, 2015, 10:52:33 pm
The single best move is to generate a random number between 0 to 1, then bid accordingly based on some rules you make so that you make each bid with the desired probability.

I mean that any game with well-defined payoffs has a Nash equilibrium, that is, there exists a set of mixed strategies for each player such that it is impossible for any player to improve their expected payoff by deviating from their strategy. A mixed strategy is a strategy in which you choose each of the 'pure' strategies, e.g., bidding a certain value, with some probability. Dominion has a Nash equilibrium, an optimal way to play, but it is so disgusting that trying to find it is not practical.

There is still plenty of luck involved, but there is a specific strategy that maximizes your odds, and if you play any other strategy against this strategy your odds will be slightly worse.
Title: Re: Maths thread.
Post by: liopoil on May 27, 2015, 10:56:57 pm
Rock-Paper-Scissors is a great example. Doing each thing at complete random might be the best strategy when playing against a computer who knows human habits. But when playing against a human, the best strategy is to use what you know about human habits, like a computer can do. Which is why a trained computer will beat a human most of the time.
Doing each thing at random is the best strategy when playing a player who will play perfectly well. If you are willing to assume that your opponent plays poorly, sure you can take advantage of that, but in doing so you are playing imperfectly and would lose to another player who plays better.

Okay, that is not quite true for rock-paper-scissors, because playing rock every time does as well as anything against pure random, but the point is that any other strategy besides pure random can be exploited. This includes the computer who is trained to look for human patterns; a computer who looked for patterns of a computer looking for human patterns would win.
Title: Re: Maths thread.
Post by: eHalcyon on May 27, 2015, 10:59:50 pm
Oops, yes, bid 1, not 98...

And to the rest of this conversation,  :o

Really though, I haven't done game theory stuff in a while; I forgot about the possibility of mixed strategies.

@Gendo, we're talking Game Theory, so we assume perfectly rational players.  These players are basically computers, capable of perfectly random selection and with no human habits to exploit.
Title: Re: Maths thread.
Post by: Ghacob on May 28, 2015, 08:45:21 am

A fun related game theory problem: You have n people bidding on a $100 bill.  They bid secretly, can't communicate with each other, and can only bid in integer numbers of dollars.  Whoever bids the highest amount without tying with someone else wins.  How much do you bid?  (I remember hearing a problem like this but I have no idea how to solve it...)

This is the same game that I tried to start in the forum games section, unsuccessfully: http://forum.dominionstrategy.com/index.php?topic=6372.0

Using this form of the problem, which I like a whole lot better, lead to a few insights not available in the profit oriented version
In this where the only goal is optimizing chance of victory:
It's visibly clear that you wouldn't want to choose more than n and I feel like it's not smart to choose more than n/2 either

So I see the optimal strategy for a sufficently large n (with a smaller n, it might be worth hoping everyone else cancels out) as randomly choosing a number between 1 and n/2, although I'm not sure if you should but some sort of curve on that probability


Title: Re: Maths thread.
Post by: DStu on May 28, 2015, 09:07:59 am
Oops, yes, bid 1, not 98...

And to the rest of this conversation,  :o

Really though, I haven't done game theory stuff in a while; I forgot about the possibility of mixed strategies.

@Gendo, we're talking Game Theory, so we assume perfectly rational players.  These players are basically computers, capable of perfectly random selection and with no human habits to exploit.
Oops, yes, bid 1, not 98...

And to the rest of this conversation,  :o

Really though, I haven't done game theory stuff in a while; I forgot about the possibility of mixed strategies.

@Gendo, we're talking Game Theory, so we assume perfectly rational players.  These players are basically computers, capable of perfectly random selection and with no human habits to exploit.
Disclaimer: just woke up.

I don't think it is so easy to assume perfectly rational. If there is a Nash equilibrium, sure you can do. But with the 100$, n player who bids highest without tieing wins, I'm not so sure there is one.
Nash equilibrium basically means that if all player behave accordingly to, it does not make sense for a single player to behave differently.
But this one is more prisoners dilemma like (even more extreme as there is no incentive to cooperate at all)as a single player you always have the incentive to bid 100, if you assume that the Nash is not leading to someone else saying 100 with prob >1/2.  ...    ...
Ok forget what I said, this probably us the Nash eq:
Say a random number so that the Total prob that two people say 100 is 1/2, 99 is 1/4, 98 is 1/8 etc.  If you deviate from this, you are hurting yourself as you are more likely to collide.

Edit: ok maybe you also don't want to get to 1/2, but maximize the prob of "you say 100, but n-1 copies of you don't say 100" the other prob you get by recursion anyway

Edit2: also I have ignored that you have to bid, this biases to smaller numbers as higher numbers lower your profit
Title: Re: Maths thread.
Post by: sudgy on May 28, 2015, 11:29:50 am
Then nobody says anything about my more defined problem...
Title: Re: Maths thread.
Post by: Awaclus on May 28, 2015, 11:42:32 am
Then nobody says anything about my more defined problem...

anything about my more defined problem...

Better?
Title: Re: Maths thread.
Post by: mpsprs on May 28, 2015, 01:19:23 pm
I don't think it is so easy to assume perfectly rational. If there is a Nash equilibrium, sure you can do. But with the 100$, n player who bids highest without tieing wins, I'm not so sure there is one.

Under the assumption that the only allowed bids are integers from 0 to 100 (or any finite set of bids), and allowing for mixed strategies (i.e. bidding x with probability p and y with probability q and so on) I'm pretty sure Nash's Existence Theorem guarantees a Nash equilibrium.  (And the only reason I'm only pretty sure is because this stuff is pretty far from my area of math).

It does not guarantee a unique nash equilibrium though.

This paper posted on the arxiv (http://arxiv.org/abs/0801.1535) seems to address some cases of this problem (they don't deal with profit-the goal is to maximize your probability of getting that $100, regardless of how much you spend to get it, and they also switch out highest bid for lowest bid).  For 3 players they show a computation of how to compute a Nash equilibrium where all three players use the same mixed strategy.  Modifying this for the profit version theoretically isn't hard (change some numbers here and there), but in practice as the number of players grows it will get tough.
Title: Re: Maths thread.
Post by: ghostofmars on May 28, 2015, 02:29:02 pm
A fun related game theory problem: You have n people bidding on a $100 bill.  They bid secretly, can't communicate with each other, and can only bid in integer numbers of dollars.  Whoever bids the highest amount without tying with someone else wins.  How much do you bid?  (I remember hearing a problem like this but I have no idea how to solve it...)
I propose the following solution, although you would probably need to write a program to actually calculate the values. Assumption: all players play the same strategy and want to optimize the potential gain based on the probabilities p_i with which they bid the amount i.

The gain of a certain amount i is given by
g_i = ps_i * (100 - i) * (1 - sum_j>i ps_j)
where ps_i is the chance that exactly one player bid the amount i
ps_i = n * p_i * (1 - p_i)^(n-1)
Now, we want to maximize
G = sum (g_i - a p_i) + a
with respect to g_i and a. The latter is a Lagrange multiplier that ensures that the p_i sum up to 1. This will lead to a system of nonlinear equations that one should be able to solve numerically. I don't know if the solution is unique, though.
Title: Re: Maths thread.
Post by: Polk5440 on May 28, 2015, 02:58:58 pm
I don't think it is so easy to assume perfectly rational. If there is a Nash equilibrium, sure you can do. But with the 100$, n player who bids highest without tieing wins, I'm not so sure there is one.

Under the assumption that the only allowed bids are integers from 0 to 100 (or any finite set of bids), and allowing for mixed strategies (i.e. bidding x with probability p and y with probability q and so on) I'm pretty sure Nash's Existence Theorem guarantees a Nash equilibrium.  (And the only reason I'm only pretty sure is because this stuff is pretty far from my area of math).

It does not guarantee a unique nash equilibrium though.


Correct on both points.
Title: Re: Maths thread.
Post by: GeoLib on May 29, 2015, 10:45:26 pm
Ok I have a problem that I don't really know the answer too. Or rather, I have two contradictory answers that I'm trying to reconcile. Perhaps it's more suited to the logic puzzles thread, but I think reconciling the answers might be a math issue. Anyways:

There is a king with a kingdom of countably infinite people. He decides to play a game with his subjects. This game consists of multiple rounds. In the first round, he calls one of his subjects to play. They come to the castle and he flips two coins. If they're both heads then that person wins and the game is over. Otherwise, he calls up two people, flips two coins. If they're both heads those people both win and the game is over. Otherwise, he calls up four people, etc. The game ends as soon as someone wins. In each round twice as many people come up and their fates are still decided by two coin flips.

You are called by the King. What is your probability of winning?

So I think I have a resolution to the paradox after posing it to a friend of mine (this is really his solution, not mine).

When we do the second scenario and it's all been decided, there's an extra piece of information: that the game is over, as sitnaltax said. This eliminates the zero-probability event that the game goes on forever and there are infinitely many losers. So the issue is that we multiply zero by infinity, and this event still contributes to the probability of being a winner, lowering it from 0.67 to 0.25
 
Title: Re: Maths thread.
Post by: liopoil on July 28, 2015, 02:17:05 pm
Still working on the real problem [What's the least prime factor of 252128 + 1?], haven't read Titandrake's solution or heron's comment on it.
Over half a year later, I went to a summer program on number theory and now am more equipped to answer this!

Consider any positive odd (since 252 is even) prime p which divides 252128 + 1. Then 252128 is congruent to -1 (mod p). Since the group of nonzero integers modulo p (Up) is cyclic, there exists a g with period length (order) p - 1, and gp - 1 = 1. Then -1 = g(p - 1)/2, and we can replace 252 with gn. Then we have that 128n is congruent to (p - 1)/2 (mod p - 1). Then 27n = (2k + 1)(p - 1)/2 for some k. 2k + 1 is odd, so p - 1 must be divisible by 2^8. 257 is the lowest such prime p, so let's test it!

252 = 22327, so 252128 = 225632567128. Then by Fermat's little theorem, which was implicitly used above as well, this is the same as 7128. Now we need to determine whether this is 1 or -1, and if it is -1, then it works since adding 1 gives 0, so then 257 would be a divisor. It must be 1 or -1 since it squares to 1, and 257 is prime.

(-1)(257 - 1)(7 - 1)/4 = 1, so by quadratic reciprocity, which is hard to state on this forum, 7 is a square modulo 257 iff 257 is a square modulo 7. 257 is 5 (mod 7), which is not a square mod 7, so 7 is not a square modulo 257. Therefore 7 = gn, where g is a generator of Up and n is odd, since if it were even 7 would be a square. Then 7128 = g128n where n is odd, so since g has order p - 1 and 256 does not divide 128n for odd n, 7128 is not 1 (mod 257). Therefore it is -1, so 257 is the least prime factor of 252128 + 1.


I spent the last 6 weeks rigorously proving all of these results and lemmas, from the ring axioms. Pretty cool to see them defeat a problem that was way over my head in January.

EDIT: Hey, this matches up quite nicely with what Heron and Titandrake did way back when!
Title: Re: Maths thread.
Post by: Kirian on July 28, 2015, 02:47:35 pm
Good work liopoil.  And here I had assumed the answer was Moat.
Title: Re: Maths thread.
Post by: Kuildeous on July 28, 2015, 03:12:43 pm
Good work liopoil.  And here I had assumed the answer was Moat.

Were you working in Base 15? Because that is totally the answer in Base 15!
Title: Re: Maths thread.
Post by: heron on July 28, 2015, 07:58:28 pm
Nice liopoil. Which summer program did you go to?
Title: Re: Maths thread.
Post by: liopoil on July 28, 2015, 08:01:37 pm
Nice liopoil. Which summer program did you go to?
Ross (http://u.osu.edu/rossmath/)
Title: Re: Maths thread.
Post by: heron on July 28, 2015, 09:55:57 pm
Nice liopoil. Which summer program did you go to?
Ross (http://u.osu.edu/rossmath/)

Cool! I'm at Canada/USA mathcamp right now.
Title: Re: Maths thread.
Post by: Witherweaver on July 28, 2015, 09:57:39 pm
Nice liopoil. Which summer program did you go to?
Ross (http://u.osu.edu/rossmath/)

Cool! I'm at Canada/USA mathcamp right now.

Canadian math is confusing, because you have to avoid using "a" as a variable name.
Title: Re: Maths thread.
Post by: Ichimaru Gin on July 28, 2015, 10:08:50 pm
eh?
Title: Re: Maths thread.
Post by: Titandrake on July 28, 2015, 11:10:43 pm
Nice liopoil. Which summer program did you go to?
Ross (http://u.osu.edu/rossmath/)

Cool! I'm at Canada/USA mathcamp right now.

Oh, cool! I went there around 5 years ago (2010 + 2011)
Title: Re: Maths thread.
Post by: scott_pilgrim on August 06, 2015, 10:58:46 pm
Okay, I really want a definitive answer from someone with a solid math background on this (input from anyone is welcome though).  I have a Bachelor's in math, but so does one of my co-workers, and we couldn't agree on this.

If x=2, what is 18÷3x?
Title: Re: Maths thread.
Post by: skip wooznum on August 06, 2015, 11:35:20 pm
Okay, I really want a definitive answer from someone with a solid math background on this (input from anyone is welcome though).  I have a Bachelor's in math, but so does one of my co-workers, and we couldn't agree on this.

If x=2, what is 18÷3x?
my high school math would tell me 12.  Could you explain why it wouldn't be?
Title: Re: Maths thread.
Post by: ConMan on August 06, 2015, 11:37:07 pm
Okay, I really want a definitive answer from someone with a solid math background on this (input from anyone is welcome though).  I have a Bachelor's in math, but so does one of my co-workers, and we couldn't agree on this.

If x=2, what is 18÷3x?
Poorly written, and it appears to be another one of these "write the expression in an ambiguous manner so people can argue about order of operations and feel superior to each other" questions.

That said, typically you would read 3x as being a single "unit" that is equal to 6, so that the entire expression is equal to 3. If it had been written 18/3x it would probably be worse, and that's why mathematicians tend to take up lots of space to write fractions so you can clearly see what's in the numerator and what's in the denominator and didn't we argue about one of these in this thread about ten pages ago oh my god my head hurts.
Title: Re: Maths thread.
Post by: Watno on August 06, 2015, 11:51:05 pm
I would definitely interpret it as 18/(3x). If something after the division sign wasn't part of the denumerator, why not put it in front of it?

In fact I have a paper here that uses such a notation (1/16n³), but that same paper also caused me lots of confusion by writing log n M and meaning log(nM), so it's probably not an example of good notation.
Title: Re: Maths thread.
Post by: scott_pilgrim on August 06, 2015, 11:57:36 pm
Okay, I really want a definitive answer from someone with a solid math background on this (input from anyone is welcome though).  I have a Bachelor's in math, but so does one of my co-workers, and we couldn't agree on this.

If x=2, what is 18÷3x?
my high school math would tell me 12.  Could you explain why it wouldn't be?

No, I can't explain why it wouldn't be, but almost everyone I asked said 3 (you resolve the 3x first for some reason).  They couldn't give me a good reason for it though.

Okay, I really want a definitive answer from someone with a solid math background on this (input from anyone is welcome though).  I have a Bachelor's in math, but so does one of my co-workers, and we couldn't agree on this.

If x=2, what is 18÷3x?
Poorly written, and it appears to be another one of these "write the expression in an ambiguous manner so people can argue about order of operations and feel superior to each other" questions.

That said, typically you would read 3x as being a single "unit" that is equal to 6, so that the entire expression is equal to 3. If it had been written 18/3x it would probably be worse, and that's why mathematicians tend to take up lots of space to write fractions so you can clearly see what's in the numerator and what's in the denominator and didn't we argue about one of these in this thread about ten pages ago oh my god my head hurts.

I'm not trying to start an argument, I legitimately want to make sure that there's not some rule I'm somehow unaware of that says you do "smash up multiplication" before everything else.  And I want to be very sure that I'm correct, because the book I was working from consistently resolved the 3x first, and I had to try to explain to a student why they were doing that, even though it seems very wrong to me.  I really think the book is wrong, but I want to be 100% sure of that before I tell my boss that the book has a major error in it that needs to be fixed.

Of course I agree that you should always write it in a less ambiguous way, but I have to be able to tell students what to do if they see it written like that.



The argument for 12 is that multiplication and division have equal priority, so you go from left to right.  18 divided by 3 is 6, 6x is 12.  The only possible argument for 3 that I could think of is that 3x is somehow fundamentally different from 3*x (with a symbol between them), since I think we could all agree 18÷3*x is 12.  Then I'd have to ask about 18÷3(x), and 18÷3(2).  But I would think 3x is exactly the same as 3*x, and I wasn't aware of any special rule that distinguishes them.
Title: Re: Maths thread.
Post by: skip wooznum on August 06, 2015, 11:58:16 pm
typically you would read 3x as being a single "unit"
never mind me, if you ever were. This sounds familiar. I concede.
Title: Re: Maths thread.
Post by: skip wooznum on August 06, 2015, 11:59:52 pm
Okay, I really want a definitive answer from someone with a solid math background on this (input from anyone is welcome though).  I have a Bachelor's in math, but so does one of my co-workers, and we couldn't agree on this.

If x=2, what is 18÷3x?
my high school math would tell me 12.  Could you explain why it wouldn't be?

No, I can't explain why it wouldn't be, but almost everyone I asked said 3 (you resolve the 3x first for some reason).  They couldn't give me a good reason for it though.

Okay, I really want a definitive answer from someone with a solid math background on this (input from anyone is welcome though).  I have a Bachelor's in math, but so does one of my co-workers, and we couldn't agree on this.

If x=2, what is 18÷3x?
Poorly written, and it appears to be another one of these "write the expression in an ambiguous manner so people can argue about order of operations and feel superior to each other" questions.

That said, typically you would read 3x as being a single "unit" that is equal to 6, so that the entire expression is equal to 3. If it had been written 18/3x it would probably be worse, and that's why mathematicians tend to take up lots of space to write fractions so you can clearly see what's in the numerator and what's in the denominator and didn't we argue about one of these in this thread about ten pages ago oh my god my head hurts.

I'm not trying to start an argument, I legitimately want to make sure that there's not some rule I'm somehow unaware of that says you do "smash up multiplication" before everything else.  And I want to be very sure that I'm correct, because the book I was working from consistently resolved the 3x first, and I had to try to explain to a student why they were doing that, even though it seems very wrong to me.  I really think the book is wrong, but I want to be 100% sure of that before I tell my boss that the book has a major error in it that needs to be fixed.

Of course I agree that you should always write it in a less ambiguous way, but I have to be able to tell students what to do if they see it written like that.



The argument for 12 is that multiplication and division have equal priority, so you go from left to right.  18 divided by 3 is 6, 6x is 12.  The only possible argument for 3 that I could think of is that 3x is somehow fundamentally different from 3*x (with a symbol between them), since I think we could all agree 18÷3*x is 12.  Then I'd have to ask about 18÷3(x), and 18÷3(2).  But I would think 3x is exactly the same as 3*x, and I wasn't aware of any special rule that distinguishes them.
I actually think I remember such a rule, yes.
Title: Re: Maths thread.
Post by: scott_pilgrim on August 07, 2015, 12:03:09 am
Okay, I really want a definitive answer from someone with a solid math background on this (input from anyone is welcome though).  I have a Bachelor's in math, but so does one of my co-workers, and we couldn't agree on this.

If x=2, what is 18÷3x?
my high school math would tell me 12.  Could you explain why it wouldn't be?

No, I can't explain why it wouldn't be, but almost everyone I asked said 3 (you resolve the 3x first for some reason).  They couldn't give me a good reason for it though.

Okay, I really want a definitive answer from someone with a solid math background on this (input from anyone is welcome though).  I have a Bachelor's in math, but so does one of my co-workers, and we couldn't agree on this.

If x=2, what is 18÷3x?
Poorly written, and it appears to be another one of these "write the expression in an ambiguous manner so people can argue about order of operations and feel superior to each other" questions.

That said, typically you would read 3x as being a single "unit" that is equal to 6, so that the entire expression is equal to 3. If it had been written 18/3x it would probably be worse, and that's why mathematicians tend to take up lots of space to write fractions so you can clearly see what's in the numerator and what's in the denominator and didn't we argue about one of these in this thread about ten pages ago oh my god my head hurts.

I'm not trying to start an argument, I legitimately want to make sure that there's not some rule I'm somehow unaware of that says you do "smash up multiplication" before everything else.  And I want to be very sure that I'm correct, because the book I was working from consistently resolved the 3x first, and I had to try to explain to a student why they were doing that, even though it seems very wrong to me.  I really think the book is wrong, but I want to be 100% sure of that before I tell my boss that the book has a major error in it that needs to be fixed.

Of course I agree that you should always write it in a less ambiguous way, but I have to be able to tell students what to do if they see it written like that.



The argument for 12 is that multiplication and division have equal priority, so you go from left to right.  18 divided by 3 is 6, 6x is 12.  The only possible argument for 3 that I could think of is that 3x is somehow fundamentally different from 3*x (with a symbol between them), since I think we could all agree 18÷3*x is 12.  Then I'd have to ask about 18÷3(x), and 18÷3(2).  But I would think 3x is exactly the same as 3*x, and I wasn't aware of any special rule that distinguishes them.
I actually think I remember such a rule, yes.

Huh...I'm going to have to look into it more.  I'm not sure what to search for though...

So what happens with 18÷3(x)?  That would still be 3, right, since the parentheses get resolved first (doing nothing)?  And 18÷3(2) is also 3, because it becomes 18÷32 (where 32 is a "smash up" 3*2, not the number thirty-two)?
Title: Re: Maths thread.
Post by: skip wooznum on August 07, 2015, 12:07:58 am
Okay, I really want a definitive answer from someone with a solid math background on this (input from anyone is welcome though).  I have a Bachelor's in math, but so does one of my co-workers, and we couldn't agree on this.

If x=2, what is 18÷3x?
my high school math would tell me 12.  Could you explain why it wouldn't be?

No, I can't explain why it wouldn't be, but almost everyone I asked said 3 (you resolve the 3x first for some reason).  They couldn't give me a good reason for it though.

Okay, I really want a definitive answer from someone with a solid math background on this (input from anyone is welcome though).  I have a Bachelor's in math, but so does one of my co-workers, and we couldn't agree on this.

If x=2, what is 18÷3x?
Poorly written, and it appears to be another one of these "write the expression in an ambiguous manner so people can argue about order of operations and feel superior to each other" questions.

That said, typically you would read 3x as being a single "unit" that is equal to 6, so that the entire expression is equal to 3. If it had been written 18/3x it would probably be worse, and that's why mathematicians tend to take up lots of space to write fractions so you can clearly see what's in the numerator and what's in the denominator and didn't we argue about one of these in this thread about ten pages ago oh my god my head hurts.

I'm not trying to start an argument, I legitimately want to make sure that there's not some rule I'm somehow unaware of that says you do "smash up multiplication" before everything else.  And I want to be very sure that I'm correct, because the book I was working from consistently resolved the 3x first, and I had to try to explain to a student why they were doing that, even though it seems very wrong to me.  I really think the book is wrong, but I want to be 100% sure of that before I tell my boss that the book has a major error in it that needs to be fixed.

Of course I agree that you should always write it in a less ambiguous way, but I have to be able to tell students what to do if they see it written like that.



The argument for 12 is that multiplication and division have equal priority, so you go from left to right.  18 divided by 3 is 6, 6x is 12.  The only possible argument for 3 that I could think of is that 3x is somehow fundamentally different from 3*x (with a symbol between them), since I think we could all agree 18÷3*x is 12.  Then I'd have to ask about 18÷3(x), and 18÷3(2).  But I would think 3x is exactly the same as 3*x, and I wasn't aware of any special rule that distinguishes them.
I actually think I remember such a rule, yes.

Huh...I'm going to have to look into it more.  I'm not sure what to search for though...

So what happens with 18÷3(x)?  That would still be 3, right, since the parentheses get resolved first (doing nothing)?  And 18÷3(2) is also 3, because it becomes 18÷32 (where 32 is a "smash up" 3*2, not the number thirty-two)?
I doubt it, but that's just speculation. I assume the rule is specifically for varibles with a coefficient. Is 3(x) considered a coefficient? Idk.
Title: Re: Maths thread.
Post by: pacovf on August 07, 2015, 12:09:50 am
So what happens with 18÷3(x)?  That would still be 3, right, since the parentheses get resolved first (doing nothing)?  And 18÷3(2) is also 3, because it becomes 18÷32 (where 32 is a "smash up" 3*2, not the number thirty-two)?

If you ever see written 18÷3(x) or, may the Lord have mercy on our souls, 18÷3(2), burn whatever book you are reading to ashes and never look back.
Title: Re: Maths thread.
Post by: Witherweaver on August 07, 2015, 12:43:20 am
Why would you read 3x as a single unit but not (18/3)x as a single unit?
Title: Re: Maths thread.
Post by: scott_pilgrim on August 07, 2015, 12:52:28 am
Why would you read 3x as a single unit but not (18/3)x as a single unit?

Actually, one argument the one guy who agreed with me was making was that if you put 18/3x into a calculator, it will do (18/3)x.

So what happens with 18÷3(x)?  That would still be 3, right, since the parentheses get resolved first (doing nothing)?  And 18÷3(2) is also 3, because it becomes 18÷32 (where 32 is a "smash up" 3*2, not the number thirty-two)?

If you ever see written 18÷3(x) or, may the Lord have mercy on our souls, 18÷3(2), burn whatever book you are reading to ashes and never look back.

Well, I would think 3(x) is exactly the same as 3x, since you just do everything in the parentheses first, which outputs x, and then you're left with just 3x.  But then, I also would have thought 3x is exactly the same as 3*x, so I don't know what to think anymore.

What about 18÷xy, where x=3 and y=2?
Title: Re: Maths thread.
Post by: pacovf on August 07, 2015, 01:09:45 am
It's not about being the same or not, it's about being purposefully confusing. The parentheses do nothing, so they shouldn't be there, and if you really need the parentheses, then the expression is sufficiently complex that it deserves to be written properly (ie., unambiguously). The implicit product is a shorthand, you have to use it responsibly.
Title: Re: Maths thread.
Post by: ConMan on August 07, 2015, 01:38:31 am
I'm not trying to start an argument, I legitimately want to make sure that there's not some rule I'm somehow unaware of that says you do "smash up multiplication" before everything else.
Fair enough, but this kind of question was showing up on Facebook a lot last year (and I think it must have been in the Random Thoughts thread or something here because it's not in this thread) and it seems like the entire point of it was to get people to argue about what was "right" or "intuitive".

It is definitely true that students are taught some version of PEMDAS (or BOMDAS, or other variations) that either says that multiplication comes before division or that if you have both then you resolve them left-to-right. And that's mostly ok for arithmetic, and it seems to work for addition and subtraction, but it kind of conflicts with the kind of shorthand that we tend to use when writing more complicated algebra, especially when it's compressed onto a single line - normally we'd write something like 14/2(3+4) as a two-line fraction so you can clearly see where everything is. But, and here's the annoying bit, the accepted shorthand of omitting the multiplication sign where you have either parentheses or pronumerals is usually understood to take precedence *over* just about everything else. Like I said earlier, smooshing things together like 2(3+4) or 3x tends to mean that you have a single "unit" that should be calculated on its own before you look at other arithmetic operations happening around them.

Alternatively, you could take the approach used in some forms of arithmetic and logic, which sets out a bunch of legal constructions of these sorts of expressions, usually requiring parentheses around just about everything, and which allows you to remove the parentheses only when the resulting expression remains unambiguous. So the "formalest" way of writing the expression might be (14/(2(3+4))), or (18÷(3x)), and the rules of the system would tell you that you can remove the outermost parentheses, but no more because the expression becomes ambiguous at that point. Or you can learn Swedish notation, which removes the ambiguity in another way.
Title: Re: Maths thread.
Post by: scott_pilgrim on August 07, 2015, 01:54:59 am
It's not about being the same or not, it's about being purposefully confusing. The parentheses do nothing, so they shouldn't be there, and if you really need the parentheses, then the expression is sufficiently complex that it deserves to be written properly (ie., unambiguously). The implicit product is a shorthand, you have to use it responsibly.

Again, I don't disagree with you, and I'm very frustrated that I'm having to deal with this type of problem in the first place.  But I wanted to know what to do when I actually do run across this kind of thing again in the future.

I'm not trying to start an argument, I legitimately want to make sure that there's not some rule I'm somehow unaware of that says you do "smash up multiplication" before everything else.
Fair enough, but this kind of question was showing up on Facebook a lot last year (and I think it must have been in the Random Thoughts thread or something here because it's not in this thread) and it seems like the entire point of it was to get people to argue about what was "right" or "intuitive".

It is definitely true that students are taught some version of PEMDAS (or BOMDAS, or other variations) that either says that multiplication comes before division or that if you have both then you resolve them left-to-right. And that's mostly ok for arithmetic, and it seems to work for addition and subtraction, but it kind of conflicts with the kind of shorthand that we tend to use when writing more complicated algebra, especially when it's compressed onto a single line - normally we'd write something like 14/2(3+4) as a two-line fraction so you can clearly see where everything is. But, and here's the annoying bit, the accepted shorthand of omitting the multiplication sign where you have either parentheses or pronumerals is usually understood to take precedence *over* just about everything else. Like I said earlier, smooshing things together like 2(3+4) or 3x tends to mean that you have a single "unit" that should be calculated on its own before you look at other arithmetic operations happening around them.

Alternatively, you could take the approach used in some forms of arithmetic and logic, which sets out a bunch of legal constructions of these sorts of expressions, usually requiring parentheses around just about everything, and which allows you to remove the parentheses only when the resulting expression remains unambiguous. So the "formalest" way of writing the expression might be (14/(2(3+4))), or (18÷(3x)), and the rules of the system would tell you that you can remove the outermost parentheses, but no more because the expression becomes ambiguous at that point. Or you can learn Swedish notation, which removes the ambiguity in another way.

Thanks, this is basically the kind of answer I wanted.  Probably it can go either way, and it doesn't come up very often because people know better than to write things like that anyway.

I do agree that there's something that feels intuitively right about putting 3x together as one unit, but it really goes against my intuition of 3x being identical to 3*x.

---

Anyway, I feel bad about starting another one of these discussions, so here's a fun little problem to (hopefully) make up for it.

You have an hourglass that measures 4 minutes and an hourglass that measures 7 minutes.  How do you measure exactly 9 minutes (using only these hourglasses)?

Clarification 1: The nine minutes must be all consecutive (for example, you can't measure 3 minutes, take a break, then measure out 6 more minutes).
Clarification 2: The nine minutes starts the instant you have the hourglasses (which both start out with all the sand on one side), so you can't get things set up beforehand.
Title: Re: Maths thread.
Post by: sudgy on August 07, 2015, 01:59:16 am
You can just do the 4 minute one until there's an equal amount on both sides, then do the seven minute one, right?
Title: Re: Maths thread.
Post by: scott_pilgrim on August 07, 2015, 02:06:21 am
You can just do the 4 minute one until there's an equal amount on both sides, then do the seven minute one, right?

You can't tell when they're equal.  Maybe the radius of the top half is bigger than the radius of the bottom half.
Title: Re: Maths thread.
Post by: skip wooznum on August 07, 2015, 02:35:09 am
start with both hourglasses flowing, or whatever the word is. After four minutes, turn the 4 minute hourglass over. After seven minutes, turn the 7 minute hourglass over. After eight minutes turn the 7 minute hourglass over.
Title: Re: Maths thread.
Post by: skip wooznum on August 07, 2015, 02:59:27 am
I've been wondering something myself, maybe the guys around here can help me out with it.

Is everyone familiar with the Monty Hall problem? To review: You're on a game show. Let's make a deal. You must choose one of three curtains and you win what is behind that curtain. One curtain is hiding a brand new converible, the other two are hiding toasters. You pick curtain number one. Monty, the host, says "wow, great choice! But I'll tell you what, I'll show you what's behind curtain number two." He opens up curtain number two and it's a toaster. He then asks you if you want to switch to curtain number three or stay at curtain number one. What do you do? (Monty always opens up a curtain regardless of whether or not you picked the correct one originally. He never opens the one you picked, and he never opens the one with the car.) The answer is you switch of course, because it's twice as likely that it's in curtain number three.

My question: There are 100 curtains, one with a car, 99 with toasters. You choose curtain number 1, he shows you that curtains 4-100 all are hiding toasters. So you now obviously should switch to curtain two or three. Let's say you switch to curtain two. Now he shows you that curtain three is also hiding a toaster and gives you the option to switch again. Do you go back to curtain one or stay at curtain two?

My understanding, btw, is you should switch back to curtain one for 50.5% chance of winning
Title: Re: Maths thread.
Post by: qmech on August 07, 2015, 04:56:08 am
Not switching is correct the second time.  Curtain 1 still only has a 1/100 chance of being the car, so curtain 2 has the car almost every time.
Title: Re: Maths thread.
Post by: terminalCopper on August 07, 2015, 07:49:16 am
I think qmech is right.

However, under certain assumptions the first switch  to curtain two was already horrible.
if we assume that Monty has to leave us a final choice after opening all but two curtains, we should simply stick to Curtain 1 until then, and we are guaranteed a 99% chance by switching at the last occasion. If we switch immediatly, Monty might open Curtain 1, leaving us with a 50-50 chance between Curtain 2 and Curtain 3. That would have been horrible.
Title: Re: Maths thread.
Post by: skip wooznum on August 07, 2015, 08:19:38 am
Not switching is correct the second time.  Curtain 1 still only has a 1/100 chance of being the car, so curtain 2 has the car almost every time.
why is this true?
Title: Re: Maths thread.
Post by: skip wooznum on August 07, 2015, 08:20:33 am
I think qmech is right.

However, under certain assumptions the first switch  to curtain two was already horrible.
if we assume that Monty has to leave us a final choice after opening all but two curtains, we should simply stick to Curtain 1 until then, and we are guaranteed a 99% chance by switching at the last occasion. If we switch immediatly, Monty might open Curtain 1, leaving us with a 50-50 chance between Curtain 2 and Curtain 3. That would have been horrible.
you dont know he's going to give you another chance to switch
Title: Re: Maths thread.
Post by: Watno on August 07, 2015, 09:08:55 am
After you choose door 1, there is a 99/100 chance you're wrong
Revealing that 4-100 are wrong makes 2 and 3 have 99/200 to be right. So in 200 cases, 2 will have 1 as the right door, and 99 each have 2 and 3.
Revealing that we can't be in one of the cases where 3 is right means that the probability 2 is right is 99/(99+2)=99/101
Title: Re: Maths thread.
Post by: skip wooznum on August 07, 2015, 09:14:32 am
After you choose door 1, there is a 99/100 chance you're wrong
Revealing that 4-100 are wrong makes 2 and 3 have 99/200 to be right. So in 200 cases, 2 will have 1 as the right door, and 99 each have 2 and 3.
Revealing that we can't be in one of the cases where 3 is right means that the probability 2 is right is 99/(99+2)=99/101

but out of the 99 cases that have 2 as the right door, most of them would have the host eliminating door 1. In fact, if we apply your reasoning to the original monty hall problem, we'd get an answer of 50/50.
Title: Re: Maths thread.
Post by: Watno on August 07, 2015, 09:35:10 am
Why do most of the cases where 2 is right have the moderator eliminate 1?
Title: Re: Maths thread.
Post by: skip wooznum on August 07, 2015, 10:26:49 am
Why do most of the cases where 2 is right have the moderator eliminate 1?

do you mean as opposed to eliminating 1 half the time and 3 half the time? Well because if he only eliminates 1 half of the cases that it's in 2, then when he eliminates 1, you can switch to 3 for 2/3 probability of being correct. And when he eliminates 3, you can stay with 2 for 49.5/51.5, or around 96% probability of being correct. So eliminating door 1 and door 3 equally is a terrible strategy for Monty. His best strategy is one that gives you the same chance of winning no matter what he does. (This was true in the original problem as well. It's just that there the best thing he could do in cases where you happened to guess right would be to open each other door an equal number of times.) That optimal strategy is:
In 20,200 cases, there are 202 cases having door 1 as correct, 9,999 cases having door 2, and 9,999 cases having door 3.  In the 9,999 cases having door 2 (which is the one you chose) he should eliminate door 3 only 198 times (or around 2%) and eliminate door 1 the other 9801 times (or around 98% of the time). If he sticks to this strategy, then whichever door he eliminates, you should switch to the other for a 50.5% probability of being correct.
if I'm wrong can someone show me where I went off?
Title: Re: Maths thread.
Post by: Watno on August 07, 2015, 01:28:39 pm
I assumed that the moderator had no motivatio in this whoel thing and just opens a random door out of the possible ones. If he wants you to not win,  I think this gets very complicated, because the optimal strategies you and the moderator then choose depend on each other unless I'm mistaken.
Title: Re: Maths thread.
Post by: skip wooznum on August 07, 2015, 01:41:04 pm
I assumed that the moderator had no motivatio in this whoel thing and just opens a random door out of the possible ones. If he wants you to not win,  I think this gets very complicated, because the optimal strategies you and the moderator then choose depend on each other unless I'm mistaken.
fine so assuming that in situations where he can open either door he will open one at random, id say there's 99/103 chance it's in door number 2 because exactly half of the cases having it door 2 are ruled out.
And I don't see why the optimal strategies would depend on each other.
Title: Re: Maths thread.
Post by: TrojH on August 07, 2015, 02:50:17 pm
I assumed that the moderator had no motivatio in this whoel thing and just opens a random door out of the possible ones. If he wants you to not win,  I think this gets very complicated, because the optimal strategies you and the moderator then choose depend on each other unless I'm mistaken.
fine so assuming that in situations where he can open either door he will open one at random, id say there's 99/103 chance it's in door number 2 because exactly half of the cases having it door 2 are ruled out.
And I don't see why the optimal strategies would depend on each other.

skip, under the usual assumptions that the host never opens your current door or the door with the car, and otherwise has an equal probability of choosing each door... I would say that this final answer of yours is correct.

(Take what I say with a grain of salt, though. I'm just a math prof.  :) )
Title: Re: Maths thread.
Post by: skip wooznum on August 07, 2015, 02:54:59 pm
I assumed that the moderator had no motivatio in this whoel thing and just opens a random door out of the possible ones. If he wants you to not win,  I think this gets very complicated, because the optimal strategies you and the moderator then choose depend on each other unless I'm mistaken.
fine so assuming that in situations where he can open either door he will open one at random, id say there's 99/103 chance it's in door number 2 because exactly half of the cases having it door 2 are ruled out.
And I don't see why the optimal strategies would depend on each other.

skip, under the usual assumptions that the host never opens your current door or the door with the car, and otherwise has an equal probability of choosing each door... I would say that this final answer of yours is correct.

(Take what I say with a grain of salt, though. I'm just a math prof.  :) )
thanks. And what about if the host doesn't have equal probability of choosing each door, what if the host is trying to win?
Title: Re: Maths thread.
Post by: TrojH on August 07, 2015, 03:01:28 pm
If the host can play strategically, then you'll have to be more specific about what the host is allowed to do. If you initially pick the wrong door, can the host just open that door and show that you've lost? Then you only have a 1/100 chance to win, and you might as well stick with your original door no matter what the host does.
Title: Re: Maths thread.
Post by: skip wooznum on August 07, 2015, 03:07:32 pm
If the host can play strategically, then you'll have to be more specific about what the host is allowed to do. If you initially pick the wrong door, can the host just open that door and show that you've lost? Then you only have a 1/100 chance to win, and you might as well stick with your original door no matter what the host does.
the host must open doors and allow you to switch. But he does not have to  choose which door to open in a completely random fashion. So in the situation at hand, he can for example, open door one 2% of the times it's in 2, and open door three 98% of the time it's in 2, which is roughly what I'd imagine he'd do.
Title: Re: Maths thread.
Post by: singletee on August 07, 2015, 03:10:54 pm
I've been wondering something myself, maybe the guys around here can help me out with it.

Is everyone familiar with the Monty Hall problem? To review: You're on a game show. Let's make a deal. You must choose one of three curtains and you win what is behind that curtain. One curtain is hiding a brand new converible, the other two are hiding toasters. You pick curtain number one. Monty, the host, says "wow, great choice! But I'll tell you what, I'll show you what's behind curtain number two." He opens up curtain number two and it's a toaster. He then asks you if you want to switch to curtain number three or stay at curtain number one. What do you do? (Monty always opens up a curtain regardless of whether or not you picked the correct one originally. He never opens the one you picked, and he never opens the one with the car.) The answer is you switch of course, because it's twice as likely that it's in curtain number three.

My question: There are 100 curtains, one with a car, 99 with toasters. You choose curtain number 1, he shows you that curtains 4-100 all are hiding toasters. So you now obviously should switch to curtain two or three. Let's say you switch to curtain two. Now he shows you that curtain three is also hiding a toaster and gives you the option to switch again. Do you go back to curtain one or stay at curtain two?

My understanding, btw, is you should switch back to curtain one for 50.5% chance of winning

The problem with your formulation is that it does not unambiguously determine the algorithm the host is using. Neither does the formulation of the original problem, but it is implicitly understood to be the following by virtue of the fact that it is how the real-life game show worked:

1. Contestant chooses a door.
2. Host chooses a door at random that the contestant has not chosen and that contains a goat. Host reveals this door.
3. Contestant is given a choice to switch or stay.

Now, for your new question, the algorithm could be either of the following:
A.
1. Contestant chooses a door.
2. Host chooses 97 random doors that the contestant has not chosen and that contains toasters. Host reveals them.
3. Contestant chooses to switch.
4. Host chooses a random door that contestant has not currently chosen and that contains a toaster. Host reveals it.
5. Contestant chooses to switch or stay once more.
In this case, you should switch back to door number 1, with a 50.5% chance of winning.

B.
1. Contestant chooses a door.
2. Host chooses 97 random doors that the contestant has not chosen and that contains toasters. Host reveals them.
3. Contestant chooses to switch.
4. Host chooses a random door that contestant has never chosen this game and that contains a toaster. Host reveals it.
5. Contestant chooses to switch or stay once more.
In this case, you should stay with door number 2, with a 99% chance of winning.
Title: Re: Maths thread.
Post by: skip wooznum on August 07, 2015, 03:24:46 pm
I've been wondering something myself, maybe the guys around here can help me out with it.

Is everyone familiar with the Monty Hall problem? To review: You're on a game show. Let's make a deal. You must choose one of three curtains and you win what is behind that curtain. One curtain is hiding a brand new converible, the other two are hiding toasters. You pick curtain number one. Monty, the host, says "wow, great choice! But I'll tell you what, I'll show you what's behind curtain number two." He opens up curtain number two and it's a toaster. He then asks you if you want to switch to curtain number three or stay at curtain number one. What do you do? (Monty always opens up a curtain regardless of whether or not you picked the correct one originally. He never opens the one you picked, and he never opens the one with the car.) The answer is you switch of course, because it's twice as likely that it's in curtain number three.

My question: There are 100 curtains, one with a car, 99 with toasters. You choose curtain number 1, he shows you that curtains 4-100 all are hiding toasters. So you now obviously should switch to curtain two or three. Let's say you switch to curtain two. Now he shows you that curtain three is also hiding a toaster and gives you the option to switch again. Do you go back to curtain one or stay at curtain two?

My understanding, btw, is you should switch back to curtain one for 50.5% chance of winning

The problem with your formulation is that it does not unambiguously determine the algorithm the host is using. Neither does the formulation of the original problem, but it is implicitly understood to be the following by virtue of the fact that it is how the real-life game show worked:

1. Contestant chooses a door.
2. Host chooses a door at random that the contestant has not chosen and that contains a goat. Host reveals this door.
3. Contestant is given a choice to switch or stay.

Now, for your new question, the algorithm could be either of the following:
A.
1. Contestant chooses a door.
2. Host chooses 97 random doors that the contestant has not chosen and that contains toasters. Host reveals them.
3. Contestant chooses to switch.
4. Host chooses a random door that contestant has not currently chosen and that contains a toaster. Host reveals it.
5. Contestant chooses to switch or stay once more.
In this case, you should switch back to door number 1, with a 50.5% chance of winning.

B.
1. Contestant chooses a door.
2. Host chooses 97 random doors that the contestant has not chosen and that contains toasters. Host reveals them.
3. Contestant chooses to switch.
4. Host chooses a random door that contestant has never chosen this game and that contains a toaster. Host reveals it.
5. Contestant chooses to switch or stay once more.
In this case, you should stay with door number 2, with a 99% chance of winning.
it's certainly not option B. The two options in my mind for step 4 are:
A. Host chooses a completely random door that isn't the contestant's current door or the car door.I'd say this is 99/103 and TrojH concurs.

B. Host chooses a door that isn't the contestant's current door or the car door but he doesn't choose equally between  the available doors, rather he chooses with a modified rate that will maximize his chances of winning. I'd say this is 50.5%

And in your option B, I'd say the odds are 99/101, not 99/100, but that's neither here nor there.
Title: Re: Maths thread.
Post by: qmech on August 07, 2015, 03:53:12 pm
It doesn't matter what strategy the host uses, as long as he follows the rule that the prize is always behind one of the
Not switching is correct the second time.  Curtain 1 still only has a 1/100 chance of being the car, so curtain 2 has the car almost every time.
why is this true?

It's very easy to get very confused by this sort of problem.  As I write this I'm not sure whether my or Watno's number is correct.  I think terminalCopper's observation might have something to do with explaining the difference.

PPE: will read 4 new replies now.
Title: Re: Maths thread.
Post by: singletee on August 07, 2015, 04:00:40 pm
it's certainly not option B. The two options in my mind for step 4 are:
A. Host chooses a completely random door that isn't the contestant's current door or the car door.I'd say this is 99/103 and TrojH concurs.

B. Host chooses a door that isn't the contestant's current door or the car door but he doesn't choose equally between  the available doors, rather he chooses with a modified rate that will maximize his chances of winning. I'd say this is 50.5%

And in your option B, I'd say the odds are 99/101, not 99/100, but that's neither here nor there.

Actually, you're right, it can't be B, because there's no guarantee that a door can be opened at all, since the door with the car might be the only remaining not-chosen door.
Title: Re: Maths thread.
Post by: liopoil on August 07, 2015, 04:16:14 pm
skip, it's your problem. Please give us a single, precisely formulated problem. Here's what I think you currently intend your problem to be, correct me if I am wrong:

There are 100 doors, one of which has a prize behind it, the others contain toasters. The contestant and host will play a game where the contestant wins if they open the door with the prize and the host wins if the contestant opens a door with a toaster. The steps of the game are:

1. Contestant selects a door
2. Host is forced to open 97 not-currently-chosen doors with toasters behind them of his choice
3. Contestant has the option to switch their selection to one of the other two closed doors.
4. Host is forced to open one more (closed) not-currently-chosen door with a toaster behind it of his choice.
5. Contestant opens one of the two closed doors of their choice.

Assuming the Host plays optimally, what is the Contestant's optimal strategy and what is his chance of winning?

If this is the specified problem, then the contestant can insure that he has a 99% chance of winning by not switching in step 3 and switching in step 5, and the Host is powerless to stop him. The contestant can't do better than this, clearly. TerminalCopper figured this out.

You seem to think that the contestant switched in step 3. Why did they do that? Were they playing a game which they didn't know the rules for? I hate playing games I don't know the rules for.
Title: Re: Maths thread.
Post by: skip wooznum on August 07, 2015, 04:17:00 pm
it's certainly not option B. The two options in my mind for step 4 are:
A. Host chooses a completely random door that isn't the contestant's current door or the car door.I'd say this is 99/103 and TrojH concurs.

B. Host chooses a door that isn't the contestant's current door or the car door but he doesn't choose equally between  the available doors, rather he chooses with a modified rate that will maximize his chances of winning. I'd say this is 50.5%

And in your option B, I'd say the odds are 99/101, not 99/100, but that's neither here nor there.

Actually, you're right, it can't be B, because there's no guarantee that a door can be opened at all, since the door with the car might be the only remaining not-chosen door.
fair point.
Title: Re: Maths thread.
Post by: skip wooznum on August 07, 2015, 04:23:39 pm
skip, it's your problem. Please give us a single, precisely formulated problem. Here's what I think you currently intend your problem to be, correct me if I am wrong:

There are 100 doors, one of which has a prize behind it, the others contain toasters. The contestant and host will play a game where the contestant wins if they open the door with the prize and the host wins if the contestant opens a door with a toaster. The steps of the game are:

1. Contestant selects a door
2. Host is forced to open 97 not-currently-chosen doors with toasters behind them of his choice
3. Contestant has the option to switch their selection to one of the other two closed doors.
4. Host is forced to open one more (closed) not-currently-chosen door with a toaster behind it of his choice.
5. Contestant opens one of the two closed doors of their choice.

Assuming the Host plays optimally, what is the Contestant's optimal strategy and what is his chance of winning?

If this is the specified problem, then the contestant can insure that he has a 99% chance of winning by not switching in step 3 and switching in step 5, and the Host is powerless to stop him. The contestant can't do better than this, clearly. TerminalCopper figured this out.

You seem to think that the contestant switched in step 3. Why did they do that? Were they playing a game which they didn't know the rules for? I hate playing games I don't know the rules for.
fine. Let's add a rule that says that once the contestant is offered the option to switch and declines, he is no longer able to switch later on. The game is over and he must keep his curtain. That should solve TC's issue.

And sorry for not keeping this restricted to a single problem, it's just I want to know what people think about the other problem as well. But the one you described is my priority.
Title: Re: Maths thread.
Post by: Kirian on August 07, 2015, 04:23:49 pm
If Monty offers you a switch a second time, switch to the Moat.
Title: Re: Maths thread.
Post by: skip wooznum on August 07, 2015, 04:28:03 pm
If Monty offers you a switch a second time, switch to the Moat.
please keep solutions in spoilers. It's inconsiderate towards others.
Title: Re: Maths thread.
Post by: liopoil on August 07, 2015, 04:59:20 pm
Okay. In that case it is best for the contestant to switch the first time, since surely he can do better than 1/100. Then we are playing the classical monty hall problem with the following modifications:

1. The car is not uniformly distributed between doors; it is behind the first with probability 2/200, the second 99/200, the third 99/200.
2. The contestant is forced to select door 2.
3. Then the host opens door 1 or 3, whichever has a goat behind it. If both have a goat the host chooses door 1 or 3 with a strategy which minimizes the chance that the contestant wins, instead of randomly as in the classical problem.
4. Then the contestant opens one of the two remaining closed doors of their choice

This is a fairly simple game to solve. The contestant has 4 pure strategies: Open door 1 if possible, else door 2, Open door 2, open door 3 if possible, else door 2, and open the other door. Call these strategies 1, 2, 3,  and 4, respectively. The host has two pure strategies: Open door 1, or open door 3 (since he only has a choice when both are goats). Here's a payoff table, where the payoff is that of the contestant and a win is +1, a loss -1. The payoff for the host is the negative.

                1          2          3        4
Door 1      .01       -.01     -.01     .01   

Door 3    -.98       -.01       .98     .01

Clearly it can never be better to choose strategies 1 or 2, so we just consider 3 and 4. Then it is never better for the host to choose to open door 3 if he has the choice, so then we are left with just Door 1, and strategies 3 and 4. Then of course the contestant should always switch, strategy 4.

So we got lucky and there was a pure-strategy equilibrium. The host should always open Door 1 if he has a choice*, and the contestant should always switch*. The contestant's expected payoff is than .01, or equivalently, he has a 101/200 = 50.5% chance of winning.

*Technically, the host could also open door 3 when he has a choice with probability up to and including 2/99, and then the contestant would be fine opening door 2 when the host opens door 3 if P(D3) = 2/99. The expected payoff remains the same of course.
Title: Re: Maths thread.
Post by: TrojH on August 07, 2015, 05:17:54 pm
liopoil, thanks for that detailed solution. It saved me from having to type up a solution of my own. :D

I concur with liopoil's answer.
Title: Re: Maths thread.
Post by: skip wooznum on August 07, 2015, 06:13:41 pm
Okay. In that case it is best for the contestant to switch the first time, since surely he can do better than 1/100. Then we are playing the classical monty hall problem with the following modifications:

1. The car is not uniformly distributed between doors; it is behind the first with probability 2/200, the second 99/200, the third 99/200.
2. The contestant is forced to select door 2.
3. Then the host opens door 1 or 3, whichever has a goat behind it. If both have a goat the host chooses door 1 or 3 with a strategy which minimizes the chance that the contestant wins, instead of randomly as in the classical problem.
4. Then the contestant opens one of the two remaining closed doors of their choice

This is a fairly simple game to solve. The contestant has 4 pure strategies: Open door 1 if possible, else door 2, Open door 2, open door 3 if possible, else door 2, and open the other door. Call these strategies 1, 2, 3,  and 4, respectively. The host has two pure strategies: Open door 1, or open door 3 (since he only has a choice when both are goats). Here's a payoff table, where the payoff is that of the contestant and a win is +1, a loss -1. The payoff for the host is the negative.

                1          2          3        4
Door 1      .01       -.01     -.01     .01   

Door 3    -.01       -.01       .98     .01

Clearly it can never be better to choose strategies 1 or 2, so we just consider 3 and 4. Then it is never better for the host to choose to open door 3 if he has the choice, so then we are left with just Door 1, and strategies 3 and 4. Then of course the contestant should always switch, strategy 4.

So we got lucky and there was a pure-strategy equilibrium. The host should always open Door 1 if he has a choice*, and the contestant should always switch*. The contestant's expected payoff is than .01, or equivalently, he has a 101/200 = 50.5% chance of winning.

*Technically, the host could also open door 3 when he has a choice with probability up to and including 2/99, and then the contestant would be fine opening door 2 when the host opens door 3 if P(D3) = 2/99. The expected payoff remains the same of course.

ok, so the first thing I notice is we have the same result. Maybe I'm cut out for this math thing after all. Now I just need to figure out how you gou your result.

The first thing I don't understand isone entry on your table. If the contestant employs strategy 1, and the host always opens door 3 when possible, shouldn't the payout be -.98, because the contestant will only win if its behind door 1?
Title: Re: Maths thread.
Post by: liopoil on August 07, 2015, 06:32:42 pm

                1          2          3        4
Door 1      .01       -.01     -.01     .01   

Door 3    -.01       -.01       .98     .01

Clearly it can never be better to choose strategies 1 or 2, so we just consider 3 and 4. Then it is never better for the host to choose to open door 3 if he has the choice, so then we are left with just Door 1, and strategies 3 and 4. Then of course the contestant should always switch, strategy 4.

So we got lucky and there was a pure-strategy equilibrium. The host should always open Door 1 if he has a choice*, and the contestant should always switch*. The contestant's expected payoff is than .01, or equivalently, he has a 101/200 = 50.5% chance of winning.

*Technically, the host could also open door 3 when he has a choice with probability up to and including 2/99, and then the contestant would be fine opening door 2 when the host opens door 3 if P(D3) = 2/99. The expected payoff remains the same of course.

The first thing I don't understand isone entry on your table. If the contestant employs strategy 1, and the host always opens door 3 when possible, shouldn't the payout be -.98, because the contestant will only win if its behind door 1?
You are correct, I will edit that now. That makes the table a bit more symmetric. It doesn't change the result.
Title: Re: Maths thread.
Post by: WalrusMcFishSr on August 08, 2015, 01:39:05 pm
Could you imagine the spectacle of 100-door Let's Make a Deal? I'm imagining a 10x10 wall of doors. Then simultaneously revealing 97 goats for virtually no reason! I'd watch it.
Title: Re: Maths thread.
Post by: skip wooznum on August 08, 2015, 09:37:22 pm
Lio, how did you get to the host opening Door 3  2/99 of the time?
Title: Re: Maths thread.
Post by: liopoil on August 08, 2015, 10:35:36 pm
Lio, how did you get to the host opening Door 3  2/99 of the time?
He needs to make sure that the utility of the contestant employing strategy 3 is never more than 0.01. If P(D3) is the probability he opens door 3, then the utility is .98 * P(D3) - .01 * (1 - P(D3)) = .99 * P(D3) - .01. This quantity is less than or equal to .01 only for P(D3) less than or equal to 2/99. For P(D3) = 2/99, there is equality and the contestant has equal utility with strategies 3 and 4.
Title: Re: Maths thread.
Post by: skip wooznum on August 08, 2015, 11:31:22 pm
I just realized our answers are very different:
you're saying the host will open door 1 if he can, and the contestant should always switch (this is pre-your last paragraph). What this will result in is that in a situation where the host opens door 3, the contestant should switch for a guaranteed win. What you are referring to when you say 50.5% are the contestants chances before the game begins. What I was saying, was that at the point that the host opens door 3, there is a 50.5% it's in door 1.
Title: Re: Maths thread.
Post by: Kirian on August 08, 2015, 11:35:44 pm
As is common with math problems, xkcd has the best answer:

(http://imgs.xkcd.com/comics/monty_hall.png)
Title: Re: Maths thread.
Post by: liopoil on August 08, 2015, 11:38:41 pm
Hmmm, well I disagree with that. I'd say there is anywhere from a 97/99 to 1 probability that it is in the first door given the third was revealed. The host is really hoping the prize isn't in Door 1.
Title: Re: Maths thread.
Post by: skip wooznum on August 08, 2015, 11:53:48 pm
Hmmm, well I disagree with that. I'd say there is anywhere from a 97/99 to 1 probability that it is in the first door given the third was revealed. The host is really hoping the prize isn't in Door 1.
what's wrong with saying that the host will open door one with probability 22/1111 in situations where he has a choice? If he does this does the contestant have some strategy that will give him better than 50.5% odds of winning? And wouldn't the host doing this get us to a 50.5% chance that it's behind door 1 and 49.5% chance it's in door 2?
Title: Re: Maths thread.
Post by: skip wooznum on August 09, 2015, 03:01:25 am
Just realized I completely don't understand what you're saying :P. if the host opens door three 2 out of the 99 times where he has a choice (which is what you suggest is part of the range for most optimal strategy), then in 200 cases, door 3 will be opened 4 times; twice when it's actually in door 1, and twice when it's in door 2 (the other 97 times it's in door 2, he'd open door 1). Am I understanding all this correctly? If so, then in a situation where the host opens door 3, wouldn't you have a 50/50 shot? Out of 4 possible scenarios, there are 2 that would mean door two is correct and 2 that door one is correct. 
Title: Re: Maths thread.
Post by: liopoil on August 09, 2015, 09:05:00 am
Hmmm, well I disagree with that. I'd say there is anywhere from a 97/99 to 1 probability that it is in the first door given the third was revealed. The host is really hoping the prize isn't in Door 1.
what's wrong with saying that the host will open door one with probability 22/1111 in situations where he has a choice? If he does this does the contestant have some strategy that will give him better than 50.5% odds of winning? And wouldn't the host doing this get us to a 50.5% chance that it's behind door 1 and 49.5% chance it's in door 2?
22/1111 = 2/101 < 2/99, so sure, the host can do that. Those probabilities are correct. But there's nothing special about 2/101, as far as I can see.

Oops, I got ahead of myself again. Yes, then the contestant has a 50/50 shot. In fact, this makes sense, because 2/99 is the point where strategies 3 and 4 are equally good, because they differ only in the case where door 3 is opened. So then there is anywhere from a 1/2 to 1 probability that the car is behind door 1, given door 3 was opened. So to be on the safe side, you should probably open door 1. This number is not uniquely determined because the strategy for the host is not uniquely determined; any value from 0 to 2/99 for the probability he opens door 3 if he has a choice yields the same expected payoff for the contestant: 1/100. If P(D3) =  x, then the probability it is in door 2 given door 3 was opened is (99x)/(2 + 99x), which ranges over all real values between 0 and 1/2 for x in [0, 2/99].
Title: Re: Maths thread.
Post by: liopoil on August 09, 2015, 09:11:47 am
His best strategy is one that gives you the same chance of winning no matter what he does.
So this I think is your error. Because the host's actions depend on where the car is, and the contestant's chance of winning also depends on where the car is, the contestant's chance of winning changes depending on which door is opened. What IS true, and what's true for many many (all?) games, is that the contestant's expected payoff is the same no matter which of the pure strategies the host randomly adopts.

As it turns out, the host can achieve this equality and in fact it is a valid strategy for him. However, there are infinitely many others which don't have this symmetry but achieve the same outcome.
Title: Re: Maths thread.
Post by: skip wooznum on August 09, 2015, 09:34:11 am
His best strategy is one that gives you the same chance of winning no matter what he does.
So this I think is your error. Because the host's actions depend on where the car is, and the contestant's chance of winning also depends on where the car is, the contestant's chance of winning changes depending on which door is opened. What IS true, and what's true for many many (all?) games, is that the contestant's expected payoff is the same no matter which of the pure strategies the host randomly adopts.

As it turns out, the host can achieve this equality and in fact it is a valid strategy for him. However, there are infinitely many others which don't have this symmetry but achieve the same outcome.

right. So I assumedthat the host would try to keep an equality that would make it that whatever door the host opens, the contestant still has a 50.5% chance. You're saying that that isn't exclusively the best strategy; as long as the host's strategy gives the contestant 50.5% of winning originally,  that strategy is optimal regardless of how the odds change later on. Gotchya. Anyway, thanks everyone for helping out, I hope this wasnt too primitive for you guys.
Title: Re: Maths thread.
Post by: scott_pilgrim on August 26, 2015, 04:25:11 pm
Here's a fun problem I came up with.  Writing a program to solve it is cheating.  (Very minor hint:) You should be able to solve it without using a calculator at all.

In a particular family, every man has one son and one daughter, and every woman has two sons and one daughter.  What is the difference between the number of great great...(100 total greats) grandsons a man in this family will have, and the number of great great...(100 total greats) granddaughters a woman in this family will have?

(Only the original man/woman and his/her descendants count as being "in the family".)
Title: Re: Maths thread.
Post by: liopoil on August 26, 2015, 05:17:57 pm
A grandchild is two generations, so we are counting the men/women in the 102nd generation, where the original person is the 0th generation.

To count the daughters, we count the total number of people in the 101th generation starting with a woman.

To count the sons, we count the total number of people in the 101th generation starting with a man, then add the number of women in the 101th generation starting with a man.

The number of women in the 101th generation starting with a man is the total number of people in the 100th generation starting with a man.

Let mi denote the set of people in the ith generation starting with a man, and wi denote the set of people in the ith generation starting with a woman. Note that w1 = m1 U m0. In each subsequent generation, the sets generate offspring independently, and so by induction w101 = m101 U m100. Therefore the difference is 0.

There is probably a more elegant way to state the solution, and maybe there is a better notation for what I did. The inductive step feels kind of handwavy.
Title: Re: Maths thread.
Post by: scott_pilgrim on August 26, 2015, 06:25:39 pm
A grandchild is two generations, so we are counting the men/women in the 102nd generation, where the original person is the 0th generation.

To count the daughters, we count the total number of people in the 101th generation starting with a woman.

To count the sons, we count the total number of people in the 101th generation starting with a man, then add the number of women in the 101th generation starting with a man.

The number of women in the 101th generation starting with a man is the total number of people in the 100th generation starting with a man.

Let mi denote the set of people in the ith generation starting with a man, and wi denote the set of people in the ith generation starting with a woman. Note that w1 = m1 U m0. In each subsequent generation, the sets generate offspring independently, and so by induction w101 = m101 U m100. Therefore the difference is 0.

There is probably a more elegant way to state the solution, and maybe there is a better notation for what I did. The inductive step feels kind of handwavy.


That looks right, but you did it a little differently from me.  You can make some really cool sequences for the number of males, females, or total in each generation, and then do stuff with those.  The sequences follow a pattern similar to the Fibonacci numbers, so I tried to ask a question that you could answer without having a program generate the numbers for you, but I guess you don't actually need the sequences to answer that question.
Title: Re: Maths thread.
Post by: jonts26 on September 30, 2015, 07:22:17 pm
(http://i.imgur.com/c2jJC19.png)
Title: Re: Maths thread.
Post by: eHalcyon on September 30, 2015, 07:45:05 pm
Troll image?
Title: Re: Maths thread.
Post by: Awaclus on September 30, 2015, 08:01:41 pm
Troll image?

No, it's actually true. Just like this one:

(https://dl.dropboxusercontent.com/u/16948609/nerokasta.jpg)
Title: Re: Maths thread.
Post by: silverspawn on September 30, 2015, 08:08:34 pm
Troll image?

it's 120 = 5*4*3*2*1 = 5!

it's supposed to be clever n stuff.
Title: Re: Maths thread.
Post by: Kirian on September 30, 2015, 08:10:35 pm
Troll image?

Yes, but not that kind of troll image, the other kind.
Title: Re: Maths thread.
Post by: eHalcyon on September 30, 2015, 08:21:50 pm
D'oh.  :-[
Title: Re: Maths thread.
Post by: popsofctown on October 01, 2015, 11:07:32 am
This might be the right thread for this.

I was musing this morning on how the Secretary Problem might be modified to handle "who should I main" in MOBAs.

For this, you'd want some same assumptions, some different assumptions:

I. You are going to play N games testing A applicants before selecting your applicant (the same, people tend to have an idea of how much time they want to waste experimenting)

II.  Unlike the Secretary problem, you are free to go ahead and play all N games (though it'd be nice to have a strategy where you quit early if you can completely rule out all but one hero.)

III. Like the secretary problem, the process of gathering information about applicants is sequential in nature, but unlike the secretary problem, you can make up to P passes through the list, revisiting only sufficiently impressive cantidates (The way most players enjoy/efficiently learn suggests that games on the same hero be consecutive.  The large number of characters in a MOBA game requires that P be small.. definitely less than ten.  In Starcraft A=three so P can equal, like, twenty.
It seems like this may need to be revised or cleaned up to reflect that playing a large number of games on a champion, leaving it, then returning it for another long string of games, creates far less testing bias then playing a champion once on first pass, once on second past, etc.)

IV. Like the secretary problem, each applicant has a true value V.  V is your winrate over an infinite number of games with the champion, so it ranges from 0 to 1.  You could probably use practical knowledge about the game to clamp the values to at least .1 through .9 and probably something even smarter than that, but there's lots of parameters already.

V. Like the secretary problem, you gather information about V when you spend time with an applicant.  Unlike the secretary problem, your knowledge is imperfect, and dependent on the amount of time you spend with an applicant.  You'll get a value of wins over games played, and that will have an imperfect correspondence with V, but it gives you some information about V.

VI.  Unlike the secretary problem, the final choice does not have to be last champ you played.  Due to the consequences of rule III and rule I you still might have to reject choices early on in a manner somewhat reminiscent of how those secretaries get very indignant if you don't hire them on the spot.

VII.  The optimal solution to the problem maximizes the V of the final champion selected.  The value of V is more important than how V is relative to the other champions, though, unlike the secretary problem (all though if the secretary problem were made more practical, it would probably also be more concerned with V)(Unless there's all the ones you don't hire join other company's and then you lose the intramural between company's secretary-off).




The idea interest me a bit, and as MOBAs get more stable and balanced there might be more interest in playing the game in a style that sort of chases the solution here.
I find it rather fascinating that the optimal solution quite possibly excludes some applicants entirely when A is small, and N is large.  Maybe even if P is still large or infinite.  Because getting accurate information could be so much more important than being open to every possibility.  The interesting question is, how many applicants will get excluded?  If it proves best to clamp the lowest to highest winrates as something like 15%-60%, it might, paradoxically, sometimes be correct to ignore a totally unplayed virgin champion while you continue to explore a champion you are are 1-1 with, even if the algorithm is doing much better than a .5 V on average, just because you can build a reliable source of information without being two games behind and have ruled against the champion being awful.

Idk just some musings in b4 no1 reads
Title: Re: Maths thread.
Post by: DStu on October 01, 2015, 02:21:25 pm
So what are you trying to do?  Doing the experimental games is basically Bayesian statistics, you have some prior distribution of your strength with each champ, and you try to narrow this distributions down by including observations. At the end, you chose one champ.

So the overall goal would be to maximize the expectation value (wrt to the prior distribution (?)) of the real strength of the chosen champ, over all strategies to test these champs.

There are some parameters here that you would have to specify, as the priors and how your observations update the priors. How well you do this influences how good your optimization can be (or you also optimize over these, but that will get really complicated). Given all these I'm not sure if one can analytically solve the problem, but at least one could do simulations.



keep the text below here which is how that post started, is kind of unrelated to the one above but might be interesting, too
---------------------

The problem is interesting, but not specified enough to give a solution, I suggest even the type of the strategy depends on further parameters.
First one that comes to my mind is to fix "how much information do I gather per game".
If that is "everything", you of course just want to test as many champs as possible
If the marginal information is increasing with the number of games you play with a champ (e.g. the second game might give you more information than the first, as you can make more informed tests) the strategy will look significantly different than if it is decreasing (the 1000th game will give you less marginal information than the first probably). 

So you would have to fix that, something like maybe delta information = xe^⁻x .  Or just e^-x is you think the first game is more important than the second.



Title: Re: Maths thread.
Post by: popsofctown on October 01, 2015, 03:29:59 pm
So what are you trying to do?  Doing the experimental games is basically Bayesian statistics, you have some prior distribution of your strength with each champ, and you try to narrow this distributions down by including observations. At the end, you chose one champ.

So the overall goal would be to maximize the expectation value (wrt to the prior distribution (?)) of the real strength of the chosen champ, over all strategies to test these champs.

There are some parameters here that you would have to specify, as the priors and how your observations update the priors. How well you do this influences how good your optimization can be (or you also optimize over these, but that will get really complicated). Given all these I'm not sure if one can analytically solve the problem, but at least one could do simulations.



keep the text below here which is how that post started, is kind of unrelated to the one above but might be interesting, too
---------------------

The problem is interesting, but not specified enough to give a solution, I suggest even the type of the strategy depends on further parameters.
First one that comes to my mind is to fix "how much information do I gather per game".
If that is "everything", you of course just want to test as many champs as possible
If the marginal information is increasing with the number of games you play with a champ (e.g. the second game might give you more information than the first, as you can make more informed tests) the strategy will look significantly different than if it is decreasing (the 1000th game will give you less marginal information than the first probably). 

So you would have to fix that, something like maybe delta information = xe^⁻x .  Or just e^-x is you think the first game is more important than the second.

I think there's a miscommunication here.  The way I want to define the problem, the ONLY information gathered about a champion by playing a champion is whether you won or last, and what that win or loss suggests about V.  So if you play Chancellorman and win, you know that Chancellorman can't possibly have V=0, and there is a greater than 50% chance that Chancellorman's V is greater than 50%, because you've taken a random sample (with an awfully small sample size) out of an indefinite number of games played with Chancellorman.  Realistically, some details about that particular game might be somewhat useful to making guesses about V, but in order for the problem to be simple enough we're ignoring those.  (those details have also been largely discredited by statistics, according to developers' analysis of backend stats, but even if they were more useful it'd be simpler to drop them)

So the first game is no more important than the second, it doesn't even matter what ordered they were played.  They are treated as an unordered sample from a larger population of millions of games played with the champion, games you haven't played yet.


I know there's an exact formula for relating the characteristics of a small sample of a population to the population at large based on the sample size.  So "how much information do I gather per game" should already be exactly defined by those formulas, which I learned in high school and do not remember right now. 
I remember there was something special about a sample size of 30 being somewhat of a turning point in getting to a really good bead on the characteristics of the longer population, so it's possible the solution strategy looks something like testing a champ about 5 times, dropping it if it loss streaks out the gate, then continuing to test it to somewhere around 30 and moving on to the next champ at that point even if the champ is doing well.  And excluding enough champs that it will have a chance to get several dudes to 30.
Title: Re: Maths thread.
Post by: Ratsia on October 01, 2015, 03:48:23 pm
I was musing this morning on how the Secretary Problem might be modified to handle "who should I main" in MOBAs.
What you wrote sounds a lot like the multi-armed bandit problem (https://www.wikiwand.com/en/Multi-armed_bandit), though the fact that you do not care about the winning rate while exploring makes the solution a bit easier.

There's been a lot of research on this in the machine learning community (and probably in some other fields too) during the past decade or so, in part because it solves online advertising. For practical applications with finite number of candidates and somehow reasonable distribution of the values any of the old standard solutions (Thompson sampling, upper-confidence bounds, etc) should work well, but for interesting theoretical properties you would probably need to do some reading.
Title: Re: Maths thread.
Post by: DStu on October 01, 2015, 11:14:37 pm
I think there's a miscommunication here.

Are you asssuming a fixed winrate for a champion, or are you assuming a fixed winrate for you with that champion? In the sense of how well it fits your playing style, personal skill and whatever.
If you are in the first case you are right and each game will matter the same, if you are in the second you could model it in a way that games are not equally important (but of course don't have to)
Title: Re: Maths thread.
Post by: popsofctown on October 02, 2015, 09:07:25 am
The fixed win-rate FOR YOU.  And yes, it's due to playstyle fit. 

I still don't understand how it's even possible to model games as having different importance with a fixed winrate, but I'd love if I'm missing a detail and you could help me see it!
Title: Re: Maths thread.
Post by: DStu on October 02, 2015, 02:04:10 pm
The fixed win-rate FOR YOU.  And yes, it's due to playstyle fit. 

I still don't understand how it's even possible to model games as having different importance with a fixed winrate, but I'd love if I'm missing a detail and you could help me see it!

Of course depends on how you model the whole stuff, if you do it the Bayesian way I think you can
a) assume there is a "true" fixed win-rate for you, but also assume that your win-rate in the first games is worse (or more reverted to 1/2) than the true one. Kind of cheated as it's not fixed any more, but the "true" one you want to find is still fixed.
b) If you calculate the posteriori distributions, you probably get something like constant * prior* (product of terms due to observations). You could just arbitrarily weight the terms from the first games lower (which, in this context is probably equivalent to a))

But in the meantime I am thinking, this all might add to much complexity (and more parameters) to the problem, I would first really solve it with "really" constant probabilities.
Title: Re: Maths thread.
Post by: XerxesPraelor on October 08, 2015, 09:30:58 am
I'm really frustrated at a particular math problem right now in the (already handed in) homework for introductory Math at CMU, and I'm hoping someone here might be able to justify it to me.

So there's a function f(x) from A to B.

Prove that if f is injective, and S and T are subsets of A, that f(S-T) = f(S) - f(T).

But S is a subset of A, not an element of A. Now the actual problem they want us to solve is obvious, but this kind of ambiguity seems really unforgivable when both definitions could apply in some situations. What makes it worse is that this alternate definition of f(S) was not explained in the homework or any time in class, so there's no reason to expect us to know it.
Title: Re: Maths thread.
Post by: Witherweaver on October 08, 2015, 09:40:24 am
I'm really frustrated at a particular math problem right now in the (already handed in) homework for introductory Math at CMU, and I'm hoping someone here might be able to justify it to me.

So there's a function f(x) from A to B.

Prove that if f is injective, and S and T are subsets of A, that f(S-T) = f(S) - f(T).

But S is a subset of A, not an element of A. Now the actual problem they want us to solve is obvious, but this kind of ambiguity seems really unforgivable when both definitions could apply in some situations. What makes it worse is that this alternate definition of f(S) was not explained in the homework or any time in class, so there's no reason to expect us to know it.

So, these are standard notations:

S - T means S\T = { x in S: x not in T}

f(S) = {y: y=f(x) for some x in S}
f(T) = {y: y=f(x) for some x in T}
f(S-T) = {y: y=f(x) for some x in S-T} = {y: y=f(x) for some x in S and not in T}
f(S) - f(T) = { y: y in f(S) and y not in f(T)} = {y: y=f(x) for some x in S AND y is not f(z) for any z in T}

S and T are subsets of A, so S-T is not ambiguously defined.  They're sets; their difference is set difference. 

I think the problem is straightforward given these definitions.
Title: Re: Maths thread.
Post by: XerxesPraelor on October 08, 2015, 09:48:04 am
Yeah I realize the sets aren't ambiguous. I'm talking about the function. It can mean both a function from A -> B and one from P(A) -> P(B).

PS. Yes, the problem was easy once I figured out the equivocation. I just wish they defined a new function instead of coopting f to be two different functions at the same time.
Title: Re: Maths thread.
Post by: Witherweaver on October 08, 2015, 09:49:12 am
Namely, suppose f is injective.  Then if y is an elements of B such that there is x1, x2 in A with f(x1) = y, f(x2) = y, we must have x1 = x2.  (I.e., two unique elements in the domain cannot map to the same element in the range.)

First, let y be in f(S-T).  Then y = f(x) for some x in S-T, which is an x that is in S and not T.  We need to show that y is in f(S)-f(T).    Since y = f(x) and x is in S, y is in f(S).  Moreover,  x is not in T. Can y be in f(T)?  If it were, then there would be z in T such that f(z) = y.  But, f(x) = y, and by the injective property of x, this implies x=z.  This is a contradiction, because z is in T but x is not. Therefore, y is not in f(T).  Thus, y is in f(S) but not f(T), so y is in f(S) - f(T).

Now let y be in f(S) - f(T).  We need to show y is in f(S-T).  This is now straightforward.  Because y is in f(S)-f(T), y is in f(S).  So there is an x in S so that y=f(x).  However, y is not in f(T).  So it cannot be the case that x is in T, because then y would be in f(T).  So, x is in S and not T, so x is in S-T.  Thus, y is in f(S-T).

We have shown f(S-T) and f(S)-f(T) are subsets of reach other, and therefore equal.

Note that f being injective was used in only one direction.
Title: Re: Maths thread.
Post by: Witherweaver on October 08, 2015, 09:51:30 am
Yeah I realize the sets aren't ambiguous. I'm talking about the function. It can mean both a function from A -> B and one from P(A) -> P(B).

A function is defined with its domain (and codomain).

f: A->B means f is defined to map elements in A and elements in B.

f:P(A)->P(B) and f:A->B are entirely different things, even though you use the same "f" for them.  In your problem, the former was defined and the latter was not. (Well, it's implicitly defined:

Any function f:A->B defines g:P(A)->P(B) by g(T) = {y in B: y = f(x) for some x in T}.  WE shorthand this by using the same "f" instead of new "g".)
Title: Re: Maths thread.
Post by: popsofctown on October 08, 2015, 09:55:46 am
I always have trouble justifying super simple statements like that in the way the teacher wants to see it.  I always want to point at it and say, "yeah, duh."...
Examine left hand side.
Using @ signs when my keyboard doesn't have symbols I used in math class
f(S-T) = f(S) - f(S@INTERSECT@T) - [all f(y) such that x@ISELEMENTOF@S and y@ISELEMENTOF@T, x=/=y, and f(x)=f(y)]

Then you simplify.  The S intersect T part simplifies down to f(T) since if you expand it to subtract stuff that is in T but not in S, the f(s) part won't have any of that ish for you to take away so it's all good.  Actually, maybe you can write it just as f(T) in the first place, but it seems more formal that way.  I'm not sure.

The last part simplifies to the empty set because the existence of any f(y) contradicts that f is injective.


EDIT: geez, it says I got quadruple ninja'ed, I'm not gonna read the better answers and get sad, I'm just gonna post my garbage and run away.
Title: Re: Maths thread.
Post by: Witherweaver on October 08, 2015, 09:57:18 am
Yeah I realize the sets aren't ambiguous. I'm talking about the function. It can mean both a function from A -> B and one from P(A) -> P(B).

PS. Yes, the problem was easy once I figured out the equivocation. I just wish they defined a new function instead of coopting f to be two different functions at the same time.

Well, fair enough, but quite often we abuse notation for convenience.  Using f(A) for a subset A in the domain of f to be the image of A under f is such common (and useful) notation, that it isn't really a problem.  Really, you don't have to think of this "new" f as mapping P(A) to P(B).  It doesn't, it just maps A to B. The notation f(A) does not mean "the function f when you plug in A".  It is simply notation for the particular subset in B that is mapped to by elements of A under f.

There is no ambiguity here because there is not an "f" defined on a domain of subsets of A.  f(A) does not mean anything else that what we've defined it to be here.
Title: Re: Maths thread.
Post by: Witherweaver on October 08, 2015, 11:38:01 am
On the subject of math, math is really hard when you forget to include negative signs at the start.

phi(x) = e^{-x^2}/2,

so clearly

phi((x-u)/a) = e^{(x-u)^2/(2a^2)}

20 lines later, things aren't canceling correctly...
Title: Re: Maths thread.
Post by: Kirian on December 04, 2015, 01:23:21 pm
TIL all the binomial coefficients other than (n 0) and (n n) of a prime number are divisible by the prime number, and that this is a sufficient and necessary condition for primality.
Title: Re: Maths thread.
Post by: mpsprs on December 04, 2015, 01:25:29 pm
TIL all the binomial coefficients other than (n 0) and (n n) of a prime number are divisible by the prime number, and that this is a sufficient and necessary condition for primality.

And hence (x+y)^p=x^p+y^p  (at least mod p).  If only my calculus students recognized that they should not be working mod 2.
Title: Re: Maths thread.
Post by: liopoil on December 04, 2015, 05:00:08 pm
TIL all the binomial coefficients other than (n 0) and (n n) of a prime number are divisible by the prime number, and that this is a sufficient and necessary condition for primality.
Hmm, necessity follows from the expression in terms of factorials, but how do you prove sufficiency? I suppose n choose p isn't divisible by n for prime p dividing n?
Title: Re: Maths thread.
Post by: Witherweaver on December 04, 2015, 05:14:26 pm
TIL all the binomial coefficients other than (n 0) and (n n) of a prime number are divisible by the prime number, and that this is a sufficient and necessary condition for primality.
Hmm, necessity follows from the expression in terms of factorials, but how do you prove sufficiency? I suppose n choose p isn't divisible by n for prime p dividing n?

Aren't we saying something different?  That p divides (p k) for all 0 < k < p iff p is prime. 

Edit: Thanks mpsprs.
Title: Re: Maths thread.
Post by: mpsprs on December 04, 2015, 05:15:49 pm
TIL all the binomial coefficients other than (n 0) and (n n) of a prime number are divisible by the prime number, and that this is a sufficient and necessary condition for primality.
Hmm, necessity follows from the expression in terms of factorials, but how do you prove sufficiency? I suppose n choose p isn't divisible by n for prime p dividing n?

Proof for Liopoil.  (But you should do it yourself.  It's not too bad).
Suppose n=pq and consider (n p)  Then the numerator is p*2p*3p*...*qp*(p-free stuff).  The denominator (p!(n-p)!) is p*p*2p*3p*...*(q-1)p*(p-free stuff).  Everything cancels exactly except qp/p=q.  If p^e exactly divides n (so p^e divides n, but p^(e+1) does not), then p^(e-1) exactly divides (n p), which means p^e and hence n cannot divide (n p).
Title: Re: Maths thread.
Post by: mpsprs on December 04, 2015, 05:19:18 pm
TIL all the binomial coefficients other than (n 0) and (n n) of a prime number are divisible by the prime number, and that this is a sufficient and necessary condition for primality.
Hmm, necessity follows from the expression in terms of factorials, but how do you prove sufficiency? I suppose n choose p isn't divisible by n for prime p dividing n?

Aren't we saying something different?  That p divides (p k) iff p is prime.

You need to tack on a 'for all 0<k<p' condition before the iff. 

But I think Liopoil was thinking about the (proof of the) statement 'if n is not prime, then n does not divide (n k) for some k' by specifically guessing that if p divides n, then n won't divide (n p).  His statement is one direction of yours.  (And the harder to prove)
Title: Re: Maths thread.
Post by: Witherweaver on December 04, 2015, 05:35:18 pm
TIL all the binomial coefficients other than (n 0) and (n n) of a prime number are divisible by the prime number, and that this is a sufficient and necessary condition for primality.
Hmm, necessity follows from the expression in terms of factorials, but how do you prove sufficiency? I suppose n choose p isn't divisible by n for prime p dividing n?

Aren't we saying something different?  That p divides (p k) iff p is prime.

You need to tack on a 'for all 0<k<p' condition before the iff. 

But I think Liopoil was thinking about the (proof of the) statement 'if n is not prime, then n does not divide (n k) for some k' by specifically guessing that if p divides n, then n won't divide (n p).  His statement is one direction of yours.  (And the harder to prove)

Oh, I see, thanks.
Title: Re: Maths thread.
Post by: silverspawn on January 31, 2016, 11:06:31 am
Can someone explain to me how

(https://upload.wikimedia.org/math/8/5/e/85ed8e76c91d588aa3354ab1c192974f.png)

?
Title: Re: Maths thread.
Post by: liopoil on January 31, 2016, 11:14:30 am
\frac{b}{a + \sqrt{a^2  - b}}

= \frac{b}{a + \sqrt{a^2  - b}} \cdot \frac{a - \sqrt{a^2 - b}}{a - \sqrt{a^2 - b}}

= \frac{b(a - \sqrt{a^2 - b})}{a^2 - (a^2 - b)}

= \frac{b(a - \sqrt{a^2 - b})}{b} = a - \sqrt{a^2 - b}
Title: Re: Maths thread.
Post by: silverspawn on January 31, 2016, 12:47:33 pm
(https://upload.wikimedia.org/math/f/7/7/f77f0f42e64ef99c65d167e62e3e0b50.png)

(https://upload.wikimedia.org/math/3/d/c/3dc54e95e9c5b67d54fff41b37b6e8f8.png)

(https://upload.wikimedia.org/math/a/1/7/a171876d6b7825c7cf82f562ade8a3f9.png)

(https://upload.wikimedia.org/math/0/b/0/0b0b9721020d79edc23f2aa372e59d3b.png)

thanks!
Title: Re: Maths thread.
Post by: Witherweaver on January 31, 2016, 01:17:22 pm
You should also check the case where you attempt to divide by 0 (i.e., a = sqrt{a^2-b}).
Title: Re: Maths thread.
Post by: silverspawn on January 31, 2016, 01:52:20 pm
I think it has to be a = -SR(a²-b). if that's the case then a² = a²-b so b = 0 so a = -SR(a²) = -a = 0

so a = b = 0 and 0/0 can be anything, so here 0 = 0/0
Title: Re: Maths thread.
Post by: faust on January 31, 2016, 02:01:21 pm
so a = b = 0 and 0/0 can be anything, so here 0 = 0/0

When I was at high school, I used to think that way. Now I don't like it and I feel like it's much better to say that 0/0 is not defined, as otherwise 0 = 0/0 = 1.
Title: Re: Maths thread.
Post by: liopoil on January 31, 2016, 02:10:49 pm
I think it has to be a = -SR(a²-b). if that's the case then a² = a²-b so b = 0 so a = -SR(a²) = -a = 0

so a = b = 0 and 0/0 can be anything, so here 0 = 0/0
No, in this case your initial expression doesn't make any sense as faust said. Witherweaver is noting that I claim to be multiplying by "1", but when a = \sqrt{a^2  - b} I am multiplying by 0/0 which can lead to faulty results. However, when this is the case, a^2 = a^2 - b, so b = 0, so the expression is 0 and thus a - \sqrt{a^2 - b} is still correct.
Title: Re: Maths thread.
Post by: Kirian on January 31, 2016, 02:16:25 pm
Isn't it easier just to multiply both sides through by [a + sqrt(a2 + b)] ?
Title: Re: Maths thread.
Post by: liopoil on January 31, 2016, 02:37:08 pm
Isn't it easier just to multiply both sides through by [a + sqrt(a2 + b)] ?
Uh, yes, it is I guess. Though technically this is assuming the result unless you show it is reversible (which is obviously is, but still).
Title: Re: Maths thread.
Post by: Titandrake on January 31, 2016, 03:49:34 pm
Isn't it easier just to multiply both sides through by [a + sqrt(a2 + b)] ?
Uh, yes, it is I guess. Though technically this is assuming the result unless you show it is reversible (which is obviously is, but still).

Not reversible if (a + \sqrt{a^2 - b}) = 0 which can happen for a < 0, b = 0. In that case, the identity is actually wrong. I believe that's the only case though.

Title: Re: Maths thread.
Post by: silverspawn on January 31, 2016, 03:52:35 pm
Okay, what's the deal with everyone using TeX Notation when you don't even turn them into images?  ???
Title: Re: Maths thread.
Post by: Titandrake on January 31, 2016, 07:07:06 pm
Okay, what's the deal with everyone using TeX Notation when you don't even turn them into images?  ???

Basic TeX notation is readable at a glance, and it's a lot more effort to turn them into images and upload them. If people understand what you mean, the actual format doesn't matter as much. It's just a forum post.
Title: Re: Maths thread.
Post by: silverspawn on February 01, 2016, 10:38:50 am
I see. Although you don't have to "upload", In case of lio's calculation, all I had to do was to copy the code into a wiki page, add <math> tags, and it complied flawlessly (then you can copy the image codes), which is why I wondered if maybe you use a tool that generates the code.

It seems a bit strange to me, because I don't find TeX sourcecode pretty to look at, and isn't it easier to say SR(4) than \sqrt{4}?
Title: Re: Maths thread.
Post by: DStu on February 01, 2016, 10:58:27 am
I see. Although you don't have to "upload", In case of lio's calculation, all I had to do was to copy the code into a wiki page, add <math> tags, and it complied flawlessly (then you can copy the image codes), which is why I wondered if maybe you use a tool that generates the code.

It seems a bit strange to me, because I don't find TeX sourcecode pretty to look at, and isn't it easier to say SR(4) than \sqrt{4}?

probably depends on how often you have written \sqrt{4}.
Title: Re: Maths thread.
Post by: Kirian on February 01, 2016, 11:20:09 am
I see. Although you don't have to "upload", In case of lio's calculation, all I had to do was to copy the code into a wiki page, add <math> tags, and it complied flawlessly (then you can copy the image codes), which is why I wondered if maybe you use a tool that generates the code.

It seems a bit strange to me, because I don't find TeX sourcecode pretty to look at, and isn't it easier to say SR(4) than \sqrt{4}?

Even without using Tex, programming languages almost all use sqrt() and not sr().
Title: Re: Maths thread.
Post by: Awaclus on February 01, 2016, 12:00:46 pm
I would probably have to google what it means if "SR(4)" came up in a math notation somewhere, whereas I instantly know what sqrt means.
Title: Re: Maths thread.
Post by: Witherweaver on February 01, 2016, 12:59:29 pm
I see. Although you don't have to "upload", In case of lio's calculation, all I had to do was to copy the code into a wiki page, add <math> tags, and it complied flawlessly (then you can copy the image codes), which is why I wondered if maybe you use a tool that generates the code.

It seems a bit strange to me, because I don't find TeX sourcecode pretty to look at, and isn't it easier to say SR(4) than \sqrt{4}?

I would not assume SR(4) means square root without some context.  It looks like the name of some group or something.  But \sqrt{} is pretty unambiguous.
Title: Re: Maths thread.
Post by: Witherweaver on February 01, 2016, 01:01:21 pm
And if you normally type in TeX/LaTeX (like I do), it's second nature.  Even when writing emails at work, I will use LaTeX notation to talk about equations or mathematical expressions.
Title: Re: Maths thread.
Post by: DStu on February 01, 2016, 01:25:56 pm
I see. Although you don't have to "upload", In case of lio's calculation, all I had to do was to copy the code into a wiki page, add <math> tags, and it complied flawlessly (then you can copy the image codes), which is why I wondered if maybe you use a tool that generates the code.

It seems a bit strange to me, because I don't find TeX sourcecode pretty to look at, and isn't it easier to say SR(4) than \sqrt{4}?

I would not assume SR(4) means square root without some context.  It looks like the name of some group or something.  But \sqrt{} is pretty unambiguous.


http://www.thesrgroup.com/
Title: Re: Maths thread.
Post by: liopoil on February 01, 2016, 04:12:04 pm
I see. Although you don't have to "upload", In case of lio's calculation, all I had to do was to copy the code into a wiki page, add <math> tags, and it complied flawlessly (then you can copy the image codes), which is why I wondered if maybe you use a tool that generates the code.

It seems a bit strange to me, because I don't find TeX sourcecode pretty to look at, and isn't it easier to say SR(4) than \sqrt{4}?
I actually didn't know an easy way to generate the pictures, but I could tell that you knew LaTeX from your post, so that's what seemed easiest to do.
Title: Re: Maths thread.
Post by: Tables on February 05, 2016, 07:13:30 pm
So random idea I thought of today - and actually ended up fully solving while posting since I realised I missed something obvious for working out the answer.

What is the smallest list of n numbers (where n is a positive integer) such that:

The mode is n
The median is n
The mean is n
The range is n

Write down your list of numbers as well.

Harder version: As above, but with a variance of n.

Bonus points in both cases for proving your solutions.

The first version is relatively straight forward. I would say that a talented A level mathematician (16-18 year old level) could probably solve it and maybe prove it. The second version is a lot harder, especially to prove and if you find the whole family of solutions for the lowest n (spoiler: There's more than one solution to the second one).

I do have solutions to all of these, which I'll save for now so people can have a go and because I noticed an improvement to my answer to the second one and want to give a complete answer
Title: Re: Maths thread.
Post by: heron on February 05, 2016, 07:59:32 pm
What do you mean by the smallest list? By definition the list must have n elements, so they will all be the same size.
Unless I am looking for the smallest n that you can do this for?
Title: Re: Maths thread.
Post by: WanderingWinder on February 05, 2016, 08:11:29 pm
So random idea I thought of today - and actually ended up fully solving while posting since I realised I missed something obvious for working out the answer.

What is the smallest list of n numbers (where n is a positive integer) such that:

The mode is n
The median is n
The mean is n
The range is n

Write down your list of numbers as well.

Harder version: As above, but with a variance of n.

Bonus points in both cases for proving your solutions.

The first version is relatively straight forward. I would say that a talented A level mathematician (16-18 year old level) could probably solve it and maybe prove it. The second version is a lot harder, especially to prove and if you find the whole family of solutions for the lowest n (spoiler: There's more than one solution to the second one).

I do have solutions to all of these, which I'll save for now so people can have a go and because I noticed an improvement to my answer to the second one and want to give a complete answer

4 (2,4,4,6) and 7 (3.5,3.5,7,7,7,10.5,10.5). 6 almost works for the second part - you can get a variance as close to 6 as you like without ever quite making it there.
Title: Re: Maths thread.
Post by: Tables on February 06, 2016, 07:04:44 am
What do you mean by the smallest list? By definition the list must have n elements, so they will all be the same size.
Unless I am looking for the smallest n that you can do this for?

Yeah, I mean the smallest n. Sorry, it was late at night while I worded it.

WW: Your solution to part 1 is correct, part 2 is not. Hint: Don't assume the list must be "symmetric" around the mean
Title: Re: Maths thread.
Post by: Limetime on February 06, 2016, 08:14:07 am
What is the probability of a golden Sombrero?(Both opening cards miss shuffle assuming olny two card gained turn 1-2)
Title: Re: Maths thread.
Post by: Rabid on February 06, 2016, 08:23:14 am
What is the probability of a golden Sombrero?(Both opening cards miss shuffle assuming olny two card gained turn 1-2)
2/12 * 1/11 = 1/66
Title: Re: Maths thread.
Post by: Awaclus on February 06, 2016, 08:26:35 am
What is the probability of a golden Sombrero?(Both opening cards miss shuffle assuming olny two card gained turn 1-2)

(2*10!)/12! = ~0,015

There are 12! different possible ways to arrange all the cards, and there are 2 ways to arrange the opening buys times the 10! ways to arrange the rest of the cards.

PPE: Or that.
Title: Re: Maths thread.
Post by: DStu on February 06, 2016, 01:10:46 pm
What do you mean by the smallest list? By definition the list must have n elements, so they will all be the same size.
Unless I am looking for the smallest n that you can do this for?

Yeah, I mean the smallest n. Sorry, it was late at night while I worded it.

WW: Your solution to part 1 is correct, part 2 is not. Hint: Don't assume the list must be "symmetric" around the mean

I can prove that 6 is possible .

2.75, 3.8, 6, 6, 8.7, 8.75
have mean value 6 and variance 6.051
2.75, 4, 6, 6, 8.5, 8.75
have mean value 6 and variance 5.675


so we have the numbers 2.75,6,6,8.75 and 3.8+h,  8.7-h. For h in [0,0.2], the range doesn't change, nor does the mode or median.  Mean doesn't change for any h.  The variance is continuous in h, so by mean value theorem there exists an h \in (0,0.2) such that variance is 6. (The h is probably quite easy to find as variance should be monotonous in h, too (but what for a mathematician would I be if I wouldn't be satisfied with proving the existence, and would continue to find out what the value is. Especially if it already stated that the solution is not unique anyway)
Title: Re: Maths thread.
Post by: florrat on February 06, 2016, 03:08:57 pm
The problem is that the question is ambiguous, since variance can mean two different things, either sN-12 or sN2. See Wolfram Mathworld (http://mathworld.wolfram.com/SampleVariance.html).

WW assumed that the variance is sN2, and in that case he is right: with n=6 you can get sN2 arbitrarily close to 6, but not exactly 6. His solution for n=7 is correct under this interpretation

Tables and DStu assume the variance is sN-12, and in this case n=6 is possible and optimal.
Title: Re: Maths thread.
Post by: florrat on February 06, 2016, 03:21:11 pm
PS: if the variance means sN-12, an exact solution is
(3,6-\sqrt{6},6,6,6+\sqrt{6},9)
and all solutions for n=6 are of the form
(x,9-x-y,6,6,9-x+y,x+6) for 2+(1/2)\sqrt{2} < x < 4-(1/2)\sqrt{2} and y=\sqrt{-2x^2+12x-12}.

EDIT: typos
Title: Re: Maths thread.
Post by: DStu on February 06, 2016, 04:47:12 pm
The problem is that the question is ambiguous, since variance can mean two different things, either sN-12 or sN2. See Wolfram Mathworld (http://mathworld.wolfram.com/SampleVariance.html).

WW assumed that the variance is sN2, and in that case he is right: with n=6 you can get sN2 arbitrarily close to 6, but not exactly 6. His solution for n=7 is correct under this interpretation

Tables and DStu assume the variance is sN-12, and in this case n=6 is possible and optimal.

I used VARIANCE in LO, it seems to be s_N, and I would argue that this is what should be used.  s_{N-1} you take if you have a random sample from a distribution, to get an unbiased estimator. This is not what we want in this case, we talk about the variance of a list.  This is as if the list is the complete distribution, to get the variance of this one you must take s_N.

Which confuses me now a bit, as I nevertheless "proved" that N=6 is possible. Might have some mistake in there...




Edit: A fuck it, I'm too drunk for this shit. Was s_{N-1} all along in my formula, at least this clears that. My above post is wrong because wrong definition of variance, WW is right, use s_N!
Title: Re: Maths thread.
Post by: Tables on February 06, 2016, 05:41:34 pm
The problem is that the question is ambiguous, since variance can mean two different things, either sN-12 or sN2. See Wolfram Mathworld (http://mathworld.wolfram.com/SampleVariance.html).

WW assumed that the variance is sN2, and in that case he is right: with n=6 you can get sN2 arbitrarily close to 6, but not exactly 6. His solution for n=7 is correct under this interpretation

Tables and DStu assume the variance is sN-12, and in this case n=6 is possible and optimal.

It doesn't matter which definition you use. The minimum n is the same for both definitions.

You only (IIRC) use the sN-12 definition for a sample. This isn't a sample. So for the problem, you can use variance = E((X-µ)2).
Title: Re: Maths thread.
Post by: Tables on February 06, 2016, 06:09:37 pm
(https://coyoteperilmondo.files.wordpress.com/2013/01/fffuuu1_large.jpg)

I just noticed, during completing my proof that you could do it in 6, that I was actually causing the 2nd largest number to increase above the largest number. I was sure I checked this didn't happen yesterday. Sigh.

Yeah I guess 6 isn't actually possible. But at least I have a conclusive proof of it now.
Title: Re: Maths thread.
Post by: Tables on February 06, 2016, 06:25:02 pm
Well, okay, so here's what I had in terms of proof for both problems:

I guess I should post my solutions now. Maybe I did make a mistake somewhere, there's people here better at this kind of maths than I am, so whatever.

Easy version: 2, 4, 4, 6 is the list, so n = 4. Mode is 4 (two fours), Median is 4 (4 and 4 in the middle), Mean is 4 (sum is 16, 16/4=4) and range is 4 (6-2 = 4). This is also unique as the solution - you need two or more fours. for the mode. 3-4 fours doesn't work, as then the range or mean will fail. So two fours for the mode. As the median is 4 they have to be the middle numbers. And as the range and mean are also 4, the last two numbers must be equidistant from 4, i.e. one is two less, one or two more.

You can't do it in three numbers, since getting a mode of 3 means two 3s, so for the range your final number must be 0 or 6, which makes your mean 0 or 6. You can't do it in two numbers, as to get a range of 2 and a mean of 2 your numbers must be 1 and 3, which has no mode. One number is has range 0.


Hard version: 6 numbers. Here's an example list: 2.5, 6.5 - sqrt(34)/2, 6, 6, 6.5 + sqrt(34)/2, 8.5.

1-4 numbers can't work, which follows for the working in the easy version. For 4 numbers, there's a unique layout, right? But that doesn't have variance 4 (it has a variance of 8/3). What about 5? Well, we need 5, 5 in there for the median. Let x be the smallest number in the list. Then x + 5 is the largest number (range), and finally 10 - 2x is the final number (mean). Then firstly 4/3 < x < 10/3 in order to ensure 10 - 2x is not outside our range. But then we run into issues. Plugging x, x + 5, 10 - 2x, 5, 5 into our variance equation - E((X-µ)2) gives us:

25 = (x - 5)2 + x2 + (5 - 2x)2

25 = x2 - 10x + 25 + x2 + 25 - 20x + 4x2

25 = 6x2 - 30x + 50

0 = 6x2 - 30x + 25

x ~= 1.057 or x ~= 3.943

But both of these are outside our range of x, since they make the range of the list greater than 5. Therefore, 5 doesn't work.

So now 6. Well, we have a solution, so we're done! Let's find the family of solutions though. We need to have 6, 6 in there because mode. The smallest number we can call x again, and the biggest x + 6 (range). Let's call the 5th number y and then finally the 6th number will be 18 - 2x - y (mean). WLOG let y<=6 (median requires either it or 18 - 2x - y is less than or equal to 6 and the other greater than or equal).

Now we plug these into our variance formula and get:

36 = (6-x)2 + (6-y)2 + (6-6)2 + (6-6)2 + (2x + y - 12)2 + (6 - 6 + x)2

Expanding and simplifying that gives us:

0 = 6x2 + 2y2 + 4xy - 60x - 36y + 180

I can't be bothered to rearrange this myself, but it looks like an ellipse or something. Let's have WA rearrange for y.

y = -sqrt(-2x^2 + 12x - 9) - x + 9

Great. So now our list of six numbers is: x, 9 - x - sqrt(-2x^2 + 12x - 9), 6, 6, 9 - x + sqrt(-2x^2 + 12x - 9), x + 6


And here's where I realised the mistake. So... The issue is that, when we start putting bounds on x, we find there's no value which works. It's hard to state exactly since there's a lot of little cases, but basically: Increase x and the 2nd term drops below 3, so we can't do that. However the second term does eventually start increasing, but not enough to overtake x before the 5th term drops below 6. So we can't increase x. Decreasing x causes the same issue, but in reverse. The 5th term starts increasing above x+6 It starts decreasing eventually but not enough before the 2nd term increases above 6. So there's no value of x which satisfies all needed properties, meaning 6 doesn't work.

So... yeah I'm slightly bummed now. Turns out (unsurprisingly) that florrat was correct.
Title: Re: Maths thread.
Post by: enfynet on February 06, 2016, 11:55:23 pm
For Easy Mode, I assumed that _ 1 _ would satisfy the requirements.
Title: Re: Maths thread.
Post by: Titandrake on February 07, 2016, 12:56:28 am
More of a probability question, but I wondered about this randomly, and think I actually solved it.

For what values of c does there exist a non-constant random variable X such that for all positive integers k, E[X^k] = c?
Title: Re: Maths thread.
Post by: DStu on February 07, 2016, 03:45:47 am
More of a probability question, but I wondered about this randomly, and think I actually solved it.

For what values of c does there exist a non-constant random variable X such that for all positive integers k, E[X^k] = c?

I would guess just 1 and 0


With Jensen's inequality (as x->x^\frac{k+1}k is convex), you have E[X^{k+1}] >= E[X^k]^{\frac{k+1}k}, that excludes c<1.  For 0<c<1, you take E[X^{k-1}] <= E[X^k]^\frac{k-1}k.  0 and 1 are constant under this mapping, so no problem there. Negative c can't be because of even k's.


Edit: Of course 0 also doesn't work because of non-constant X, so at least second moment is larger than 0.
Edit2: and of course 1 obviously works with 2*Bernoulli(1/2).
Edit3: Ok moments, not centralized moments. Then take a slightly different distribution, but still a Bernoulli variant, just center it yourself :)
Title: Re: Maths thread.
Post by: Titandrake on February 07, 2016, 04:06:37 am
Hm, I have an example with c = 1/2.

With just moments, I think 2 * Bernoulli(1/2) doesn't work, since E[X] = 1 and E[X^2] = 2.
Title: Re: Maths thread.
Post by: DStu on February 07, 2016, 04:18:35 am
Yeah, I think my proof was for with absolute values. So E[|X|^k].

Otherwise, x^\alpha is not really concave for \alpha<1.

c>1 should still work on first glance.
Title: Re: Maths thread.
Post by: DStu on February 07, 2016, 04:20:08 am
Without absolute values and with real moments, you
get any 0<c<1 just by Bernoulli(c)...


Edit: Hmm, no negative values in here, somehow my reasoning for 0<c<1 above does not work. Not completely surprising though, didn't completely think it through, was more an analogy for c>1, might have some wrong sign or inequality in there....
Title: Re: Maths thread.
Post by: Titandrake on February 07, 2016, 04:32:09 am
I got the same final answer, slightly differently but I think your reasoning works.

I think your reasoning E[X^{k+1}] >= ( E[X^k] )^{k+1/k} restricts you to c <= 1, because you can still have 1 >= 1^{k+1/k}. Although actually that doesn't fix the problem you pointed out, I'd need to think about it more carefully.

Edit: decided to add in the argument I used. I'm not as familiar with reasoning the way you did, so I did something a lot more gimmicky.


Consider the moment generating function E[e^{tX}] = 1 + t E[X] / 1! + t^2 E[X^2] / 2! + t^3 E[X^3] / 3! + and so on. If E[X^k] = c, this works out to

E[e^{tX}] = (c + c t/1! + c t^2/2! + ...) + (1 - c) = c e^t + (1 - c)

which is the MGF for Bernoulli(c), giving 0 < c < 1. Can't have c < 0 because of even k, can't have c = 0 because then X = 0 everywhere, can't have c = 1 because X = 1 everywhere, can't have c > 1 because Var(X) = E[X^2] - (E[X])^2 = c - c^2 would be negative.
Title: Re: Maths thread.
Post by: DStu on February 07, 2016, 04:44:49 am
I think your variance argument is basically Jensen in the special case k=2, so not really more gimmickly, more like a bit more on point...

Edit: I think my inequalities above are the both in the wrong direction, probably you can them get right in the case c>1 (and using k+2 instead of k+1), but not in c<1.
Title: Re: Maths thread.
Post by: Tables on February 07, 2016, 07:01:59 am
For Easy Mode, I assumed that _ 1 _ would satisfy the requirements.

1 has a range of 0, so it fails.
Title: Re: Maths thread.
Post by: enfynet on February 07, 2016, 09:21:24 am
For Easy Mode, I assumed that _ 1 _ would satisfy the requirements.

1 has a range of 0, so it fails.
Ah, yeah I guess I glossed over that one.
Title: Re: Maths thread.
Post by: Joseph2302 on February 07, 2016, 04:14:19 pm
For Easy Mode, I assumed that _ 1 _ would satisfy the requirements.
What about moat?
Title: Re: Maths thread.
Post by: Tables on February 07, 2016, 05:05:43 pm
For Easy Mode, I assumed that _ 1 _ would satisfy the requirements.
What about moat?

Yes, that is the solution, although moat moat moat moat moat, moat Moat moat moat note moat. Mote mote mote, mote Mote meat moat moat:

1) moat

2) moat

3) moat moat

Moat, moat moat, moatmoat = moat - moatmoatmoat. Moat moat, moat meat moat moat.
Title: Re: Maths thread.
Post by: silverspawn on February 07, 2016, 05:15:03 pm
For Easy Mode, I assumed that _ 1 _ would satisfy the requirements.
What about moat?

Yes, that is the solution, although moat moat moat moat moat, moat Moat moat moat note moat. Mote mote mote, mote Mote meat moat moat:

1) moat

2) moat

3) moat moat

Moat, moat moat, moatmoat = moat - moatmoatmoat. Moat moat, moat meat moat moat.


makes me wonder

For which moat ∈ ℝ does the equation moatmoat = moat - moatmoatmoat yield true?

I don't think I'm good enough at maths to calculate that. I guess it can only work for a moat ∈ (0, 1) or maybe also a moat ∈ (-1, 0) ?

Oort Cloud
Title: Re: Maths thread.
Post by: sudgy on February 07, 2016, 05:29:31 pm
For Easy Mode, I assumed that _ 1 _ would satisfy the requirements.
What about moat?

Yes, that is the solution, although moat moat moat moat moat, moat Moat moat moat note moat. Mote mote mote, mote Mote meat moat moat:

1) moat

2) moat

3) moat moat

Moat, moat moat, moatmoat = moat - moatmoatmoat. Moat moat, moat meat moat moat.


makes me wonder

For which moat ∈ ℝ does the equation moatmoat = moat - moatmoatmoat yield true?

I don't think I'm good enough at maths to calculate that. I guess it can only work for a moat ∈ (0, 1) or maybe also a moat ∈ (-1, 0) ?

Oort Cloud


It doesn't look like it, even in the complex numbers.  Here's (http://www.wolframalpha.com/input/?i=f(x)+%3D+x%5Ex-(x-x%5E(x%5Ex))) a link.
Title: Re: Maths thread.
Post by: silverspawn on February 07, 2016, 05:46:18 pm
For Easy Mode, I assumed that _ 1 _ would satisfy the requirements.
What about moat?

Yes, that is the solution, although moat moat moat moat moat, moat Moat moat moat note moat. Mote mote mote, mote Mote meat moat moat:

1) moat

2) moat

3) moat moat

Moat, moat moat, moatmoat = moat - moatmoatmoat. Moat moat, moat meat moat moat.


makes me wonder

For which moat ∈ ℝ does the equation moatmoat = moat - moatmoatmoat yield true?

I don't think I'm good enough at maths to calculate that. I guess it can only work for a moat ∈ (0, 1) or maybe also a moat ∈ (-1, 0) ?

Oort Cloud


It doesn't look like it, even in the complex numbers.  Here's (http://www.wolframalpha.com/input/?i=f(x)+%3D+x%5Ex-(x-x%5E(x%5Ex))) a link.

Maybe moat needs a buff?
Title: Re: Maths thread.
Post by: Limetime on February 07, 2016, 08:39:50 pm
For Easy Mode, I assumed that _ 1 _ would satisfy the requirements.
What about moat?

Yes, that is the solution, although moat moat moat moat moat, moat Moat moat moat note moat. Mote mote mote, mote Mote meat moat moat:

1) moat

2) moat

3) moat moat

Moat, moat moat, moatmoat = moat - moatmoatmoat. Moat moat, moat meat moat moat.


makes me wonder

For which moat ∈ ℝ does the equation moatmoat = moat - moatmoatmoat yield true?

I don't think I'm good enough at maths to calculate that. I guess it can only work for a moat ∈ (0, 1) or maybe also a moat ∈ (-1, 0) ?

Oort Cloud

Moat.
Title: Re: Maths thread.
Post by: sudgy on February 21, 2016, 03:18:41 pm
So, this is more of a physics problem, but I just want a second opinion.  I'm trying to get an equation that gives the angle to shoot a projectile with the least velocity, given the x displacement and the z displacement.  Through a whole lot of complicated stuff1, it seems like this (http://www.wolframalpha.com/input/?i=theta+%3D+pi+%2B+2+tan%5E(-1)(-sqrt(x%5E2%2Bz%5E2)%2Fx-sqrt(2)+sqrt(z%5E2%2Fx%5E2-z%2Fsqrt(x%5E2%2Bz%5E2)-z%5E3%2F(x%5E2+sqrt(x%5E2%2Bz%5E2))%2B1)%2Bz%2Fx)) is the equation I'm looking for.  There's a couple things I'm wondering about though:

1. Wolframalpha originally said that the pi at the beginning of the equation is 2*pi*n, where n is an integer.  However, a lot of answers were only correct with that being pi at the beginning.  Is there any reason this is true (or maybe not true, and what should the equation be)?

2. No matter how small the x is (like 0.0001 type small) and no matter how small the z is (like -9999999 type small), theta is always positive (it just approaches zero).  Is this how it should be?  I would think that when throwing down, throwing it at least some down is a good idea.

1: Starting with equations for x and z velocity, integrating, solving for v as a function of x, z, and theta, then optimizing the function with respect to theta
Title: Re: Maths thread.
Post by: liopoil on February 21, 2016, 06:06:57 pm
So, this is more of a physics problem, but I just want a second opinion.  I'm trying to get an equation that gives the angle to shoot a projectile with the least velocity, given the x displacement and the z displacement.  Through a whole lot of complicated stuff1, it seems like this (http://www.wolframalpha.com/input/?i=theta+%3D+pi+%2B+2+tan%5E(-1)(-sqrt(x%5E2%2Bz%5E2)%2Fx-sqrt(2)+sqrt(z%5E2%2Fx%5E2-z%2Fsqrt(x%5E2%2Bz%5E2)-z%5E3%2F(x%5E2+sqrt(x%5E2%2Bz%5E2))%2B1)%2Bz%2Fx)) is the equation I'm looking for.  There's a couple things I'm wondering about though:

1. Wolframalpha originally said that the pi at the beginning of the equation is 2*pi*n, where n is an integer.  However, a lot of answers were only correct with that being pi at the beginning.  Is there any reason this is true (or maybe not true, and what should the equation be)?

2. No matter how small the x is (like 0.0001 type small) and no matter how small the z is (like -9999999 type small), theta is always positive (it just approaches zero).  Is this how it should be?  I would think that when throwing down, throwing it at least some down is a good idea.

1: Starting with equations for x and z velocity, integrating, solving for v as a function of x, z, and theta, then optimizing the function with respect to theta
Theta should always be positive, which is good. The projectile will hit the right z after some amount of time; we would rather this time be long so that we have more time for the projectile to move to the left.

EDIT: The following is silly, don't bother reading

However, your answer should certainly be in terms of g, so something is off here.

I'll try to solve it here myself, maybe the same way you did?

Let's solve for the time it takes to have the right z-coordinate. If z > 0, then we want the time when it is on its way down. We have:

z = vt sin Q - 0.5g t2, where Q is the angle theta and g is the acceleration due to gravity. Then:

t = (1/g){v sin Q + sqrt[(v sin Q)2 - 2gz]}by the quadratic formula. Then:

x/(v cos Q) = t, so x = (v cos Q/g){v sin Q + sqrt[(v sin Q)2 - 2gz]}. Let v be the minimum v such that there exists a Q such that it gets to the point (x,z). Necessarily this Q will be the one which maximizes the right hand side of the equation while keeping it real. At the maximum, dx/dQ = 0, so:

d/dQ[(v^2/g)(sin Q cos Q + sqrt{sin2 Q - 2gv-2z}] = 0, with v, g, z, being constants:
cos2 Q - sin2 Q + d/dQ[sqrt{sin2 Q - c}] = 0, where c = 2gz/v2
1 - 2sin2 Q + sin Q/(sqrt{sin2 Q - c}) = 0
sin Q = (2sin2 Q - 1)(sqrt{sin2 Q - c})
sin2 Q = (4sin4 Q - 4sin2 Q + 1)(sin2 Q - c). Letting u = sin2 Q:
u = (4u2 - 4u + 1)(u - c)
u = 4u3 - 4u2(1 + c) + u(1 + 4c) - c
0 = u3 - (1 + c)u2 + cu - c/4

And, um, not sure what to do now. v is such that c is not more than u; does this mean that c = u? I'll try that I guess, see what happens:

0 = u3 - u3 - u2 + u2 - u/4, uh, nevermind. Wolphram gives the three roots in terms of c; take the real one, square root it and then arcsin it; that's your angle. But there's no way to determine c without v, so I guess I had to isolate v way back up there, which is probably what you did.
Title: Re: Maths thread.
Post by: qmech on February 21, 2016, 06:10:58 pm

I seem to remember there is a nice trick for this question.  I can't remember the details, but I don't feel too bad as you'll get more out of it by working them out yourself.  The idea is that you can do a transformation of the coordinates to make z = 0, so the target is on your level.  You know (or show) that the best angle here is 45 degrees, and pull that back to your original coordinate system to get your answer.  This provides a possible explanation for why you're always aiming up, as halfway between vertical and "really far down" is still above the horizontal.
Title: Re: Maths thread.
Post by: sudgy on February 21, 2016, 06:35:52 pm
Liopoil: the velocity that you shoot at does depend on g, it's just that the angle doesn't.  I don't see any reason why the angle should depend on g, the best path should be the same regardless of it.  I derived my equations differently from yours, when I have time I'll post them here.

qmech: I didn't quite get how to do what you were saying, and started looking it up, and found this (http://mathoverflow.net/questions/33807/angle-maximizing-the-distance-of-a-projectile).  That has a really simple answer that I'll probably just use...
Title: Re: Maths thread.
Post by: liopoil on February 21, 2016, 09:18:47 pm
ok, so my previous approach was badly misguided. Here's a nice short solution based on qmech's post and sudgy's link:

Suppose we live in a world where the direction of constant acceleration due to gravity makes an angle 0 < phi < pi with the horizontal. What angle should we fire to get as far as possible on flat ground?

Decompose the velocity vector into components in the direction of gravity and the horizontal (these are not perpendicular, but that is okay). We want to maximize the product of the average horizontal velocity and the time. The average horizontal velocity is given by the velocity at the projectile's peak, and the time is given by twice the time to the peak. Since the only vertical velocity is in the gravity component, at the peak the velocity is just the horizontal component, and the time is proportional to the gravitational component. Thus the distance is directly proportional to the product of the components, so we set the components equal to each other*. Then the direction of initial velocity must be the angle bisector of the direction of gravity and the horizontal, that is, the initial velocity makes an angle of phi/2 with the horizontal.

Now, if the point (x,z) you want to get to makes an angle phi = arctan(z/x) with the horizontal, then rotating so that the vector (x,z) points horizontally, now gravity makes an angle of pi/2 - phi with the horizontal, which for positive x will always be between 0 and pi. Therefore we should shoot at an angle of pi/4 - arctan(z/x)/2.

*I'm having trouble articulating exactly why setting the components equal to each other is best, especially because their sum could be increased by having them different.


I can't remember the details, but I don't feel too bad as you'll get more out of it by working them out yourself.
Thanks for wasting my evening.
Title: Re: Maths thread.
Post by: sudgy on February 24, 2016, 12:40:01 am
Another random problem I just had (that I gave up for not being important whatsoever, not knowing the required material, and knowing that I would be nerd sniped if I did it):

In minecraft, sugarcane grows at a somewhat weird rate.  Every tick, a block of sugarcane has a chance to try to grow.  This chance is determined by taking all of the blocks in a 16x16x16 area and choosing three of those blocks.  If a sugarcane happens to be chosen, it increases its age by one.  When the age hits 16, it grows one block.

If you don't know anything about minecraft, when you get a new block of sugarcane, you can harvest it without affecting the old one, and can either save it or plant it again.  So, assume that you harvest the new sugarcane instantly, and at first, you replant it, but later, you save it.  Also assume that you won't use sugarcane you planted already.  Say you want to save 138 sugarcane1.  What is the optimal point to switch from replanting sugarcane to saving it?

I know this question might seem complicated just because of the way I worded it, but in the end, it should make sense.  I just realized that the solution gets really complicated.

1: Although it's not important for this problem, this is the amount needed to make an enchantment table and 15 bookshelves
Title: Re: Maths thread.
Post by: liopoil on February 24, 2016, 12:57:15 am
It takes on average 164/3 ticks for any given block of sugar cane to grow, so you should plant as long you expect it to be that many ticks until you get to 138, which is easily calculated. In fact I think that you will always just end up planting 138 total sugarcane and wait until the last one finishes growing, which will take floor(log2(138))*164/3 = 174763 ticks on average. Unless I am misunderstanding the question.
Title: Re: Maths thread.
Post by: sudgy on February 24, 2016, 01:45:35 am
They don't grow when that 164/3 chance happens, they only age by one.  When the age reaches 16, they grow.  One thing I forgot to mention that's important, is that then the age goes back to zero.  So, each one doesn't have a chance to grow on each tick, each is a part of the way through.

What do you mean by "wait until the last one finished growing"?  I feel like something's not right there.
Title: Re: Maths thread.
Post by: DStu on February 24, 2016, 05:57:37 am
They don't grow when that 164/3 chance happens, they only age by one.  When the age reaches 16, they grow.  One thing I forgot to mention that's important, is that then the age goes back to zero.  So, each one doesn't have a chance to grow on each tick, each is a part of the way through.

What do you mean by "wait until the last one finished growing"?  I feel like something's not right there.
They age with 16^3/3, and they need 16 ages to grow, that makes it 16^4/3, or?
Title: Re: Maths thread.
Post by: liopoil on February 24, 2016, 07:29:34 am
They don't grow when that 164/3 chance happens, they only age by one.  When the age reaches 16, they grow.  One thing I forgot to mention that's important, is that then the age goes back to zero.  So, each one doesn't have a chance to grow on each tick, each is a part of the way through.

What do you mean by "wait until the last one finished growing"?  I feel like something's not right there.
Right, but as DStu said we need a 3/16^3 chance to happen 16 times, which takes 16^4/3 ticks on average. Once you have 138 planted and no sugarcane saved, wait for all 138 to finish growing.
Title: Re: Maths thread.
Post by: DStu on February 24, 2016, 12:30:10 pm
Do you know the age of the plant? That would change things a bit...

Basically you would want to stop earlier, because your expected time to grow 138 cones given the ages is smaller than without knowing the ages.*


* This might be wrong, but in this case liopoils approach is also wrong. There is a small ( I think) inaccuracy in it, but if * is wrong it is too larger to ignore.
Title: Re: Maths thread.
Post by: Accatitippi on February 24, 2016, 12:33:54 pm
Do you know the age of the plant? That would change things a bit...

Basically you would want to stop earlier, because your expected time to grow 138 cones given the ages is smaller than without knowing the ages.

Not unless you're cheating. Of course, you could estimate them, since you know when you planted it.

Of course this is very theoretical, because in real Minecraft life you just plant all of them since you can retrieve them after you've planted them.
Title: Re: Maths thread.
Post by: DStu on February 24, 2016, 01:05:43 pm
Do you know the age of the plant? That would change things a bit...

Basically you would want to stop earlier, because your expected time to grow 138 cones given the ages is smaller than without knowing the ages.

Not unless you're cheating. Of course, you could estimate them, since you know when you planted it.

Of course this is very theoretical, because in real Minecraft life you just plant all of them since you can retrieve them after you've planted them.

I think it's even true if you don't know the age.  Liopoli assumes that it takes on average 16^4/3 ticks to spawn a cone for every plant. That's only true if the time to spawn is geometrically distributed, here it's the sum of 16 geometric distributions.  Basically, for a random plant far enough in the future, you would guess that on average it has age 8, so it does only need 8*16^3/3 ticks to spawn a new cone.
It now get's a bit more complicated, because at the time you want to start harvesting probably most of the plants a quiet young (because you just planted them, but anyway even if they have age 2 they produce a new cone a but faster compared to the geometric situation), and only the older ones can be assumed to have a random age.  But basically I would guess because of this you want to start harvesting a bit earlier, as the first new cones spawn a bit faster, so you have less time for a new plant to earn back its investment (which now really takes 16^4/3 ticks on average).

:e also, if my simulations are correct, it doesn't really matter. Stop somewhere between 100 and 150, the variance is much larger than the difference in expectation values...
Title: Re: Maths thread.
Post by: liopoil on February 24, 2016, 05:08:06 pm
Yes, there is a slight innaccuracy, but it is negligible. However I see no point in ever going past 138.
Title: Re: Maths thread.
Post by: DStu on February 25, 2016, 04:57:08 am
However I see no point in ever going past 138.
Obviously.

However, seems like the the optimum is somewhere around 100.
(https://dl.dropboxusercontent.com/u/23087358/Dominion/minecarft.png)
(100 samples each, coupled until the first one starts harvesting to reduce variance and improve speed)

Code: [Select]
import numpy as np
import numpy.random as rnd
import pandas as pd
import matplotlib.pyplot as plt


def iterate(field, planted, harvested, stop):
    def grow(planted, i):
        if planted > i:
            field[i] = field[i] + 1
            if field[i]==16:
                field[i]=0
                return 1
        return 0
       
    i = rnd.randint(N)
    j=-1
    k=-1
    while (j<0) or (i==j):
        j = rnd.randint(N)
    while (k<0) or (i==k) or (j==k):
        k = rnd.randint(N)
   
    new_plants = 0
    new_plants += grow(planted, i)
    new_plants += grow(planted, j)
    new_plants += grow(planted, k)
    harvested += max(0, planted + new_plants - stop)
    planted = min(planted + new_plants, stop)
   
    return field, planted, harvested


rep = 100
res = 2
goal = 138

start = 90
end = 150


result = pd.Series(index=range(start, end, res))
samples = pd.DataFrame(columns = range(rep), index=result.index)
stops = np.asarray(result.index)
count = np.zeros(len(result.index))

for i in range(rep):
    burn_in = 0
    planted = 1
    harvested = 0
    field = np.zeros([N], dtype=int)
    avg = np.zeros(len(result.index))
    stop = result.index.min()
    while planted<stop:
        burn_in += 1
        field, planted, harvested = iterate(field, planted, harvested, stop)
    #until here the same for everyone
    save_field = field.copy()
    save_planted = planted
    for stop in range(len(stops)):
        s = stops[stop]
        count[stop] += burn_in
        while (harvested<goal):
            field, planted, harvested = iterate(field, planted, harvested, s)
            count[stop] += 1
       
        field = save_field.copy()
        planted = save_planted
        harvested = 0
   
avg = pd.Series(count/rep, index=result.index)
avg

:edit Went a bit further with the coupling, and did 300 samples
(https://dl.dropboxusercontent.com/u/23087358/Dominion/minecarft2.png)

Code: [Select]
...
rep = 300
res = 2
goal = 138

start = 60
end = 140


result = pd.Series(index=range(start, end, res))
samples = pd.DataFrame(columns = range(rep), index=result.index)
stops = np.asarray(result.index)
count = np.zeros(len(result.index))

for i in range(rep):
    print(i)
    burn_in = 0
    planted = 1
    harvested = 0
    field = np.zeros([N], dtype=int)
    avg = np.zeros(len(result.index))
    for stop in range(len(stops)):
        s = stops[stop]
        while planted<stop:
            burn_in += 1
            field, planted, harvested = iterate(field, planted, harvested, s)
        #until here the same for everyone following
        np.copyto(save_field, field)
        save_planted = planted
        save_harvested = harvested
        count[stop] += burn_in
        while (harvested<goal):
            field, planted, harvested = iterate(field, planted, harvested, s)
            count[stop] += 1
        np.copyto(field, save_field)
        planted = save_planted + save_harvested
        harvested = 0
   
avg = pd.Series(count/rep, index=result.index)
avg
Title: Re: Maths thread.
Post by: liopoil on February 25, 2016, 11:36:39 am
Why is it all spiky? It should change direction just once right? Just not enough trials?

You want to plant as long as the probability it finishes growing twice before you hit 138 is higher than the probability it doesn't finish growing before you hit 138. Even this will not be entirely accurate, however. This leads me to estimate that around 3/4 of the number of blocks you want is optimal.
Title: Re: Maths thread.
Post by: DStu on February 25, 2016, 12:53:25 pm
Why is it all spiky? It should change direction just once right? Just not enough trials?

Yeah, 300 is still a bit low, even if the coupling is already quite strong.

I think I greatly increase the number of trials I can simulate by not drawing the 3 fields every tic (which will miss most of the time), but just jumping over all these by simulating the time it takes until some plant is drawn (which is mostly geometric with mean 16^3/3, slightly off from this because the 3 fields are not independent).

Just don't have time at the moment, but I think one sees what one should do anyway, somewhere around 100 stop planting...
Title: Re: Maths thread.
Post by: liopoil on February 25, 2016, 03:06:35 pm
Why is it all spiky? It should change direction just once right? Just not enough trials?
the time it takes until some plant is drawn (which is mostly geometric with mean 16^3/3, slightly off from this because the 3 fields are not independent).
Due to linearity of expectation, it is exactly this for any given plant plot, right?
Title: Re: Maths thread.
Post by: DStu on February 25, 2016, 04:47:58 pm
Why is it all spiky? It should change direction just once right? Just not enough trials?
the time it takes until some plant is drawn (which is mostly geometric with mean 16^3/3, slightly off from this because the 3 fields are not independent).
Due to linearity of expectation, it is exactly this for any given plant plot, right?
It's not exactly geometric, as the three chosen fields are not independent. You can't chose one field twice.

You can see this in the extreme case with only three fields , where you would always chose every field, so the time to chose field 1 is constant 1, and not geometric with mean 1.
But with 4k fields and just 100 targets the deviation should be quite small, and I also think I know how to make it exact.
Title: Re: Maths thread.
Post by: liopoil on February 25, 2016, 05:06:16 pm
Why is it all spiky? It should change direction just once right? Just not enough trials?
the time it takes until some plant is drawn (which is mostly geometric with mean 16^3/3, slightly off from this because the 3 fields are not independent).
Due to linearity of expectation, it is exactly this for any given plant plot, right?
It's not exactly geometric, as the three chosen fields are not independent. You can't chose one field twice.

You can see this in the extreme case with only three fields , where you would always chose every field, so the time to chose field 1 is constant 1, and not geometric with mean 1.
But with 4k fields and just 100 targets the deviation should be quite small, and I also think I know how to make it exact.
Why does the distribution matter rather than just the mean? Wait, duh. Nevermind.
Title: Re: Maths thread.
Post by: DStu on February 26, 2016, 01:23:22 am
Why is it all spiky? It should change direction just once right? Just not enough trials?
the time it takes until some plant is drawn (which is mostly geometric with mean 16^3/3, slightly off from this because the 3 fields are not independent).
Due to linearity of expectation, it is exactly this for any given plant plot, right?
It's not exactly geometric, as the three chosen fields are not independent. You can't chose one field twice.

You can see this in the extreme case with only three fields , where you would always chose every field, so the time to chose field 1 is constant 1, and not geometric with mean 1.
But with 4k fields and just 100 targets the deviation should be quite small, and I also think I know how to make it exact.
Why does the distribution matter rather than just the mean? Wait, duh. Nevermind.

I think you are right they might really be exactly geometric, I had a wrong assumption before.

I'm not sure if just the expectation matters, as the distribution controls the spawning of new plants, and these again spawn plants, you have some exponential behaviour here, which is nonlinear. Not sure if this is relevant in this context.

:e I think basically the question is, is https://en.wikipedia.org/wiki/Wald%27s_equation applicable here. And I don't think it's obvious to see that condition 2) is satisfied.
Title: Re: Maths thread.
Post by: skip wooznum on March 18, 2016, 01:23:23 am
Is anyone familiar with the game Set? I was wondering, what is the most cards you could have out on the table where it would still be possible for there to be no sets?
Title: Re: Maths thread.
Post by: Titandrake on March 18, 2016, 02:02:32 am
Is anyone familiar with the game Set? I was wondering, what is the most cards you could have out on the table where it would still be possible for there to be no sets?

If you Google this, the answer is 20. It looks like the actual proof you can't use 21 or more is a bit complicated, unfortunately.

Side note, I learned the following variant from people who play Set a lot: when you get to the end of the deck, leave the last card face down. You can figure out what the last card is from the face-up cards, and winning by taking a set with the facedown card is much more stylish.

Every card has 4 attributes: color, shape, shading, and number. Whenever you have a set, for every attribute

So, considering just the number attribute for now. A set either has three 1s, three 2s, three 3s, or one of each. At the beginning of the game, # cards with 1 thing = # cards with 2 thing = # cards with 3 things. Whenever you take a set, this still holds true...in mod 3 (remainder when dividing by 3 if you're unfamiliar with mod)

The same argument applies for every other attribute. So, at the end of the game, all the cards left must satisfy:

And with 1 card hidden, you can figure out what it needs to be to make all the above hold true.

PPE: Turns out you can't have a list inside a spoiler.
Title: Re: Maths thread.
Post by: skip wooznum on March 18, 2016, 02:24:41 am
Is anyone familiar with the game Set? I was wondering, what is the most cards you could have out on the table where it would still be possible for there to be no sets?

If you Google this, the answer is 20. It looks like the actual proof you can't use 21 or more is a bit complicated, unfortunately.
im bad at google. Could you link it?
Title: Re: Maths thread.
Post by: Titandrake on March 18, 2016, 02:37:32 am
https://en.wikipedia.org/wiki/Set_%28game%29#Basic_combinatorics_of_Set
Title: Re: Maths thread.
Post by: Kirian on March 18, 2016, 10:50:34 pm
I can't believe no one has yet posted the following limerick:

(http://invirtuo.cc/img/limerick.gif)

(I won't spoil the limerick quite yet for those who haven't seen it before.)
Title: Re: Maths thread.
Post by: Axxle on March 18, 2016, 11:03:15 pm
a dozen a gross and a score
All added to three square root of four
You'll divide it by seven
And then add five elevens
??? I'm at a loss
Title: Re: Maths thread.
Post by: liopoil on March 18, 2016, 11:06:40 pm
Without reading Axxle's post or having seen it before:

A dozen, its square and a score
Plus three times the square root of four
divided by seven
plus five times eleven
is 9 squared and not a bit more


Okay, to be fair I do vaguely remember that last line from somewhere.

EDIT: Oh right, 144 is a gross. Also I'm unclear on how many syllables exactly the lines are supposed to have. 8-8-6-6-8 feels most natural to me. Is there supposed to be a specific meter?
Title: Re: Maths thread.
Post by: liopoil on March 18, 2016, 11:35:19 pm
Side note, I learned the following variant from people who play Set a lot: when you get to the end of the deck, leave the last card face down. You can figure out what the last card is from the face-up cards, and winning by taking a set with the facedown card is much more stylish.
This is awesome, but what if there is no set using that card :(
Title: Re: Maths thread.
Post by: Titandrake on March 19, 2016, 01:51:51 am
Side note, I learned the following variant from people who play Set a lot: when you get to the end of the deck, leave the last card face down. You can figure out what the last card is from the face-up cards, and winning by taking a set with the facedown card is much more stylish.
This is awesome, but what if there is no set using that card :(

Then you are sad, but you can feel good if you're the first to declare no remaining sets, because you need to figure out the last card to make sure.
Title: Re: Maths thread.
Post by: silverspawn on March 19, 2016, 11:22:22 am
I think it goes like this:

                                 
                                         
         Moat         
                               
                                             
Title: Re: Maths thread.
Post by: singletee on March 19, 2016, 02:56:01 pm
Without reading Axxle's post or having seen it before:

A dozen, its square and a score
Plus three times the square root of four
divided by seven
plus five times eleven
is 9 squared and not a bit more


Okay, to be fair I do vaguely remember that last line from somewhere.

EDIT: Oh right, 144 is a gross. Also I'm unclear on how many syllables exactly the lines are supposed to have. 8-8-6-6-8 feels most natural to me. Is there supposed to be a specific meter?

What matters is not so much syllables as stressed syllables.

oXooXooX
oXooXooX
oXooXo
oXooXo
oXooXooX

So what we have here is amphibrachic (https://en.wikipedia.org/wiki/Amphibrach) meter. We have two lines of trimeter (count the Xs), followed by two lines of dimeter (rare, I don't even know if that's the right term), and finally one more line of trimeter.

Now let's take another limerick (that I just wrote):

A writer desired a meter
So as to make poetry sweeter
He followed the rules
He had learned back in school
But he could not enamor the reader.

Let's look at the syllables here:

oXooXooXo
oXooXooXo
oXooX
ooXooX
ooXooXooXo

Notice lines 3 and 4 are missing a final unstressed syllable, and lines 4 and 5 start with an extra unstressed syllable. That's ok! The first and last foot don't have to match up exactly, as long as the stressed syllables do. There's a limit to how much you can fool around with things, and you just have to find out how much by trying it. In this case notice how the "missing" syllable is immediately followed by an extra syllable. It kind of reminds me of ionic bonding.
Title: Re: Maths thread.
Post by: Axxle on March 22, 2016, 12:07:55 am
I just mixed up diameter and circumference when trying to measure, and now I have these ridiculously long tassels hanging off my glass float net.  :-[
Title: Re: Maths thread.
Post by: Kirian on March 22, 2016, 12:47:55 am
It shocks the hell out of me that you can use the prime numbers to calculate pi.  How the hell can those possibly be related!?!?
Title: Re: Maths thread.
Post by: sudgy on March 22, 2016, 01:10:00 am
It shocks the hell out of me that you can use the prime numbers to calculate pi.  How the hell can those possibly be related!?!?

Something I have learned from studying math: somehow, everything is related.
Title: Re: Maths thread.
Post by: silverspawn on March 22, 2016, 01:19:44 am
That's interesting. Do you use all prime numbers with diminishing relevance?
Title: Re: Maths thread.
Post by: Titandrake on March 22, 2016, 01:32:00 am
Kirian is probably referring to the result from https://en.wikipedia.org/wiki/Euler_product#Notable_constants

(https://upload.wikimedia.org/math/e/6/f/e6fae229e30bae187d0e2988c31ad46d.png)

Edit: Looks like an explanation that generalizes requires more math than I know. An easier justification is at http://www.cut-the-knot.org/proofs/AfterEulerProduct.shtml. The idea is that you start with the Leibniz formula, and note that every odd number equal to 1 mod 4 must be the product of an even number of (not necessarily distinct) primes that are 3 mod 4.
Title: Re: Maths thread.
Post by: Axxle on March 22, 2016, 01:37:26 am
I'm guessing Kirian saw this

https://youtu.be/HrRMnzANHHs
Title: Re: Maths thread.
Post by: Kirian on March 22, 2016, 11:28:42 am
I'm guessing Kirian saw this

Yep.

Kirian is probably referring to the result from https://en.wikipedia.org/wiki/Euler_product#Notable_constants

(https://upload.wikimedia.org/math/e/6/f/e6fae229e30bae187d0e2988c31ad46d.png)

OK, so there are at least two ways of getting pi from the prime numbers.  The linked video uses Eqn 60 at this link:  http://mathworld.wolfram.com/PiFormulas.html

Actually, looking at them, they might be the same thing but written differently; it's really tough to tell.  Both equations are attributed to Euler.

Edit:  It appears the formula at MathWorld (and in the video near 2:00) gives the series 2/pi = (2/3)(6/5)(6/7)(10/11)..., which is both extremely similar to, yet completely different from, the series at that Wiki link.

--------

Of course, the fact that there is a formula that gives you the Nth hexadecimal digit of pi without calculating the previous digits is also a bit mind-blowing.
Title: Re: Maths thread.
Post by: Watno on March 22, 2016, 11:40:19 am
I just mixed up diameter and circumference when trying to measure, and now I have these ridiculously long tassels hanging off my glass float net.  :-[

Recently, I was trying to figure out the size of a fondue pot with some friends (in order to find out wether the ecipe would fit in). Since we already had put some stuff in, we didn't want to fill it with water and measure how much water fit in, so instead we measured the height and the radius, and tried to calulate the volume. Our result didn't seem very realistic though, and it took us quite a while to figure out that the area of a circle wasn't 2*PI*r^2.
Title: Re: Maths thread.
Post by: liopoil on March 22, 2016, 04:43:51 pm
My favorite is that, roughly speaking, the probability that two arbitrary integers have no common prime factors is 6/(pi^2). The proof involves first showing that it is 1/(zeta(2)) with fancy factoring, then it is the basel problem, which Euler solved with taylor polynomials of sine, which is where pi comes in. Unfortunately I forget all the details.
Title: Re: Maths thread.
Post by: Titandrake on March 22, 2016, 07:00:08 pm
Coincidentally, this discussion inspired a blog post where I talked about just that. You can read it at http://www.alexirpan.com/2016/03/22/primes-pi.html

(Shameless promotion is shameless.)
Title: Re: Maths thread.
Post by: Titandrake on March 31, 2016, 03:44:58 am
Wow, how have I gone this long without using the fullpage LaTeX package?

It does what you think - if you add it as a required package, it will set all margins to 1 inch. My LaTeX-fu on math expressions is getting pretty solid, but the actual formatting is still pretty weak.
Title: Re: Maths thread.
Post by: liopoil on March 31, 2016, 07:25:35 am
Wow, how have I gone this long without using the fullpage LaTeX package?

It does what you think - if you add it as a required package, it will set all margins to 1 inch. My LaTeX-fu on math expressions is getting pretty solid, but the actual formatting is still pretty weak.
Why is this so desirable? Isn't there a pretty simple way to set margins manually? Why 1-inch?
Title: Re: Maths thread.
Post by: Witherweaver on March 31, 2016, 10:14:01 am
Wow, how have I gone this long without using the fullpage LaTeX package?

It does what you think - if you add it as a required package, it will set all margins to 1 inch. My LaTeX-fu on math expressions is getting pretty solid, but the actual formatting is still pretty weak.

I would use the geometry package over fullpage.  fullpage isn't really a recommended package.  (See http://kb.mit.edu/confluence/pages/viewpage.action?pageId=3907057.)

Edit: My default is something like

Code: [Select]
\usepackage{geometry}
\newgeometry{margin=0.75in}

or more compactly

Code: [Select]
\usepackage[margin=0.75in]{geometry}

The advantage here is that you can change geometry in different places; for example, a cover page or final page. [/code]
Title: Re: Maths thread.
Post by: Titandrake on March 31, 2016, 02:05:23 pm
I was freaking out because I had never bothered to learn how to change margin size. Thought it would be really annoying for some reason, when it wasn't.
Title: Re: Maths thread.
Post by: Witherweaver on April 05, 2016, 04:04:05 pm
Came across this after some related Quora discussion:

http://www.maa.org/external_archive/devlin/devlin_06_08.html

I have big issues with this rant.  Mainly, it misses the main point that the definitions are, by and large, arbitrary.  In some cases, some definitions simplify things, but really the definition is part of the math, and it can be personal preference on what to take as your axiom and what to take as your conclusions.

The basic claim is that multiplication is not defined through addition.  But it can be.  Roughly: suppose you know what binary  x+y  means for any real numbers x and y.  Association lets you define n-ary '+'.  Then you define

m*x = x*m = sum(i=1..m, x) = x + x + ... + x (m times)

for any integer m and real number x. (Note that commutivity is by definition.)

Now, given some integer m!=0, we may define  a real number m^{-1} = (1/m) by the real number that satisfies

m*(1/m) = (1/m) * m = 1. 

Now, suppose p and q are rational numbers, p=n/m, q=k/l, where n,m,k,l are integers (m, l nonzero).  Then we define

p*q = (n*k)*(1/(m*l)).

This is perfectly defined as n*k is an integer and 1/(m*l) is a real number. 

Now, what is x*y for any real numbers x and y?  Well, we take a sequence of rational numbers x_n -> x and y_n -> y.  (This could actually be done relative to any topology; the normal topology on the real numbers coincides with the usual Euclidean distance.  You could argue that we need to know how to multiply real numbers to measure convergence, but you could do it on the level of topology.  Or you could simply take the Euclidean norm as given, and it's through that norm that we define multiplication.  Though maybe if you take any topology and require multiplication to be continuous wrt that topology you would get the same thing.. I'm not really sure.)    Then  x*y is defined to be the limit of the sequence x_n*y_n.  A small amount of work shows it's well defined. 

So we started with addition of reals and some notion of a topology and ended up with multiplication of reals.  There is nothing to say that this definition of multiplication is not "really" multiplication---it surely is.  Moreover, in statements like:

Quote
And telling them that multiplication is repeated addition definitely requires undoing later.

How much later? As soon as the child progresses from whole-number multiplication to multiplication by fractions (or arbitrary real numbers). At that point, you have to tell a different story.

"Oh, so multiplication of fractions is a DIFFERENT kind of multiplication, is it?" a bright kid will say, wondering how many more times you are going to switch the rules.

The author is missing a big issue.  There ARE different kinds of multiplication.  Just because an algebra A is a subset of some B and you have a binary operation to make B an algebra doesn't mean A with the induced operation of B is the same thing as B.  In fact, A with induced operation may not even be an algebra.  In other words, even if I take a "multiplication" with the real numbers as axiomatic, that doesn't necessarily mean you should have the same notion of multiplication on the integers. Sure, it turns out the natural definitions coincide, but even so (Z,*), (Q,*) and (R,*) are entirely different objects.  Moreover, if you consider, for example, the set X = {0,1,2,3,4,5}, this is certainly a subset of real numbers.  You can even induce R's multiplication on X... except you get into trouble.  Because * does not take X into X; it takes X into some larger set.  In fact, the thing we may be interested in is not R's * but a different kind of * that maps X into X, some special *_X.  Maybe x(*X)y = (x*y) mod 6.  In fact, there are unlimited numbers of multiplications.

Though, notably, in my example multiplication by fractions is not 'changing any rules'.  It is operating on the same rule that multiplication by an integer is. 

Also, this:

Quote
Why not say that there are (at least) two basic things you can do to numbers: you can add them and you can multiply them. (I am discounting subtraction and division here, since they are simply the inverses to addition and multiplication, and thus not "basic" operations. This does not mean that teaching them is not difficult; it is.) Adding and multiplying are just things you do to numbers - they come with the package. We include them because there are lots of useful things we can do when we can add and multiply numbers. For example, adding numbers tells you how many things (or parts of things) you have when you combine collections. Multiplication is useful if you want to know the result of scaling some quantity.

is arbitrary.  You could just as easily say that there are two things you can do to numbers: you can subtract them and you can divide them.  I discount addition and multiplication , since these are just inverses.  It may be more natural to define addition and multiplication as axiomatic (though as I said, you don't 'need' to define multiplication; you can define topology or metrics instead), probably because of how we count, but it doesn't *have* to be done this way; it's a choice.
Title: Re: Maths thread.
Post by: Cuzz on April 05, 2016, 05:19:30 pm
It shocks the hell out of me that you can use the prime numbers to calculate pi.  How the hell can those possibly be related!?!?

You can also use, say, the odd numbers (ok, also 4)
Title: Re: Maths thread.
Post by: Kirian on April 05, 2016, 05:27:18 pm
Came across this after some related Quora discussion:

http://www.maa.org/external_archive/devlin/devlin_06_08.html

I have big issues with this rant.... The basic claim is that multiplication is not defined through addition.

Someone call up all the computer engineers out there and tell them they've been building circuit chips wrong all this time.
Title: Re: Maths thread.
Post by: Tables on April 05, 2016, 05:27:33 pm
It shocks the hell out of me that you can use the prime numbers to calculate pi.  How the hell can those possibly be related!?!?

You can also use, say, the odd numbers (ok, also 4)

In the list of all numbers of the form 2n+1 and also 4, I would say that 4 already is an odd number.
Title: Re: Maths thread.
Post by: Cuzz on April 05, 2016, 05:42:40 pm
It shocks the hell out of me that you can use the prime numbers to calculate pi.  How the hell can those possibly be related!?!?

You can also use, say, the odd numbers (ok, also 4)

In the list of all numbers of the form 2n+1 and also 4, I would say that 4 already is an odd number.

That is interesting, but then again, so are all natural numbers.
Title: Re: Maths thread.
Post by: Witherweaver on April 05, 2016, 05:50:18 pm
It shocks the hell out of me that you can use the prime numbers to calculate pi.  How the hell can those possibly be related!?!?

You can also use, say, the odd numbers (ok, also 4)

Maybe we can use the odd numbers to calculate 4.
Title: Re: Maths thread.
Post by: Cuzz on April 05, 2016, 05:54:03 pm
It shocks the hell out of me that you can use the prime numbers to calculate pi.  How the hell can those possibly be related!?!?

You can also use, say, the odd numbers (ok, also 4)

Maybe we can use the odd numbers to calculate 4.

What sorcery.....?
Title: Re: Maths thread.
Post by: Witherweaver on April 05, 2016, 05:57:56 pm
It shocks the hell out of me that you can use the prime numbers to calculate pi.  How the hell can those possibly be related!?!?

You can also use, say, the odd numbers (ok, also 4)

Maybe we can use the odd numbers to calculate 4.

What sorcery.....?

(http://i.imgur.com/gBKH3cj.gif)
Title: Re: Maths thread.
Post by: qmech on April 05, 2016, 06:02:10 pm
Came across this after some related Quora discussion:

http://www.maa.org/external_archive/devlin/devlin_06_08.html

I have big issues with this rant.... The basic claim is that multiplication is not defined through addition.

Someone call up all the computer engineers out there and tell them they've been building circuit chips wrong all this time.

I think that's a slight mischaracterisation of Devlin's position.  He's saying that, however it's defined, repeated addition is not what multiplication is.  This is an incredibly common pattern in mathematics.  You can define the natural numbers as {}, {{}}, {{},{{}}}, ... and the ordered pair (a,b) is {{a},{a,b}} and an integer as an equivalence class of ordered pairs of naturals, and a rational as an equivalence class of ordered pairs of integers, and a real as an equivalence class of Cauchy sequences (whatever they are) of rationals ... but that's not what a real number is.

A function from X to Y "is" a set of ordered pairs such that every x in X appears in exactly one pair (x,y) with y in Y.  But that's not how you think about a function, or how you interpret an occurrence of f(x).  A graph "is" a pair (V,E) where V is a set of vertices and E a set of 2-subsets of V, but you're not going to think in those terms if I ask you to draw a K_4 in the plane.  Mathematical objects have their own existence, and when we think about them we think about them in terms of properties they have.  The concrete definitions can convince somebody that a structure exists, but when you get to work with it you can throw away the scaffolding.  For multiplication the rules are that 0.x = 0, 1.x = x, x.y = y.x and (x+y).z = x.y + x.z.  These contain the inductive definition of multiplication on the naturals, but once you've checked that everything makes sense those particular cases are no longer all that special.
Title: Re: Maths thread.
Post by: Witherweaver on April 05, 2016, 06:10:39 pm
Came across this after some related Quora discussion:

http://www.maa.org/external_archive/devlin/devlin_06_08.html

I have big issues with this rant.... The basic claim is that multiplication is not defined through addition.

Someone call up all the computer engineers out there and tell them they've been building circuit chips wrong all this time.

I think that's a slight mischaracterisation of Devlin's position.  He's saying that, however it's defined, repeated addition is not what multiplication is.  This is an incredibly common pattern in mathematics.  You can define the natural numbers as {}, {{}}, {{},{{}}}, ... and the ordered pair (a,b) is {{a},{a,b}} and an integer as an equivalence class of ordered pairs of naturals, and a rational as an equivalence class of ordered pairs of integers, and a real as an equivalence class of Cauchy sequences (whatever they are) of rationals ... but that's not what a real number is.

A function from X to Y "is" a set of ordered pairs such that every x in X appears in exactly one pair (x,y) with y in Y.  But that's not how you think about a function, or how you interpret an occurrence of f(x).  A graph "is" a pair (V,E) where V is a set of vertices and E a set of 2-subsets of V, but you're not going to think in those terms if I ask you to draw a K_4 in the plane.  Mathematical objects have their own existence, and when we think about them we think about them in terms of properties they have.  The concrete definitions can convince somebody that a structure exists, but when you get to work with it you can throw away the scaffolding.  For multiplication the rules are that 0.x = 0, 1.x = x, x.y = y.x and (x+y).z = x.y + x.z.  These contain the inductive definition of multiplication on the naturals, but once you've checked that everything makes sense those particular cases are no longer all that special.

Okay, I can get behind this a little more.. but, still, "is" is a bit subjective.  Sure, the set of natural numbers is something, but to get any handle on it we need to define it.  It, in a sense, "is" as much {}, {{}}, {{}, {{}}},  as it "is" anything else. 

But, also, 'multiplication' is not really anything.  Only multiplication together with sets A, B, C is a thing.   
Title: Re: Maths thread.
Post by: Cuzz on April 05, 2016, 06:17:00 pm
Came across this after some related Quora discussion:

http://www.maa.org/external_archive/devlin/devlin_06_08.html

I have big issues with this rant.... The basic claim is that multiplication is not defined through addition.

Someone call up all the computer engineers out there and tell them they've been building circuit chips wrong all this time.

I think that's a slight mischaracterisation of Devlin's position.  He's saying that, however it's defined, repeated addition is not what multiplication is.  This is an incredibly common pattern in mathematics.  You can define the natural numbers as {}, {{}}, {{},{{}}}, ... and the ordered pair (a,b) is {{a},{a,b}} and an integer as an equivalence class of ordered pairs of naturals, and a rational as an equivalence class of ordered pairs of integers, and a real as an equivalence class of Cauchy sequences (whatever they are) of rationals ... but that's not what a real number is.

A function from X to Y "is" a set of ordered pairs such that every x in X appears in exactly one pair (x,y) with y in Y.  But that's not how you think about a function, or how you interpret an occurrence of f(x).  A graph "is" a pair (V,E) where V is a set of vertices and E a set of 2-subsets of V, but you're not going to think in those terms if I ask you to draw a K_4 in the plane.  Mathematical objects have their own existence, and when we think about them we think about them in terms of properties they have.  The concrete definitions can convince somebody that a structure exists, but when you get to work with it you can throw away the scaffolding.  For multiplication the rules are that 0.x = 0, 1.x = x, x.y = y.x and (x+y).z = x.y + x.z.  These contain the inductive definition of multiplication on the naturals, but once you've checked that everything makes sense those particular cases are no longer all that special.

Okay, I can get behind this a little more.. but, still, "is" is a bit subjective.  Sure, the set of natural numbers is something, but to get any handle on it we need to define it.  It, in a sense, "is" as much {}, {{}}, {{}, {{}}},  as it "is" anything else. 

But, also, 'multiplication' is not really anything.  Only multiplication together with sets A, B, C is a thing.

This reminds me of a discussion I recently had with a colleague. I remarked that my students were having a hard time understanding that a function as a concept is distinct from its graph, and he reminded me that, being a special type of relation, that is in fact exactly what a function is.
Title: Re: Maths thread.
Post by: Kirian on April 05, 2016, 06:50:46 pm
Okay, I can get behind this a little more.. but, still, "is" is a bit subjective.

I'm guessing you did not have sex with that woman?
Title: Re: Maths thread.
Post by: Witherweaver on April 05, 2016, 06:53:09 pm
Okay, I can get behind this a little more.. but, still, "is" is a bit subjective.

I'm guessing you did not have sex with that woman?

"woman" is a bit a subjective.  Oh, wait, that's not right... hold on...
Title: Re: Maths thread.
Post by: Kirian on April 05, 2016, 07:08:14 pm
I just realized that joke makes almost no sense to non-Americans or people born before 1990-ish.
Title: Re: Maths thread.
Post by: Watno on April 05, 2016, 08:04:14 pm
I'm European and born after 1990, and I think I understand what it refers too, and I don't believe this to be very unusual
Title: Re: Maths thread.
Post by: Tables on April 06, 2016, 06:07:55 am
I'm European and born after 1990, and I think I understand what it refers too, and I don't believe this to be very unusual

This. I can't quite remember if it was Clinton or Nixon, but I know it was definitely something to do with receiving Heads of State.
Title: Re: Maths thread.
Post by: Tables on April 15, 2016, 04:06:11 pm
Fun thing I worked out today: Take a times table grid, any size. Draw a rectangle on it*. The average of all of the numbers in the rectangle is equal to the average of the four corner squares of the rectangle.

Equally fun thing: Take a times table grid, any size. The sum of all the numbers in this times table grid is equal to the average of the four corner squares, multiplied by the bottom right square.

I leave the proof of these statements for your own pleasure.

Hint: Doing it purely algebraically is doing it in hard mode. Use properties of the times table grid to cut the work you need to do significantly.

*A rectangle orthogonal to the grid and covering whole squares, for the pedants among you**

**Yes this definition is still probably too vague. Shut up.
Title: Re: Maths thread.
Post by: Polk5440 on April 15, 2016, 05:35:58 pm
Fun thing I worked out today: Take a times table grid, any size. Draw a rectangle on it. The average of all of the numbers in the rectangle is equal to the average of the four corner squares of the rectangle.

Equally fun thing: Take a times table grid, any size. The sum of all the numbers in this times table grid is equal to the average of the four corner squares, multiplied by the bottom right square.

I leave the proof of these statements for your own pleasure.

These are fun exercises to show. The second one is easy to show algebraically:

Using the formula 1 + 2 + ... + n =n(n+1)/2 (by induction or the brilliancy of Gauss), the sum of the elements in a multiplication table of size n is n(n+1)/2 + 2*n(n+1)/2 + ... + n*n(n+1)/2 = n(n+1)/2*n(n+1)/2 = n^2*(1 + n + n + n^2)/4. Noting the corner elements of a multiplication table are 1, n, n, and n^2, we are done.

For the first one, this can be brute forced in a similar fashion.

Intuitively, think about one row of the rectangle at a time. Because each row of the rectangle is an arithmetic sequence, the middle element (or average of the middle two elements) will be the average. This is the same as the average of the two end points. To visualize this, think about Gauss's intuitive proof for 1 + 2 + ... + n = n(n+1)/2. You've collapsed the rectangle to one column which is also an arithmetic sequence. The middle element (or average of the middle two elements) will be the average. This is the same as the average of the two end points. Therefore, all you need to do is take the average of the four corners of the rectangle.

Corollary: If your rectangle has odd numbers of rows and columns, you can also just pick the middle element. That's your average.
Title: Re: Maths thread.
Post by: Tables on April 15, 2016, 05:52:02 pm
Yeah, that's more or less how I worked them out. I actually did the second one first, just like you. It came about from working out how you can add up all the squares on a multiplication grid. I'm not sure how I came up with thinking about the corners though.

I wouldn't consider your explanation for the first one there to be brute forcing it. Brute forcing it would be just setting it up as an algebra problem and then checking two equations match up - in particular this:

(n - m + 1)(p - q + 1)( nq + mq + np + mp ) / 4 = ( nq(n+1)(q+1) - mq(m-1)(q+1) - np(n+1)(p-1) + mp(m-1)(p-1) ) / 4

Left hand side is the number of boxes in your grid, multiplied by the average of the four corners (for a grid from m to n by p to q). Right hand side is the total of all the boxes using arithmetic series. These equations do indeed balance, but yeah that's just ugly and inelegant.


Title: Re: Maths thread.
Post by: liopoil on April 15, 2016, 05:57:02 pm
Proof without hint:

Note that in each column c, the average value is c * m, where m is the mean value over all row numbers, or equivalently the average of the first and last row numbers. The average value of c is similarly the average of the first and last columns. Thus the average value of the whole table is the product of these two averages, which can be seen to be the average of the products (simply by exansion), or the average of the corners.

The equally fun thing follows from the the above proof and the fact that the bottom right corner represents the number of cells in the whole table.


PPE: Two posts I haven't read
Title: Re: Maths thread.
Post by: Polk5440 on April 15, 2016, 06:27:30 pm
Yeah, that's more or less how I worked them out. I actually did the second one first, just like you. It came about from working out how you can add up all the squares on a multiplication grid. I'm not sure how I came up with thinking about the corners though.

I wouldn't consider your explanation for the first one there to be brute forcing it.

Right. I didn't type my brute forced algebra for 1. I tried to outline how I was thinking about why it works.
Title: Re: Maths thread.
Post by: ehunt on April 17, 2016, 06:00:56 pm
Kirian is probably referring to the result from https://en.wikipedia.org/wiki/Euler_product#Notable_constants

(https://upload.wikimedia.org/math/e/6/f/e6fae229e30bae187d0e2988c31ad46d.png)

Edit: Looks like an explanation that generalizes requires more math than I know. An easier justification is at http://www.cut-the-knot.org/proofs/AfterEulerProduct.shtml. The idea is that you start with the Leibniz formula, and note that every odd number equal to 1 mod 4 must be the product of an even number of (not necessarily distinct) primes that are 3 mod 4.

If you're already happy with the Leibniz formula, then it follows formally from the following two observations:

1. 1 - 1/3 + 1/5 - 1/7 + 1/9 - ... is the value at s = 1 of the function sum_{n=0}^infinity f(n) n^{-s}, where f(n) is the function that 0 if n is even, 1 if n is in the set {1, 5, 9, ...} (i.e. is 1 mod 4), and -1 if n is in the sequence {3, 7, 11, ...} (i.e. is 3 mod 4).

2. If f is a multiplicative function (meaning f(xy) = f(x)f(y), as is satisfied for our f above), then

sum f(n) n^(-s) is the product over all primes p of (1-f(p)p^(-s))^(-1)

To prove this, first apply the geometric series formula from high school to every single term on the right hand side, then use the fact that every natural number factors uniquely into a product of primes.
Title: Re: Maths thread.
Post by: Kirian on June 01, 2016, 01:58:38 am
I was going to make a joke about abstract algebra, but I couldn't come up with one that had the right ring to it.
Title: Re: Maths thread.
Post by: scott_pilgrim on June 01, 2016, 02:34:02 am
It's important to make sure you're audience is in the right field; when you factor in the group you're telling it to, you can generate an ideal response.  I don't think a normal group would get an abstract algebra joke, but if you distribute it to people in the domain of math, they will associate certain words with their identity in algebra (and by extension, they will find your joke clever).
Title: Re: Maths thread.
Post by: pacovf on June 01, 2016, 08:19:48 am
I saw more fees (m).

...am I doing this right?
Title: Re: Maths thread.
Post by: Limetime on June 09, 2016, 02:13:16 pm
Dominion opening probability question:
What is the probabilities of hitting 5 first shuffle if you open silver/wedding and wedding/(pay off debt)
Title: Re: Maths thread.
Post by: sudgy on August 03, 2016, 01:28:29 am
So, I saw this equation as (I think) a joke somewhere online:

y'' = y'^(y'*sin(x*y)) + (e^x)*tan(1/x)

It's way too advanced for me, and I can tell the solution is probably really nasty.  Can any of you solve it?  Wolframalpha wasn't giving it.
Title: Re: Maths thread.
Post by: ConMan on August 03, 2016, 02:58:41 am
The very fact that it's got a y'^y' kind of term in it means it's not going to be anywhere amenable to most kinds of nice analysis. Best you could probably do is maybe try an infinite series approach, but even that's going to be hideous and prone to weird errors.
Title: Re: Maths thread.
Post by: Witherweaver on August 03, 2016, 12:17:17 pm
So, I saw this equation as (I think) a joke somewhere online:

y'' = y'^(y'*sin(x*y)) + (e^x)*tan(1/x)

It's way too advanced for me, and I can tell the solution is probably really nasty.  Can any of you solve it?  Wolframalpha wasn't giving it.

One thing you can do is cast it in to an easier problem to solve numerically.  Maybe something like the following

Let u = y, v=y'.  Then the equation becomes

v' = v^(v*sin(x*u)) + (e^x)tan(1/x),
u' = v.

Then you can take the initial point (u_0, v_0) and expand the derivatives as finite-differences to get an Euler scheme:

v_{n+1} =v_n+h_n*(v_n^(v_n*sin(x_n*u_n))+(e^(x_n))tan(1/x_n)),
u_{n+1}= u_n + h_n*v_n,

where h_n = x_{n+1}-x_n.  We almost know there is a region where we can find a solution.  (ODEs are well behaved like this, but I don't have the theorems off the top of my head.)  We obviously need to be away from x=0, and also there are going to be regions (1/x = (n+1/2)*Pi) where the solution blows up.  So you'd probably have to stick to strips between these points.  Inside of there I'd guess you could converge to a solution, though.

You don't need to reduce the order, you could also directly discretize the original problem

(y_{n+1} - 2y_n+y_{n-1})/(2h_n^2) = ((y_n-y_{n-1})/h)^((y_n-y_{n-1})/h)*sin(x_n*y_n)) + (e^x_n)*tan(1/x_n)

with an initial y_0, y_1.  Basically the same as before.


Edit: I shouldn't have said initial guess; the point (u_0,v_0) = (y_0, y'_0) must be provided for the problem to have a chance of being well defined. 
Title: Re: Maths thread.
Post by: pacovf on August 09, 2016, 03:48:03 am
Dominion opening probability question:
What is the probabilities of hitting 5 first shuffle if you open silver/wedding and wedding/(pay off debt)

First one is annoying to calculate (I'd say ~70%, probably less, without writing it out), second one is 61/66 (92.4%).
Title: Re: Maths thread.
Post by: Witherweaver on August 09, 2016, 10:15:40 am
Dominion opening probability question:
What is the probabilities of hitting 5 first shuffle if you open silver/wedding and wedding/(pay off debt)

First one is annoying to calculate (I'd say ~70%, probably less, without writing it out), second one is 61/66 (92.4%).

Hitting five your first shuffle if you open wedding/(pay off debt) is far more probable than people think!
Title: Re: Maths thread.
Post by: Tables on August 12, 2016, 07:06:20 pm
00=1. I vaguely understand the arguments for why, but can someone try and clarify it?
Title: Re: Maths thread.
Post by: Watno on August 12, 2016, 07:19:44 pm
Exponentiation with positive integer exponent n is defined as taking the product of the base with itself n times. Extending this definition to an exponent of 0 leads to nice properties and therefore theres no reason not to do it.
Title: Re: Maths thread.
Post by: math on August 12, 2016, 08:11:38 pm
00=1. I vaguely understand the arguments for why, but can someone try and clarify it?

If my understanding is correct, 00 is an indeterminate form.  x0=1 for all x not equal to zero, and 0x=0 for all x not equal to zero.
Title: Re: Maths thread.
Post by: Watno on August 12, 2016, 09:06:27 pm
This outlines good reasons to define 0^0 as 1: https://www.quora.com/What-is-0-0-the-zeroth-power-of-zero-1
Title: Re: Maths thread.
Post by: Jack Rudd on August 13, 2016, 09:02:03 am
0x=0 for all x not equal to zero.
No, 0x=0 for all x greater than zero. 0x is undefined for x less than zero.
Title: Re: Maths thread.
Post by: schadd on August 14, 2016, 10:18:46 pm
   10 people are alone in rooms, and none of them have ever communicated. all of them are equipped with a button and a device that can generate and display a completely random real number within some selected interval. the goal of these 10 people is to collectively press their buttons 20 times, as soon as possible, but if any of them press their button within one second of another person, then they have to start again from 0 presses and everyone is alerted as such. everyone has perfect reaction times, everything happens instantly (e.g. the button press and the number generation) and they are all capable of evaluating the generated numbers into a time interval (e.g. seconds) and adding/subtracting from it and stuff. however, no one is alerted when someone else presses a button, only when the count is reset.
 
   what is the optimal strategy for this game? does it get easier to determine with fewer people and fewer necessary button presses? can you adapt to what other people are doing by noting when the count is reset?
Title: Re: Maths thread.
Post by: Titandrake on August 15, 2016, 01:22:20 am
   10 people are alone in rooms, and none of them have ever communicated. all of them are equipped with a button and a device that can generate and display a completely random real number within some selected interval. the goal of these 10 people is to collectively press their buttons 20 times, as soon as possible, but if any of them press their button within one second of another person, then they have to start again from 0 presses and everyone is alerted as such. everyone has perfect reaction times, everything happens instantly (e.g. the button press and the number generation) and they are all capable of evaluating the generated numbers into a time interval (e.g. seconds) and adding/subtracting from it and stuff. however, no one is alerted when someone else presses a button, only when the count is reset.
 
   what is the optimal strategy for this game? does it get easier to determine with fewer people and fewer necessary button presses? can you adapt to what other people are doing by noting when the count is reset?

Is this a puzzle with a known solution, or a problem you made up that you're curious about? In either case, I think you need more information to make a good answer.

What do you mean by "completely random real number"? Do the participants know anything about how the numbers are generated, like bounds on the number, or whether the distribution is uniform or normal or <insert favorite probability distribution here>? Or do they only know they're samples from some probability distribution? If you mean the second, I don't see how you can identify an optimal strategy - my intuition says there are good strategies that work no matter how the numbers are generated, but the optimal strategy (the one that finishes in least expected time) is going to depend on the probability distribution.
Title: Re: Maths thread.
Post by: schadd on August 15, 2016, 01:57:48 am
Is this a puzzle with a known solution, or a problem you made up that you're curious about?
the latter


What do you mean by "completely random real number"? Do the participants know anything about how the numbers are generated, like bounds on the number, or whether the distribution is uniform or normal or <insert favorite probability distribution here>? Or do they only know they're samples from some probability distribution?
it's uniform distribution i think (all values are equally likely, ??, the wikipedia page for that has too many links to longer pages in the synopsis) and the folks choose the bounds when they decide to generate the number
Title: Re: Maths thread.
Post by: Titandrake on August 15, 2016, 03:05:10 am
Are they allowed to press the device infinitely many times? Does everyone's device work the same way?

If everything's instant, and a person triggers the alert if they press the button within 1 second of themselves, I have a solution that guarantees the expected time is as close to 20 seconds as you want. Ignore the button entirely. Each player mentally flips a coin that lands heads with probability 1 - epsilon, where epsilon is some small constant > 0. Everyone whose coin landed heads presses the button. If two or more people press the button, everyone is alerted, and they try again immediately, losing no time. If 1 person pressed the button, they press the button every second until they're done. If 0 people pressed the button, in 20 seconds everyone will know, and they try again.

The probability 0 people press the button is epsilon^10. The first time this doesn't happen, they win. The expected value is 20 / (1 - epsilon^10), now make epsilon as small as you want to get this arbitrarily close to 20.

This works for an arbitrary number of people and an arbitrary number of button presses; making failures instant lets you get away with retrying in the vast majority of cases.
Title: Re: Maths thread.
Post by: schadd on August 15, 2016, 03:24:01 am
Are they allowed to press the device infinitely many times? Does everyone's device work the same way?
yes.
the other stuff
so that sort of confirms my initial suspicion which is that they shouldn't be alerted when the thing restarts
Title: Re: Maths thread.
Post by: Titandrake on August 15, 2016, 04:00:36 am
Are they allowed to press the device infinitely many times? Does everyone's device work the same way?
yes.

For the record, I don't think the button adds anything to the problem. If you assume magic people who can do everything instantly, what stops these people from simulating arbitrary probability distributions in their head by doing tons of instantaneous mental calculation? Why should they use the button at all?

the other stuff
so that sort of confirms my initial suspicion which is that they shouldn't be alerted when the thing restarts

I think there's a way to get a similar result if people aren't notified of a restart, but haven't worked out the details yet.

Edit: nvm, I'm probably wrong and you get a worse bound. Since everyone gets identical information, everyone must decide on the same probabilistic strategy. Let's further assume everyone's strategy boils down to "press the button 20 times with probability p". They don't get any feedback until the end of 20 seconds, so I believe there's no better class of strategies, but I haven't thought about it formally yet.

Let the number of people be N. The number of button presses K doesn't matter if they don't get alerted. All it does is change how long they have to wait before learning if they succeeded or not.

Then, we want the p such that the probability exactly one person presses the button is maximized. With some combinatorics we get

max_{p} (N choose 1) * p * (1-p)^{N-1}

Use a common trick: maximizing this is equivalent to maximizing the log.

max_{p} \log{N} + \log{p} + (N-1) * \log{1-p}

This is maximized when p = 1/N. (You could either explicitly find where the derivative is 0 and verify the 2nd derivative is always negative, or cheat like I did by noticing this is the MLE for estimating a binomial distribution.)

For p = 1/N, the probability of success is N * (1/N) * (1-1/N)^{N-1} = (1-1/N)^{N-1}, which approaches 1/e for large N. So, in the limit, if they need K button presses, you can get expected time K*e.
Title: Re: Maths thread.
Post by: schadd on August 15, 2016, 11:04:02 am
For the record, I don't think the button adds anything to the problem. If you assume magic people who can do everything instantly, what stops these people from simulating arbitrary probability distributions in their head by doing tons of instantaneous mental calculation? Why should they use the button at all?
they have to use it at least once, else we have to assume that they'll all come up with the same thing. but yeah, perhaps the people shouldn't be able to do math after they come up with a strategy. also, i thought of it as the random number isn't a probability to press the button, rather an amount of time to wait before pressing the button, though the former seems to work. also thank you for answering


the amount of revisions that i have to do should make it clear that this is not an elegant problem some professor came up with
Title: Re: Maths thread.
Post by: Titandrake on August 16, 2016, 12:27:28 am
It seems to me that you were looking for a very specific kind of strategy, in a world where people aren't infinitely smart, and then made the error of removing too much of reality when trying to turn it into a math problem.

If everyone's random number generator works the same way, they'll all come up with the same strategy anyways. Yes, maybe different people will do something different because they got different random numbers, but by same strategy, I mean that if you had everyone generate a random number, then switched two people right before they saw the number and decided what to do, the same thing would happen.
Title: Re: Maths thread.
Post by: ehunt on August 18, 2016, 06:42:45 pm
For a and b positive natural numbers, the quantity a^b counts the number of functions from a set of size b to a set of size a. We wish to extend the definition to cases where a and b are 0. In set theory we identify a function with its graph, so a function from S to T is just a subset G of the cartesian product S x T such that

"for all s in S there is exactly one t in T with (s, t) an element of G."

If S is empty, then "for all s in S" is a vacuous condition, and so any subset of S \times T is a function. However, S \times T is empty, so it has only one subset. Therefore a^0 = 1 for all a, including a = 0.

If T is empty, then unless S is empty, it's not possible that for all s in S there is exactly one t in T with (s, t) an element of G, so there are no functions from S to T. So 0^b = 1 for b > 0.
Title: Re: Maths thread.
Post by: sudgy on November 04, 2016, 01:14:37 am
This was a problem my math teacher just gave the class:

What is the derivative of (sin(tan(x))*(sec2(ex)-tan2(ex)-1))/((ln(tan(x)))2)?  (For anyone who feels like turning this into an image, please do, because this looks nasty right now.)

I don't know if anybody really got it, but to a person who's just learning things it's one of the most evil questions ever.
Title: Re: Maths thread.
Post by: Kirian on November 04, 2016, 01:25:38 am
This was a problem my math teacher just gave the class:

What is the derivative of (sin(tan(x))*(sec2(ex)-tan2(ex)-1))/((ln(tan(x)))2)?  (For anyone who feels like turning this into an image, please do, because this looks nasty right now.)

I don't know if anybody really got it, but to a person who's just learning things it's one of the most evil questions ever.

I was going to say that was really tough, and is the answer Moat, and then I realized what the trick is supposed to be, and simply decided your teacher is a dick, unless they then went on to explain said dickery.
Title: Re: Maths thread.
Post by: ConMan on November 04, 2016, 01:26:17 am
This was a problem my math teacher just gave the class:

What is the derivative of (sin(tan(x))*(sec2(ex)-tan2(ex)-1))/((ln(tan(x)))2)?  (For anyone who feels like turning this into an image, please do, because this looks nasty right now.)

I don't know if anybody really got it, but to a person who's just learning things it's one of the most evil questions ever.
sec^2(x) - tan^2(x) = 1, by rearrangement of the normal cos^2 + sin^2 identity, thus the whole thing is equal to 0.
Title: Re: Maths thread.
Post by: ConMan on November 04, 2016, 01:26:43 am
This was a problem my math teacher just gave the class:

What is the derivative of (sin(tan(x))*(sec2(ex)-tan2(ex)-1))/((ln(tan(x)))2)?  (For anyone who feels like turning this into an image, please do, because this looks nasty right now.)

I don't know if anybody really got it, but to a person who's just learning things it's one of the most evil questions ever.

I was going to say that was really tough, and is the answer Moat, and then I realized what the trick is supposed to be, and simply decided your teacher is a dick, unless they then went on to explain said dickery.
I assumed that something so nasty-looking would have a trick to it, and it didn't take long to spot it.
Title: Re: Maths thread.
Post by: sudgy on November 04, 2016, 01:29:23 am
This was a problem my math teacher just gave the class:

What is the derivative of (sin(tan(x))*(sec2(ex)-tan2(ex)-1))/((ln(tan(x)))2)?  (For anyone who feels like turning this into an image, please do, because this looks nasty right now.)

I don't know if anybody really got it, but to a person who's just learning things it's one of the most evil questions ever.

I was going to say that was really tough, and is the answer Moat, and then I realized what the trick is supposed to be, and simply decided your teacher is a dick, unless they then went on to explain said dickery.

He explained it pretty quickly.
Title: Re: Maths thread.
Post by: Kirian on November 04, 2016, 01:31:30 am
This was a problem my math teacher just gave the class:

What is the derivative of (sin(tan(x))*(sec2(ex)-tan2(ex)-1))/((ln(tan(x)))2)?  (For anyone who feels like turning this into an image, please do, because this looks nasty right now.)

I don't know if anybody really got it, but to a person who's just learning things it's one of the most evil questions ever.

I was going to say that was really tough, and is the answer Moat, and then I realized what the trick is supposed to be, and simply decided your teacher is a dick, unless they then went on to explain said dickery.
I assumed that something so nasty-looking would have a trick to it, and it didn't take long to spot it.

Sure, but springing that sort of thing on high school students is a dick move, but if he rapidly explained it, then it's a good lesson:  look for ways to simplify things.
Title: Re: Maths thread.
Post by: sudgy on November 04, 2016, 01:46:53 am
This was a problem my math teacher just gave the class:

What is the derivative of (sin(tan(x))*(sec2(ex)-tan2(ex)-1))/((ln(tan(x)))2)?  (For anyone who feels like turning this into an image, please do, because this looks nasty right now.)

I don't know if anybody really got it, but to a person who's just learning things it's one of the most evil questions ever.

I was going to say that was really tough, and is the answer Moat, and then I realized what the trick is supposed to be, and simply decided your teacher is a dick, unless they then went on to explain said dickery.
I assumed that something so nasty-looking would have a trick to it, and it didn't take long to spot it.

Sure, but springing that sort of thing on high school students is a dick move, but if he rapidly explained it, then it's a good lesson:  look for ways to simplify things.

...I'm in college (granted, it's my first term).
Title: Re: Maths thread.
Post by: sudgy on November 06, 2016, 06:21:03 pm
So, there's this game that my mom has for piano students, and a problem came up that I feel like should have a simple answer but I can't think of it.  To make it simpler, I'll turn the game into this:  You start at 0.  You roll a die with n sides.  If the number on the die is greater than the number you are at, you move to that number.  If the number on the die is less than the number you are at, you win.

So, my question is, how many turns on average does it take to win, as n tends towards infinity?  This game seems horribly unbalanced in that it should only take a couple turns to win, but what would this average be?  It seems like the type of problem where e would sneak up on you but I can't think of any way to actually solve it.
Title: Re: Maths thread.
Post by: schadd on November 06, 2016, 09:01:50 pm
lower bound: 1
Title: Re: Maths thread.
Post by: sudgy on November 06, 2016, 10:53:53 pm
lower bound: 1

It's actually two.  You can't win in one turn because no dice roll is less than zero.
Title: Re: Maths thread.
Post by: schadd on November 06, 2016, 11:21:29 pm
i meant 1 after the first one
Title: Re: Maths thread.
Post by: pacovf on November 06, 2016, 11:59:03 pm
If you are rolling an n-sided die. Let's call a_k the average number of (extra) throws you need to satisfy the given condition, if the highest number you've rolled is a k. Then you have:

-> a_n = (n-1)/n + (1+a_n)/n -> a_n = n/(n-1)

-> a_k = (k-1)/n + sum_(h>=k){(1+a_h)/n}

which uh I am sure you can solve by induction, but it's late.

EDIT: a_k = n(1-1/(n-1)^(1+n-k))/(n-2), I believe, so you just do the average of all the possibilities (and add 1) to get the answer. Or replace k by 0, which is the same:

A = n(1-1/(n-1)^(n+1))/(n-2)

which tends to 1 as n->inf, which feels weird? I might be wrong.

EDIT:

Actually I was wrong, a_k = (n/(n-1))^(1+n-k)

so A = (n/(n-1))^(n+1)
Title: Re: Maths thread.
Post by: ehunt on November 07, 2016, 04:43:03 am
If you are rolling an n-sided die. Let's call a_k the average number of (extra) throws you need to satisfy the given condition, if the highest number you've rolled is a k. Then you have:

-> a_n = (n-1)/n + (1+a_n)/n -> a_n = n/(n-1)

-> a_k = (k-1)/n + sum_(h>=k){(1+a_h)/n}

which uh I am sure you can solve by induction, but it's late.

EDIT: a_k = n(1-1/(n-1)^(1+n-k))/(n-2), I believe, so you just do the average of all the possibilities (and add 1) to get the answer. Or replace k by 0, which is the same:

A = n(1-1/(n-1)^(n+1))/(n-2)

which tends to 1 as n->inf, which feels weird? I might be wrong.

EDIT:

Actually I was wrong, a_k = (n/(n-1))^(1+n-k)

so A = (n/(n-1))^(n+1)

nice! then A tends to e -- put n-1 = m to get

A = (1 + 1/m)^(m+2);

(the + 2 in the exponent doesn't affect the limit since lim (1+1/m)^2 is 1).
Title: Re: Maths thread.
Post by: sudgy on November 29, 2016, 01:17:49 am
Didn't somebody way earlier talk about factoring a negative exponent?  For instance, I was doing a problem that involved the expression "6sqrt(1+x^-2) + sqrt(1 + x^2)" and by factoring x^-2 from the first sqrt I was able to simplify it a lot.
Title: Re: Maths thread.
Post by: SirPeebles on December 29, 2016, 12:07:37 pm
Kirian is probably referring to the result from https://en.wikipedia.org/wiki/Euler_product#Notable_constants

(https://upload.wikimedia.org/math/e/6/f/e6fae229e30bae187d0e2988c31ad46d.png)

Edit: Looks like an explanation that generalizes requires more math than I know. An easier justification is at http://www.cut-the-knot.org/proofs/AfterEulerProduct.shtml. The idea is that you start with the Leibniz formula, and note that every odd number equal to 1 mod 4 must be the product of an even number of (not necessarily distinct) primes that are 3 mod 4.


Another connection is that the Riemann Zeta function may be expressed in terms of primes, and when evaluate at s=2 you get (pi^2)/6
Title: Re: Maths thread.
Post by: silverspawn on December 29, 2016, 12:18:54 pm
By the way, is it just me or is pi as 3,1516... a really unlikely definition and 6,303... would be more practical for most purposes, and most likely what would be done if it were defined today?
Title: Re: Maths thread.
Post by: SirPeebles on December 29, 2016, 12:38:03 pm
By the way, is it just me or is pi as 3,1516... a really unlikely definition and 6,303... would be more practical for most purposes, and most likely what would be done if it were defined today?

I wouldn't use either of those  ;)

But more seriously, I think that tau is often more useful for theoretical work, but for practicality it sure is a lot more convenient to measure the diameter of a circle than it is to measure the radius. Hell, even finding the center of a circle can be a pain.
Title: Re: Maths thread.
Post by: Watno on December 29, 2016, 01:08:04 pm
The analytical definition actually defines pi/2.
Title: Re: Maths thread.
Post by: Mic Qsenoch on December 29, 2016, 01:11:18 pm
The analytical definition actually defines pi/2.

Which is a real pain because you have to add up that infinite series twice just to figure out what pi is!
Title: Re: Maths thread.
Post by: SirPeebles on December 29, 2016, 01:17:50 pm
The analytical definition actually defines pi/2.

Which definition are you thinking of? One of the simplest analytical definitions for "pi" that I can think of is that it is the period of any (nonzero) solution to y'' = -y. This definition yields tau.
Title: Re: Maths thread.
Post by: Watno on December 29, 2016, 01:23:27 pm
I was thinking of the smallest nonnegative zero of cosine.
Title: Re: Maths thread.
Post by: SirPeebles on December 29, 2016, 02:48:00 pm
I was thinking of the smallest nonnegative zero of cosine.

Sure, but cosine is a somewhat arbitrary function to start with. Well, it's the even part of e^x, which is kind of special.
Title: Re: Maths thread.
Post by: pacovf on December 29, 2016, 02:57:18 pm
...are you back, or just terribly bored? Because... Welcome back!
Title: Re: Maths thread.
Post by: sudgy on January 16, 2017, 02:12:32 am
Say you are trying to prove that all natural numbers have a certain property.  You find an infinite sum where each term is a fraction of the natural numbers (and all of the numbers one fraction gives the property to only get it from that one fraction).  The sum of this infinite series of fractions is one.  Is that proof that all natural numbers have that property, or just that almost all of them do?
Title: Re: Maths thread.
Post by: Witherweaver on January 16, 2017, 10:47:34 am
Say you are trying to prove that all natural numbers have a certain property.  You find an infinite sum where each term is a fraction of the natural numbers (and all of the numbers one fraction gives the property to only get it from that one fraction).  The sum of this infinite series of fractions is one.  Is that proof that all natural numbers have that property, or just that almost all of them do?

What do you mean each term is a fraction of the natural numbers?  Do you mean each term is rational and positive? 

I'd be inclined to say (without giving much thought) that it depends on the property.

Edit: Err, actually no.  You only have one sequence.  Say you have sum(1/2^n, n>=2), which converges to 1.  All numerartors and denominators are of the form 2^n , but every natural number is not.

You may mean something different though.  It's hard to understand what you're trying to say.
Title: Re: Maths thread.
Post by: Haddock on January 16, 2017, 12:43:25 pm
You may mean something different though.  It's hard to understand what you're trying to say.
Title: Re: Maths thread.
Post by: sudgy on January 16, 2017, 01:18:13 pm
Okay, for a really simple example, say you find that something gives half the numbers the property, then half of the remaining numbers that property, then half of those remaining numbers, and so on.  In this case it seems pretty obvious that all numbers have the property, so I'm wondering if that works for any infinite sum that sums to one.
Title: Re: Maths thread.
Post by: SirPeebles on January 16, 2017, 01:23:37 pm
Okay, for a really simple example, say you find that something gives half the numbers the property, then half of the remaining numbers that property, then half of those remaining numbers, and so on.  In this case it seems pretty obvious that all numbers have the property, so I'm wondering if that works for any infinite sum that sums to one.

This would still not imply that all natural numbers have the property. Mostly because there isn't really a useful definition of "half" of a countably infinite set.
Title: Re: Maths thread.
Post by: Watno on January 16, 2017, 01:29:45 pm
However, if you have a sequence of subsets of of N that covers N, and you prove a statement for each such subset, it holds for all natural numbers.
Title: Re: Maths thread.
Post by: Witherweaver on January 16, 2017, 01:30:52 pm
You're also making the set of numbers for which you have the property smaller... if all numbers in a set have a given property, then certainly any subset satisfies it.

Oh.. remaining.. nevermind.

But yeah, finite sure, infinitely countable it depends on what you mean.
Title: Re: Maths thread.
Post by: SirPeebles on January 16, 2017, 01:31:19 pm
This might be a more useful response. It seems that what you really want to do is put what it called a "measure" on the set of natural numbers. A measure is a way of assigning a size to each subset of numbers in such a way that the size of a disjoint union is just the sum of the sizes of of the individual subsets. In your example, you would want the measure of the full set of natural numbers to equal one, which is sometimes called a probability measure.

In this case, if you have a disjoint union of subsets whose measures sum up to one, then your subsets will indeed include all but a subset of measure zero. Now, it depends on the measure you use, but you can indeed have a nonempty set with measure zero. However, the phrase "almost all" is frequently used by mathematicians in a very precise sense to mean "all but a set of measure zero".

tl;dr

rephrasing your question in measure theoretic terms, almost all natural numbers will have your property.
Title: Re: Maths thread.
Post by: sudgy on January 16, 2017, 01:32:37 pm
Okay, for a really simple example, say you find that something gives half the numbers the property, then half of the remaining numbers that property, then half of those remaining numbers, and so on.  In this case it seems pretty obvious that all numbers have the property, so I'm wondering if that works for any infinite sum that sums to one.

This would still not imply that all natural numbers have the property. Mostly because there isn't really a useful definition of "half" of a countably infinite set.

Say first is that all even numbers have the property.
Next, all numbers 4n+1 have the property.
Next, all numbers 8n+3 have the property.
Next, all numbers 16n+7 have the property.
Next, all numbers 32n+15 have the property.

And so on.  You can represent this as 1/2 + 1/4 + 1/8 + 1/16 + 1/32 + ..., which is one.
Title: Re: Maths thread.
Post by: silverspawn on January 16, 2017, 01:34:43 pm
Any specific number should be reached at some point by adding more subgroups with this property, right? No matter how your infinite sum looks like.
Title: Re: Maths thread.
Post by: Witherweaver on January 16, 2017, 01:35:50 pm
Isn't it more direct to just take an arbitrary natural number K and ask if it can be expressed in the form described?
Title: Re: Maths thread.
Post by: Watno on January 16, 2017, 01:36:23 pm
Say first is that all even numbers have the property.
Next, all numbers 4n+1 have the property.
Next, all numbers 8n+3 have the property.
Next, all numbers 16n+7 have the property.
Next, all numbers 32n+15 have the property.

And so on.  You can represent this as 1/2 + 1/4 + 1/8 + 1/16 + 1/32 + ..., which is one.

You can't.
Title: Re: Maths thread.
Post by: sudgy on January 16, 2017, 01:36:33 pm
However, if you have a sequence of subsets of of N that covers N, and you prove a statement for each such subset, it holds for all natural numbers.

Even if it requires an infinite number of subsets?
Title: Re: Maths thread.
Post by: Witherweaver on January 16, 2017, 01:36:41 pm
If not, then yeh answer is obviously no.  Take the property to be "not X", where X is something not of that form.
Title: Re: Maths thread.
Post by: SirPeebles on January 16, 2017, 01:41:13 pm
However, if you have a sequence of subsets of of N that covers N, and you prove a statement for each such subset, it holds for all natural numbers.

Even if it requires an infinite number of subsets?

Yes. Let n be an arbitrary natural number. Since our collection subsets covers N, we know that n belongs to one of our subsets. But we've proved that every element of the subset has our property. So n has the property.
Title: Re: Maths thread.
Post by: Watno on January 16, 2017, 01:41:58 pm
However, if you have a sequence of subsets of of N that covers N, and you prove a statement for each such subset, it holds for all natural numbers.

Even if it requires an infinite number of subsets?

Yes.
If a statement holds for all elements of each set of a family of sets, it holds for each element of the union as well.
Title: Re: Maths thread.
Post by: scott_pilgrim on January 16, 2017, 01:54:35 pm
You could just start by proving that any natural number can be written as (2^k)n+2^(k-1)-1, and then prove that if a number can be written like that, then it has that property.  That should make it obvious that every natural number has that property, without thinking about infinite unions.
Title: Re: Maths thread.
Post by: Watno on January 16, 2017, 01:58:13 pm
Aren't you implicitely thinking about infinite unions when you do that?
Title: Re: Maths thread.
Post by: scott_pilgrim on January 16, 2017, 01:59:31 pm
Aren't you implicitely thinking about infinite unions when you do that?

Probably, but I think it might be a more intuitive way of thinking about it for some people.
Title: Re: Maths thread.
Post by: sudgy on January 16, 2017, 02:14:16 pm
You could just start by proving that any natural number can be written as (2^k)n+2^(k-1)-1, and then prove that if a number can be written like that, then it has that property.  That should make it obvious that every natural number has that property, without thinking about infinite unions.

The problem that I have though isn't in the form of 2kn+2k-1-1.  I just used that as an example.  The problem I have is of the form 2kn + c, where c takes on a whole bunch of values that don't seem to have any rhyme or reason.  (I've found a way to compute c, but it's really really complicated).  However, the number of c's that work for a specific k seems to be easier to find, so I was looking for another way to do it.  My idea was to use the number of c's for a given k (let's call it ck) divided by 2k (this fraction is basically the fraction of natural numbers it includes) and summing them up:

(ck1)/(2k1) + (ck2)/(2k2) + (ck3)/(2k3) + (ck4)/(2k4) + ...

Also, when I say a fraction of the natural numbers, say a/b, I'm saying that if you picked b consecutive natural numbers, there would be a of them.


So how would I prove that the union of all of these subsets is the natural numbers?
Title: Re: Maths thread.
Post by: Witherweaver on January 16, 2017, 03:46:05 pm
But again it depends on the property if not every natural number can be written as n*2^k + c_k.

If every natural number can be written this way, and every number of this form has property P, then certainly every natural number has property.  However, if there is a natural number N that cannot be expressed as n*2^k + c_k for any n, k, then certainly there is a property P that does not translate from the subset to all naturals.  The trivial property is "m has property P if m is not equal to N".
Title: Re: Maths thread.
Post by: Cuzz on January 16, 2017, 04:09:17 pm
You could just start by proving that any natural number can be written as (2^k)n+2^(k-1)-1, and then prove that if a number can be written like that, then it has that property.  That should make it obvious that every natural number has that property, without thinking about infinite unions.

The problem that I have though isn't in the form of 2kn+2k-1-1.  I just used that as an example.  The problem I have is of the form 2kn + c, where c takes on a whole bunch of values that don't seem to have any rhyme or reason.  (I've found a way to compute c, but it's really really complicated).  However, the number of c's that work for a specific k seems to be easier to find, so I was looking for another way to do it.  My idea was to use the number of c's for a given k (let's call it ck) divided by 2k (this fraction is basically the fraction of natural numbers it includes) and summing them up:

(ck1)/(2k1) + (ck2)/(2k2) + (ck3)/(2k3) + (ck4)/(2k4) + ...

Also, when I say a fraction of the natural numbers, say a/b, I'm saying that if you picked b consecutive natural numbers, there would be a of them.


So how would I prove that the union of all of these subsets is the natural numbers?

I may be misunderstanding, but you need some measurement of the overlap of these subsets. Trivial example: Let P be the property "N is even or N = 2k for some natural number k." 1/2 of all natural numbers are even, and 1/2 are of the form 2k for some natural number k. 1/2 + 1/2 =1 but certainly not all natural numbers have property P.
Title: Re: Maths thread.
Post by: Polk5440 on January 16, 2017, 04:33:10 pm
summing them up:

I reading into things and thinking you might need this: Remember, if you have two sets A and B, the number of elements in A or B = number of elements in A + number of elements in B - number of elements in A and B.
Title: Re: Maths thread.
Post by: sudgy on January 16, 2017, 04:35:11 pm
In this case, none of the elements in the sets overlap.
Title: Re: Maths thread.
Post by: SirPeebles on January 16, 2017, 06:34:28 pm
sudgy, I haven't read your request too closely, but here is an example to watch out for:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...

and so forth. Each natural number eventually turns red except for 1.
Title: Re: Maths thread.
Post by: sudgy on January 17, 2017, 01:32:42 pm
sudgy, I haven't read your request too closely, but here is an example to watch out for:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...

and so forth. Each natural number eventually turns red except for 1.

Now I'm curious, what's the difference between this example and my earlier one that makes mine include all the numbers while yours doesn't?  I'm not just talking about how yours is 2kn+2k-1+1 while mine is 2kn+2k-1-1, but I'm more looking for something that says why mine covers the natural numbers while yours doesn't.
Title: Re: Maths thread.
Post by: Haddock on January 17, 2017, 01:44:54 pm
sudgy, I haven't read your request too closely, but here is an example to watch out for:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...

and so forth. Each natural number eventually turns red except for 1.

Now I'm curious, what's the difference between this example and my earlier one that makes mine include all the numbers while yours doesn't?  I'm not just talking about how yours is 2kn+2k-1+1 while mine is 2kn+2k-1-1, but I'm more looking for something that says why mine covers the natural numbers while yours doesn't.
This should be fairly clear, no?  Powers of 2 start at 1, so adding 1 will definitely mean you miss something, while subtracting is not a threat.

Indeed, if you add a large enough constant you're pretty much always going to miss some early numbers.  This is the main problem with the question, to some extent. 

If you can't prove that your set of sequences covers everything, you're likely at the very least to miss finitely many numbers at the start. 

For certain sequences you could prove that you cover almost all naturals, I'm sure.  The "almost all" would sometimes mean "all but finitely many", and sometimes mean something more measure-theoretically complex.

It really does depend on the sequences in question.
Title: Re: Maths thread.
Post by: Cuzz on January 17, 2017, 01:54:43 pm
Also, when I say a fraction of the natural numbers, say a/b, I'm saying that if you picked b consecutive natural numbers, there would be a of them.

Can you state this condition more carefully using quantifiers?
Title: Re: Maths thread.
Post by: sudgy on January 17, 2017, 02:13:34 pm
Also, when I say a fraction of the natural numbers, say a/b, I'm saying that if you picked b consecutive natural numbers, there would be a of them.

Can you state this condition more carefully using quantifiers?

I'm more of an amateur mathematician (that's why I ask so many questions here), and haven't really heard of quantifiers before, but I'll try to state it a bit more formally.

A subset S of N contains a fraction a/b of N iff for all subsets T of N with length b containing consecutive integers, the size of T ∩ S is a.
Title: Re: Maths thread.
Post by: Haddock on January 18, 2017, 08:42:24 am
Also, when I say a fraction of the natural numbers, say a/b, I'm saying that if you picked b consecutive natural numbers, there would be a of them.

Can you state this condition more carefully using quantifiers?

I'm more of an amateur mathematician (that's why I ask so many questions here), and haven't really heard of quantifiers before, but I'll try to state it a bit more formally.

A subset S of N contains a fraction a/b of N iff for all subsets T of N with length b containing consecutive integers, the size of T ∩ S is a.
I can say fairly confidently that that's not going to be a good definition.  There are too many edge cases.  Your example with arithmetic progressions is OK because they're nice evenly laid-out sequences.  In general, that's not what a mathematician would mean if they said S was a proportion a/b of the naturals.

That said, for your question specifically your definition might be OK, since you're only working with arithmetic progressions.  In that picture, you just need to know how much overlap there is between the progressions.  (I suspect there'll be too much overlap, but I haven't looked closely at your specific sequences)
Title: Re: Maths thread.
Post by: Witherweaver on January 18, 2017, 09:54:19 am
I feel like the only natural definition of a subset A being a proportion X of its superset B is |A|  = X*|B|, where |.| is some measure and 0 \leq X \leq 1.  When |B| is an infinite ordinal, I think these operations still make sense; maybe it should be |B|= Y*|A|, where Y >= 1. (If |.| is the usual cardinality and B is the natural numbers, |B| is the first infinite ordinal, and X can only be 0 or 1 depending on if A is finite or not.)
Title: Re: Maths thread.
Post by: Haddock on January 18, 2017, 10:11:43 am
I feel like the only natural definition of a subset A being a proportion X of its superset B is |A|  = X*|B|, where |.| is some measure and 0 \leq X \leq 1.  When |B| is an infinite ordinal, I think these operations still make sense; maybe it should be |B|= Y*|A|, where Y >= 1. (If |.| is the usual cardinality and B is the natural numbers, |B| is the first infinite ordinal, and X can only be 0 or 1 depending on if A is finite or not.)
This might be a valid definition but it is not the only natural one, at least not for subsets of the naturals (or subsets of any countable ordered set).

The definition I have seen (and/or used) most often for subsets of N is (variants of) the following:

X (a subset of N) has density d if
Limsup (|X intersect {1,...,N}| / N) = d,
the limsup being taken as N --> infinity.

See https://en.wikipedia.org/wiki/Natural_density
Title: Re: Maths thread.
Post by: Witherweaver on January 18, 2017, 10:19:00 am
I feel like the only natural definition of a subset A being a proportion X of its superset B is |A|  = X*|B|, where |.| is some measure and 0 \leq X \leq 1.  When |B| is an infinite ordinal, I think these operations still make sense; maybe it should be |B|= Y*|A|, where Y >= 1. (If |.| is the usual cardinality and B is the natural numbers, |B| is the first infinite ordinal, and X can only be 0 or 1 depending on if A is finite or not.)
This might be a valid definition but it is not the only natural one, at least not for subsets of the naturals (or subsets of any countable ordered set).

The definition I have seen (and/or used) most often for subsets of N is (variants of) the following:

X (a subset of N) has density d if
Limsup (|X intersect {1,...,N}| / N) = d,
the limsup being taken as N --> infinity.

See https://en.wikipedia.org/wiki/Natural_density

That makes sense, right.  My way doesn't let you usefully compare subsets of naturals very well, since the relative measure is either 0 or 1.
Title: Re: Maths thread.
Post by: Cuzz on January 18, 2017, 10:31:04 am
I feel like the only natural definition of a subset A being a proportion X of its superset B is |A|  = X*|B|, where |.| is some measure and 0 \leq X \leq 1.  When |B| is an infinite ordinal, I think these operations still make sense; maybe it should be |B|= Y*|A|, where Y >= 1. (If |.| is the usual cardinality and B is the natural numbers, |B| is the first infinite ordinal, and X can only be 0 or 1 depending on if A is finite or not.)
This might be a valid definition but it is not the only natural one, at least not for subsets of the naturals (or subsets of any countable ordered set).

The definition I have seen (and/or used) most often for subsets of N is (variants of) the following:

X (a subset of N) has density d if
Limsup (|X intersect {1,...,N}| / N) = d,
the limsup being taken as N --> infinity.

See https://en.wikipedia.org/wiki/Natural_density

And for this definition, the thing sudgy is trying to show is most certainly false because you could always remove some infinite set of density 0. But I don't know how helpful that is.
Title: Re: Maths thread.
Post by: Haddock on January 18, 2017, 10:54:59 am
I feel like the only natural definition of a subset A being a proportion X of its superset B is |A|  = X*|B|, where |.| is some measure and 0 \leq X \leq 1.  When |B| is an infinite ordinal, I think these operations still make sense; maybe it should be |B|= Y*|A|, where Y >= 1. (If |.| is the usual cardinality and B is the natural numbers, |B| is the first infinite ordinal, and X can only be 0 or 1 depending on if A is finite or not.)
This might be a valid definition but it is not the only natural one, at least not for subsets of the naturals (or subsets of any countable ordered set).

The definition I have seen (and/or used) most often for subsets of N is (variants of) the following:

X (a subset of N) has density d if
Limsup (|X intersect {1,...,N}| / N) = d,
the limsup being taken as N --> infinity.

See https://en.wikipedia.org/wiki/Natural_density

And for this definition, the thing sudgy is trying to show is most certainly false because you could always remove some infinite set of density 0. But I don't know how helpful that is.
It's not AUTOMATICALLY false, it's just not true in general.  It depends on exactly what sudgy's sequences look like. 
Title: Re: Maths thread.
Post by: Cuzz on January 18, 2017, 02:39:20 pm
I feel like the only natural definition of a subset A being a proportion X of its superset B is |A|  = X*|B|, where |.| is some measure and 0 \leq X \leq 1.  When |B| is an infinite ordinal, I think these operations still make sense; maybe it should be |B|= Y*|A|, where Y >= 1. (If |.| is the usual cardinality and B is the natural numbers, |B| is the first infinite ordinal, and X can only be 0 or 1 depending on if A is finite or not.)
This might be a valid definition but it is not the only natural one, at least not for subsets of the naturals (or subsets of any countable ordered set).

The definition I have seen (and/or used) most often for subsets of N is (variants of) the following:

X (a subset of N) has density d if
Limsup (|X intersect {1,...,N}| / N) = d,
the limsup being taken as N --> infinity.

See https://en.wikipedia.org/wiki/Natural_density

And for this definition, the thing sudgy is trying to show is most certainly false because you could always remove some infinite set of density 0. But I don't know how helpful that is.
It's not AUTOMATICALLY false, it's just not true in general.  It depends on exactly what sudgy's sequences look like.

Right, I was referring to this:

Say you are trying to prove that all natural numbers have a certain property.  You find an infinite sum where each term is a fraction of the natural numbers (and all of the numbers one fraction gives the property to only get it from that one fraction).  The sum of this infinite series of fractions is one.  Is that proof that all natural numbers have that property, or just that almost all of them do?

not to any specific scenario.
Title: Re: Maths thread.
Post by: Haddock on January 19, 2017, 05:05:13 am
I feel like the only natural definition of a subset A being a proportion X of its superset B is |A|  = X*|B|, where |.| is some measure and 0 \leq X \leq 1.  When |B| is an infinite ordinal, I think these operations still make sense; maybe it should be |B|= Y*|A|, where Y >= 1. (If |.| is the usual cardinality and B is the natural numbers, |B| is the first infinite ordinal, and X can only be 0 or 1 depending on if A is finite or not.)
This might be a valid definition but it is not the only natural one, at least not for subsets of the naturals (or subsets of any countable ordered set).

The definition I have seen (and/or used) most often for subsets of N is (variants of) the following:

X (a subset of N) has density d if
Limsup (|X intersect {1,...,N}| / N) = d,
the limsup being taken as N --> infinity.

See https://en.wikipedia.org/wiki/Natural_density

And for this definition, the thing sudgy is trying to show is most certainly false because you could always remove some infinite set of density 0. But I don't know how helpful that is.
It's not AUTOMATICALLY false, it's just not true in general.  It depends on exactly what sudgy's sequences look like.

Right, I was referring to this:

Say you are trying to prove that all natural numbers have a certain property.  You find an infinite sum where each term is a fraction of the natural numbers (and all of the numbers one fraction gives the property to only get it from that one fraction).  The sum of this infinite series of fractions is one.  Is that proof that all natural numbers have that property, or just that almost all of them do?

not to any specific scenario.
Right.

You don't even know that the "exceptional set" has density 0, necessarily.  If the original terms of the infinite union have too much overlap, you learn nothing.

Eg:
The various arithmetic progressions:
{k.2^n  |  k in N} 
(for various n>0)
have density 2^{-n}.

The sum 2^{-n} is 1, obviously, but the union of all the sets is just the set of even numbers. 

So you don't even have "almost all" necessarily.
Title: Re: Maths thread.
Post by: Cuzz on January 19, 2017, 02:00:49 pm
Sudgy can you explain this?

In this case, none of the elements in the sets overlap.

Maybe list some very concrete examples of some of the sets you're talking about too
Title: Re: Maths thread.
Post by: Haddock on January 19, 2017, 02:07:11 pm
Sudgy can you explain this?

In this case, none of the elements in the sets overlap.

Maybe list some very concrete examples of some of the sets you're talking about too
I think he just means that in his infinite union of sets, the sets are all pairwise disjoint (have no numbers in common).

In which case the best answer I can give is the following.

If you have infinitely many DISJOINT sets of numbers Sn, each with density Cn, and the sum of the Cn is 1, then the union of all of the Sn is a set whose complement has density 0.

So if you can prove property P about each of the sets Sn, then every number should have property P except for some "bad" set of numbers with density 0.


Crucial fact:  A set having density 0 does not mean it's empty.  It doesn't even mean it's finite.
Title: Re: Maths thread.
Post by: Cuzz on January 19, 2017, 02:20:23 pm
Sudgy can you explain this?

In this case, none of the elements in the sets overlap.

Maybe list some very concrete examples of some of the sets you're talking about too
I think he just means that in his infinite union of sets, the sets are all pairwise disjoint (have no numbers in common).

I get that this is probably what he means, but I have a hard time making that fit with his definition of "fraction of the natural numbers" here:

A subset S of N contains a fraction a/b of N iff for all subsets T of N with length b containing consecutive integers, the size of T ∩ S is a.

I'm finding it a little hard to see how you have a collection of these with "fraction" adding up to 1 that are all pairwise disjoint. The only example I see seems to cover all of N trivially (write a = b*2^k with b odd and a lies in A_k):

A_0 = 1, 3, 5, 7, ...
A_1 = 2, 6, 10, 14,...
A_2 = 4, 12, 20, 28,...
A_3 = 8, 24, 40, 56,...
.
.
.
Title: Re: Maths thread.
Post by: sudgy on January 20, 2017, 02:14:25 am
I've seen that I can't really do what I was wanting, so for me the discussion isn't as relevant.  Anyway, I know that that definition for fractions of the naturals isn't good in all cases, it's just what I was intending for this specific example.

I'm finding it a little hard to see how you have a collection of these with "fraction" adding up to 1 that are all pairwise disjoint. The only example I see seems to cover all of N trivially (write a = b*2^k with b odd and a lies in A_k):

A_0 = 1, 3, 5, 7, ...
A_1 = 2, 6, 10, 14,...
A_2 = 4, 12, 20, 28,...
A_3 = 8, 24, 40, 56,...
.
.
.

What I was doing skipped some powers of two.  That opens it up to a lot of nontrivial examples.
Title: Re: Maths thread.
Post by: silverspawn on January 27, 2017, 12:31:30 pm
What is the best thing to read if I want to learn set theory? If there is free access to it online, that's a bonus.

I started here (http://www.math.toronto.edu/weiss/set_theory.pdf) ... I don't think I can judge yet whether that's a good script. a few chapters in I took a peek forward and saw that they define the natural numbers as

0                 =  ∅
1 = {0}        = {∅}
2 = {0, 1}     = {∅, {∅}}
3 = {0, 1, 2} = {∅, {∅}, {∅, {∅}}}
etc.

Is this how proper set theory works – constructing everything through empty sets and sets of empty sets?
Title: Re: Maths thread.
Post by: Haddock on January 27, 2017, 12:35:49 pm
What is the best thing to read if I want to learn set theory? If there is free access to it online, that's a bonus.

I started here (http://www.math.toronto.edu/weiss/set_theory.pdf) ... I don't think I can judge yet whether that's a good script. a few chapters in I took a peek forward and saw that they define the natural numbers as

0                 =  ∅
1 = {0}        = {∅}
2 = {0, 1}     = {∅, {∅}}
3 = {0, 1, 2} = {∅, {∅}, {∅, {∅}}}
etc.

Is this how proper set theory works – constructing everything through empty sets and sets of empty sets?
In answer to your final question, yes.  That's a very standard construction of the naturals. 
As a basic building block, you can't do better than the empty set.  The axioms of Set Theory want to minimise how many sets they just claim to exist out of the blue, so it's best to build everything up piecewise from the one set you know exists (axiom 1) - the empty set.

 I've not seen that text before, but if it's based on lecture notes from an undergraduate course it's probably fine.  The Oxford set theory course also makes its lecture notes publicly available (at least, I can access them without having to sign into anything) and I remember them being very good.

EDIT: Many people have recommended a book by Enderton on Set Theory.  I've not seen it myself, but have seen lots of senior lecturers recommend it to students.  So if you can get hold of a copy that might be a very good resource.
Title: Re: Maths thread.
Post by: Haddock on January 27, 2017, 12:41:13 pm
Just had a quick skim of the notes you're looking at.  Looks like he starts with a big description of the underlying formal language.  Which is nice and all, and certainly crucial for understanding the subtleties, but if you're looking for a crash course introduction you might want to find a course that jumps into the set theory a bit earlier. 
You can get away without the logical language for quite some time.
Title: Re: Maths thread.
Post by: Watno on January 27, 2017, 12:56:51 pm
That script is weird. The author says that the AC is true, and thinks that there is hope that there will be a solution to the question of wether CH is true or not. The most interesting things I learned in my set theory lectures is that these things are independant of the other axioms.
Title: Re: Maths thread.
Post by: silverspawn on January 27, 2017, 01:06:34 pm
In answer to your final question, yes.  That's a very standard construction of the naturals.

That's kind of awesome... and here I thought that the maths I learned at my university was fundamental. How foolish!

Just had a quick skim of the notes you're looking at.  Looks like he starts with a big description of the underlying formal language.  Which is nice and all, and certainly crucial for understanding the subtleties, but if you're looking for a crash course introduction you might want to find a course that jumps into the set theory a bit earlier. 
You can get away without the logical language for quite some time.

I was actually more thinking about acquiring a really fundamental understanding of sets rather than something quick, so if the approach is good in theory, I don't mind it.
Title: Re: Maths thread.
Post by: silverspawn on January 27, 2017, 01:07:35 pm
Although a part of me wants to protest that if everything consists of empty sets, there is ultimately nothing inside!
Title: Re: Maths thread.
Post by: Haddock on January 27, 2017, 01:21:46 pm
Although a part of me wants to protest that if everything consists of empty sets, there is ultimately nothing inside!
The set {{}} is not empty!  The bracket structure itself is what's inside.

This was one of the things I loved most about basic Set Theory.  It reduces all of mathematics to the question of looking at pretty patterns of brackets.

That script is weird. The author says that the AC is true, and thinks that there is hope that there will be a solution to the question of wether CH is true or not. The most interesting things I learned in my set theory lectures is that these things are independant of the other axioms.
That pretty much settles it - silver, don't use those notes!

(Though it's arguably legitimate to state that you believe in AC - or CH.  But really that's just the mathematician's equivalent of faith in <insert deity here>.)

Title: Re: Maths thread.
Post by: Watno on January 27, 2017, 01:25:57 pm
That script is weird. The author says that the AC is true, and thinks that there is hope that there will be a solution to the question of wether CH is true or not. The most interesting things I learned in my set theory lectures is that these things are independant of the other axioms.
That pretty much settles it - silver, don't use those notes!

(Though it's arguably legitimate to state that you believe in AC - or CH.  But really that's just the mathematician's equivalent of faith in <insert deity here>.)

Yeah, it is. However the main thing set theory is good for is to establish that it's both valid to think that CH (and to a lesser extent AC) is true or that it's false.
Title: Re: Maths thread.
Post by: silverspawn on January 27, 2017, 01:58:37 pm
The set {{}} is not empty!  The bracket structure itself is what's inside.
I know :P

That pretty much settles it - silver, don't use those notes!
Alright – do you have a link to the Oxford Script?
Title: Re: Maths thread.
Post by: Haddock on January 27, 2017, 04:23:57 pm
That script is weird. The author says that the AC is true, and thinks that there is hope that there will be a solution to the question of wether CH is true or not. The most interesting things I learned in my set theory lectures is that these things are independant of the other axioms.
That pretty much settles it - silver, don't use those notes!

(Though it's arguably legitimate to state that you believe in AC - or CH.  But really that's just the mathematician's equivalent of faith in <insert deity here>.)

Yeah, it is. However the main thing set theory is good for is to establish that it's both valid to think that CH (and to a lesser extent AC) is true or that it's false.
Ha! A fair perspective I guess, though I think it also has other values.  :Do

The set {{}} is not empty!  The bracket structure itself is what's inside.
I know :P

That pretty much settles it - silver, don't use those notes!
Alright – do you have a link to the Oxford Script?
I'll PM you.
Title: Re: Maths thread.
Post by: heron on January 27, 2017, 10:01:17 pm
I am taking a course on set theory this semester, here is what we are using: https://www.math.ku.edu/~roitman/SetTheory.pdf
Title: Re: Maths thread.
Post by: SirPeebles on January 28, 2017, 11:28:01 am
What is the best thing to read if I want to learn set theory? If there is free access to it online, that's a bonus.

I started here (http://www.math.toronto.edu/weiss/set_theory.pdf) ... I don't think I can judge yet whether that's a good script. a few chapters in I took a peek forward and saw that they define the natural numbers as

0                 =  ∅
1 = {0}        = {∅}
2 = {0, 1}     = {∅, {∅}}
3 = {0, 1, 2} = {∅, {∅}, {∅, {∅}}}
etc.

Is this how proper set theory works – constructing everything through empty sets and sets of empty sets?

Well, there are really two things going on here. First we write down the rules for what arithmetic ought to obey, which we call axioms, e.g. the Peano axioms.

Next, we go about constructing a model of these axioms, that is a set of objects and operations that satisfy the axioms. There are usually lots and lots of different models, and they might not all behave the same way. One model is this one involving nested sets and empty sets.

For another example, in real analysis you usually write down a few axioms for the real numbers, namely those of being a complete ordered field. One model is given by Dedekind cuts, another is given by equivalence classes of Cauchy sequences. Neither model can be said to be the "true" real numbers.

When people say that AC is independent of ZF, they mean that there is both a model of ZF which satisfies AC and a model of ZF where AC fails.
Title: Re: Maths thread.
Post by: sudgy on February 22, 2017, 09:21:15 pm
Is this a correct proof that the square root of all natural numbers that aren't perfect squares is irrational?

Consider a natural number n that is not a perfect square.

Case 1. The prime factorization of n contains one of each of its factors.

Assume sqrt(n) = a/b, with a, b ∈ N with no common factors.  Then n = a2/b2 and b2n=a2.  This means than n|a2.  Because n only contains one of each of its factors, and a contains each of its factors at least twice, n|a.  Let c = a/n.  c ∈ N because n|a.  Then a = cn and putting it in the earlier equation gives b2n = c2n2, or just b2=c2n.  This means that n|b^2, and by the same reasoning as earlier, n|b.  This is a contradiction, as a and b should have no common factors.

Case 2. The prime factorization of n contains more than one of some of its factors.

Keep pulling out squares from the prime factorization of n until there are no duplicates in its factors.  The result will be a number that contains one of each of its factors (which is irrational by Case 1) times an integer.  This is an irrational number times an integer, which itself is an irrational number.


Now, I can't see anything wrong with it.  However, I did some googling and I didn't really see anybody use something this simple.  Someone said all the proofs he's seen used the fundamental theorem of arithmetic.
Title: Re: Maths thread.
Post by: liopoil on February 22, 2017, 10:29:07 pm
The fundamental theorem of arithmetic simply states that every positive integer has a unique prime factorization, which you use in your proof. So it's really nothing special, and your proof seems normal to me.

Here's a slightly shorter way of putting it that might be a bit too succinct:

Suppose for contradiction that there is a natural n not a perfect square with sqrt(n) rational. Then there exist natural a,b such  that b2n = a2. A natural number is a perfect square if and only if the exponents in the prime factorization of the number are all even. Since b2 is a perfect square and n is not, there is an odd exponent in the prime factorization of n and therefore there is an odd exponent in the prime factorization of b2n, since an odd exponent is added to an even one. But then b2n is not a perfect square, while a2 is, a contradiction.

EDIT: I am reminded of an overkill proof that 21/n is irrational for all natural n > 1. For the case n = 2 use the proof above. For n > 2, suppose that 21/n = b/a is rational. Then 2 = bn/an, and so 2an = bn. Well, in this case, an + an = bn would be a contradiction of fermat's last theorem, so 21/n cannot be rational.
Title: Re: Maths thread.
Post by: Titandrake on February 22, 2017, 11:43:52 pm
Your proof looks correct.

Some searching turned up http://math.stackexchange.com/questions/189130/prove-that-if-n-is-not-the-square-of-a-natural-number-then-sqrtn-is-irra which looks similarly simple and works along the same lines as yours (but it does the contradiction earlier.)

I also found the thread with the comment you specified, where they talk about unique factorization domains, rings, etc. The problem is that thread is made of people who are used to thinking at a more abstract level, so the proofs they give are simple to them, or have potential to generalize better to more abstract algebras.

Note: sudgy's proof doesn't require unique prime factorization. If numbers had more than 1 prime factorization, you could pick one of those factorizations arbitrarily and the proof would still work.

Edit: I heard the overkill proof technically doesn't work because requiring Fermat's Last Theorem makes it circular, but I don't want to bother checking whether that's true.
Title: Re: Maths thread.
Post by: theorel on February 24, 2017, 04:14:52 pm
I don't think sudgy's proof works without the fundamental theorem of arithmetic.

In particular, I'm not sure that
Quote
Because n only contains one of each of its factors, and a2 contains each of its factors at least twice, n|a
holds without fundamental theorem of arithmetic. 

I think with non-unique factorizations, you can't require n to have one of each factor and a2 to have 2 of each factor and every factor of n to be one of those duplicated factors.  You can only require any 2 of them.
Title: Re: Maths thread.
Post by: Cuzz on February 24, 2017, 05:57:55 pm
I've just been reading a bunch of Doron Zeilberger's opinions and other writings on ultrafinitism and I legitimately can't tell whether I just find them hilariously snarky or if they're actually starting to sway me. 
Title: Re: Maths thread.
Post by: Witherweaver on February 24, 2017, 06:05:49 pm
I've just been reading a bunch of Doron Zeilberger's opinions and other writings on ultrafinitism and I legitimately can't tell whether I just find them hilariously snarky or if they're actually starting to sway me.

Wait, how do you know Doron Zeilberger?  He's at Rutgers; I did my PhD there.
Title: Re: Maths thread.
Post by: Cuzz on February 24, 2017, 06:15:54 pm
I've just been reading a bunch of Doron Zeilberger's opinions and other writings on ultrafinitism and I legitimately can't tell whether I just find them hilariously snarky or if they're actually starting to sway me.

Wait, how do you know Doron Zeilberger?  He's at Rutgers; I did my PhD there.

Just from legend more or less. There aren't that many ultrafinitists out there.
Title: Re: Maths thread.
Post by: Witherweaver on February 24, 2017, 06:20:28 pm
I've just been reading a bunch of Doron Zeilberger's opinions and other writings on ultrafinitism and I legitimately can't tell whether I just find them hilariously snarky or if they're actually starting to sway me.

Wait, how do you know Doron Zeilberger?  He's at Rutgers; I did my PhD there.

Just from legend more or less. There aren't that many ultrafinitists out there.

Ah.  He is a quirky guy.  I never did combinatorics so I didn't interact with him much.. I believe I TA'd for him once.
Title: Re: Maths thread.
Post by: heron on February 24, 2017, 09:53:00 pm
I heard about him from one of the mentors at Canada/USA Mathcamp. I think he is fairly widely known (among certain circles).
Title: Re: Maths thread.
Post by: Titandrake on February 24, 2017, 11:00:16 pm
I heard about him from one of the mentors at Canada/USA Mathcamp. I think he is fairly widely known (among certain circles).

Oh, you went to Mathcamp? Cool! Mathcamp is actually what got me into Dominion. This was before Isotropic got big, so lots of us did things like open Village/Mining Village.
Title: Re: Maths thread.
Post by: SirPeebles on February 25, 2017, 11:52:08 am
I've just been reading a bunch of Doron Zeilberger's opinions and other writings on ultrafinitism and I legitimately can't tell whether I just find them hilariously snarky or if they're actually starting to sway me.

I was going to read his opinions, but man, his list goes on forever.
Title: Re: Maths thread.
Post by: sudgy on March 04, 2017, 05:24:15 pm
I've never taken statistics before, but I feel like the answer to this should be pretty simple.  Say I've done an experiment to determine if a certain value is constant, and I have a bunch of data.  How do I determine the p value for the assumption that it is constant?  Googling just gives me a bunch of other scenarios.
Title: Re: Maths thread.
Post by: Ratsia on March 05, 2017, 02:15:51 pm
I've never taken statistics before, but I feel like the answer to this should be pretty simple.  Say I've done an experiment to determine if a certain value is constant, and I have a bunch of data.  How do I determine the p value for the assumption that it is constant?  Googling just gives me a bunch of other scenarios.
You're probably not giving enough information here. If everything you have is a set of exchangeable measurements of the value, there's no way of separating measurement noise from changes in the actual value. You need some information about the data points along the aspects you suspect the value might vary (temporal, spatial, or whatever). Whether the answer is simple or not then depends on what kind of dynamics you are looking at as possible alternatives.
Title: Re: Maths thread.
Post by: sudgy on March 05, 2017, 03:42:53 pm
I've never taken statistics before, but I feel like the answer to this should be pretty simple.  Say I've done an experiment to determine if a certain value is constant, and I have a bunch of data.  How do I determine the p value for the assumption that it is constant?  Googling just gives me a bunch of other scenarios.
You're probably not giving enough information here. If everything you have is a set of exchangeable measurements of the value, there's no way of separating measurement noise from changes in the actual value. You need some information about the data points along the aspects you suspect the value might vary (temporal, spatial, or whatever). Whether the answer is simple or not then depends on what kind of dynamics you are looking at as possible alternatives.

It's measuring the equilibrium constant of a chemical reaction with varying initial concentrations of reactants.  I don't know anything about how the concentration would affect it (I know it actually is constant, but this experiment is supposed to be a test of that).  This isn't necessary to do (it's just for a college class), but I thought I could maybe try to be a bit more rigorous in my defense of the hypothesis.
Title: Re: Maths thread.
Post by: sudgy on March 05, 2017, 05:21:02 pm
Okay, maybe a p value isn't what I'm looking for, that's just what people usually look for.  My main question is how can I mathematically justify the assumption that my data represents a constant value?
Title: Re: Maths thread.
Post by: scott_pilgrim on March 05, 2017, 05:32:21 pm
Okay, maybe a p value isn't what I'm looking for, that's just what people usually look for.  My main question is how can I mathematically justify the assumption that my data represents a constant value?

If you're pretty sure that the data should be linear, you can find the least squares regression line (you can probably just google that and find an online tool that will do it for you), and then see how close the slope is to 0 and whether the r^2 value is "good".
Title: Re: Maths thread.
Post by: Ratsia on March 06, 2017, 01:46:21 am
It's measuring the equilibrium constant of a chemical reaction with varying initial concentrations of reactants.  I don't know anything about how the concentration would affect it (I know it actually is constant, but this experiment is supposed to be a test of that).  This isn't necessary to do (it's just for a college class), but I thought I could maybe try to be a bit more rigorous in my defense of the hypothesis.
I'd say scott_pilgrim's suggestion is good enough for you. You do have nice pairs of values, the initial concentrations and the actual value, so the question boils down to showing that there is no relationship between the two. By making an assumption that there could be a linear relationship and then showing that the relationship that best fits the data is one with (pretty much) zero slope is what most people would do. Just remember to combine that with a clear plot that shows there are no obvious higher-order relationships -- I guess that kind of a plot is what they are actually looking for as the solution.
Title: Re: Maths thread.
Post by: sudgy on March 06, 2017, 11:41:14 am
It's measuring the equilibrium constant of a chemical reaction with varying initial concentrations of reactants.  I don't know anything about how the concentration would affect it (I know it actually is constant, but this experiment is supposed to be a test of that).  This isn't necessary to do (it's just for a college class), but I thought I could maybe try to be a bit more rigorous in my defense of the hypothesis.
I'd say scott_pilgrim's suggestion is good enough for you. You do have nice pairs of values, the initial concentrations and the actual value, so the question boils down to showing that there is no relationship between the two. By making an assumption that there could be a linear relationship and then showing that the relationship that best fits the data is one with (pretty much) zero slope is what most people would do. Just remember to combine that with a clear plot that shows there are no obvious higher-order relationships -- I guess that kind of a plot is what they are actually looking for as the solution.

I don't think they're actually looking for anything too fancy (the only math required for this course is algebra).  I was just trying to get extra brownie points or something.
Title: Re: Maths thread.
Post by: silverspawn on March 11, 2017, 06:17:38 am
So I finished the set theory lecture a while ago (and read a bit on wikipedia). I got a few questions left, if anyone wants to help. (I got the sense that there are actually a few different models which work slightly differently, so this is about ZFC).

First (this was not really explored in the lecture, I just tried to gather it from thinking & the internet), do I understand it correctly that

ℕ =: ω = {0, 1, 2, ...}

aka the natural numbers and the smallest infinite ordinal. Then the next "bigger" ordinals are

ω+ = ω ∪ {ω} = {0, 1, 2, ..., ω}
ω++ = {0, 1, 2, ..., ω, ω+}
...

and there exists

α := ω ∪ {ω, ω+, ω++, ...} = {0, 1, 2, ..., ω, ω+, ω++, ...}

and then

α+ = α ∪ {α} = {0, 1, 2, ..., ω, ω+, ω++, ... α}
α++ = {0, 1, 2, ..., ω, ω+, ω++, ... α, α+}
...

and there exists

β := {0, 1, 2, ..., ω, ω+, ω++, ... α, α+, α++, ...}

and

γ := {0, 1, 2, ..., ω, ω+, ω++, ... α, α+, α++, ..., β, β+, β++, ...}

and then you can play that game forever and can keep getting ordinals that way, and the ordinal which is the union of all such ordinals is ω1, which is kind of like ℕ x ℕ and therefore still countable in the same way (but the first non-recursive ordinal), so it's still ω1 ~ ℕ and then there exist ω1+, ω1++, ω1+++, ω1 ∪ {ω1, ω1+, ω1++, ...} := Ψ and Ψ+, Ψ++, ω1 ∪ {Ψ, Ψ+, Ψ++}, and this can be done arbitrarily often again, until we get something which is kind of like ℕ x ℕ x ℕ which is still countable, let's call it Φ and then building from Φ you could construct something like ℕ x ℕ x ℕ x ℕ which would still be countable, and if you do that arbitrarily often, then you have the union of all such ordinals, which is also the union of all countable ordinals and is kind of like ℕ x ℕ x ℕ x ℕ ... and called ω0 and the first uncountable ordinal. Is that all correct?

(It's pretty weird. I like it. If it actually works that way.)

Second, if this is all grounded in this set language and can all be done formally, why aren't all mathematical theorems just provable or disprovable through some software which handles First-order logic?

Third, is this in any way applicable beyond providing a generally better understanding of maths? (Not saying this wouldn't be enough reason to study it.)

And fourth, I'm a bit confused about the whole principle of axioms. If the idea is that they give you ways to construct new sets, and your universe always contains exactly all sets which can be constructed this way, doesn't the axiom of foundation (which was the only one introduced which said something doesn't exist) just assert something that must be true anyway (since otherwise it is inconsistent with the other axioms), but for which no-one found a proof (and presumably there is none?) If so, that seems more like a theory that everyone beliefs in rather than an axiom to me, because it's asserting something rather than defining it, and because introducing it doesn't change the universe.

And 4.5, isn't the power set axiom implied by the replacement scheme? It seemed as if otherwise the axioms were meant to have as little redundancy as possible, so that seems odd.
Title: Re: Maths thread.
Post by: liopoil on March 11, 2017, 09:10:51 am
As far as I can tell the replacement scheme does not imply the power set axiom at all. Where did you get that idea?

Without any axioms, we don't know anything about how sets work at all. It would be impossible to do anything with them because  we wouldn't know anything for sure. There are some basic properties about sets which we want to be true because they fit with our intuitive notion for what a set should be and they let us prove lots of other things about sets. These are our axioms. It's not that they haven't been proved; they can't be proved because without them we simply don't know anything. Don't think of them as a belief system or assumptions, rather, they are definitions. The rationale is "let's build math up from sets. Wait, what's a set? Well, let's define it to be a thing which has all these properties..." Many of the axioms relate to which sets exist given that other sets exist, which is certainly important for constructing all the mathematical objects we use every day, but they are really just properties about the sets themselves. For example, the axiom of union says that any set A has the property that we can take a union over it, that is, there exists another set B that contains exactly the elements which are elements of the elements of A.
Title: Re: Maths thread.
Post by: silverspawn on March 11, 2017, 09:41:11 am
I don't think you understood the question. I do look at axioms as definitions. The question was, since most axioms expand your universe by giving you tools to construct more sets, why is something that doesn't give you any new sets (the axiom of foundation), but rather asserts that you can't build sets with property X – sets which you cannot construct anyway (otherwise it would contradict your other axioms) – considered an axiom rather than a theorem.
Title: Re: Maths thread.
Post by: scott_pilgrim on March 11, 2017, 10:20:48 am
Second, if this is all grounded in this set language and can all be done formally, why aren't all mathematical theorems just provable or disprovable through some software which handles First-order logic?

I thought (someone can correct me if I'm wrong) that while it's possible for a machine to verify an arbitrary proof in first-order logic, it's not possible for a machine to come up with a proof of an arbitrary statement in first-order logic.
Title: Re: Maths thread.
Post by: Watno on March 11, 2017, 11:14:02 am
I don't think you understood the question. I do look at axioms as definitions. The question was, since most axioms expand your universe by giving you tools to construct more sets, why is something that doesn't give you any new sets (the axiom of foundation), but rather asserts that you can't build sets with property X – sets which you cannot construct anyway (otherwise it would contradict your other axioms) – considered an axiom rather than a theorem.

What contradiction are you talking about? If ZFC is consistent, so is ZFC without foundation.

Regarding automated proofing: ZFC is inconsistent or incomplete (https://en.wikipedia.org/wiki/G%C3%B6del%27s_incompleteness_theorems), that is there are either theorems that can't be decided, or there's a contradiction in ZFC. All decidable theorems can be proven true or false through some software that handles first-order logic though (but not in finite time), which seems to be kinda tautological to me.

Regarding wether this is is applicable to anything, I don't think so.

There are models of ZF(C) without the power set axiom, which are actually some of the more populary axiom systems known as ZF(C)^{-}.
Title: Re: Maths thread.
Post by: Watno on March 11, 2017, 11:15:41 am
Second, if this is all grounded in this set language and can all be done formally, why aren't all mathematical theorems just provable or disprovable through some software which handles First-order logic?

I thought (someone can correct me if I'm wrong) that while it's possible for a machine to verify an arbitrary proof in first-order logic, it's not possible for a machine to come up with a proof of an arbitrary statement in first-order logic.

Unless I'm mistaken, this is false. If a given statement is decidable, there's a finite proof that it is true or false. Checking all possible proofs will get you to the right one at some point (provided you check them in ascending length).
Title: Re: Maths thread.
Post by: silverspawn on March 11, 2017, 12:12:33 pm
I don't think you understood the question. I do look at axioms as definitions. The question was, since most axioms expand your universe by giving you tools to construct more sets, why is something that doesn't give you any new sets (the axiom of foundation), but rather asserts that you can't build sets with property X – sets which you cannot construct anyway (otherwise it would contradict your other axioms) – considered an axiom rather than a theorem.

What contradiction are you talking about? If ZFC is consistent, so is ZFC without foundation.

Here is what I mean:

assume every axiom except foundation. Now one of those two things must be true

1| based on these axioms, there is a set which violates the axiom of foundation
2| based on these axioms, there is no set which violates the axiom of foundation

If 1| holds, then the axiom of foundation contradicts the other axioms. So I assume 1| doesn't hold. So 2| holds. So there is no set which violates the axiom of foundation – even if you don't assume it. Which begs the question of, why introduce it as an axiom, if it is true anyway? If it is just something that is assumed to be true but cannot be proven, then it doesn't seem to be a definition (hence no axiom) but rather a theorem.
Title: Re: Maths thread.
Post by: Watno on March 11, 2017, 02:30:47 pm
assume every axiom except foundation. Now one of those two things must be true

1| based on these axioms, there is a set which violates the axiom of foundation
2| based on these axioms, there is no set which violates the axiom of foundation
This is false. Just because you can't prove a set exists, that doesn't mean it doesn't.
Title: Re: Maths thread.
Post by: silverspawn on March 11, 2017, 03:06:41 pm
I'm not saying you can prove it. I'm just saying either it exists or it doesn't exist.
Title: Re: Maths thread.
Post by: Watno on March 11, 2017, 03:56:41 pm
In each individual model, yes it does. However, there are models where it does, and models where it doesn't.

Consider for example the theory consisting only of the axiom "Empty sets exists". The model consisting only of a single set is a model of that, but so is any model of ZFC.
Title: Re: Maths thread.
Post by: silverspawn on March 11, 2017, 04:53:42 pm
Okay, but there is no model in which such a set exists, is there? It doesn't exist even with all axioms present, so how could it exist with fewer axioms.
Title: Re: Maths thread.
Post by: liopoil on March 11, 2017, 05:16:32 pm
Seems to me that you are assuming that sets can only exist if they can be explicitly constructed from the axioms. That's not true at all.
Title: Re: Maths thread.
Post by: silverspawn on March 12, 2017, 01:52:25 am
Oh yes, I was assuming that. Isn't that the point of the axiom system, to regulate exactly which sets exist?
Title: Re: Maths thread.
Post by: Watno on March 12, 2017, 07:34:12 am
It is not possible to regulate exaxctly what sets exists. Any sufficiently useful axiom system will have some statements it can't decide.
Title: Re: Maths thread.
Post by: silverspawn on March 12, 2017, 08:43:41 am
I mean, sure you have statements you can't decide. That just means that there are sets that you can't prove exist. You could define "a set exists iff it can be constructed by our axioms" which is how the lecture I read makes it sound like, and have sets where you aren't sure.
Title: Re: Maths thread.
Post by: liopoil on March 12, 2017, 05:08:45 pm
No, the point is so that you know some sets that DO exist. There will always be sets that might or might not exist, e.g. continuum hypothesis.

EDIT: It also might be undecidable whether a set can be constructed from our axioms or not, so you will still have sets that might or might not exist
Title: Re: Maths thread.
Post by: silverspawn on March 15, 2017, 08:40:18 am
Okay, so the claim of the axioms is not "these are the sets that exist," but "these are some sets that exist" and then the axiom of foundation says "these are some sets that don't exist," and every set that can't be constructed from the axiom and doesn't contradict the axiom of foundation is up for debate?
Title: Re: Maths thread.
Post by: Haddock on March 16, 2017, 02:16:13 pm
I've just seen this pop up and will definitely have stuff to contribute.  Can't right now though. :)
Title: Re: Maths thread.
Post by: Watno on March 16, 2017, 02:27:10 pm
I would say statements about the existence of sets are not different from any other statements with regard to their relation to axioms (except that nearly every statement is a statement about the existence of sets in a way).

Note that there is no statement like "this sets exists" in the language of set theory, only "a set with this property exists". (For example "the empty set exists" is not a set-theoretic statement. "There is a set x such that no set y is an element x" is.)
Title: Re: Maths thread.
Post by: Haddock on March 16, 2017, 06:13:51 pm
So I finished the set theory lecture a while ago (and read a bit on wikipedia). I got a few questions left, if anyone wants to help. (I got the sense that there are actually a few different models which work slightly differently, so this is about ZFC).

First (this was not really explored in the lecture, I just tried to gather it from thinking & the internet), do I understand it correctly that

ℕ =: ω = {0, 1, 2, ...}

aka the natural numbers and the smallest infinite ordinal. Then the next "bigger" ordinals are

ω+ = ω ∪ {ω} = {0, 1, 2, ..., ω}
ω++ = {0, 1, 2, ..., ω, ω+}
...

and there exists

α := ω ∪ {ω, ω+, ω++, ...} = {0, 1, 2, ..., ω, ω+, ω++, ...}

and then

α+ = α ∪ {α} = {0, 1, 2, ..., ω, ω+, ω++, ... α}
α++ = {0, 1, 2, ..., ω, ω+, ω++, ... α, α+}
...

and there exists

β := {0, 1, 2, ..., ω, ω+, ω++, ... α, α+, α++, ...}

and

γ := {0, 1, 2, ..., ω, ω+, ω++, ... α, α+, α++, ..., β, β+, β++, ...}

and then you can play that game forever and can keep getting ordinals that way, and the ordinal which is the union of all such ordinals is ω1, which is kind of like ℕ x ℕ and therefore still countable in the same way (but the first non-recursive ordinal), so it's still ω1 ~ ℕ and then there exist ω1+, ω1++, ω1+++, ω1 ∪ {ω1, ω1+, ω1++, ...} := Ψ and Ψ+, Ψ++, ω1 ∪ {Ψ, Ψ+, Ψ++}, and this can be done arbitrarily often again, until we get something which is kind of like ℕ x ℕ x ℕ which is still countable, let's call it Φ and then building from Φ you could construct something like ℕ x ℕ x ℕ x ℕ which would still be countable, and if you do that arbitrarily often, then you have the union of all such ordinals, which is also the union of all countable ordinals and is kind of like ℕ x ℕ x ℕ x ℕ ... and called ω0 and the first uncountable ordinal. Is that all correct?

(It's pretty weird. I like it. If it actually works that way.)
This is a pretty good summary, yes.  You have to be a bit careful with the first uncountable ordinal, in that pretty much any union you can physically write down is going to be smaller than that ("union of all countables" works fine of course).  Other than that, yes, you have the idea.

More general picture:


It is important to remember that set theory is not trying to be a 100% precise description of the mathematical world.  Maybe that is what the original set theorists wanted, but the reality is that that's not feasible.  Instead, set theory is trying to write down a decent approximation of what we believe the mathematical world to be.  This, silver, is where your mild confusion arises, I believe.

As logicians, we write down some number of axioms that we believe should hold in mathematics (Foundation is a great example - we take it as an axiom because, as mathematicians, we do not want to deal with sets that might be infinitely nested or horribly ugly in other ways.  It is a statement of our belief that mathematics should be well-founded on a nice clean basis without infinite recursions.  But you don't have to take Foundation - indeed, I believe - though don't fully understand - that computer scientists often like to use set theory without Foundation, because it suits their theoretical basis somehow.).    But we do not expect - indeed we know that it is impossible - to write down a set of axioms that covers absolutely every facet of possibility.   

At this point you need some grounding in Logic/Model Theory,  The idea is: we have written down some axioms.  But since our axioms are not complete (and indeed they cannot be), there are bound to be lots of different structures that satisfy those axioms.  In other words, there are lots of "models of ZFC"  (or at least we believe that there should be).  Here, "model of ZFC" means "collection of things/sets that satisfies all the axioms".  There might well be lots of different models of ZFC, and we want to believe that the "true" mathematical world is one of those models - but we don't know which one. 

So, to your questions, if you ask "does a set with *some weird property* exist?", if it's not proven or disproven by the axioms, the answer will be:
"Some models of ZFC contains such a set, and some do not."  We haven't decided yet, as mathematicians, which of the various models of ZFC is the "right" one - if we ever do, that would be tantamount to adding an additional axiom.  (For instance we might take GCH as an axiom - though this is unlikely to happen any time soon.).

This goes into the scope of some slightly deeper theory (can send you some notes on that if you like, silver).  Foundation is once again a good example.  It is proven that the axiom of Foundation is independent of the other axioms (excluding Choice).  How do we prove this? "Easy". We write down two structures.  One of them satisfies all of the axioms including Foundation (still ignoring Choice), and one satisfies all of the axioms except it DOESN'T satisfy Foundation. 
So, if we decided we weren't sure about the Axiom of Foundation any more, then we would have at least two possible models of Set Theory - and we'd have to accept both as equally valid (though one contains some infinitely nested sets, and the other doesn't).

No idea whether this makes things clearer.  Anyhoo, general abstract chat over, wanted to reply to some quotes:
Second, if this is all grounded in this set language and can all be done formally, why aren't all mathematical theorems just provable or disprovable through some software which handles First-order logic?
Even if computers were any good at producing proofs (they're not) - there's the issue that not every mathematical idea can be expressed in first-order - even when you use all the power of set theory.

Third, is this in any way applicable beyond providing a generally better understanding of maths? (Not saying this wouldn't be enough reason to study it.)Depending on how you view it, it's more an exercise in its own right - though the understanding of infinite cardinals is VERY useful mathematically.

And fourth, I'm a bit confused about the whole principle of axioms. If the idea is that they give you ways to construct new sets, and your universe always contains exactly all sets which can be constructed this way, doesn't the axiom of foundation (which was the only one introduced which said something doesn't exist) just assert something that must be true anyway (since otherwise it is inconsistent with the other axioms), but for which no-one found a proof (and presumably there is none?) If so, that seems more like a theory that everyone beliefs in rather than an axiom to me, because it's asserting something rather than defining it, and because introducing it doesn't change the universe.
I've alluded to this above.  The bit in italics is probably your biggest stumbling block.  The important thing is that the axioms lay out some rules for what sets SHOULD look like (we should have all of these sets, but not these ones, etc), but it doesn't lay out every POSSIBLE rule.  The axioms leave room for some uncertainty about which things are sets and which aren't.
And 4.5, isn't the power set axiom implied by the replacement scheme? It seemed as if otherwise the axioms were meant to have as little redundancy as possible, so that seems odd.
I don't think this is true.
Responses in bold.

There are models of ZF(C) without the power set axiom, which are actually some of the more populary axiom systems known as ZF(C)^{-}.
Unless you're using quite an unusual terminology, ZF^- is typically ZF without Foundation - removing Powerset is not a familiar idea to me.

In each individual model, yes it does. However, there are models where it does, and models where it doesn't.

Consider for example the theory consisting only of the axiom "Empty sets exists". The model consisting only of a single set is a model of that, but so is any model of ZFC.
This is a good way to put it.

Oh yes, I was assuming that. Isn't that the point of the axiom system, to regulate exactly which sets exist?
It gives you some of the rules, but it CANNOT regulate it entirely.  There will always be some things which may or may not exist as sets - at that point it is up to your philosophy to decide which

Okay, so the claim of the axioms is not "these are the sets that exist," but "these are some sets that exist" and then the axiom of foundation says "these are some sets that don't exist," and every set that can't be constructed from the axiom and doesn't contradict the axiom of foundation is up for debate?
This seems like a good description.

Note that there is no statement like "this sets exists" in the language of set theory, only "a set with this property exists". (For example "the empty set exists" is not a set-theoretic statement. "There is a set x such that no set y is an element x" is.)
Hmm.  In  the presence of the Extensionality Axiom, this distinction is pretty much negligible.  The Empty Set is unique by extensionality, as are many of the other sets given by axioms like Union/Pairs/Comprehension.




Title: Re: Maths thread.
Post by: silverspawn on March 17, 2017, 02:34:09 pm
Thanks! That was very helpful.
Title: Re: Maths thread.
Post by: SirPeebles on March 19, 2017, 10:30:07 am
An example that I've found useful for understanding the distinctions around axioms and models is to think about group theory. The definition of a group is essentially a list of axioms. A model of the group axioms is any collection of things which satisfy the group axioms -- in other words, a group! There are lots of statements which are undecidable from the group axioms. For instance, the statement "there is a nonidentity element which is its own inverse" is an undecidable statement, since there are some models where it is true (Z mod 2) and some where it is false (Z mod 3).

Similarly for rings. The definition of a ring lays out the axioms, and each ring is a model of those axioms. The statements "multiplication is commutative" and "each nonzero element has a multiplicative inverse" are independent of the ring axioms. If we choose to make these new axioms, then the models we are left with are called fields.

In a real analysis class, you probably laid out the axioms for the real numbers, namely that they form a complete ordered field. Any two such fields are isomorphic, but there are still different models. Two of the most common are Dedekind Cuts and equivalence classes of Cauchy sequences.

And of course no discussion of axioms is complete without mentioning Euclid's postulates. For a long time people wonder if his fifth postulate, known as the parallel postulate, could be deduced from the first four. This was finally settled a few centuries ago by producing alternative models of the first four axioms: flat, spherical, and hyperbolic geometry. The parallel postulate holds in flat but fails in the others, demonstrating that it is independent of the other axioms.
Title: Re: Maths thread.
Post by: silverspawn on May 01, 2017, 05:24:59 am
I need help calculating the length of an arc (or rather showing that it has no finite length). I don't think this is supposed to be hard, but I can't figure it out

the function is α: [0,1] -> ℝ^2, α(t) = (t, t*cos(pi/t)) for t > 0 and (0,0) for t = 0

I researched and found out how to bring it back to the integral

(http://fs5.directupload.net/images/170501/9oxhvqob.png)

But I can't figure out how to show that isn't finite, either.
Title: Re: Maths thread.
Post by: pacovf on May 01, 2017, 08:46:50 am
Off the top of my head, I would try to calculate (or put a lower bound) on the length of the arc in between two points where the cosinus is 1 (or zero, whichever is more convenient), and go from there. Does that work?
Title: Re: Maths thread.
Post by: Titandrake on May 02, 2017, 03:48:50 am
Off the top of my head, I would try to calculate (or put a lower bound) on the length of the arc in between two points where the cosinus is 1 (or zero, whichever is more convenient), and go from there. Does that work?

Solution follows.


cos(pi/t) = 1 when t = 1/2, 1/4, 1/6, ...
cos(pi/t) = -1 when t = 1, 1/3, 1/5, ...

Draw straight lines between t=1, t=1/2, t=1/3, and so on. The sum of those line lengths is a lower bound for the length of the curve. The line between t=1/k and t=1/(k+1) is at least 1/k + 1/(k+1) long, so the length of the curve is lower bounded by the harmonic series, which diverges.
Title: Re: Maths thread.
Post by: silverspawn on May 02, 2017, 05:01:09 am
I get the solution except for the line between t=1/k and t=1/(k+1) being at least 1/k + 1/(k+1) long. Isn't it just/also at least 2 long, since it's sqrt(2² + [1/k - 1/(k+1)] > sqrt(2²) = 2?
Title: Re: Maths thread.
Post by: Polk5440 on May 02, 2017, 01:06:24 pm
I get the solution except for the line between t=1/k and t=1/(k+1) being at least 1/k + 1/(k+1) long. Isn't it just/also at least 2 long, since it's sqrt(2² + [1/k - 1/(k+1)] > sqrt(2²) = 2?

No, because the function is t*cos(pi/t), not just cos(pi/t).

More detail: Consider just t=1 and t=1/2. (1,-1) and (1/2,1/2) are two points on the graph. Draw a right triangle between the two points. Clearly the length of the hypotenuse is a lower bound for the  arc length between those two points. The length of a leg of the triangle is also a lower bound. The height of the triangle is 1/2+1. Now consider t=1/2 and t=1/3 giving (1/2,1/2) and (1/3,-1/3). Draw the triangle between the two points. The height of the triangle is 1/2+1/3. Etc. The sum of the heights of all such triangles is a lower bound on the arc length. That sum is at least as large as the harmonic series which diverges.

Edited wording.
Title: Re: Maths thread.
Post by: silverspawn on May 02, 2017, 02:38:19 pm
I get the solution except for the line between t=1/k and t=1/(k+1) being at least 1/k + 1/(k+1) long. Isn't it just/also at least 2 long, since it's sqrt(2² + [1/k - 1/(k+1)] > sqrt(2²) = 2?

No, because the function is t*cos(pi/t), not just cos(pi/t).

-.- right. Okay, thanks.
Title: Re: Maths thread.
Post by: silverspawn on May 05, 2017, 02:12:09 pm
I have a second problem (the same stupid lecture). I need to prove something, but it really appears to be false. That probably means I messed up, but idk how, so...

Let (E^2, d) be an Euclidean space and [P, Q] and [P', Q'] two line segments of equal length. I am supposed to prove that there are exactly two possible isometries T :: E^2 -> E^2 which map P onto P' and Q onto Q'; T(P) = P' and T(Q) = Q'. Also an isometry is defined as a function which preserves distance, so d(P, Q) = d(T[p], T[Q]).

Except this isn't true. I think.

Let f be a function which just shifts all points by (P' - P), so that P lands exactly on P' and all other points land wherever.

Let g be a rotation with fixed point P' that rotates exactly far enough so that f(g(Q)) = Q'.

Let h be a reflection around the axis that goes through P' and through the middle point of f(Q) and Q', so that h(f(Q)) = Q'

Then g ∘ f and h ∘ f both map P onto P' and Q onto Q' (f already maps P onto P' and g and h both don't change the point P').

Similarly, by moving Q to Q' first and then doing the same maneuvers to the point where P lands to P' without changing Q', I get two more functions.

All of them preserve distance, and they don't seem to be identical. You can get 4 more by first swapping/mirroring and then shifting I believe (and there are probably infinity other ways), but well just having 4 proves that there aren't just 2. Am I wrong or is the hypothesis wrong?
Title: Re: Maths thread.
Post by: silverspawn on May 05, 2017, 02:18:34 pm
Oh, I also made a graphic! This shows P and Q and P' and Q' and f and g and h.

(http://fs5.directupload.net/images/170505/jebkaq8d.png)
Title: Re: Maths thread.
Post by: Watno on May 05, 2017, 03:58:25 pm
Similarly, by moving Q to Q' first and then doing the same maneuvers to the point where P lands to P' without changing Q', I get two more functions.
Have you checked wether these two are actually different from the 2 before?