C) Regex = a(a+b)+(a+b)+a + b(a+b)+(a+b)+b. First and last charcters should be same. hence can be a or b. And there should atleast be two charachters between the first and last charachter which can be partioned to x and y. Dont think of this as equivalent wcwr. any part of the string can be assumed as w here.