Recent activity by Sushant kaushal

494
views
1 answers
What is the language produced by....null*(denoted by phi) doubt from youtube video here
3.1k
views
1 answers
Show how to solve the fractional knapsack problem in O(n) time.The solution include that we can find the median in O(n) time and then solving the fractional knapsack problem on input ... , so how do we have the equation T(n) = T(n/2) + cn?
21.2k
views
4 answers
Given a language $L$, define $L^i$ as follows:$L^0 = \{ \varepsilon \}$$L^i = L^{i-1} \bullet L \text{ for all } I >0$The order of ... language $L_1 ($over alphabet $0)$ accepted by the following automaton.The order of $L_1$ is ________.
1.9k
views
3 answers
Why is recursive equation of following code $T(n)=T(n/2)+O(1)$, not $T(n)=8*T(n/2)+O(1)$? int x=0; int A(n) { if(n==1) return 1; else { X+=8A(n/2)+n^3; } return X; }
14.7k
views
6 answers
What does the following algorithm approximate? (Assume $m > 1, \epsilon >0$).x = m; y = 1; While (x-y > ϵ) { x = (x+y)/2; y = m/x; } print(x);$\log \, m$m^2$m^{\frac{1}{2}}$m^{\frac{1}{3}}$