Problem Detail: I’m trying to solve this question in order to review for my exam, and this one has got me a bit stumped. From the looks of it, it seems like a fairly straight-forward question, but I can’t figure out Read More …
Blog
[Solved]: How to solve this Planning Domain Definition Language (PDDL) question?
Problem Detail: These are 5 action descriptions with conditional effects: Action(A, Precond:{X}, Effect:{when P : ~X), Z}) Action(B, Precond:{Y}, Effect:{when Z : ~P), ~Y,~Z,X}) Action(C, Precond:{~Z}, Effect:{when P : ~X), Y}) Action(D, Precond:{~X}, Effect:{when Q : X)}) Action(E, Precond:{Z}, Effect:{when Q Read More …
[Solved]: Types as first class Citizen
Problem Detail: Coming from a C++ background I don’t understand why one needs types / type expressions as first class citizen? The only language I know that supports this feature is Aldor. Does anybody have some literature about types as first Read More …
[Solved]: Prove that context free languages are not closed under swapping prefixes and suffixes
Problem Detail: Prove that context free languages aren’t closed under this operation: $ A(L) = { zyx mid x,y,z in {0,1 }^*, xyz in L } $ Obviously, we need to find a context free language $L$ such that $A(L)$ isn’t Read More …
[Solved]: 3-SAT for variables appearing 3 times
Problem Detail: I’ve been trying to investigate 3-SAT for variables appearing 3 times and so far I’m getting some mixed answers as to its complexity. For example, https://people.maths.ox.ac.uk/scott/Papers/restricted3sat.pdf says instances of 3-SAT in which every variable occurs three times are always Read More …
[Solved]: Minimising height of a 2-3-4 tree
Problem Detail: I’m wondering how a set of keys could be assigned to nodes in a 2-3-4 tree in order to minimize the height of the tree? Does the sequence of insertion matter with 2-3-4 trees? Asked By : Jack Answered By Read More …
[Solved]: Sandwiching Languages
Problem Detail: I am studying for my algorithms final and came across the following problem: Find three languages $L_1 subset L_2 subset L_3$ over the same alphabet such that $L_2 in P$ and $L_1,L_3$ are undecidable. I am having trouble coming Read More …
[Solved]: What is the worst case running time for an algorithm that combines insertionsort and mergesort?
Problem Detail: Suppose that we have an algorithm “combination” that uses insertionsort for $n < 100$ and mergesort for $n geq 100$. Is the worst case running time of “combination” then $n^2$ or $nlog n$? I was thinking that it’s simply Read More …
[Solved]: What is the difference between Abstract Data Types and objects?
Problem Detail: An answer on Programmers.SE characterizes an essay by Cook (Objects are not ADTs) as saying Objects behave like a characteristic function over the values of a type, rather than as an algebra. Objects use procedural abstraction rather than type Read More …
[Solved]: first order logic resolution unification
Problem Detail: Assuming I have shown part of the knowledge base in the clausal format: [1] p1(banana). [2] not p1(X) or p2(Y). [3] p1(X) or not p3(F). … and more rules. Most of the books, would do something like this: [1,2] Read More …