Solving minimum scalar product puzzle