Problem Detail: On page 16 of this algorithms book, it states: For example, suppose we are choosing between two algorithms for a particular computational task. One takes $f_1(n) = n^2$ steps, while the other takes $f_2(n) = 2n + 20$ steps Read More …
Author: ignougroup
Can someone give a simple but non-toy example of a context-sensitive grammar?
Problem Detail: I’m trying to understand context-sensitive grammars. I understand why languages like ${ww mid w in A^*}$ ${a^n b^n c^n mid ninmathbb{N}}$ are not context free, but what I’d like to know if a language similar to the untyped lambda 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 …
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 …
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 …
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 …
How DMA improves I/O operation efficiency?
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 …
Iterative binary search analysis
Problem Detail: I’m a little bit confused about the analysis of binary search. In almost every paper, the writer assumes that the array size $n$ is always $2^k$. Well I truly understand that the time complexity becomes $log(n)$ (worst case) under Read More …
Turing machine and language decidability
Problem Detail: The document I am reading is here: Turing Machines Before getting into the question, here is the notation used on the picture: Here $Delta$ denotes the blank and R, L and S denote move the head right, left and Read More …
The difference between a bit and a Qubit
Problem Detail: Ok, I have done a lot of research on Quantum computers. I understand that they are possibly the future of computers and may be commonplace in approximately 30-50 years time. I know that a Binary is either 0 or Read More …