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 …
Blog
[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]: Interleaving algorithm for 2 stacks
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 …
[Solved]: Why do we need “Bloom Filters” if we can use hash tables?
Problem Detail: A Bloom filter is a probabilistic data structure designed to tell, rapidly and memory-efficiently, whether an element is in the set or no. If we can use hash tables where we have O(1) in best time, O(n) in a Read More …
[Solved]: Given a minimum vertex cover can we find all the others in polynomial time?
Problem Detail: Having found one minimum vertex cover of a connected undirected graph, is there a known polynomial-time algorithm for finding all the other minimum vertex covers of the graph, or is this problem NP-complete as well? Another question: what other Read More …
[Solved]: How to determine if a state is a fixed point in a Hopfield network?
Problem Detail: I have been reading a lot and I am still unsure of how to determine this. Let’s say I have an initial binary state vector (1, 1, 1). How would I go about determining whether (1, 1, 1) is Read More …
[Solved]: What is the difference between cyber security ontologies and scenario ontologies in this system?
Problem Detail: I have been reading the paper Towards a Cognitive System for Decision Support in Cyber Operations. And I have been trying to understand the role of two ontologies proposed here, cyber security ontologies and scenario ontologies. I have asked 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]: 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]: 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 …