Let X = {x1,x2,...,xn} a sequence of real numbers. Design an
algorithm that in linear time finds the continue subsequence of
elements xi,xi+1,...,x, which product is the maximum. Suppose that
the product of an empty subsequence is 1 and observe that the
values can be less to 0 and less to 1.
Q. A sequence X1, X2, ... , Xn is said to be cyclically sorted
if the smallest number in the sequence is Xi for some unknown ?,
and the sequence Xi, Xi+1, Xn, ... , X1, X2,....Xi-1 is sorted in
an increasing order. Design an algorithm to find the position of
the minimal element in a cyclically sorted ? distinct elements. (6
points) If your algorithm uses recursion, you need so show the
recurrence function. Otherwise, show a closed-end form...
Let a sequence {xn} from n=1 to infinity satisfy
x_(n+2)=sqrt(x_(n+1) *xn) for n=1,2 ......
1. Prove that a<=xn<=b for all n>=1
2. Show |x_(n+1) - xn| <= sqrt(b)/(sqrt(a)+sqrt(b)) * |xn -
x_(n-1)| for n=2,3,.....
3. Prove {xn} is a cauchy sequence and hence is convergent
Please show full working for 1,2 and 3.
A sequence of integers x1,x2,...,xn is unimodal if for some 1 ≤
i ≤ n we have x1 < x2 < ... < xi and xi > xi+1 > ...
> xn. Find the maximum element in a unimodal sequence of
integers x1, x2, . . . , xn. The running time should be O(log n).
Show that your algorithm meets the bound.
For any sequence (xn) of real numbers, we say that
(xn) is increasing iff for all n, m ∈ N, if n < m,
then xn < xm. Prove that any increasing
sequence that is not Cauchy must be unbounded. (Here, “unbounded”
just means that xn eventually gets larger than any given
real number). Then, show that any increasing sequence that is
bounded must converge
1. . Let X1, . . . , Xn, Y1, . . . , Yn be mutually independent
random variables, and Z = 1 n Pn i=1 XiYi . Suppose for each i ∈
{1, . . . , n}, Xi ∼ Bernoulli(p), Yi ∼ Binomial(n, p). What is
Var[Z]?
2. There is a fair coin and a biased coin that flips heads with
probability 1/4. You randomly pick one of the coins and flip it
until you get a...
Let (xn) be a sequence with positive terms. (a) Prove
the following: lim inf xn+1/ xn ≤ lim inf
n√ xn ≤ lim sup n√xn ≤
lim sup xn+1/ xn .
(b) Give example of (xn) where all above inequalities
are strict. Hint; you may consider the following sequence
xn = 2n if n even and xn = 1 if n
odd.