Boolean matrix theory and applications