Problem Detail: Suppose I have two stacks $<a_1,a_2,…a_m>$ and $<b_1, b_2,…b_n>$ and a third stack of size $m+n$. I want to have the third stack in the following manner, $$<a_1,b_1,a_2,b_2,…a_n,b_n…a_m-1,a_m>$$ for $$m>n$$ This was easy to do if the two initial Read More …
Author: ignougroup
[Solved]: Can I have a “dependent coproduct type”?
Problem Detail: I’m reading through the HoTT book and I have a (probably very naive) question about the stuff in the chapter one. The chapter introduces the function type $$ f:Ato B $$ and then generalizes it by making $B$ dependent Read More …
[Solved]: Is the codomain/range of a hash function always $mathbb{Z}$ or $mathbb{N}$?
Problem Detail: From Wikipedia A hash function is any algorithm or subroutine that maps large data sets of variable length, called keys, to smaller data sets of a fixed length. For example, a person’s name, having a variable length, could be Read More …
[Solved]: Finding a function which is a mapping reduction of A to B
Problem Detail: How do I precisely define the function which is a mapping reduction of A to B for the following examples? What is the process of figuring this out? Given: A and B are languages over the alphabet {0,1}. Examples: Read More …
[Solved]: Is there an adjustment for Adler32 algorithm so it works well on short messages?
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 …
[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]: 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 …
[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]: 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 …