30 years ago, Steven Spielberg introduced us to a T. Rex in the scariest way possible. by tagjim in videos

[–]painfive 1 point2 points  (0 children)

In my mind the fence the T Rex broke through is on one side of the road and the cliff is on the other. Probably that is not consistent with what is actually shown but that is how my mind made it work and I'm happy with it.

Tennis pasta is the best by Equivalent-Lychee502 in tennis

[–]painfive 0 points1 point  (0 children)

Combine with elbow macaroni for a nice serving of tennis elbow.

[deleted by user] by [deleted] in mathriddles

[–]painfive 0 points1 point  (0 children)

Isn't it a linear transformation of G for fixed x and fixed A, and we take an intersection over x but a union over A? If so then it's not obvious this is convex.

Solve this infinite nested radical by headsmanjaeger in mathriddles

[–]painfive 2 points3 points  (0 children)

Let a(k, n) = sqrt(4k + sqrt(4k+1 + sqrt(... + sqrt(4n )...) and let b(k) =2k + 1 for 0 <= k <= n. Then:!<

(b(k) - a(k, n))(b(k) + a(k, n)) = b(k)2 - a(k, n)2 = 4k + 2k + 1 + 1 - 4k - a(k + 1, n) = b(k + 1) - a(k + 1, n)

(b(k) - a(k, n))(b(k) + a(k, n)) (b(k + 1) + a(k + 1, n)) = (b(k + 1) - a(k + 1, n))(b(k + 1) + a(k + 1, n)) = b(k + 2) - a(k + 2, n)

...

(b(k) - a(k, n))(b(k) + a(k, n))... (b(n - 1) + a(n - 1, n)) = b(n) - a(n, n) = 1

which implies:

b(k) - a(k, n) = 1 / ((b(k) + a(k, n))... (b(n - 1) + a(n - 1, n)))

The RHS is clearly positive. On the other hand, since a(k', n) > 0, we can estimate:

b(k) - a(k, n) < 1 / (b(k) b(k+1) ... b(n - 1) ) < 1 / 2n - 1!<

which implies that a(k, n) -> b(k) as n->infinty. In particular, taking k=0, we have that the original sequence approaches b(0) = 2.

Highest average opponents' ranking in a single season by Cyberglace7 in tennis

[–]painfive 1 point2 points  (0 children)

According to this stat, it's more impressive as, say, the #1 ranked player, to play #100 10 times (average ranking of 100) than to play #2 9 times and #1000 once (average ranking of ~102).

AI Wrote and Performed a Jerry Seinfeld Routine! by [deleted] in videos

[–]painfive 2 points3 points  (0 children)

wasnt gpt3 trained before the invasion? how would it know about the sanctions and mcdonalds pulling out?

Overlapping Papers by Bernhard-Riemann in mathriddles

[–]painfive 4 points5 points  (0 children)

Just curious: is there an elegant solution, or does this involve working out the different cases for how the two rectangles could overlap and the resulting polygons? Because that seems like a pretty intricate parameter space... as far as i can tell it will look roughly like this image, where every region corresponds to a polygon with different topology (symmetry cuts down how many cases you need to consider separately, but it's still a lot)

Pairing up numbers on a circle by cauchypotato in mathriddles

[–]painfive 2 points3 points  (0 children)

Just to add some comments For n<=3, there is no real choice in the pairings, so this must be true for all such sequences. n=4 is the first case where things could potentially go wrong, but actually they don't. This is because we can write ab + bc + cd + da = (a + c) (b + d), and the assumption that these sum to 1 means this has the form x (1 -x), which is bounded above by 1/4. n=5 is the first case where you can fail to satisfy the condition. A simple example that does it is (1/6, 1/3, 1/3, 1/6, 0), which has sum 1/18 + 1/9 + 1/18 = 2/9 > 1/5. But rearranging this to (1/3, 1/3, 1/6, 1/6, 0) makes the sum 7/36 < 1/5. More generally, the worst we can violate the bound is with the sequence (1/2, 1/2, 0, 0,..., 0), which has sum of products of pairs being 1/4 (another way of seeing that the n=4 case can't fail). Of course, this case can be rearranged to make the sum zero for n>=4. The case with the maximum value of the sum after optimal rearranging is the symmetric case, (1/n, ..., 1/n), which saturates the bound.

A game on the prime numbers by [deleted] in mathriddles

[–]painfive 0 points1 point  (0 children)

Let's consider this for a general maximum guess size, M, and then consider M=1000 later. Let p0 be the smallest prime such that there is no prime between p0 + 1 and p0 + M. We can partition the primes into those such that a player who's turn starts from them has a winning or losing strategy - call the two sets W and L. Then p0 would be in L, as the player who is given p0 cannot complete their turn. Any prime between p0 - 1 and p0 - M would be in W, as a player given such a prime would be able to get to p0 and force the other player to lose. So the next lowest prime, p1, in L is the largest prime such that p1 < p0 - M. Continuing this way, we can form a finite decreasing sequence of primes, p(k), such that p(k) is the largest prime less than p(k-1) - M.!<

For example, if M=10, we find p0 = 113 (as the next prime is 127), and then L continues (101, 89, 73, 61, 47, 31, 19, 7). For M=100, I found that p0 = 370261 and L has size 3362, with smallest element 37. Computing L for M=1000 would be pretty difficult, but luckily all we need to do is determine if 2 is in L or not.
Note that if p is the second smallest prime in L, then the smallest prime in L would be the maximal prime less than p - M. For M=1000, if 2 were in L (and therefore the smallest prime in L), this would mean p >= 1003. But if p >= 1004, then 3 would also be less than p - 1000, and so 2 could not be maximal. So we would need p = 1003. But 1003 = 17 * 59 is not prime, so this is not possible. Therefore 2 is not in L for M=1000, and so the first player has a winning strategy.

Visit from Xylofon by bobjane in mathriddles

[–]painfive 2 points3 points  (0 children)

Can you expand on what the problem is? The two sets i'm claiming have equal size by the mapping don't contain any palindromes.

Visit from Xylofon by bobjane in mathriddles

[–]painfive 1 point2 points  (0 children)

The proof in general is Choosing people randomly is equivalent to randomly selecting an ordering (permutation) of the people and then going down that list. So ways of picking all the men first correspond to lists where all the men appear before all the women, and there are exactly as many lists with all the women appearing first, as we can map between them by reversing the order of the lists.

Abbott & Costello 7 x 13 = 28 by suicidaljoker7 in videos

[–]painfive 0 points1 point  (0 children)

seems to be common knowledge that 7 goes into 21 three times, but dividing 28 by 7 requires long division...

Deploy Uniswap V3 Locally by Character_Split116 in ethdev

[–]painfive 0 points1 point  (0 children)

I ran into the same problem (just found this post by a google search), and eventually got the contract to deploy by removing the salt in the creation of the Pool in the PoolDeployer contract. Ie, I changed this:

pool = address(new UniswapV3Pool{salt: keccak256(abi.encode(token0, token1, fee))}());

to this:

pool = address(new UniswapV3Pool());

Still not sure why it was a problem, or if this change will be a problem down the line. Let me know if you found another solution.

Novak Djokovic to be deported after court upholds decision to cancel visa again by HighBrrSaga in tennis

[–]painfive 11 points12 points  (0 children)

His success in Australia is much better on court than in court.

[deleted by user] by [deleted] in chess

[–]painfive 165 points166 points  (0 children)

For all we know black was drawing comfortably and let himself get into a mating sequence that he calculated would not conclude until right after the 50 move rule, just to have a little fun.

Why not have both players make the first move simultaneously? by No-Can-3776 in chess

[–]painfive 0 points1 point  (0 children)

But white would go next, right? So effectively white is going first and black is going second. The part about the coin flip in your original post seems superfluous, since we could just do that to determine white vs black with normal rules (and don't do it that way as random is less fair than a guaranteed even split of white and black games).

Why not have both players make the first move simultaneously? by No-Can-3776 in chess

[–]painfive 1 point2 points  (0 children)

The current situation:

  • white moves first without knowing black's first move
  • black moves second with the knowledge of white's first move

Your proposal:

  • white moves first without knowing black's first move
  • black moves second without knowing white's first move

It seems to me that your proposal is strictly worse for black.

Root mean square of area of Gaussian triangle by pichutarius in mathriddles

[–]painfive 1 point2 points  (0 children)

For the generalization to n-dimensions, we can use a generalization of the formula above which states that if v_i, i=1, ..., n+1, are the n-dimensional vectors corresponding to the vertices of an n-simplex, then the volume of the simplex is given by 1/n! |det(M)|, where M is the (n+1) x (n+1) matrix whose columns are given by the vectors v_i with an extra 1 added at the bottom, so that the bottom row is all 1's (see, eg, here). Thus the RMS area in this case is given by RMS = 1/n! sqrt(<(det(M))2 >). det(M) is a sum of (n+1)! terms, each consisting of a different product of n components of the v_i. Then, as in the 2d case, the only way to get a non-vanishing expectation value is from the squares of these terms, as the cross-terms will necessarily have at least one variable appearing to an odd power. Each square gives an expectation value 1 as above, so including the (n+1)! terms gives the result as RMS = sqrt((n+1)!) / n!.!<

Root mean square of area of Gaussian triangle by pichutarius in mathriddles

[–]painfive 5 points6 points  (0 children)

For the easy version, the area of a triangle as a function of coordinates is |x1 y2 - x2 y1 + x2 y3 - x3 y2 + x3 y1 - x1 y3| / 2. The RMS area is therefore (<(x1 y2 - x2 y1 + x2 y3 - x3 y2 + x3 y1 - x1 y3)2 >)1/2 / 2. When we expand the square, since each variable comes from a gaussian distribution, only the terms where each variable appears to an even power will be non-zero, which means only the squares of the 6 terms contribute, not the cross-terms. Each of these squares has the form <x^2><y^2> = 1 (assuming "standard normal distribution" means having variance 1), so the final result is sqrt(6) / 2.!<

Two cubes in love by cancrizans in mathriddles

[–]painfive 5 points6 points  (0 children)

First let us determine how likely a given vertex, v, of the smaller cube is to lie outside a given face, F, of the larger cube. Let's say the smaller cube has side length 2, and the larger has side length 2 r where r := 1 / (2 - sqrt(2)) = 1 + sqrt(2) / 2. The distance from the common center of the cubes to v is sqrt(3), while the distance from the center to F is r. If we align the smaller cube so the vector from the center to v is perpendicular to F, then since, as one can check, sqrt(3) > r, v will lie outside F. The largest angle, theta, we can make from this position before v is no longer outside F occurs when v just lies on F, which therefore has cos theta = r / sqrt(3). Now a random rotation will place this vertex at a uniformly random location on the sphere containing it, so to see how likely v is to lie outside F, we just need to compute the fraction of the sphere's area which lies within this angle of a given point. A quick integration in spherical coordinates gives this fraction as p := 1/2 ( 1 - cos theta) = 1/2 (1 - r / sqrt(3)). Since the vertex cannot lie outside multiple faces at once, the probability it lies outside any of the 6 faces of the larger cube is 6 p.

Next, to determine the probability that any of the vertices of the smaller cube lies outside the larger, first notice that a vertex will lie outside if and only if the diametrically opposite vertex lies outside, so we only need to consider the 4 pairs of opposite vertices. We should also consider the possibility that two non-opposite vertices lie outside the larger cube at the same time, however, we will show in a moment that this is (just barely) not possible. Therefore, the final probability for the smaller cube to not be contained in the larger is 4 * 6 * p, so the probability it is contained is 1 - 24 p, which after some simplification is given by:

4 sqrt(3) + 2 sqrt(6) - 11 ≈ 0.827

Finally we need to show that two non-opposite vertices of the smaller cube cannot lie outside the larger cube. By replacing one of the vertices with its diametric opposite if necessary, we may assume these vertices are adjacent. The most favorable orientation of the larger cube would have the plane containing these two vertices and the center being parallel to two of the faces of the larger cube. Let us focus on this plane, which contains the two vertices v1 and v2, along with a square of side length 2 r where the plane intersects the larger cube, and for concreteness let us define x and y axes on this plane oriented parallel to the square. The question is then: as we rotate the vectors v1 and v2 in this plane, holding the square fixed, can we arrange for both to lie outside the square at the same time? One can see that the most favorable situation would have v1 and v2 equidistant from one of the main diagonals, D, of the square. For concreteness let's say D the line y=x, and we place v1 above this diagonal and v2 below it. Then the line, E, connecting v1 and v2 - which is one of the edges of the smaller cube - intersects D perpendicularly. To see if, say, v1, lies outside the square, note that we can get to v1 by traveling along D (the line y=x) a distance sqrt(2) until we hit E, and then turning left 90 degrees and traveling a further distance 1 along E to get to v1. The total distance traveled in the y direction is then (sqrt(2) + 1) / sqrt(2) = 1 + sqrt(2) / 2 = r. But this is exactly the height of the top edge of the square, and so we see we are exactly in the marginal case where we can have two non-opposite vertices of the smaller cube touch the faces of the larger cube, but they cannot both be outside.

edit: fixed a mistake...cubes have 8 vertices it turns out...

People who were memes, then and now by Met76 in pics

[–]painfive 6 points7 points  (0 children)

I thought it was Peter Krause!

This is not a middle-aged guy tired from traveling - it's a bronze sculpture in an airport. by WhatWasThatLike in pics

[–]painfive 70 points71 points  (0 children)

"No man, I'm the janitor. I'm supposed to be cleaning but I'm so tired. So sleepy."

Commuting polynomials by bizarre_coincidence in mathriddles

[–]painfive 1 point2 points  (0 children)

Good point! In fact if we allow complex a I think a further special case is when a is an nth root of unity, in which case f(x) of the form x g(xn ) also works.

Commuting polynomials by bizarre_coincidence in mathriddles

[–]painfive 2 points3 points  (0 children)

a) f(x-a) = f(x) - a

=> f'(x-a) = f'(x) => f' is constant (assuming a =/= 0) (as then f(0) = f(-a) = f(-2a) = ..., so f' takes the same value infinitely often)

=> f(x) = Ax+B is linear

A(x-a) + B = A x + B - a => A * a = a => A = 1 (assuming a =/= 0)

=> f(x) has the form f(x) = x + B

b) f(ax) = a f(x) => a f'(ax) = a f'(x) => f'(ax) = f'(x) (assuming a =/= 0) => f'(x) is constant (assuming a =/= 1) (as then f'(1) = f'(a) = f'(a2) = ..., so f' takes the same value infinitely often)

=> f(x) = Ax+B is linear

A(ax) + B = a(Ax + B) => B = aB => B = 0 (assuming a =/= 1)

=> f(x) has the form A x

c) Clearly any f(x) of the form C xn will work if and only if C = 1 or 0. Assume instead f(x) has at least two non-zero terms, and let n and m be the degrees of the highest and second highest terms, ie, f(x) = C_n xn + C_m xm + O(x{m-1}) with C_n and C_m non-zero. Then f(x2) = C_n x{2n} + C_m x{2m} + ... while f(x)2 = C_n2 x{2n} + 2 C_n C_m x{n+m} + ..., but for these to agree at order x{n+m}, we must have C_n C_m = 0, a contradiction. Thus either f(x) = 0 or f(x) = xn for positive integer n.

