Problem Detail: I am reading Computer Architecture & Organization by William Stallings to understand I/O operations. Stallings pretty well explains why Programmed I/O (CPU keeps checking the I/O module register status) & Interrupt I/O (CPU still has to over look data Read More …
Blog
Correctness of Strongly Connected Components algorithm for a directed graph
Problem Detail: I have been reading up on algorithm for finding the strongly connected components in a directed graph $G=(V,E)$. It considers two DFS search and the second step is transposing the original graph $G^T$. The algorithm is the following : Read More …
Planarity conditions for Planar 1-in-3 SAT
Problem Detail: Planar 3SAT is NP-complete. A planar 3SAT instance is a 3SAT instance for which the graph built using the following rules is planar: add a vertex for every $x_i$ and $bar{x_i}$ add a vertex for every clause $C_j$ add Read More …
How to simulate backreferences, lookaheads, and lookbehinds in finite state automata?
Problem Detail: I created a simple regular expression lexer and parser to take a regular expression and generate its parse tree. Creating a non-deterministic finite state automaton from this parse tree is relatively simple for basic regular expressions. However I can’t Read More …
Solutions to synchronization problem need to be executed in critical section
Problem Detail: I was reading about synchronization problems for cooperating processes and i learned that only hardware solutions like test_and_wait() and compare_and_set() are performed atomically at the hardware level and in all other software solutions like mutex, semaphore the code needs Read More …
Drawing an implication graph for 2-SAT clauses
Problem Detail: I am trying to convert the following 2-sat clauses to implications and then draw the implication graph. The clauses are: {¬xvy}, {¬yvz}, {¬zvw} ,{¬wvu},{¬uv¬x},{xvw},{¬wvx} I converted the boolean literals into implications so I could construct the implication graph: {¬xvy}: Read More …
Maximum length path between any two nodes in a tree with possible negative edge weights
Problem Detail: Is there an efficient way to find the longest path between any two nodes in a tree. Given that edges can have negative weights. I know about the diameter problem which finds the longest path in a graph with Read More …
Lambda calculus didn’t seem abstract. And I can’t see the point of it
Problem Detail: The underlying question: What does lambda calculus do for us that we can’t do with the basic function properties and notation generally learned in middle school algebra? First of all, what does abstract mean in the context of lambda Read More …
What is the height of an empty BST when using it in context for balancing?
Problem Detail: Suppose the datatype for a BST is defined as follows (in SML) datatype ‘a bst_Tree = Empty | Node of (int * ‘a) * ‘a bst_Tree * ‘a bst_Tree; So there are two cases one in which the BST Read More …
Is there a context free, non-regular language $L$, for which $L^*$ is regular?
Problem Detail: I know that there are non-regular languages, so that $L^*$ is regular, but all examples I can find are context-sensitive but not context free. In case there are none how do you prove it? Asked By : Simon S Answered Read More …