I found this question in one of our past exams, and I'm not to sure about the correct answer.
I have a language L1 (which i don't know anything about) and another language L2, which is regular, the question is: given that L1L2, L2L1 are regular can i also say for sure that L1 is regular?
At first my answer was no, since I cannot say anything about the original languages given their regular concatenation; But then I thought : Wouldn't I be able to extract the DFA or regex for the first language since I have both L1L2 and L2L1?
Thank you for your time and help :)