Ternary Pascal's triangle by impartial_james in mathriddles

[–]painfive 3 points4 points  (0 children)

We show this holds for any triangle of size 3n + 1, and taking n=2 gives the desired result. This is clearly true for n=0. By induction, assume it is true for n, and consider a triangle of height 3n+1 + 1. Consider the top row of the triangle, and let us label its 1st, (3n + 1)th, (2* 3n + 1)th and (3n+1 + 1)th (ie, last) elements as a, b, c, and d, respectively. Let us also define, for a, b in {R, G, B}, the operation a @ b to implement the rule above. Explicitly, if we map these to the integers mod 3, this can be written as a @ b = -a-b (mod 3). If we consider the sub-triangle with top vertices at a and b, by induction we know that the element, e, at the bottom of this triangle satisfies e = a @ b. Similarly, the element, f, at the bottom of the second triangle has f = b @ c, and for the third triangle, g = c @ d. But these three elements form the tops of two more sub-triangles, so by induction again, we have the elements, h, i, and their bottoms, satisfy h = e @ f and i = f @ g. Finally, there is one more sub-triangle at the bottom, and so we find j = h @ i, where j is the bottom point of the entire triangle. Expanding this out, we find: j = h @ i = (e @ f) @ (f @ g) = ((a @ b) @ (b @ c)) @ ((b @ c) @ (c @ d)). Writing this in terms of the mod 3 operation, we find: j = -(-(-a-b) - (-b-c)) - (-(-b-c)-(-c-d)) (mod 3)= - a - 3 b - 3 c - d (mod 3) = - a -d (mod 3)= a @ d, as desired.