Problem Detail: I’m reading through “Computers and Intractability: A guide to the Theory of NP-Completeness” by Michael R. Garey and David S. Johnson, p. 20 and I came across this concept of a function that is polynomially related to input lengths Read More …
Author: ignougroup
[Solved]: What do I need to know about algorithms?
Problem Detail: Drawing from Are algorithms (and efficiency in general) getting less important?, I get that algorithms are more important than ever, but I need to know anything about them other than their complexities? I would expect to use algorithms out Read More …
[Solved]: How CPU know which process generated an interrupt?
Problem Detail: When a computer OS supports multi-program, it needs to have a scheduling algorithm to handle which process will be run by the cpu. If a process is in state ‘blocked’ waiting for IO, the scheduling causes another process to Read More …
[Solved]: Why is this language over {a,b,c} regular?
Problem Detail: The language of all words over the alphabet {a,b,c} such that the number of as in the word minus the number of cs in the word is divisible by three. How is this language regular? Lecturer notes says that Read More …
[Solved]: Basic questions about network flow calculations
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 …
[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 …