Problem Detail: This is in context of hashing of strings. I’m not sure why a string like, CS, could be represented as CS = ‘c’*256 + ‘s’ Does anyone know about this? Asked By : John Swoon Answered By : David Richerby A Read More …
Author: ignougroup
Converting a digraph to an undirected graph in a reversible way
Problem Detail: I am looking for an algorithm to convert a digraph (directed graph) to an undirected graph in a reversible way, ie the digraph should be reconstructable if we are given the undirected graph. I understand that this will come Read More …
Understanding DPLL algorithm
Problem Detail: I’m trying to understand DPLL algorithm for solving SAT problem. And here it is: Algorithm DPLL Input: A set of clauses Φ. Output: A Truth Value. function DPLL(Φ) if Φ is a consistent set of literals then return true; Read More …
Is a stack overflow detected by hardware or software?
Problem Detail: Is it the task of the software (operating system) to detect stack overflows or is a stack overflow detected in hardware, causing an exception in the CPU? Asked By : gilianzz Answered By : Gilles It can be software, or hardware, Read More …
Undecidable unary languages (also known as Tally languages)
Problem Detail: An exercise that was in a past session is the following: Prove that there exists an undecidable subset of ${1}^*$ This exercise looks very strange to me, because I think that all subsets are decidable. Is there a topic Read More …
Running time – Linked Lists Polynomial
Problem Detail: I have developed two algorithms and now they are asking me to find their running time. The problem is to develop a singly linked list version for manipulating polynomials. The two main operations are addition and multiplication. In general Read More …
Simplification of regular expression and conversion into finite automata
Problem Detail: This is a beginners question. I and reading the book “Introduction to Computer Theory” by Daniel Cohen. But I end up with confusion regarding simplification of regular expressions and finite automata. I want to create an FA for the Read More …
All paths of less than a given length in a directed graph between couple of nodes
Problem Detail: Counting all possible paths, or all possible paths with a given length, between a couple of nodes in a directed or undirected graph is a classical problem. Attention should be given to what all means, due to the possibles Read More …
Are regular expressions $LR(k)$?
Problem Detail: If I have a Type 3 Grammar, it can be represented on a pushdown automaton (without doing any operation on the stack) so I can represent regular expressions by using context free languages. But can I know if a Read More …
Time complexity of a triple nested loop with squared indices
Problem Detail: I have seen this function in past year exam paper. public static void run(int n){ for(int i = 1 ; i * i < n ; i++){ for(int j = i ; j * j < n ; j++){ Read More …