This commit is contained in:
Miloslav Ciz 2025-07-05 08:29:04 +02:00
parent 0d26cac3da
commit d60f3c941f
15 changed files with 1936 additions and 1926 deletions

View file

@ -546,7 +546,8 @@ Bear in mind this is not a school test that's supposed to decide if you get to a
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. 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?
136. What is a universal [Turing machine](turing_machine.md) and how do we make one from an "ordinary" Turing machine (just explain the principle)?
137. Did you enjoy this quiz?
### Answers
@ -685,7 +686,8 @@ Bear in mind this is not a school test that's supposed to decide if you get to a
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)* (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
136. Universal Turing machine (UTM) is one that's programmed to simulate another Turing machine, i.e. it's a kind of interpreter of Turing machines implemented as a Turing machine. To UTM we can supply any Turing machine encoded as a sequence of symbols written on a tape, plus its input data, and the UTM then simulates the run of the encoded machine and computes exactly what the encoded machine would have computed. To create a UTM we may start by defining a way of encoding Turing machines as sequences of symbols and then proceeding to program a normal Turing machine to interpret this format. Turing machine is defined by a table of its states, where each state is a tuple (holding next state, head shift and written symbol for each possible input symbol) -- it's easily possible to encode the table as a sequence of symbols and since the table is always finite, the sequence will be as well. It can then be shown we may program each constituent operation to make a Turing machine be able to read the sequence and perform the actions that the encoded machine would.
137. yes
## Other