This commit is contained in:
Miloslav Ciz 2025-05-15 21:57:58 +02:00
parent edb70b8898
commit 2328abee24
18 changed files with 2032 additions and 1979 deletions

View file

@ -544,7 +544,8 @@ Bear in mind this is not a school test that's supposed to decide if you get to a
132. Create a fraction ([rational number](rational_number.md) that [approximates](approximation.md) [pi](pi.md) at least to 8 fractional digits, i.e. the approximation must start with 3.14159265.
133. You have 7 [fat](body_shaming.md), horribly smelling [transsexual](transsexual.md) [reddit](reddit.md) admins who all stink exactly the same except for one, which smells yet a little worse. You have a smell comparator with two chambers: you can put any number of people into the chambers and the machine will tell you if the total smell in one chamber is worse, better or equal to than in the other chamber. You can only afford to perform two measurements. How do you identify the worst smelling redditor?
134. Find the [square root](sqrt.md) of the [complex number](complex_number.md) *[i](i.md)*.
135. Did you enjoy this quiz?
135. Fred has two (half) brothers, Abe and Greg. Greg is also Fred's grandfather and Abe is Fred's father and half cousin. How is this possible?
136. Did you enjoy this quiz?
### Answers
@ -640,8 +641,7 @@ Bear in mind this is not a school test that's supposed to decide if you get to a
90. Kind of octagon but with unevenly long sides; a rectangle with bevelled corners, i.e. two horizontal sides, two vertical sides, two 45 degree walls and two 135 degree walls. We can imagine taxicab distance from given point like sort of a diamond, it creates 4 quadrants around the point, in each the distance increases linearly in diagonal direction -- regions of constant distance here form 45 degree angled squares. Boundaries between these quadrants form a cross of infinite size. Taking two different points these two crosses will overlap and form 9 regions (draw it): top-left, top-middle, top-right, middle-left etc. Examining each of the regions we will find that it either keeps the increasing direction the same (if both overlaid directions are the same) or that some principal direction cancels out and leave the sum increasing only in one principal direction -- basically we find that in each of those regions the sum increases linearly in one of 8 directions separated by 45 degrees (except for the middle region where the sum is constant). It's also clear the heightmap has to stay continuous as both of the summed functions are continuous. From all this we can deduce the shape basically.
91. It's a [Turing complete](turing_complete.md) system (typically a [programming language](programming_language.md)) that's however extremely hard to use for any practical programming, i.e. it can be seen as a programming language in which it is theoretically possible to program anything (anything programmable in any other language) but practically it's impossible to program anything significant because of the complicated nature of that language. This terms is related to [esoteric languages](esolang.md).
92. [Earth](earth.md) or jvpcG. The cipher reverses the ASCII string and xors every byte (that's not a space) with 0x02 (i.e. flips the second lowest bit) -- don't bitch too much about this being too arbitrary, you can notice the string is reversed by the last character being uppercase and the first one being special char (?), then you can kind of recognize the words as the encoded chars are close to their decoded versions and the lengths of the words also hint on the words (for example a question is quite likely to start with "What").
93. Let's simplify the left-hand side: *sin(2 * x) / (2 - 2 * sin^2(x)) - log2(1 / 8^(-1/3)) = 2 * sin(x) * cos(x) / (2 * (1 - sin^2(x))) - log2(8^1/3) = 2 * sin(x) * cos(x) / (2 * cos^2(x)) - log2(2) =
sin(x) / cos(x) - log2(2) = tg(x) - 1*, so we get *tg(x) >= 1*. So that will hold when *pi/4 + pi * n <= x < pi/2 + pi * n*, *n* is an integer.
93. Let's simplify the left-hand side: *sin(2 * x) / (2 - 2 * sin^2(x)) - log2(1 / 8^(-1/3)) = 2 * sin(x) * cos(x) / (2 * (1 - sin^2(x))) - log2(8^1/3) = 2 * sin(x) * cos(x) / (2 * cos^2(x)) - log2(2) = sin(x) / cos(x) - log2(2) = tg(x) - 1*, so we get *tg(x) >= 1*. So that will hold when *pi/4 + pi * n <= x < pi/2 + pi * n*, *n* is an integer.
94. Considering an infinitely small non-zero interval *dx*, and the graph height increase over this interval *dy*, the distance increase (from Pythagorean theorem) on this interval will be *sqrt(dx^2 + dy^2)*. We can replace *dy* by *tan(alpha) * dx*. By definition tangent of the function's angle at a certain point is its derivative, so we can also replace *tan(alpha)* by derivative of the function, *f'(x)*. So we get length increase *sqrt(dx^2 + f'(x)^2 * dx^2) = sqrt(dx^2 * (1 + f'(x)^2)) = dx * sqrt(1 + f'(x)^2)*. Now to add infinitely many values over infinitely small intervals we use integrals, so to add all these small length increases we can write the final formula: *length(x1,x2) = Integral(x1,x2) sqrt(1 + f'(x)^2) dx*. Testing this on *f(x) = x* from 0 to 1 we get the expected *length(0,1) = Integral(0,1) sqrt(1 + 1^2) dx = sqrt(2)*. For *f(x) = sin(x)* from 0 to *2 * pi* we get *length(0,2 * pi) = Integral(0,2 * pi) sqrt(1 + cos^2(x)) dx ~= 7.64*, which seems about right (it's a bit more than 2 * pi).
95. no
96. [The Cathedral And The Bazaar](bazaar.md), Larry Wall, Uriel, INTERCAL, John (Carmack and Romero).
@ -682,8 +682,9 @@ sin(x) / cos(x) - log2(2) = tg(x) - 1*, so we get *tg(x) >= 1*. So that will hol
131. Biology.
132. Do it like this: 3.14159265 = 314159265 / 100000000 = 62831853 / 20000000.
133. Put three and three into the two comparator chambers, leave one outside. If the smells are equal, the one outside is the worst smelling. Otherwise take the three people out of the worse smelling chamber and do the same: put one in one chamber, another in the other chamber and leave one outside. If the smells are equal, the one outside is the worst smelling, otherwise it's the one in the worse smelling chamber.
134. Start with the equation *(a + b*i)^2 = i*, you have to find *a* and *b*. This will expand to *a^2 + 2*a*b*i -b^2 = i* which we can get to the form: *2*a*b*i + a^2 = i + b^2*; so, equating the real and imaginary parts, we now know that *abs(a) = abs(b)* and *2*a*b = 1*. From this we can deduce both solution, one is *1/sqrt(2) + i/sqrt(2)*, the other *-1/sqrt(2) - i/sqrt(2)*.
135. yes
134. Start with the equation *(a + b * i)^2 = i*, you have to find *a* and *b*. This will expand to *a^2 + 2 * a * b * i -b^2 = i* which we can get to the form: *2 * a * b * i + a^2 = i + b^2*; so, equating the real and imaginary parts, we now know that *abs(a) = abs(b)* and *2 * a * b = 1*. From this we can deduce both solution, one is *1/sqrt(2) + i/sqrt(2)*, the other *-1/sqrt(2) - i/sqrt(2)* (any one will suffice as the correct solution).
135. They live in Alabama :D Greg had a son with his mother: Abe; then Abe had a son with the same woman: Fred. All men are half brothers as they share a mother, Greg is also Fred's half uncle (is his father's half brother) and grandfather (father of his father), Abe is the son of Fred's half uncle so he is his half cousin.
136. yes
## Other