Problem Detail: There are definitions of Absolute, Strong and Weak Fairness available across the internet, but I cannot find a definition of “K-Fairness” property for critical section algorithms (also algorithms that satisfy a 1-fairness or 3-fairness property). Does this actually exist Read More …
Blog
[Solved]: Attempt to write a function with cubed log runtime complexity $O(log^3 n)$
Problem Detail: I’m learning Data Structures and Algorithms now, I have a practical question that asked to write a function with O(log3n), which means log(n)*log(n)*log(n). public void run(int n) { for (int i = 1; i < n; i *= 2) Read More …
[Solved]: How do we know for sure that EXPTIME ≠ P?
Problem Detail: I’m a beginner in learning about computational complexity and this has stumped me. I’ve read that by the time hierarchy theorem, it’s known that EXP-complete problems are not in P. (Wikipedia) It makes absolute sense intuitively that this is Read More …
[Solved]: Turing Completeness + Dataflow Unification = Arbitrarily invertible (pure, nonrecursive) functions?
Problem Detail: Assume we are working in a Turing-complete, referentially-transparent, higher-order language that supports arbitrary dataflow unification. Shouldn’t it then be possible to construct the following function (using Haskell-like syntax, because that’s what I’m most familiar with)? — Takes an arbitrary Read More …
[Solved]: Running time of selection sort
Problem Detail: I wrote pseudocode for Selection Sort, but I’m not sure what is the running time of my algorithm, can you help me with that? My Pseudocode: Selection Sort(int a[], int n) Input: array of length $n$ Output: sorted array Read More …
[Solved]: Is a language with only a stack of fixed-size integers Turing-complete?
Problem Detail: I encountered the brainfuck programming language which I know is turing complete. However I then decided to create a high level language that gets compiled to brainfuck code. There is only one data type in it (integer, since that’s Read More …
[Solved]: Pseudo-random sequence prediction
Problem Detail: Disclaimer: I am a biologist, so sorry for (perhaps) basic question phrased in such crude terms. I am not sure if I should ask this question here or on DS/SC, but CS is the largest of three, so Read More …
[Solved]: Turing Machines: Arbitrary alphabet equivalence with binary alphabet
Problem Detail: Think of an $n$-ary alphabet as ${0, 1, …, n-1, n}$. For example, a binary alphabet is ${0, 1}$. Do Turing Machines with binary alphabets decide the same set of languages as Turing Machines with $3$+ symbol alphabets? I Read More …
[Solved]: What is the “Chairman Tree”?
Problem Detail: My competitive programming coach told me of a balanced binary tree used by a lot of Chinese competitors that has all the functions of any other balanced binary tree and is fully persistent and runs queries and updates in Read More …
[Solved]: Some slight confusion with the UNTIL operator in CTL (e.g. a U b)
Problem Detail: I’ve sketched a very small transition system in paint that I’ll use as an example. I want to see if $A(aUb)$ holds for this transition system. From my understanding, this CTL formula is asking if ALL paths satisfy $aUb$. Read More …