Problem Detail: As part of a homework assignment covering implementation of introsort I’m asked why heapsort is used rather than mergesort (or other $O(nlog(n))$ algorithms for that matter). Introsort is a hybrid sorting algorithm that provides both fast average performance and Read More …
Author: ignougroup
Gödelization in Turing Machine
Problem Detail: I was looking at Gödelization in Theory of Computation course. I could understand the Gödel numbering concepts, but couldn’t understand its importance in Theory of Computation. Could anyone please point to some good materials or point out its importance. Read More …
designing a DFA and the reverse of it
Problem Detail: There is a theorem that says if a language is regular, it’s reverse is regular as well. How can I draw a DFA that shows if a language is regular, it’s regular as well? Asked By : Parisa Answered By Read More …
Difference between weak and strong AI
Problem Detail: I’m trying to understand the difference between weak and strong AI. For an example, let’s say we would pass the turing test – would it show strong AI or weak AI then? I don’t believe that this is standard Read More …
Proving NP-completeness of a graph coloring problem
Problem Detail: Given a graph $G=(V,E)$ and a set of colors $k<V$. Find a assignment of colors to vertices that minimizes the number of adjacent vertices in conflict. (Two adjacent vertices are in conflict if they have the same color.) I Read More …
Are semantic networks ontologies?
Problem Detail: I struggle with few definitions in knowledge representation and seek credible help to distinguish between them. I have been searching on wikipedia and many websites for the difference between ontologies and semantic networks (not to be confused with semantic Read More …
What is an instance of NP complete problem?
Problem Detail: I don’t understand this definition of an “instance” of a problem. Quoting from the CLRS book on page 1054 on abstract problems (Chapter 34.1): We define an abstract problem $Q$ to be a binary relation on a set $I$ Read More …
The relation between 2SAT and 3SAT
Problem Detail: Show that proving 2SAT is not NP-Complete would prove that 3SAT is not in P. Or eqivalently – Show that proving 3SAT is in P would prove that 2SAT is NP-Complete. I can see there is an easy Read More …
How to find the cost of pseudocode with a nested loop and a nested if statement?
Problem Detail: How can I find the cost of pseudocode with a nested loop and a nested if statement? On the left hand side is an example from a textbook I am following. On the right hand side is pseudo code Read More …
How fast can we find all Four-Square combinations that sum to N?
Problem Detail: A question was asked at Stack Overflow (here): Given an integer $N$, print out all possible combinations of integer values of $A,B,C$ and $D$ which solve the equation $A^2+B^2+C^2+D^2 = N$. This question is of course related to Bachet’s Read More …