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 …
Author: ignougroup
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 …
Easy proof for context-free languages being closed under cyclic shift
Problem Detail: The cyclic shift (also called rotation or conjugation) of a language $L$ is defined as ${ yx mid xy in L }$. According to wikipedia (and here) the context-free languages are closed under this operation, with references to papers Read More …
Line separates two sets of points
Problem Detail: If there is a way to identify if two sets of points can be separated by a line? We have two sets of points $A$ and $B$ if there is a line that separates $A$ and $B$ such that Read More …
Guessing the smallest unique positive integer
Problem Detail: Let us consider the following game: there are some players and a computer. Each player inputs one positive integer and his name (player doesn’t know another’s numbers, just his own). When all the players made their moves, computer outputs Read More …