Cats can do a lot of damage to carpet. Making a mess once in a while is one thing and be taken care of, But when you have a cat in the house that has urges to scratch, well now you have potential for some real damage. The cat who got bored one afternoon and tore up this carpet right at the edge, did so in just a few hours. The owner of this carpet is in luck because it is right on the edge and only took off about an inch of carpet, with a tight pull the carpet can be hooked back onto the tack strip, the extra carpet can be trimmed and it'll look like nothing ever happened. The other alternative if there is not enough carpet to stretch would be to add a transitional medium, such as an aluminum strip, more tile, or wood.
Carpet is not the only thing that a cat can damage, upholstery is also at high risk so keep your cat busy with things that it's okay to claw at and you'll find that it will have little interest in the things you want it not to claw, especially if the approved claw toys are doped with cat nip.