Problem Detail: this is my first question on this site. I recently, study on NP. I have some confusion about this Topic, and want to propose my inference and some one verify me. I) each NP problem can be solved in Read More …
Blog
[Solved]: Prove that regular languages and context-free languages aren’t closed under $Perm(L)$
Problem Detail: Let the operation $$Perm(L) = { w | exists u in L text{ such that } u text{ is a permutation of } w }$$ Prove that both regular languages and CFLs aren’t closed under $Perm(L)$. I’ve tried to Read More …
[Solved]: MU0 instruction set
Problem Detail: As i know the MU0 processor instruction format is as follows: so the opcode is 4 bit, can anyone explain why it has only 8 instructions, if it could have 16 instructions, 2^4 = 16 ?? Asked By : rainman Read More …
[Solved]: What is the effect of operating systems on execution speed?
Problem Detail: I’m using a Raspberry Pi 2 which works with 900MHz. (Asked this question there and they think it belongs to cs) My question is: since it also runs an operating system in the background, I expect this would take Read More …
[Solved]: Mergesort with $O(n^2 log n)$ runtime
Problem Detail: I have a task where i need to find a problem in which mergesort has to have a runtime of $O(n^2 log n)$. In our lecture we said that the runtime is $O(n log n)$ assuming that every comparison Read More …
[Solved]: How to find loop invariant from weakest precondition?
Problem Detail: Consider this code: Precondition: Postcondition: rv == i <==> ∃i, 0 ≤ i ≤ a.length-1, a[i] == key function Find(Array<int> a, int key) returns (int i) { i = a.length -1; while i ≥ 0 { if a[i] == Read More …
[Solved]: Asymptotic equivalent of the recurrence T(n)=3⋅T(n/2)+n
Problem Detail: The questions is to find the running time $T(n)$ of the following function: $$T(n)=3cdot T(n/2) + n tag{1}$$ I know how to solve it using Master theorem for Divide and Conquer but I am trying to solve it by Read More …
[Solved]: Infinite Memory
Problem Detail: It seems to me that any problem whose solution requires finite memory can be emulated on a Finite State Machine . This would make those problems that can’t be solved by a Finite State Machine to require infinite memory Read More …
[Solved]: How do calculators convert from decimal to fraction?
Problem Detail: Sorry if this question is either obvious or ignorant. I am a high school student with only the computer science knowledge I have taught myself. Calculators have a function that can convert numbers from decimal to fractional equivalents. For Read More …
[Solved]: Understanding Logical to Physical Addressing
Problem Detail: I am trying to understand the concept of logical to physical addressing. I am given 72 physical addresses (0-71) with values A virtual address = 2^(p+w) p = page bits w = word bits I know the page table Read More …