Why does not ice float in this case just instantly after melting? I encountered this question:

A cube of ice of edge 4 cm is placed in an empty cylinder of glass of inner diameter 6 cm. Assume that ice melts uniformly from each side so that it always retains its cubical shape. Remembering that ice is lighter than water, find the length of the edge of the ice cube at the instant it just leaves contact with the bottom of the glass. 

My question is, since density of ice < density of water, it should always float. So, just after the instant ice melts, it should float. So in this question, why does the ice float only after a certain time period after melting? 
And, if density of water = density of object, suppose we keep it at an arbitrary depth H by force, then release it, does it keep floating at that position only or does it attain a particular depth? 
Really confused.
 A: At first, the ice cube is alone in the empty cylinder: it won't float, so it's in contact with the bottom of the glass. Then, it starts melting: a thin layer of water appears in the bottom of the cylinder; however, the ice cube won't start to float now. Indeed, there is not enough water: imagine that you're walking just after a rainfall, and you step on a puddle; then, are your shoes in contact with the ground ? Of course, yes: there is not enough water for Archimede's force to counter your weight. The same thing happens with the ice cube.
Now, in order for you to find when the ice cube starts really floating, you have to compare Archimede's force - considering the ice cube is still in contact with the bottom of the glass - and the weight. When the weight is the smallest one, then the ice cube will start floating.
For your second question: it depends on what your object is. For a solid object which stays solid, yes, since pressure forces will exactly counter the weight, and this two forces are the only one acting on the object. However, if you consider a non-solid object, or a solid which melts, then it will diffuse.
A: Initially there is no water in the container and the ice "sits on the bottom". As it melts, water builds up around it - but not enough of the cube is submerged to cause it to float (like a ship in a lake with insufficient depth, it "runs aground"). After a certain amount of ice has turned into water, the weight of displaced water will exceed the weight of the remaining ice.
And then it will float.
Mathematically, at a given time the cube has a side $a$, volume $a^3$. The area of the container is $A=\frac14 \pi d^2$, and the fraction of that area occupied by the cube is $a^2$. The volume of water is $V_w=(a_0^3-a^3)\frac{\rho_i}{\rho_w}$ (since the water is more dense than the ice), and the height of the liquid is 
$$h = \frac{V_w}{A-a^2}$$ 
The submerged volume of the cube is $h\times a$, and the weight of the displaced water is $\rho_w g a^2 h$. The weight of the cube is $a^3 \rho_i g$.
The cube will float when the weight of the displaced water equals the weight of the cube, so
$$\rho_w g a^2 h = \rho_i g a^3\\
h = a\frac{\rho_i}{\rho_w}$$
Putting these together you get
$$a\frac{\rho_i}{\rho_w} = \frac{a_0^3-a^3}{A-a^2}\frac{\rho_i}{\rho_w}$$
Interestingly, the relative densities of water and ice don't come into the final answer (they cancel on both sides of the equation). We can rearrange:
$$a(A-a^2)=a_0^3 - a^3\\
aA = a_0^3\\
a = \frac{a_0^3}{A} = \frac{64}{9\pi}\approx~2.26~\rm{ cm}$$
As for your second question - it's hard to get objects of "exactly the same density"; but if the density is indeed the same, then there is no net force on the object and so it will be "neutrally buoyant". This is an important concept in (scuba) diving - as a diver you try to be neutrally buoyant to minimize the energy you need to spend while swimming. But every time you take a breath you will start to drift up, and as you breathe out, you drift down again. This is because your effective density will change with the amount of air in your lungs. A good diver will modulate their breathing for this reason. Also, divers have a BCD (buoyancy control device) that they use to adjust buoyancy with depth (since the weight of your air tank changes with time, your neoprene wetsuit gets compressed with depth, etc...). Note that "neutrally buoyant" doesn't guarantee "won't move". Thermal currents etc will still affect your object.
A: Here's a simple derivation of the length of the ice cube's edge at the moment that buoyancy lifts it from the bottom of the cylinder.
Notation:


*

*$r$ - The inner radius of the glass cylinder. (Half the 6 cm diameter, or 3 cm.)

*$l_0$ - The initial length of the ice cube's edge. (Given as 4 cm.)

*$l$ - The length of the ice cube's edge at some point in time.

*$h$ - The height of the water above the bottom of the cylinder.

*$\rho_i$ - Density of ice.

*$\rho_w$ - Density of water.


