The isomorphism problem for cyclic algebras and an application