Problem Detail: In the following direct cache map, there is a list of 32-bit memory address references, given as word addresses. I gathered that the index size is 3 bit and there is no offset. However, I used 4 bits to Read More …
Category: Uncategorized
[Solved]: Algorithm for type conversion / signature matching
Problem Detail: I’m working on an expression typing system and looking for insights on what algorithms may be available which solve my problem — or a proof that its complexity is too high to be reasonable to implement. The problem is Read More …
[Solved]: Why do reductions to NP-complete problems in NTIME(n) not break the nondeterministic time hierarchy?
Problem Detail: Let $mathrm{L} in mathrm{NTIME}(n^3)$. Since $mathrm{NTIME}(n^3) subseteq mathrm{NP}$, we have that $mathrm{L} le_p mathrm{3SAT}$. However, $mathrm{3SAT} in mathrm{NTIME}(n)$. Hence, $mathrm{L} in mathrm{NTIME}(n)$. Thus, $mathrm{NTIME}(n^3)subseteq mathrm{NTIME}(n)$ which implies the non-deterministic time-hierarchy is false. But we all know that time hierarchy Read More …
[Solved]: Variable Length Encoding of Integers
Problem Detail: I was just researching Fibonacci encoding of integers. Numbers are encoded in binary and where no two consecutive bits are equal to 1 – other than to terminate the number. Now other schemes are possible, for example having three Read More …
[Solved]: Can we move quantifiers to the left in predicate logic?
Problem Detail: Say I have part of a query in the form: ∃xa(…)∧∃xb(…)∧∃xc(…), where a, b, and c are attributes and the ellipses can be anything (I’m looking for a general rule). Is this equivalent to saying ∃xa,xb,xc(…∧…∧…) – i.e. compacting Read More …
[Solved]: Time cost of thread creation
Problem Detail: While creating an algorithm, the following question came up: In uniform cost, what is the time cost of a process that creates a thread? Is there a difference between creating a thread in a thread pool vs creating a Read More …
[Solved]: Why does $A(L)= { w_1w_2: |w_1|=|w_2|$ and $w_1, w_2^R in L }$ generate a context free language for regular $L$?
Problem Detail: How can I prove that the language that the operator $A$ defines for regular language $L$ is a context free language. $A(L)= { w_1w_2: |w_1|=|w_2|$ and $w_1, w_2^R in L }$, where $x^R$ is the reversed form of $x$. Read More …
[Solved]: Expected number of updates of minimum
Problem Detail: I came across the following problem in a exam. We choose a permutation of n elements $[1,n]$ uniformly at random. Now a variable MIN holds the minimum value seen so far at it is defined to $infty$ initially. Now Read More …
[Solved]: Please explain “decidability” and “verifiability”
Problem Detail: I am trying to (intuitively) understand the two terms “decidability” and “verifiability”. I have done a reasonable amount of searching and going through the various texts I can put my hands on. However, their intuitive understanding seems to escape Read More …
[Solved]: Is the $k$P$k$N-3SAT problem NP-complete?
Problem Detail: Consider the following 3-SAT variant defined over the variables $x_1,ldots,x_n$. In the $k$P$k$N-3SAT problem each variable $x_j$, $j in [n]$, occurs exactly $k$ times as a positive literal in $phi$, and exactly $k$ times as a negative literal in Read More …