Answered By : Dave Clarke My preference is for Coq, but I imagine that others prefer Isabelle. One of the strange things I found about Isabelle is that there is a two-level syntax, where some of your definitions need to be Read More …
Blog
Why is linear programming in P but integer programming NP-hard?
Answered By : Benjamin Lindqvist I can’t comment since it requires 50 rep, but there are some misconceptions being spread about, especially Raphael’s comment “In general, a continous domain means there is no brute force (and no clever heuristics to speed Read More …
What are handles in parsing?
Answered By : Alex ten Brink Let’s consider the following grammar: 1: $S to A b$ 2: $S to B b$ 3: $A to a a$ 4: $B to a a a$ Obviously, this language is totally uninteresting: the only words Read More …
Number of cycles in a graph?
Answered By : Shaull Assuming you mean simple cycles (otherwise the number is infinite) – yes, of course the number can be exponential: consider the complete graph on $n$ vertices, then every sequence of distinct vertices can be completed to a Read More …
(AVL Trees) What is the maximum possible difference between the number of nodes in the root node’s subtrees?
Answered By : Mowji I assume that we start labeling heights from $0$. Actually your approach is right. You must consider the left-side (or right-side) sub-tree with the least possible amount of nodes and the right-side (or left-side) sub-tree with the Read More …
Boolean search explained
Answered By : Yuval Filmus Hint: The search x AND y will result in 10 000 hits. Problem Detail: My mother is taking some online course in order to be a librarian of sorts, in this course they cover boolean searches, so Read More …
What is the asymptotic runtime of this nested loop?
Answered By : Gilles The result is correct, but your reasoning is not. You can’t mix big-oh with ellipses. It happens to work here because of extra conditions that happen to be true but that you haven’t checked. Why summing big-ohs Read More …
Reason to learn propositional & predicate logic
Answered By : Guy Coder I tend to like Unification and anything related to it. If you don’t know propositional & predicate logic, then you are skipping the basics of logic. If you have an interest in anything listed, then it Read More …
Generating Combinations from a set of pairs without repetition of elements
Answered By : Carl Mummert One direct way is a recursive procedure that does the following on each invocation. The input to the procedure is a list of pairs that have already been chosen and a list of all the pairs. Read More …
Can a runtime environment detect an infinite loop?
Answered By : Kyle Strand It might be theoretically possible for a runtime environment to check for such loops using the following procedure: After ever instruction executed, the runtime environment would make a complete image of the state of a running Read More …