text: 'murder by numbers ' is a psychological suspense-thriller that tells the story of a tenacious homicide detective , cassie mayweather ( sandra bullock ) and her new partner sam kennedy ( ben chaplin ) who become pitted against two malevolently brilliant young men ( ryan gosling and michael pitt ) in an ingenious battle of wits as they try to solve a murder case .