1
Suppose you are given a list of \(n\) integers, each of size at most \(100n\). How many operations would it take you to do the following tasks (in answering these questions, we are interested primarily in whether it will take \(\log n\), \(\sqrt{n}\), \(n\), \(n^2\), \(n^3\), \(2^n\), … steps. In other words, ignore multiplicative constants.):
Determine if the number \(2n+7\) is in the list.
Determine if there are two numbers in the list whose sum is \(2n+7\).
Determine if there are two numbers in the list whose product is \(2n+7\) (This one is more subtle than it might appear! It may be to your advantage to sort the integers in the list).
Determine if there is a number \(i\) for which all the numbers in the list are between \(i\) and \(i+2n+7\).
Determine the longest sequence of consecutive integers belonging to the list.
Determine the number of primes in the list.
Determine whether there are three integers \(x\), \(y\) and \(z\) from the list so that \(x+y=z\).
Determine whether there are three integers \(x\), \(y\) and \(z\) from the list so that \(x^2+y^2=z^2\).
Determine whether there are three integers \(x\), \(y\) and \(z\) from the list so that \(xy=z\).
Determine whether there are three integers \(x\), \(y\) and \(z\) from the list so that \(x^y=z\).
Determine whether there are two integers \(x\) and \(y\) from the list so that \(x^y\) is a prime.
Determine the longest arithmetic progression in the list (a sequence \((a_1, a_2,\dots,a_t)\) is an arithmetic progression when there is a constant \(d\neq 0\) so that \(a_{i+1}=a_i+d\), for each \(i=1,2, \dots, t-1\)).
Determine the number of distinct sums that can be formed from members of the list (arbitrarily many integers from the list are allowed to be terms in the sum).
Determine the number of distinct products that can be formed from members of the list (arbitrarily many integers from the list are allowed to be factors in the product).
Determine for which integers \(m\), the list contains at least \(10\%\) of the integers from \(\{1,2,\dots,m\}\).