Up until the ice cube floats off the bottom of the cylinder, the volume of the water (i.e., the ice that has melted) is the water height times the area of the water is the area of the cylinder less the area of the ice cube:
$$v_w = h(\pi r^2 - l^2) \tag{1}$$
An alternative way to calculate the volume of the water is that it is the mass of the water divided by the density of water. The mass of the water is equal to the mass of the ice that has melted: the initial mass of the ice less the current mass. For those we need to look to the volume of the ice cube:
$$m_w = m_\text{melted ice} = \rho_i ({l_0}^3 - l^3)$$
and thus
$$v_w = \frac{m_w}{\rho_w} = \frac {\rho_i}{\rho_w} ({l_0}^3 - l^3)\tag{2}$$
Combining equations (1) and (2) yields an expression for the height of the water:
$$h = \frac {\rho_i}{\rho_w} \frac{{l_0}^3 - l^3}{\pi r^2 - l^2}\tag{3}$$
Up until the ice cube floats off the bottom of the cylinder, the mass of the water displaced by the ice cube is
$$m_\text{displaced water} = \rho_w l^2 h\tag{4}$$
At the point in time when the ice cube first floats off the bottom of the cylinder, this will equal the mass of the ice cube itself:
$$m_\text{displaced water} = \rho_i l^3\tag{5}$$
Note that equation (5) is only valid when the ice cube is floating. Both equations (4) and (5) are valid at the point in time where the ice cube first begins to float. Equating those two equations yields an alternate expression for the height of the water at this point in time:
$$h = \frac {\rho_i}{\rho_w} l \tag{6}$$
Equating expressions (3) and (6) and simplifying yields
$$\frac{{l_0}^3-l^3}{\pi r^2 -l^2} = l \tag{7}$$
Solving for $l$ yields
$$l = \frac{{l_0}^3}{\pi r^2}\tag{8}$$
Plugging in the values $l_0 = 4\,\text{cm}$ and $r=3\,\text{cm}$ yields
$$l = 2.264\,\text{cm}\tag{9}$$ 
A: To put it another way, let's re-derive why things float in the first place.
Conservation of energy and the minimum energy principle
We know that there is this principle of "conservation of energy" which says that energy is a "stuff" kind of like salt or  water or air. That requires maybe a little explanation: it is not a "stuff" in the usual sense that everyone agrees on how much of that stuff is contained in any given box; but it is a "stuff" in the sense that if the amount in the box increases or decreases, the amount outside of the box must decrease or increase respectively. Instead of calling such strange mathematical quantities "pseudo-stuff" or something else like that, we call them "conserved." It just means "if there is a change then it had to either come from or go to somewhere else."
Now the "energy picture" of physics is a little more detailed than just that; it says that if a force $\vec F$ acts on an object moving with velocity $\vec v$ then the scalar product $P = \vec F \cdot \vec v = F_x v_x + F_y v_y + F_z v_z,$ which is known as the "power produced by the force", tends to change that object's kinetic energy $K = \frac12 m v^2.$ The correct expression involves a sum-of-all-forces just like Newton's law $m ~ d\vec v/dt = \sum_i \vec F_i,$ and says $dK/dt = \sum_i P_i.$ In other words, a force producing a constant power on an object will increase its kinetic energy linearly with the time that it acts on it.
For some forces, we can define a "potential energy" $U,$ the technical expression is $\vec F = - \vec \nabla U.$ In such cases it turns out that the total change in kinetic energy $\Delta K = \int dt~\vec F\cdot\vec v$ becomes the path-independent difference $-\Delta U,$ in which case indeed this number $K + U,$ the "total energy", is conserved.
For other forces, energy is still conserved but we are not paying careful attention to where it is going. Friction and drag forces are a great example. Usually these oppose your direction of motion through a medium, so in the reference frame where that medium is stationary, you have $\vec F \propto -\vec v,$ and that is a magical relationship because it means that they always have negative power and rob energy from the system! Well the smallest $K$ can be is if $v=0$ and this means that drag forces tend to eventually bring you to rest somewhere; and the smallest $U$ can be is at a potential energy minimum and this means that drag forces tend to eventually bring you at rest at the minimum places of potential energy. (Control question: why is this argument not working for my coffee cup right now? It's on my desk, it's feeling frictional forces: why is it not on the floor where the potential energy is lower?)
Still we can use this as a great principle.
Buoyancy as a straightforward consequence.
Suppose I have a box of volume V underwater: does it sink or does it float? That is easy, look for the minimum potential energy. If I put it at the bottom of the ocean, we will say that this is $U=0$. Now if I raise it to a height $H$ relative to that, what happens? Well the obvious thing is that I have to put in the energy $m g H$ to lift the box. But what about the water? Well, a volume $V$ of water has to come from the box's new height $H$ and go all the way down to the height $0$ to compensate. So the total energy is $U = m g H - \rho V g H.$ And whether this is greater or lesser than 0 (corresponding to an increase or decrease, corresponding to sinking or floating) depends on whether $m > \rho V.$ Since $m/V$ is the average density of the box, we conclude: things more dense than water sink, things less dense than water float. This is also why a ship sinks if it has a hole in it or if its sides go under the water: then its decks start to fill up with water which makes it heavier and heavier as the water replaces the air pockets that kept it floating, eventually making it so heavy that it is more dense than water and it sinks.
How this solves your question
Notice that there is a very special circumstance, though, when the thing floats to the top of the surface. Our argument stops working. Our argument says that ships should entirely sit on the surface of the water; our experience says that they sink in a little bit, but hopefully not too much.
Well the problem is that you still need to bring a volume $V$ of water to the bottom of the ocean, but it does not all come from the height $H$! Once the box emerges from the surface, the water does not need to be subtracted from the top-side of the box in order to make room for the box; the rest of the water needs to instead be subtracted from the surface.
With a little bit of reasoning, you can work out the following general principle: cut an imaginary plane flush with the surface of the water, and look at how much of the box is underneath it: this volume is the "displaced volume" $V_D$. Then a box will float to the surface precisely until $V_D = m / \rho.$ So boats will therefore sink some characteristic depth into the water. 
Now when the ice cube melts a little bit, there is not very much water, and certainly not enough to raise the water level to the needed characteristic depth. But eventually when the ice cube is nearly all the way melted, it's in a big sea of water and it should be floating. The question is: what is the cut-off point between these two extremes?
A: 
My question is, since density of ice < density of water, it should always float.

