Multi-ArmedBanditswithBoundedArm-Memory: Near-OptimalGuaranteesforBest-Arm IdentificationandRegretMinimization