Mitch Schwartz
Reputation
Top tag
Next privilege 250 Rep.
 Dec26 comment Riddle (simple arithmetic problem/illusion) A humorous but disparaging view of this problem is given in a two-part comic on Spiked Math, here and here. Dec23 comment Fundamental Math Theory Resources? @user5061: Hmm, I'd say soft-question, reference-request, learning. Dec23 comment prove: $2^n$ is not divisible by 5 for any $n$ Or multiply both sides by $2^{-1} \equiv 3 \pmod{5}$. Dec23 comment Fundamental Math Theory Resources? Number theory is more closely tied to integers than "numbers" in general. It sounds like you are after a more general overview of mathematics to include analysis, numerical methods, foundations of mathematics, and abstract algebra, rather than just number theory. This question should probably be retagged. Dec23 comment color polygon interior in different color I believe this belongs on StackOverflow rather than here, unless you need to know something more of the mathematics. Does this link suit your needs? homeandlearn.co.uk/csharp/csharp_s15p4.html Dec23 comment color polygon interior in different color Related to your problem: Point in polygon article on Wikipedia. Dec23 comment color polygon interior in different color I assume the points are given in order? Because, in general, n points do not determine a polygon (for example, there are multiple polygons with vertices (0,0), (0,1), (1,0), (1,1), and (1/2, 1/2)). Also, are you doing this within a particular programming environment? Dec23 awarded Commentator Dec23 comment Show that $\Pi_{i < j} (v_i - v_j) \le k^{n^2}$ for $1 \le v_1 < v_2 < … < v_n = k$ Also, please check for other typos. In the question title you have 1 <= v_1 and (v_i - v_j), but in the question body you have 1 = v_1 (subject to k >> n?) and (v_j - v_i). Dec23 comment Show that $\Pi_{i < j} (v_i - v_j) \le k^{n^2}$ for $1 \le v_1 < v_2 < … < v_n = k$ Actually there are C(n,2) = n(n-1)/2 terms in the product. Dec22 awarded Critic Dec22 comment Algorithm for constructing primes The answer depends largely on n. For example, if n = 10^6 we can use a simple algorithm, but for n = 10^400 we would generally want something more advanced. The largest known prime according to Wikipedia is 2^43112609 − 1. So obviously letting n = 2^43112609 − 1 will cause some problems. Dec22 comment Two seemingly unrelated puzzles have very similar solutions; what's the connection? After throwing around various ideas unsuccessfully, I decided to try to read up on in-place permutations and was led to a paper solving exactly this problem; so, here is a spoiler. Not sure if I'm breaking protocol by posting this link, so if you'd like me to delete this comment, let me know. Great problem, by the way. I saw how to rotate a cycle on my own but got stuck when it came to finding an element in the "next" cycle. Dec22 comment Two seemingly unrelated puzzles have very similar solutions; what's the connection? @Elliott: Some moderately similar problems include finding the nth digit of the decimal expansion of a given rational number, or finding the nth Fibonacci number mod m for some m, but I think the resemblance for these is mostly superficial. Another marginally similar problem is using cycles to determine whether a set is well defined according to the axiom of regularity. This can be done with depth first search in conjunction with a boolean array. I'm having a hard time thinking of more directly similar problems. My experience is not too extensive. Dec22 revised Two seemingly unrelated puzzles have very similar solutions; what's the connection? added 551 characters in body; deleted 6 characters in body; added 4 characters in body Dec22 comment Two seemingly unrelated puzzles have very similar solutions; what's the connection? @Elliott(2), thanks. Regarding your points: (1) You're right, it's linear, not constant. Hmm, I guess I haven't solved it then. (2) I think removing a[1] makes problem 6 look more like the locker puzzle than it would otherwise. The value 1 appears nowhere in a, so the graph for problem 6 for array a cannot possibly be a permutation. However, if we omit a[1] to obtain array b, then that can be a permutation. For example, Let a = {2, 5, 4, 3, 2}. Regarding comment (3), yes I'm interested too. I didn't mean to dismiss the possibility of deep connection. I'd be happy to learn of one. Dec22 awarded Editor Dec22 revised Two seemingly unrelated puzzles have very similar solutions; what's the connection? added 131 characters in body; added 9 characters in body Dec21 comment Two seemingly unrelated puzzles have very similar solutions; what's the connection? @Elliott(1), yes that is a very sensible thing to do, and I hadn't thought of it. :) The parenthetical at the end of 6a's problem statement is a bit odd; perhaps they had yet another solution in mind. We can get around the integer size restriction on a technicality; simply start with -(2 + ... + n) and add the array elements to that! Or we could alternate addition and subtraction. I still find the PDF's comment rather misleading, since the solution for 6b meets all the requirements for 6a. Dec21 answered Two seemingly unrelated puzzles have very similar solutions; what's the connection?