Question Detail: From my Googling, it appears that call by value-result is similar to call by reference in that it changes values in the caller, but it’s different in that the changes don’t take place until the callee exits, and that Read More …
Category: Uncategorized
Call by value-result vs. call by reference?
Question Detail: From my Googling, it appears that call by value-result is similar to call by reference in that it changes values in the caller, but it’s different in that the changes don’t take place until the callee exits, and that Read More …
How does the momentum term for backpropagation algorithm work?
Question Detail: When updating the weights of a neural network using the backpropagation algorithm with a momentum term, should the learning rate be applied to the momentum term as well? Most of the information I could find about using momentum have Read More …
Quicksort vs. insertion sort on linked list: performance
Question Detail: I have written a program to sort Linked Lists and I noticed that my insertion sort works much better than my quicksort algorithm. Does anyone have any idea why this is? Insertion sort has a complexity of $Theta(n^2)$ and Read More …
How to understand the reduction from 3-Coloring problem to general $k$-Coloring problem?
Question Detail: 3-Coloring problem can be proved NP-Complete making use of the reduction from 3SAT Graph Coloring (from 3SAT). As a consequence, 4-Coloring problem is NP-Complete using the reduction from 3-Coloring: Reduction from 3-Coloring instance: adding an extra vertex to the Read More …
How does a TLB and data cache work?
Question Detail: I’m trying to study for an exam and I realized I’m confused about how the TLB and data cache work. I understand that the TLB is essentially a cache of most recently used physical addresses. However, I was looking Read More …
How to simulate a die given a fair coin
Question Detail: Suppose that you’re given a fair coin and you would like to simulate the probability distribution of repeatedly flipping a fair (six-sided) die. My initial idea is that we need to choose appropriate integers $k,m$, such that $2^k = Read More …
What is the fastest algorithm for multiplication of two n-digit numbers?
Question Detail: I want to know which algorithm is fastest for multiplication of two n-digit numbers? Space complexity can be relaxed here! Asked By : Andy Best Answer from StackOverflow Question Source : http://cs.stackexchange.com/questions/16226 Answered By : avi As of now Fürer’s algorithm by Read More …
Prove that every two longest paths have at least one vertex in common
Question Detail: If a graph $G$ is connected and has no path with a length greater than $k$, prove that every two paths in $G$ of length $k$ have at least one vertex in common. I think that that common vertex Read More …
How does the computer determine whether a number is smaller or greater than another?
Question Detail: It might sound like a stupid question but I’m really curious to know how a computer knows that $1<2$? Also, how does a computer know that the order of integer is $1,2,3,4,5,ldots$ and alphabet is A,B,C,D,…? Is it somewhere Read More …