Regular and Non-Regular Language My friends and I are taking a formal languages class and for one of our homework questions we have to prove if these languages are regular:

1) L = {apaqi : p and q are fixed integer values, i >= 0}

2) L = {apbq : p and q are fixed integer values}

For (1), we know it is regular because we can make a DFA out of it, but what we are not sure how exactly the DFA should look like. Should it not be consist only of one state, say q0, and it acts as both the initial and final state, with a loop of "a" moves going through it? Our line of thought is because p and q could be any integers, so whatever p and q would be, we would always end up with a certain number of a's, but we are not sure we are 100% correct.

For number (2), we say it is not regular because p and q could be infinite, thus making the language automatically irregular.

We are still quite confused on which concepts are correct. This is still a very abstract concept for all of us and any guidance would be appreciated. Thank you!
Think of it this way. Fix $p$ and $q$ arbitrarily – for example, take $p = 4$ and $q = 5$. Then
$$
\begin{align*}
L_1 &amp;= \{ a^4 b^{5i} : i \geq 0 \}, \\
L_2 &amp;= \{ a^4 b^5 \}.
\end{align*}
$$
Now try to answer your question. The answer will be the same no matter what values you choose for $p$ and $q$.