Problem Detail: I need to keep a collection on integers in the range 0 to 65535 so that I can quickly do the following: Insert a new integer Insert a range of contiguous integers Remove an integer Remove all integers below Read More …
Category: Uncategorized
Union and intersection of a regular and a non-regular language
Problem Detail: Lets say we have $L_1$, which is a regular language and $L_2$ which is not. Are $L_1 cap L_2$, $L_1 cup L_2$ , $L_1$ $L_2$ and $L_1 cdot L_2$ are always non-regular languages? We know that two regular languages Read More …
What is the purpose of using NIL for representing null nodes?
Problem Detail: In my Algorithms and Data Structures course, professors, slides and the book (Introduction to Algorithms, 3rd edition) have been using the word NIL to denote for example a child of a node (in a tree) that does not exist. Read More …
Who needs linearizability?
Problem Detail: I’ve been reading about the differences between serializability and linearizability, which are both consistency criteria for replicated systems such as replicated databases. However, I don’t know in which cases linearizability would be needed, even though it’s stronger than serializability. Read More …
Rearrange an array using swap with 0
Problem Detail: This is a Google interview question. I got it from a website. You have two arrays source and target, containing two permutations of the numbers [0..n-1]. You would like to rearrange source so that it equals to target. The Read More …
Is 0* decidable?
Problem Detail: I found a statement (without explanation) that a language $A = 0^*$ is decidable. How is that possible? I mean, how would we build a Turing machine that would accept (or reject) a possibly infinite string of 0’s? I Read More …
Matrix powering in $O(log n)$ time?
Problem Detail: Is there an algorithm to raise a matrix to the $n$th power in $O(log n)$ time? I have been searching online, but have been unsuccessful thus far. Asked By : Jack Hunt Answered By : Massimo Cafaro Here is the pseudocode Read More …
What is a naive method?
Problem Detail: I was researching dynamic programming and read the following: Often when using a more naive method, many of the subproblems are generated and solved many times. What is a naive method? Asked By : chopper draw lion4 Answered By : usul Read More …
What does ‘true concurrency’ mean?
Problem Detail: I often hear phrases like ‘true concurrency semantics’ and ‘true concurrency equivalences’ without any references. What does those terms mean and why are they important? What are some examples of true concurrency equivalences and what is the need for Read More …
How to prove that context sensitive languages are closed under intersection and complement?
Problem Detail: This is a question from the exam of our “Automata and Formal Languages” course. There is a question where asked to prove or disprove that any “relative complement” operation between two context sensitive languages will also produce a context Read More …