Posts for OmnipotentEntity


Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
This problem was given to me via a Discord help chat, and I thought it was an interesting problem. The labels on the hypotenuses are referring to the entire hypotenuse. The student who gave this problem fell into a bit of a trap, and I was unable to convince him that the easy method was the intended one.
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
I will echo the recommendation of Kubuntu.
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
Question about the very first level. Could you not have brought a shell into the subworld to skip waiting for the final mole by the pipe?
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
Apropos of nothing, anyone know an approximate closed form for: 2.405565034289246 This comes from a numeric solution, a, to minimizing the squared error between (1 + erf(x))/2 and 1/(1 + exp(-a x))
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
If you have two standard d12s, the probability distribution of the total value of rolling 2 of them is a triangular pmf. How many ways can you relabel the numbers on the d12s to get back the exact same distribution? (subject to the restriction that the values must be positive integers). Is there a generalizeable way find this do this for rolling n dice with k sides? An example for d6s, is the standard dice both have faces {1, 2, 3, 4, 5, 6}, while the (unique) way of relabeling them such that the analogous situation is true is the first dice is labeled {1, 2, 2, 3, 3, 4} and the second is {1, 3, 4, 5, 6, 8}.
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
Myers-Briggs is more or less psuedoscience. There are more nuanced personality tests that are used in scientific disciplines (such as Big 5), but boiling down people to 16 "types" is a bit of a fools errand. The categories are vague because they must be in order to be even slightly believable (like horoscopes).
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
I just realized that I completely misread the original problem as (x + sqrt(x)) / (y + sqrt(y)), so that explains why I was so off. *thud*
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
p4wn3r wrote:
I created a new one today! Let x and y be two positive real numbers, such that x > y and: x + y = 6 (x+sqrt(x))(y+sqrt(y)) = 8.25 Find x and y.
This winds up being equivalent to finding the intersection of a parabola with an ellipse*. If you straightforwardly attempt to solve the resulting quartic, you don't get anything that looks reasonable. The quartic I arrived at is 1396 u4 + 296 u3 - 1744 u2 - 192 u + 480 = 0, where u2 = y. I assume there is a tricky change of variables that makes this possible/reasonable to get a closed form solution, but a numerical approximation is y = 0.9453, and x = 5.0547. I'll circle back to this when I'm less busy. Seems that if I can rotate the parabola in order to eliminate the + 4u, I might be able to perform a substitution on the ellipse that might make it more amenable to manual calculation. However, I'm not looking forward to dealing with an off-axis ellipse, and it might not wind up being any less complicated. * the parabola is 37u2 + 4u - 24, and the ellipse is 4 sqrt(6 - u2)
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
Show that: Sum(a=1..inf) Sum(b=1..inf) gcd(a,b)/(a^2 b^2) = (5/2) zeta(3)
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
I don't believe that there is a simpler way to do this, I did largely the same approach, but you managed to cut out some of the faffing about I did with x = f(u), y = u. Great job.
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
Solve the functional equation f(xy) gcd(f(x), y) = f(x) f(y) for all functions f: N+ -> N+.
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
The Riddler is dead, long live the Fiddler. This week's extra credit Fiddler problem has been giving me some issues. I will restate the entire problem first, then explain where I am stuck in spoilers.
I’m continuing to play Digits (will it ever come out of beta?) from The New York Times. Based on personal experience, I recommend it as a fun way to engage kids with whole number operations. If you’re a fan of Digits, the TV show Countdown, or other similar games, then this week’s Fiddler is for you. You are writing an expression using the whole numbers 1, 2, 3, 4, and 5, and the operations of addition, subtraction, multiplication, and division. Importantly, you must use each number and operation exactly once. Also, you can use as many parentheses as you would like. No concatenation of the digits is allowed (i.e., you can’t combine 2 and 3 to make the number 23). For example, one such number you could generate is 7, since you can write that as (2÷1)×3+5−4. What is the largest value you can generate in this way, using the five digits and four operations?
Instead of five numbers and four operations, you now have nine numbers and eight operations. This time around, your expression should include the nine whole numbers 1, 2, 3, 4, 5, 6, 7, 8, and 9, each of which must be used exactly once. And the operations are once again addition, subtraction, multiplication, and division, each of which must be used exactly twice. As before, you have unlimited parentheses, while concatenation is not allowed. What is the largest value you can generate, using the nine digits and eight operations? (What if you have the numbers from 1 to 4N+1 and each of the four operations must be used exactly N times?)
With a little bit of effort you can find the values for N=1 and N=2 to be 35 and 9900 relatively easily or nearly instantaneously via a computer search, I won't bother doing much exposition on this part. Here are my thoughts on the final part for arbitrary N: If you examine the form of the solution for N=2, you'll find that all of the minuses become pluses other than the one targeting the 2, and similarly, all of the divisions become multiplications other than the one targeting 1. So this would seem to suggest that the pattern should be find some combination of the additions that sacrifice the 2 to the minus and the 1 to the division, leaving behind a grand total of 8N^2 + 6n - 4 to be split among 2n terms as evenly as possible to maximize the multiplication at the end. This gives (4N^2 + 3N - 2)/N on average, or between 4N+2 and 4N+3, approaching 4N+3 as N gets large. Using this technique it's possible to, instead of enumerating permutations of digits operations and orders, instead simply enumerate partitions of these integers into exactly 2n terms, and then choose some set of operations that makes it work. Using this approach you can rapidly find N=3, N=4 takes a few hours, but N=5 seem a little bit out of reach computationally still. The reason I want to enumerate the case for N=5, is because I suspect that it might become necessary to also sacrifice 3 once the number of minus operations becomes sufficiently large, in order to split the remaining values more evenly into the multiplication bins, finding if this becomes required, and if so exactly when would be required to begin categorizing a general solution. Using this technique, the best value for N=3 is (8 - (2 - 3 - 7))/(((1/(6+9))/(5+10)) * (4+11) * 12 * 13 = 13 * 12 * 15^3 * 16= 8424000, and for N=4 it is 17 * 16 * 15 * (11 + 9) * (12 + 8)/((1/(13+7) /(14+6)/(10 - (2 - 5 - 4 - 3))) = 17 * 16 * 15 * 20^5 = 13056000000. For N=5, the search is yet ongoing but a candidate solution is (found by hand): 21 * 20 * 19 * 18 * (17 + 7) * (16 + 9) / ((1 / (15 + 10))/(14 + 11)/(13 + 12)/(8 - (2 - 6 - 5 - 4 - 3)) = 21 * 20 * 19 * 18 * 25^4 * 24^2 = 32319000000000. One way to measure the "badness" of a particular solution is to find the squared deviation for each multiplication term from the average term, then divide by the number of terms. This roughly captures (or maybe exactly captures, I honestly haven't bothered to try to give a proof either way) how far away the solution is from an unobtainable upper bound. For N=3, this value 1.889, for N=4, it's 4. The candidate solution above has N=5 at 8.8, with just the 18 term at badness 21.16. So attempting to eliminate this term we can rewrite with also a -3 as well and get (not bothering to rewrite *s and /s and +s as -s), 21 * 20 * 19 * (18 + 5) * (17 + 6) * (16 + 7) * (15 + 8) * (14 + 9) * (11 + 10 + 4 - 3) * (13 + 12 - 2) = 21 * 20 * 19 * 23^6 * 22 = 25989180672840, which while this solution only has a badness of 2.95, the fact that there were 3 additional units to work with seems to easily make up for the relatively high badness of the N=5 candidate. If we assume that -3 will never be bigger, then we can come up with product(3N+3..4N+1) * ceil(S/(N+1))^(S mod N+1) * floor(S/(N+1))^(N+1-S mod N+1) where S = sum(3..3N+2) - 2, but I'm still not entirely convinced this is optimal for large enough N. EDIT: In fact, consider two numbers that sum to 1001, the largest pair of multipliers are 501 * 500 in this case, if we subtract 3 from the total we have 499 * 499, now unbalancing the first, we have to go all of the way down to 461 * 540 before the unbalanced but larger value becomes larger than the balanced smaller one. This is a total "badness" of 3120.5, which is about 3 * 1001. So it seems like the total badness will have to reach very large levels in order to justify removing the 3, roughly 3 times one of the terms. However, they do seem to become bad enough. This would suggest at upper limit where that things become bad enough at N=49 to force using the -3, and perhaps it's better a few (several?) values before. EDIT: A much more careful analysis of the badness for these two cases suggests a crossover at around n=19, and an analogous formula for the sac 2 and 3 case suggests that the crossover value is exactly n=21: (21, 1858561114113223590154513972642442186649575491096420050912878442728057261260800000, 1861170011681117541222317931520613643629245091916594782109445096734720000000000000, False)
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
p4wn3r wrote:
This one I created myself! You have a very large array of N white squares. Choose one of them randomly and paint it black. Repeat this process exactly N times. You can paint a square black more than once, but that has no effect in the final result. On average, what's the ratio of squares that will remain white?
Is there a nice solution to this? It feels like the coupon collector's problem, so I would assume that the answer is 1/e in the limit, but every approach I've considered and that I know to be correct has horrible dependent probability mess. I'm not completely certain if this approach is kosher but it gives me the answer I'm expecting, and I don't care enough to remind myself of the exact rules about expectations to justify it properly, but consider N squares, the expected number of black squares at the end of the first turn is p1 = 1, then it's p2 = p1 + (1 - 1/N) = 2 - 1/N for the second turn, and p3 = p2 + (1 - p2/N), and so on. Then it's a matter of solving this recursion. p3 = p2 + (1 - p2/N) = 2 - 1/N + (1 - (2 - 1/N))/N) = 2 - 1/N + 1 - 2/N + 1/N^2) = 3 - 3/N + 1/N^2 p4 = p3 + (1 - p3/N) = 3 - 3/N + 1/N^2 + (1 - (3 - 3/N + 1/N^2)/N) = 3 - 3/N + 1/N^2 + 1 - 3/N + 3/N^2 - 1/N^3 = 4 - 6/N + 4/N^2 - 1/N^3 I could be wrong, but this seems like a Pascal's triangle situation. And again, not caring enough to justify this, let's just move on and assume I'm correct. lol. If we divide both sides by N, then subtract 1 from both sides we will get 1 - pN/N = (1 - 1/N)^N which is e^-1 as N gets large. pN/N is the ratio of black squares to all squares, so 1 - pN/N is the exact value we were trying to find.
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
So to find critical points of this function we just need to take the derivative. This is (x^2 - x - 6)e^x which factors into (x-3)(x+2)e^x. Set equal to zero and we have critical values of m at y = 0 (from e^x at negative infinity), y=7e^-2 (from the (x+2)), and y = -3e^3 (from the (x-3)). So this function has zero real roots for m < -3e^3, exactly one at m = -3e^3, two on the range -3e^3 < m <= 0, three on the range 0 < m < 7e^-2, two at m = 7e^-2, and finally one for m > 7e^-2.
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
MLE is the intended solution, or rather, conditioning on the likelihood. If you collect all of the likelihoods, normalize them as a pmf, then evaluate the expectation value of the given hypergeometric distribution, 5/14 is indeed the result you get for an arbitrary bag of fixed size N, then you'll find for any valid choice of N > 13. Proving this is somewhat tricky though and it involves some more obscure summations involving binomial coefficients.
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
FractalFusion wrote:
As for the bag of tiles question, I don't have an answer yet (I'm still trying to be sure of what is assumed. A priori, is each tile blue or yellow with equal probability, independent of the others?
So the initial probability that a blue or yellow tile is drawn is an unknown. Assuming the bag initially has 50% blue and 50% red tiles is not justified.
BrunoVisnadi wrote:
It feels like it's necessary to make some assumptions about the probability distribution of the colours in the bag.
As you may have observed, the only assumption you need, once you condition upon the likelihood of the observation of the initial draw, is that the probability of any tile being drawn (independent of its color) is uniform.
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
I have a bag of tiles. The tiles can be either blue or yellow, but you do not know how many are blue and how many are yellow. You draw 12 tiles without replacement: 4 blue and 8 yellow. Is the next tile you draw more likely to be blue or yellow? Does the answer depend on the number of tiles originally in the bag? What is the chance that the next tile you draw is blue?
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
This looks like a job for Hero's Formula! sqrt(s(s-a)(s-b)(s-c)), we want the stationary point, which will obviously need to be a maximum, substituting in s = 1/2 (a+b+c), and a=3, b=3+k, and c=3+2k, and simplifying a little we get. 3/4 sqrt(-k4-4k3+6k2+36k+27) Recognizing that we just want the stationary point of this, and the form of the derivative of the sqrt(f(x)) is C f'(x)/sqrt(f(x)) for some constant, the zeros will be isolated in the numerator. Thus will be the same as the zeroes of -4(k3 + 3k2 - 3k - 9), which has three zeroes at -3, and plus/minus sqrt(3). The area of the triangle 3, 3+sqrt(3), 3+2sqrt(3) is 3/2 sqrt(9 + 6sqrt(3)) = 6.6055... There must be a better way to do this, because using Hero's formula directly is always heinous and way more complicated than it needs to be just as a rule of thumb, though the result itself is interesting.
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
Out of curiosity, at around 22 minutes in, you rest in the inn several times in a row. Why was this done? (Between stratum 1 boss monster grinds) EDIT: I found the answer here: https://docs.google.com/document/d/1uaX-V5bgFrgU01_i0NpUbXGhwe9ey6Xf8GX5g4Xt4F4/edit Visit Inn -> Sleep x14 -> Leave (Respawns Fenrir | You have 1,587 en)
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
Let f(n) be the number of sequences starting at 1 and running until n. Note that after a revert to i the total options for the sequence starting at i and going to n is the same as starting at 1 and running to n-i+1, so this gives us a recurrence. Let f(i, n) = f(n-i+1) Our trivial base cases are f(1) = 1, f(2) = 1, f(3) = 1. From f(4) when we reach 3 for the first time we can choose to revert to 2 or not, so f(4) = 1 + f(2,4) = 1 + f(3) = 2. For f(5) we can make that choice at 3 or 4, additionally, at 4 we have the choice to revert to either 2 or 3: f(5) = 1 + 2f(2,5) + f(3,5) + = 1 + 2f(4) + f(3) = 1 + 4 + 1 = 6. Enumerating to double check 12345, 1234_345, 1234_2345, 1234_234_345, 123_2345, 123_234_345. Checks out. It seems that, in general, we have f(n) = 1 + n-3 f(2, n) + n-4 f(3, n) + ... + f(n-2, n) = 1 + sum_i=0^n-4 (n-3-i) f(2+i, n) = 1 + sum_i=1^n-3 (n-(i+2)) f(n-i) Because our indexing seems to be mostly involving offsets of 2 (because the stubborn start and end not participating like other values). Let's call g(n) = f(n+2). Now we have the relatively simpler, g(n) = 1 + sum_i=1^n-1 (n-i) g(n-i) = 1 + sum_i=1^n-1 i g(i) If we take successive differences we have g(n) - g(n-1) = (n-1) g(n-1). Rearranging a bit we have: g(n) = n g(n-1), but that's the recurrence for a factorial function! (Which is what we have, the next few values of f(n) are 24, 120, 720, ...)
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
If T(x,y) = (x', y'), and U(x, y) = (x', -y'), then -y' = -d - ex - fy, which seems to suggest that the answer is simply "you negate d, e, and f." But you mentioned it was tricky, so I fear I am almost certainly missing something?
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
I haven't paid any attention to this run for a very long time, and holy route Batman! Execution looks clean. There are some minor movement things where I think it *might* be possible to be a bit cleaner with the RNG manipulation, but I don't know that for a fact, but I seem to remember RNG manip being surprisingly difficult for this game, so I don't think it's poor by any stretch of the imagination. Yes vote.
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
0/10, does not kill Wobble Bell. Obvious yes vote. I should probably add here that I'm somewhat familiar with the RTA runs of this game, and this uses essentially the same route that the RTA runs use.
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.
Experienced Forum User, Published Author, Player (36)
Joined: 9/11/2004
Posts: 2624
OmnipotentEntity wrote:
This means that the best route is to win every system except Kurasawa.
Hello past me. This is might be wrong. It looks like (provided that it is possible to lose both Gimle and Port Hedland while collecting all medals, which is questionable), that the best route is Enyo (1W) -> McAuliffe (2W) -> Gimle (2L) -> Brimstone (0L) -> Port Hedland (3L) -> Hubble's Star (2W) -> Rostov (3W) -> Venice (3) For a total of 16 medals plus the golden sun, which is one better than the route through Gimle, Kurasawa, and Rostov. Per a Gamefaqs walkthrough, your victory points are different from your medal points. Gimle should be possible to eject Gimle 2 to drop 10 victory points, but from here you need to drop one additional victory point somehow while still making it back with enough medal points. For Gimle 3, you can skip killing one of the Dralthi fighters (there are a total of 8 + Dakhath). It seems like 7 + Dakhath is enough to get the medal. So dropping that final victory point seems possible. Gimle 1 is somewhat less flexible. 10 points for escorting the Exeter, and 2 points for landing, there aren't any VPs here that you can drop and still have a chance of getting a medal, unless you can run out of fuel or something and still get the medal. Port Hedland on the other hand is super easy to fail, any single objective is enough to fail the system, and here is a video of a failure of Port Hedland 1 that still gets the medal. So with this, it seems that the 17 medal route is possible, at least on DOS.
Build a man a fire, warm him for a day, Set a man on fire, warm him for the rest of his life.