Problem #PRU-5128

Problems Mathematical logic Invariants

Problem

Anna has \(20\) novels and \(25\) comic books on her shelf. She doesn’t really keep her room very tidy and so she also has a lot of novels and comic books in various places around her room. Each time she reaches for the shelf, she takes two books and puts one back. If she takes two novels or two comic books, she puts a novel back on the shelf. If she takes a novel and a comic book, she places another comic book on the shelf. That way Anna’s shelf systematically empties, since after every operation there is one book less. Show that eventually there will be a lone comic book standing on her shelf and all her other books scattered across her room.