Problem Detail: I’m a computer science student. I want to create my own programming language (A basic language with few instructions). I know how to do a syntactic analyser, I already did it in Perl. In an article, I read something Read More …
Author: ignougroup
Is Karnaugh Map possible for Maxterms?
Problem Detail: I read about Minterms i.e. sums of products, simplification using Karnaugh Graph. Can this graph be used for Maxterms, i.e. products of sums, as well? If yes, then how? If not, then is there some other similar way to Read More …
Scheduling algorithm to minimize maximum deadline overshoot in pre-emptive scheduler
Problem Detail: Suppose there are $n$ tasks, which need to be scheduled by a pre-emptive scheduler. Each task $T_i$ has a deadline $d_i$ and a total processing time $t_i$ associated with it. Now, all $n$ tasks are given a priory to Read More …
Why doesn’t Knuth’s linear-time multiplication algorithm “count”?
Problem Detail: The wikipedia page on multiplication algorithms mentions an interesting one by Donald Knuth. Basically, it involves combining fourier-transform multiplication with a precomputed table of logarithmically-sized multiplications. It runs in linear time. The article acts like this algorithm somehow doesn’t Read More …
Why is not known whether integer factorization can be done in polynomial time knowing how to do primality tests efficiently?
Problem Detail: First of all, I have just started studying computer science by myself and maybe I just need some clarification of what “polynomial time” means regarding the time complexity of an algorithm and references to study it well. As I Read More …
Closure of Deterministic context-free languages under prefix
Problem Detail: For a formal language $L subseteq Sigma^{*}$ I define the set Pref(L) to be: $text{pref}(L) = {alpha in Sigma^{*} : exists beta in Sigma^{*} text{ such that } alpha beta in L}$ ie. the set of all (not necessarily Read More …
If I have a large random array of 0s and 1s that I want to sort what kind of an algorithm and data structures should I consider?
Problem Detail: What are the types of things that need to be considered if I need to sort a large random array of 0s and 1s? You can assume large array is in the order of million or billions. I understand Read More …
Algorithms computing if a number is a multiple of 3
Problem Detail: When doing mental calculus one can do: Given an integer k, sum all the digits (in base 10), and if the result is a multiple of 3, then k is a multiple of 3. Do you know of any Read More …
Why does this sort algorithm work?
Problem Detail: The following O(n^2) sorting algorithm works but I can’t figure out why. array a // length n, indexed 0 to n-1 for ( i = 0; i < n; i++) for ( j = 0; j < n; j++) Read More …
Why is the consensus number for test-and-set, 2?
Problem Detail: According to Wikipedia, The test-and-set operation can solve the wait-free consensus problem for no more than two concurrent processes. Why can’t it solve the problem for more than two processes? Asked By : ben Answered By : Roy O. Just to Read More …