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 …
Blog
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 …
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 …
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 …
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 …
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 …
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 …
Algorithm for finding two smallest numbers in an array
Problem Detail: I was just thinking today that the best approach to find two smallest numbers in any array would be to first sort(ascending order) it with some efficient algorithm like Quicksort(Average case complexity: nlogn) and then access the first two Read More …
What parts of linear algebra are used in computer science?
Problem Detail: I’ve been reading Linear Algebra and its Applications to help understand computer science material (mainly machine learning), but I’m concerned that a lot of the information isn’t useful to CS. For example, knowing how to efficiently solve systems of Read More …
Could quantum computing eventually be used to make modern day hashing trivial to break?
Problem Detail: Simply put, if one were to build a quantum computing device with the power of, say, 20 qubits, could such a computer be used to make any kind of modern hashing algorithm useless? Would it even be possible to Read More …