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 …
Category: Uncategorized
[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]: Is badly written code derogatory to the compiler?
Problem Detail: I was having a heated debate with a friend of mine (who considers me an idiot, mind you) and we were arguing about whether a compiler has an index, or coefficient, that judges how poorly code is written. Things Read More …
[Solved]: What’s the difference between Adaptive Control and a Kalman Filter?
Problem Detail: From my basic understanding of Adaptive Control, I understand that it uses the error and the velocity of the error to approximate the error in the solution space of a problem, thus allowing for guaranteed convergence under certain conditions Read More …
[Solved]: Complexity of 3SAT variants
Problem Detail: This question is motivated by my answer to another question in which I stated the fact that both Betweeness and Non-Betweeness problems are $NP$-complete. In the former problem there is a total order such that the betweeness constraint of Read More …
[Solved]: Is it decidable whether a pushdown automata recognizes a given regular language?
Problem Detail: The problem whether two pushdown automata recognize the same language is undecidable. The problem whether a pushdown automata recognizes the empty language is decidable, hence it is also decidable whether it recognizes a given finite language. It is undecidable Read More …
[Solved]: Prove correctness of DFA ending with ab
Problem Detail: I have the following deterministic finite automaton and I am need to prove correctness of the claim that this automata accepts ${wab mid win {a,b}^*}$ I know that I need to prove by induction on the length of the Read More …
[Solved]: How to prove that BFS directed-graph traversal algorithm terminates?
Problem Detail: How to prove that BFS directed-graph traversal algorithm terminates? (I copy the pseudocode from here) Input: A graph G and a root v of G. procedure BFS(G,v): create a queue Q enqueue v onto Q mark v while Q 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 …