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 …
Category: Uncategorized
[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]: 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]: 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]: 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]: Algorithm to partially sort list into equal-sized buckets
Problem Detail: Suppose I have a large list of numbers that I want to divide into equal-sized buckets so that every bucket contains only larger numbers than buckets to its left. Numbers within each bucket don’t need to be sorted. For Read More …
[Solved]: Seeking popular science book on bioinformatics or computational genomics
Problem Detail: An intelligent 15-year-old I know is interested in both computer science and genetics. I told her that these fields make an excellent combination. I’d like to give her a book on bioinformatics or computational genomics. I’m looking for a Read More …
[Solved]: Homomorphism erasing information
Problem Detail: I would be grateful if anyone could help me with the tricky exerciese *7.52 from Sipser’s Introduction to the Theory of Computation 3rd ed. I got stuck in proving that, if P is closed under nonerasing homomorphism (replacing all Read More …
[Solved]: Studying Skiena. War Story: What’s Past is Prolog
Problem Detail: I am reading The Algorithm Design Manual, 2nd Edition. The book gives an example task and then explains how to solve it step by step. (The task and solution is detailed here) But I don’t follow one step from Read More …
[Solved]: Randomizd String Searching
Problem Detail: I need to detect whether a binary pattern P of length m occurs in a binary text T of length n where m I want to state an algorithm that runs in time O(n) where we assume that arithmetic Read More …