Problem Detail: Given a sorted array A, we have to find the position of an element m in it. (It is also given that the element exists in the array.) However there is a constraint. Like in a game you have Read More …
Category: Uncategorized
[Solved]: Is there a difference between pure binary and binary?
Problem Detail: In some books and on the internet I occasionally find “pure binary” and “binary” on its own, is there a difference between these two terms? If so, can someone describe briefly what they are? Asked By : Saras Answered By Read More …
[Solved]: Is something more than Turing complete Turing complete?
Problem Detail: In complexity theory, we do not call a decision problem that is not in NP “NP-complete”. But in computability, do we call a machine model “Turing complete” if it can compute functions which Turing machines can not? The definition Read More …
[Solved]: Reconstructing Graphs from Degree Distribution
Problem Detail: Given a degree distribution, how fast can we construct a graph that follows the given degree distribution? A link or algorithm sketch would be good. The algorithm should report a “no” incase no graph can be constructed and any Read More …
[Solved]: Difference between Dependent type , refinement type and Hoare Logic
Problem Detail: I know little dependent type theory. From wikipedia : A dependent type is a type whose definition depends on a value. And from my Type theory course i recall that a dependent type is : Family of types indexed Read More …
[Solved]: What is the complexity of the emptiness problem for 2-way DFAs?
Problem Detail: I’m wondering, what is the time-complexity of determining emptiness for 2-way DFAs? That is, finite automata which can move backwards on their read-only input tape. According to Wikipedia, they are equivalent to DFAs, though the equivalent DFA might be Read More …
[Solved]: Particularly Tricky Recurrence Relation (Master’s Theorem)
Problem Detail: Master’s theorem is shown below, The recursive function to be solved is shown below, I understand that a refers to the number of recursive calls in this function (3 in this case). b refers to what the input size Read More …
[Solved]: “Dense” regular expressions generate $Sigma^*$?
Problem Detail: Here’s a conjecture for regular expressions: For regular expression $R$, let the length $|R|$ be the number of symbols in it, ignoring parentheses and operators. E.g. $|0 cup 1| = |(0 cup 1)^*| = 2$ Conjecture: If $|R| > Read More …
[Solved]: What’s harder: Shuffling a sorted deck or sorting a shuffled one?
Problem Detail: You have an array of $n$ distinct elements. You have access to a comparator (a black box function taking two elements $a$ and $b$ and returning true iff $a < b$) and a truly random source of bits (a Read More …
[Solved]: Why does backtracking work the way it does?
Problem Detail: I just recently started learning in a CS context (as opposed to a programming context) about simple recursive functions, along with the combinatorial applications, and techniques such as Backtracking and Divide et Impera. The example problem that I chose Read More …