Problem Detail: Flow networks are often constructed when one is interested in measuring how resilient a graph is. The idea goes as follows: two vertices are designated as source $(s)$ and sink $(t)$ respectively, to each edge $e$ of the graph Read More …
Category: Uncategorized
[Solved]: Unreachable Real Numbers – Randomness & Computability
Problem Detail: I’ve recently read that there were many real numbers that would never be reachable by humanity. The explanation itself says that we can write as many programs as integers which is infinite, but there are infinite real numbers between Read More …
[Solved]: How to count bits in cache (direct & 4-way)
Problem Detail: Let’s say, I have a cache with: 2^32 bytes of memory 2048 blocks (of 16 bytes each) Now I’m trying to figure out how much bits each field will contain. Direct mapped: One block is 16 bytes (16 * Read More …
[Solved]: Number of multisets such that each number from 1 to $n$ can be uniquely expressed as a sum of some of the elements of the multiset
Problem Detail: My problem. Given $n$, I want to count the number of valid multisets $S$. A multiset $S$ is valid if The sum of the elements of $S$ is $n$, and Every number from $1$ to $n$ can be expressed Read More …
[Solved]: Is the empty string of even length?
Problem Detail: There is this example of regular expressions: $$(SigmaSigma)^*= {wmid |w|text{ is even}},.$$ From that I understand the empty string is valid as a string of even length. Is this true? Asked By : Brian Answered By : David Richerby A number Read More …
[Solved]: Proving a sorting operation in type system
Problem Detail: I want to know how far a type system in a programming language can be beneficial. For example, I know that in a dependently typed programming language, we can create a Vector class incorporating size of the vector in Read More …
[Solved]: Modified Djikstra’s algorithm
Problem Detail: So, I’m trying to conceptualize something: Say we have a weighed graph of size N. A and B are nodes on the graph. You want to find the shortest path from A to B, given a few caveats: movements Read More …
[Solved]: Should activation function be monotonic in neural networks?
Problem Detail: A lot of activation functions in neural networks (sigmoid, tanh, softmax) are monotonic, continuous and differentiable (except of may be a couple of points, where derivative does not exist). I understand the reason for continuity and differentiability, but can Read More …
[Solved]: Can not follow the example for max-flow-min-cut on Wikipedia
Problem Detail: This Wikipedia example is very confusing. Its saying the max flow = min cut. But I see the max flow = 9 and the min cut = 7. If not, how does the capacity =min cut here? Which is Read More …
[Solved]: Huffman code optimal substructure property
Problem Detail: I am learning about Greedy Algorithms and we did an example on Huffman codes. To prove the correctness of our algorithm, we had to have the greedy choice property and the optimal substructure property. Here is what my professor Read More …