Problem Detail: some questions have been popping up recently on ambiguity in CFLs/CFGs which can have subtleties (eg languages vs grammars & ambiguity vs inherent ambiguity). wikipedia states: Many [context free?] languages admit both ambiguous and unambiguous grammars, while some languages Read More …
Author: ignougroup
[Solved]: Monotone boolean satisfiability with at most k 1s is NP-Complete
Problem Detail: I am to prove that monotone boolean formula satisfiability checking when at most k variables are set to 1 is an NP-Complete problem. Proving that it is in NP is easy, but I’m having difficulty showing that it is Read More …
[Solved]: Proving that directed graph diagnosis is NP-hard
Problem Detail: I have a homework assignment that I’ve been bashing my head against for some time, and I’d appreciate any hints. It is about choosing a known problem, the NP-completeness of which is proven, and constructing a reduction from that Read More …
[Solved]: Bloom filter and perfect hashing
Problem Detail: A Bloom filter uses a hash function to test membership in a given set $S$, by checking if an item is present of not at the specified position. To mitigate the effect of hash collision, multiple functions are used, Read More …
[Solved]: Why is the initial state of Zobrist hashing random?
Problem Detail: When generating a board for Zobrist hashing, why are the initial elements random? How can you detect changes to elements later if the initial values are random? Asked By : ross.squires Answered By : Yuval Filmus The initial elements are chosen Read More …
[Solved]: first intersection of two arrays of integers – double binary search feasible?
Problem Detail: I’m interested to find the fastest possible way to find the first element of an intersection of two integers arrays (first match) Looking for the ‘fastest’ algorithm I have seen different methods with different time complexities (to calculate the Read More …
[Solved]: Number of 1 child nodes in a binary tree
Problem Detail: Does anybody know how would I approach calculating the maximum number of 1 child nodes (nodes that have exactly 1 child) in a binary tree with n nodes. Please don’t give me the actual answer as this is one Read More …
[Solved]: Search for minimum in an array of $k$ monotonic subarrays
Problem Detail: Let $A$ be an array of totally ordered elements. A subarray $A[i..j]$ is decreasing if $A[k]geq A[k+1]$ for all $i leq k < j$. It is increasing if $A[k]leq A[k+1]$ for all $i leq k < j$. It is Read More …
[Solved]: Formulas for which any equivalent CNF formula has exponential length
Problem Detail: I read a claim that there are formulas for which any equivalent CNF has exponential length. Can you show me an example for such a boolean formula? I have been trying to build it myself and failed. Asked By Read More …
[Solved]: Choosing taps for Linear Feedback Shift Register
Problem Detail: I am confused about how taps are chosen for Linear Feedback Shift Registers. I have a diagram which shows a LFSR with connection polynomial $C(X) = X^5 + X^2 + 1$. The five stages are labelled: $R4, R3, R2, Read More …