Question Detail: In my Computing Theory course, a lot of our problems involve using induction on the length of the input string to prove statements about finite automata. I understand mathematical induction, however when strings come into play I get real Read More …
Category: Uncategorized
Deciding on Sub-Problems for Dynamic Programming
Question Detail: I have used the technique of dynamic programming multiple times however today a friend asked me how I go about defining my sub-problems, I realized I had no way of providing an objective formal answer. How do you formally 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 …
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 …
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 …
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 …
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 …
Visual Programming languages
Question Detail: Most of us learned programming using “textual” programming languages like Basic, C/C++, and Java. I believe it is more natural and efficient for humans to think visually. Visual programming allows developers to write programs by manipulating graphical elements. I Read More …
Converting an NFA to regex using GNFA algorithm?
Question Detail: So I’ve been trying to crack this for a long time and almost feel like I am going in loops about this question. Given the following NFA: Using the GNFA algorithm get the regular expression. I understand that you Read More …
When would best first search be worse than breadth first search?
Question Detail: I am studying best first search as it compares to BFS (breadth-first search) and DFS (depth-first search), but I don’t know when BFS is better than best-first search. So, my question is When would best-first search be worse than Read More …