The statement that the less dense material floats in the more dense material is typically true, but there are limits to it and this problem contains one example of such limits.
In the case of liquids, you can generally rely on the statement to be true, but for solids it is more complicated because they cannot change their shape to fit the container.
A solid floats iff it can displace an amount of liquid equal to its own mass.  In a free floating case, this is exactly the same as your original statement.  However, this is not a free floating case.  At the start of the melting process there is not enough depth of liquid to permit the ice cube to displace its mass in water.  Thus, at the start of the exercise, it does not float.
For an intuitive argument, let's take that same ice cube, and then stack a huge 10kg ice block on top of it.  Intuitively, it should be clear that that ice cube+ice block will not float on top of the water.  The more scientific reason it will not float is because the ice cube+block cannot displace enough water in the constrained space it finds itself in.  In fact, by taking this example to such an extreme, we can see that we can reach a situation where there is less than 10kg of water present in the glass, in which case it is mathematically impossible for it to displace enough water!
Now as the ice cube melts, the story changes.  Now the water level is increasing (due to the melted ice) and the size of the ice cube is decreasing.  As it gets smaller, it gets easier and easier to displace its mass in water (because the ice cube's height gets smaller with respect to the water level) until the key moment in the problem where the ice cube can finally displace its entire mass and floats.

And, if density of water = density of object, suppose we keep it at an arbitrary depth H by force, then release it, does it keep floating at that position only or does it attain a particular depth? 

Yes, the object will remain at that position.  In fact, what you will find is that "force" you applied will actually be 0 because there will be no buoyancy force at all.  if your force was non-zero, you would actually find that the object would accelerate in the direction of the force!
A: A Simpler Solution to the Mathematical Problem
When the original ice cube of volume $a_0^3$ has melted completely it shrinks to a volume $ka_0^3$ of water, where $k$ is the ratio of densities of ice to water. This water fills the cylinder to a final depth of $h=\frac{ka_0^3}{A}$ where $A$ is the area of its base. 
Now imagine that we run time backwards from here. 
A small cube of ice appears, floating on the surface of the water. It grows, always keeping its cubical shape and always keeping a fraction $k$ of its volume below the surface. As it grows the water level in the cylinder does not change, as explained in Why does ice melting not change the water level in a container?
Eventually the growing ice cube reaches the bottom of the cylinder. When it is as big as it can get while still floating, it is just touching the bottom of the cylinder, with one face flat against the bottom and a thin film of water in between. The cross sections above and below the water level are the same, and a fraction of volume $k$ is below the surface, so the side $a$ of the cube at this point is such that $ka=h$.  
If the cube grows any bigger it will cease to float, because it cannot expand any further below the surface, so it cannot keep a fraction of volume $k$ below the surface.
Therefore when the ice cube starts to float the side of the cube is $$a=\frac{h}{k}=\frac{ka_0^3}{kA}=\frac{a_0^3}{A}$$
