Since I have very little Maya knowledge I will simply tell you how I would do this in C4D. I imagine it is the same. In C4D you would create a spline by either edge selection or drawing out and putting hair constraints on each end to be the holders. The spline would then be given Spline IK and you would use the hair dynamics system to solve the physics. I imagine it is the same just different buttons to press...