Jump to content
BrainDen.com - Brain Teasers

Prime

Members
  • Posts

    871
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by Prime

  1. Just looking at your first case, NNN could mean A=Truth-teller, B=Random, C=Liar; or A=Random, B=Truth-teller, C=Liar. So those three questions do not resolve who is who. Correspondingly, your arrangement for the YNY implies that the Truth-teller lied to the first question. As well the YNN arrangement implies that the Liar answered the first question truthfully...
  2. Prime

    Oh, let me try. Although my math seems not enough for solving this problem...
  3. Prime

    The divisor 667334 fits into the pattern just fine and it seems like the only solution. However, I have a retraction to make. I reasoned earlier that 333,667 and 667,334 were the only two possibilities for the divisor. That reasoning was wrong, even though it yielded the solution. Really, there are more possibilities that had to be excluded. That was a tough assignment. What's the time limit for solving a problem like that?
  4. Prime

    Unfortunately, the divisor 333,667 does not fit into the pattern. Upon re-examination, the first member of geometric progression should have been xxx,xxx,xxx*10-10, rather than …*10-9. That opens another possibility for the divisor.
  5. Prime

    Upon further consideration, we could figure out the divisor, which might help solving the puzzle.
  6. Prime

    Yes. That's how the trick was performed. So more work is needed for other odd powers. As for the 3-digit numbers, I wouldn't want to memorize 100 different values. Need some other trick there. Frankly, I don't know what it is, but I have an idea...
  7. Prime

    I am not all that familiar with long division, but here is some stuff that seems more or less obvious to start with...
  8. Prime

    In the 6th grade my math teacher showed the class a procedure to approximate square root. I asked whether there was a nice easy way to extract roots of higher powers. She said -- “No.” Few days later I came up to the teacher and asked her to raise any two-digit number to the third power and tell me the result. She obliged. Whereupon, it took me just a couple of seconds to tell her the original number she cubed. I asked to try it again with another number. She was annoyed, as there were no calculators back then, and raising a two-digit number into the third power was taking much longer than for me to take the root. How is it done? Can this trick be used with other powers? (Other than cube.) Greater than 2-digit numbers?
  9. Prime

    I don't see how the second requirement prohibits picking the same number more than once. One set of 5 numbers is different from another set, as long as any one of the set members is different. So you can pick 4 of the same numbers as before and then choose a different 5th number. There are 25!/(20!*5!) =53130 different sets of 5 numbers there. So the instructor should have mentioned that he/she wanted only 5 different sets. That said, the interesting quality of the matrix is... Thus, as Cherry Lane noticed, as long as each row and each column member occurs exactly once in each set of 5, the product is the same, since all the factors are the same. This is a nice number puzzle. But I don't think the hint to use multiplication was necessary -- it was a dead giveaway.
  10. Prime

    Don't worry. "i" does not exist -- it's an imaginary thing. BTW, there is a recent topic discussing Reimann's conjecture.
  11. Prime

    The word "Algol" threw me off. I thought it was that old programming language I came across in 1970s. But it is not. Anyway, I don’t see how the program here counts consecutive non-primes. I did not find where it resets its non-prime counter when it encounters a prime.
  12. Prime

    Did you see my new motto: "Natural numbers only, please"? Natural logarithm base is not a natural number. And I can see where you can get into logarithmic integrals from there. I categorically refuse to go into that higher math forest!
  13. Prime

    Starting with 3 all gaps between prime numbers are even (2, 4, 6, ...). Thus the number of intervenning integers is odd. So wherever there is a string of 12 consecutive non-primes, there are at least 13 such numbers. The very first gap of the size 14 is found between 113 and 127. This is gap is special in a way it is the maximal possible in a certain interval. I believe Victor has already shown the exhaustive search that I mentioned in my previous post. It has been a good deal more than 30 years since I've seen anything written in Algol.
  14. Prime

    That is a nice economical solution. It is a corollary to Euclid’s proof that prime numbers are infinite. But the numbers are large. For 5 consecutive non-primes (or a prime gap of size 6), using that algorithm we find: {722, 723, 724, 725, 726}. Whereas, we know there are 5 consecutive non-primes between 23 and 29. The OP requests an algorithm for finding a prime gap of a given size. The algorithm could be a simple search: Suppose we look for a gap of size X (or X - 1) consecutive non-primes, where X > 3. Find the prime number P nearest to and smaller than X. Starting with P+2 test consecutive numbers with the increment of 2 for being prime. When a prime is encountered and the gap from P is still less than X, repeat the search starting from the newly found prime plus two. (The algorithm saves some steps by skipping even numbers.) This algorithm guarantees to find the first such gap that meets the OP requirement. However, I don’t think that Bonanova had such an exhaustive search in mind as an answer to his problem. He must have been looking for an economical algorithm like the one that EH has suggested. Is it possible to have an elegant non-exhaustive algorithm, which would find the very first gap of a given size? I say, since all prime numbers are arranged in a nice simple pattern with a certain kind of symmetry, such non-exhaustive algorithm exists. Although, it is a bit more complex than the one shown by EH... P.S. This subject is so close to my heart. Bonanova has found my soft spot.
  15. Prime

    Here are 19 trees, 18 rows. I don't know if it's the minimum, but it looks pretty.
  16. Prime

    There are 120 possible starting locations for opponent's program. Checking for "b" parameter on all of them sequentially would take nesting level 120 levels or more. Once again, my method relies on all (or most) of opponent's 40 nodes filled with non-zero commands. Perhaps, I did not formulate the question clearly enough. So here is my solution to building a "megastructure" that would not violate nesting level: Nope. We can keep the field size at 200, or any other number -- it does not matter.
  17. Prime

    I assume, the bus route makes a full circle (starts and ends at the same point). Either way, I see no need for integrals. The "qudrangle" problem is another matter...
  18. Prime

    In one of my attempts to solve the problem analytically I came up with the same result. But I discarded it as it seems to count in some point pairings falling outside the circle. Besides, it does not agree with my simulation of 0.725.
  19. Prime

    I ran my own simulation of random placement of 2 points inside a unit circle (of radius 1) and came up with the result of approximately 0.725. I was under the impression that all possible point pairings could be tied to chords inside the circle. Thus, the average distance would be less than 1/3 of the diameter. But, I have to give up that theory. Indeed, two dimensions seem to offer more freedom. I’m at loss how to evaluate the triple integral suggested by Bonanova. However, I have a new solution in mind. If it works out, I’ll post it here.
  20. Prime

    Here are 35, or so prepositions stacked up at the end of the sentence with no intervening non-preposition words. And the sentence makes a perfect sense to me, English-second-language-speaker. There could be many more, I’m sure.
  21. Prime

    It is time to do what Bonanova calls a “sanity check”. We are in agreement here that the average distance between two points on a segment is 1/3 length of that segment. Two non-coinciding points inside a disk lie on a chord of that disk. The longest possible chord is a diameter. It stands the reason that the average distance between two random points on a diameter of a circle would be on average 1/3 of the length of the diameter apart, like with any other segment. But, the diameter is the longest segment on which two points inside a circle may be found. There are lots and lots of other shorter chords inside a circle. 1/3 lengths of the shorter chords would drag the overall average down. So, in a circle of the radius 1, we should expect overall average noticeably below 2/3. Here is my solution for the average distance between 2 points inside a circle. Note, the intersection of unit circles could be used as a representative of probability for placement 3 and 4 points inside a unit circle. We could use it for solving the OP.
  22. Prime

    Nope. ADD command itself adds one level of nesting and it can only handle 2 values at a time. Also, there is a risk that two non-zero values add to zero. Hint: my "megastructure" relies on opponenet's program having been filled with non-zero commands. Yes. Your program sacrifices itself, but makes sure the "megastructure" loses. It makes perfect sense for the first move. Suppose, megastructure has the first move and it has found your first command. Then it is going to replace it with a bomb and you lose in round 1. So if you are losing anyway, why not punish the opponent? On the other hand, if you got to execute your first command with 99-level nesting, you could jump into another logic and wipe out that 99-level nesting trap -- just replace it with a plain bomb. This could be a natural deterent to building "megastructures". No to both questions. The program with capabilities to deter megastructure is as you found above for the question 2. And I do not suggest any artificial prohibitions or restrictions to VNA programmers -- you can code anything as long as the syntax is correct. What I have in mind is a small and very very simple change to the match setup.
  23. Prime

    Before inventing new variations on VNA, it stands the reason to play with the existing version to fully apprecate its possibilities and shortcomings. So, I am offering a few simple VNA questions/puzzles here. Given a search argument (megastructure), which checks 120 possible locations for the opponent's non-zero command. It is reasonable to expect that VNA programmers would fill the entire 40-node program body with non-zero bombs, or blanks to hide their meaningful commands. 1). I have constructed a megastructure statement which is almost guaranteed to find the opponent's first non-zero command in the 120 possible locations. Yet, this "megastructure" uses much less than 100-level deep nesting. How? (No need to write it out, just explain the general principle.) And a corollary: What is the way to defend against/confuse a "compact megastructure"? 2). Given the rules of the tournament as I set them in my previous posts, what is the way to ensure that the opponent's "megastructure" loses even when it gest the first move? 3). Devise a match setup that would make a "megastructure" searching for the first non-zero command ineffective. (Other than prohibitting bombing on the first move.) (Edited for grammar.)
  24. Prime

    I made a suggestion, which would render a "megastructure" ineffective. Prohibit bombing on the first move. So that you have a chance hide your pointer in the middle of a 40-node program body. But you did not like that solution. I joined this game on your invitation and submitted my entry early as you insisted and kept prodding me. After that I waited few weeks and you did not run it, as your VNA emulator did not work as promised. Actually, you ran only those entries against which you could win. So I wrote my own emulator and can't see the end of complaints and objections from you. Why did you invite me to play your game when you really don't want to compete? Did you think I would be an easy opponent to win against?
×
×
  • Create New...