Problem Detail: Suppose we are given $n$ distinct integers $a_1, a_2, dots, a_n$, such that $0 le a_i le kn$ for some constant $k gt 0$, and for all $i$. We are interested in finding the counts of all the possible Read More …
Author: ignougroup
[Solved]: How do I show T(n) = 2T(n-1) + k is O(2^n)?
Problem Detail: This is a practice problem I’ve come up with in order to study for an exam I have in a couple of hours. Again, here’s the problem: Show T(n) = 2T(n-1) + k is O(2^n) where k is some Read More …
[Solved]: How is a Turing Test defined?
Problem Detail: Turing Test definition taken from wikipedia: The Turing test is a test of a machine’s ability to exhibit intelligent behavior equivalent to, or indistinguishable from, that of a human. In the original illustrative example, a human judge engages in Read More …
[Solved]: Is Differential Evolution a genetic algorithm?
Problem Detail: I am trying to classify the Differential Evolution algorithm according to the framework in the book: Introduction to Evolutionary Computing The authors classify the field of evolutionary computation into 4 paradigms: Evolutionary programming Genetic programming Evolutionary strategies Genetic algorithms Read More …
[Solved]: Store and sort a large number of 64-bit integers
Problem Detail: I have about $500000000$, $64$-bit integers, so these numbers are very large. I want to sort them as quickly as possible. I have couple of questions: What data structure do you suggest for storing this data? What algorithm do Read More …
[Solved]: Maximise sum of “non-overlapping” numbers in square array – help with proof
Problem Detail: A question was posted on Stack Overflow asking for an algorithm to solve this problem: I have a matrix (call it A) which is nxn. I wish to select a subset (call it B) of points from matrix A. Read More …
[Solved]: Running time of a nested loop with $sum i log i$ term
Problem Detail: So I have the following pseudo-code: Function(n): for (i = 4 to n^2): for (j = 5 to floor(3ilog(i))): // Some math that executes in constant time So far, I know that to find this i will be calculating Read More …
[Solved]: What are some problems which are easily solved by human brain but which would take more time computers?
Problem Detail: Are there any problems which can be solved by human brain in a very less time but a computer may take a lot of time or a computer could never solve it ? Asked By : avi Answered By : vzn Read More …
[Solved]: Automatic Downcasting by Inferring the Type
Problem Detail: In java, you must explicitly cast in order to downcast a variable public class Fruit{} // parent class public class Apple extends Fruit{} // child class public static void main(String args[]) { // An implicit upcast Fruit parent = Read More …
[Solved]: Recursive definition of sum of two numbers in terms of the successor function
Problem Detail: This is a question from the book Data structures using C and C++ by Tenenbaum. Not a homework problem but self-study. Recursive definition of a+b, where a and b are non-negative integers, in terms of successor function succ defined Read More …