Problem Detail: I have observed that there are two different types of states in branch prediction. In superscalar execution, where the branch prediction is very important, and it is mainly in execution delay rather than fetch delay. In the instruction pipeline, Read More …
Author: ignougroup
[Solved]: Union of a Deterministic Context-free language and a Regular Language is a Deterministic Context-free Language
Problem Detail: In formal language theory, deterministic context-free languages (DCFL) are a proper subset of context-free languages. They are the context-free languages that can be accepted by a deterministic pushdown automaton. Now Assume that $R$ is a regular language and $D$ Read More …
[Solved]: If recursive Fibonacci is $O(2^N)$ then why do I get 15 calls for N=5?
Problem Detail: I learned that recursive Fibonacci is $O(2^N)$. However, when I implement it and print out the recursive calls that were made, I only get 15 calls for N=5. What I am missing? Should it not be 32 or near Read More …
[Solved]: How to find the big O notation of $log^b x$
Problem Detail: How would you determine big O notation for $log^b x$? I don’t think you can simply say $O(log^b x)$, can you? If you can, then here is a better question: $x^3 + log^b x$. How would you know if Read More …
[Solved]: Complexity of variation of partition problem
Problem Detail: I want to know whats the complexity of the following variant of the partition problem: Partition problem: http://en.wikipedia.org/wiki/Partition_problem Suppose we have one set formed by integers and we want to partition the set in two subsets of the same Read More …
[Solved]: Chernoff bounds and Monte Carlo algorithms
Problem Detail: One of Wikipedia examples of use of Chernoff bounds is the one where an algorithm $A$ computes the correct value of function $f$ with probability $p > 1/2$. Basically, Chernoff bounds are used to bound the error probability of Read More …
[Solved]: Creating arrays of object of abstract class in statically-typed object-oriented languages
Problem Detail: In statically-typed object-oriented languages (like Java, C++, C#, …), suppose I declare an abstract class: public abstract class myclass1 { …………….. } Most of these languages (like Java) wouldn’t allow us to create an Object of an Abstract class, Read More …
[Solved]: How do I continue learning programming, beyond the basics?
Problem Detail: DISCLAIMER: I understand that I might not be posting in the right part of StackExchange, or this question might have been asked before (I haven’t found it). If this offends anybody, I apologize. I’m 15 and a sophomore in Read More …
[Solved]: Is oracle computer capable of doing infinite loops?
Problem Detail: Solve this problem: “build an infinite binary oscilator” With a Turing Machine we can solve it a=False While True: a=not a print a, then output will be True False True False True False … (for ever) I think an Read More …
[Solved]: Mutual exclusion for n processes
Problem Detail: I want to implement mutual exclusion for $n$ processes. Critical section code: int turn = 0; /* shared control variable */ Pi: /* i is 0 or 1 */ while (turn != i) ; /* busy wait */ CSi; Read More …