Problem Detail: I’m familiar with a few problems of each class and even though the definitions are based on sets and polynomial reducibility, I see a pattern with time complexity. NP problems appear to be $O(2^n)$ (minus the P problems of Read More …
Blog
Checking if there are 2 elements in an array that sum to X in O(n lg n)
Problem Detail: I have thought about the most useful way of checking an array for 2 elements that sum to X. The trivial solution is to check the sum of every element with every element, and the complexity of this solution Read More …
Moore’s law and Clock Speed
Problem Detail: This figure says according to moore’s law number of transistors doubles about two years. but clock speed, power flattening after given stage. can anyone describe the reasons this flattening in clock-speed. Why can’t we increase the clock speed Read More …
Why unsafe state not always cause deadlock?
Problem Detail: I was reading Operating Systems by Galvin and came across the below line, Not all unsafe states are deadlock, however. An unsafe state may lead to deadlock Can someone please explain how deadlock != unsafe state ? I also Read More …
Are Turing-recognizable languages closed under intersection?
Problem Detail: Let $A$ and $B$ be Turing-recognizable languages. Must language $C = A cap B$ be Turing-recognizable too? I have a hunch that it should be because we can construct an enumerator for $C$ by enumerating all the languages in Read More …
How to calculate probability of packet loss and drop rate?
Problem Detail: In a queuing system (M/M/1) with a finite packet capacity $z$, how do you determine the probability of packet loss if we assume that packets are dropped when the system is full? Packets arrive with a rate $lambda$ and Read More …
Example of a non-context free language that nonetheless CAN be pumped?
Problem Detail: So basically L satisfies the conditions of the pumping lemma for CFL’s but is not a CFL (that is possible according to the definition of the lemma). Asked By : user2329564 Answered By : Yuval Filmus The classical example is $L Read More …
Deadlock and cycle in a resource allocation graph
Problem Detail: Here is a resource allocation graph asked in my Operating Systems Theory midterm. The question is, “Is there a deadlock here? Explain your answer in detail” Ra and Rb are resource sets and every dot inside of them Read More …
How to stop genetic algorithm population converging to a single value
Problem Detail: I’ve written a genetic algorithm (GA) that solves a 7-dimensional optimisation problem. All seven variables are floating point numbers. The problem is that the entire population seems to converge to very nearly the same point in the solution space Read More …
Is there any uncountable Turing decidable language?
Problem Detail: There are many(and I mean many) countable languages which are Turing-decidable. Can any uncountable language be Turing decidable? Asked By : Jyotirmoy Pramanik Answered By : Yuval Filmus Every language over a finite (or even countable) alphabet is countable. Assuming your Read More …