Problem Detail: We have an array of Integers, $A[]$ and we have to find the minimum number that is not the sum of a subset of array using the elements from $L$ to $R$ indices. I was thinking of using coin Read More …
Month: February 2017
[Solved]: Can a schedule with cyclic precedence graph still be serialisable?
Problem Detail: We know Every conflict serializable schedule is serializable, but not all serializable schedules conflict-serializable. (*) so it means there is at least one serializable schedule that not conflict serializable. One way of Testing conflict serializability is using Directed graph Read More …
[Solved]: More efficient algorithm for determining if one list is a sublist of another list
Problem Detail: I’m trying to build an algorithm which takes two lists of natural numbers and finds if every element of the first list is displayed at least once in the second list. What if the list is sorted? An algorithm Read More …
[Solved]: Is it possible to build DFA for odd-length words with 1 in the middle?
Problem Detail: $L := {w in {0,1}^* | $the length of $w$ is odd $ wedge $ 1 is in the middle of $w}$ So the alphabet is ${0,1}^*$. My problem is that I can’t keep track of the equality of Read More …
[Solved]: Optimizing a strictly monotone function
Problem Detail: I am looking for algorithms to optimize a strictly monotonic function $f$ such that $f(x) < y$ $f : [a,b] longrightarrow [c,d] qquad text{where } [a,b] subset {mathbb N}, [c,d] subset {mathbb N}$ such that $argmax{_x} f(x) < y$ Read More …
[Solved]: How exactly does a two stack pushdown automaton work?
Problem Detail: I have to explain how a 2-PDA works and then write a program (in Delphi) which simulates a 2-PDA step by step for the language $L = {w$w | w ∈ {0,1}^n with n>0}$. So far, so good. Now Read More …
[Solved]: Counting Number of arrays where sum of ith row is greater or equal to (i-1)th row
Problem Detail: I am working on a problem where I am supposed to count the number of arrays of size $Ntimes M$ where the sum of elements in the $i$-th row is greater than or equal to the the sum of Read More …
[Solved]: Separate all leaves of a weighted tree with minimum weight cuts
Problem Detail: This is part of a larger problem, which I believe I have reduced to this. Given a tree $T$ having positive edge weights, and $k$ leaves (nodes which have exactly one connected node), I need to delete some edges Read More …
[Solved]: Time complexity of generating the first n primes and their product
Problem Detail: Suppose that I have a turing machine that receives as input the string $1^{ntimes n}$ (unary input), what is the time complexity of writing $p_1,…,p_n$ on the output tape, where $p_i$ is the i-th prime number (written in binary)? Read More …
[Solved]: Why is binary subtraction referred to as the invert-add-shift-add method?
Problem Detail: I’m being asked this question for my computer conceptes class, can’t find anything about this in my text book, and have only been able to find half-baked answers googling it. Why is binary subtraction referred to as the invert-add-shift-add Read More …