The tag bits signify how many blocks of main memory will be mapped to the same set as similar to same line in case of direct mapping..
So given no of lines(or blocks) in cache memory = 512
Associativaity i.e. k = 4
So no of sets = 512 / 4
= 128
But no of blocks in main memory = 8192
So no of blocks that will be mapped to same set = 8192 / 128
= 213 / 27
= 64
Hence no of tag bits required = log2(No of blocks mapped to same set)
= log264
= 6 bits
Hence 6 should be the correct answer..