I have an assignment for my algorithms module that requires us, amongst other things, to find the equations for the following question.
Edit - Question Updated
You have n cards with pairwise different integer values from 1 to n , shuffled randomly on a pile. You pick cards from the pile, one after another, and depending on the card’s value you put it either on the right hand side or on the left hand side; more precisely: if the card has smaller value than all cards previously picked from the pile, then you put it on the right hand side, otherwise you put it to the left.
Formulas for expected number of cards on the right hand side and the left hand side when all cards have been picked up.
Solving the formulas with as much accuracy as possible
What is the probability that on the right hand side there are at least log log n cards at the end of the process? Use some classic inequalities, e.g. Markov Inequality.
My idea is that the number of cards on the left hand side would be $\sum\limits_{i = 1}^n {\frac{{n - m}}{{n - i}}}$ and those on the right hand side would be n - left hand side. Am not sure if my reasoning is right here though. m being the largest card picked from the pile.
probablistic equationsmean in this context? Expected values of quantity in each pile? – gt6989b Jan 02 '14 at 15:11