Problem Detail: The Adler32 algorithm has a shortcoming as noted on Wikipedia: Jonathan Stone discovered in 2001 that Adler-32 has a weakness for very short messages. He wrote “Briefly, the problem is that, for very short packets, Adler-32 is guaranteed to Read More …
Category: Uncategorized
[Solved]: Regex for the language over ${a,b,c}$ that contain at least two $a$’s but no two consecutive $b$’s
Problem Detail: Like the title says, we have the alphabet $Sigma = {a,b,c}$ and the question is asking for the regular expression of the language $L$ that has the property that all strings in $L$ have at least two consecutive $a$’s Read More …
[Solved]: Select a set of elements from a 2D matrix, such that each element comes from distinct row and column
Problem Detail: We’re facing following problem – an n * n 2D Matrix contains doubles (Java). Find a Set of elements such that Each element in the set comes from a unique row and column combination. That is, once you’ve selected Read More …
[Solved]: What is a stateful computation?
Problem Detail: I am reading about a specific field of probabilistic programming, and trying to understand what the term “stateful computation” means. See: http://projects.csail.mit.edu/church/wiki/Simple_Generative_Models (search for “XRP”) Asked By : Astrid Answered By : Shreesh Stateful computation basically means that the model of Read More …
[Solved]: What is a real-world use-case/need for a left-recursive grammar?
Problem Detail: I understand the basics of how left-recursion works, and why some people say it’s bad. And I’ve also ready opinions such as: …like LL and LR parsing, PEGs are often frustrating to use in practise. This is, principally, because Read More …
[Solved]: Checking whether a number divides any of a set of other numbers
Problem Detail: Consider a static set $S$ of positive numbers from range $[1..10^9]$. Is there an efficient algorithm to answer queries of the form: “Given a number $d$ is there an element $x in S$ such that $d | x$”. Simple Read More …
[Solved]: Longest “bounded” subsequence
Problem Detail: Given a sequence of comparable objects $a_1, a_2, ldots a_n,$ how quickly can we find the longest subsequence $s$ such that $s_i > s_1$ for $i > 1$? Or equivalently, how quickly can we find $$ underset{i}{argmax} ; # Read More …
[Solved]: How do you determine the inputs to a neural network?
Problem Detail: I’m looking at this tutorial on neural networks. The data that is given from the UCI study includes various attributes, such as “mean x of on pixels”, “total # on pixels” etc, which are taken as input to the Read More …
[Solved]: Metagame Paradox: what is wrong with this explanation?
Problem Detail: Today I’ve heard about fascinating metagame paradox. I tried to come up with an explanation via Turing Machines formalization (below). Do you know what is the solution to the paradox? (the post content: definition – proposed solution – conclusion) Read More …
[Solved]: Find the smallest summed distances by uniquely pairing elements of one set to elements of another set
Problem Detail: As input I have two sets of points in RN, typically for large N, for example N=40. Supose both sets have m elements: S = s1 … sm T = t1 … tm Semantically both sets are equal, but Read More …