math using latex! need to know how to write latex

For the state diagram , see the example in the template, or
draw it by hand and insert a photo of it
Please check what i have attached, open the [ [ Template Assignment. pdf ( Its the .tex document in pdf, because i cant attach the .tex file here so i put the .tex code in pdf) ] [ Assignment Template.pdf ] the original pdf format question ] ,,,,,,,, use overleaf.com! to write the Problem 1 question and answer wants it both in pdf and .tex format and Need to know how to write LATEXPlease use latex to write problem 1 question and answers in .text format i also want pdf you can use the example assignment template there are two file pdf format and .tex (in pdf form because i cant attach .tex file here) INSTRUCTION 2- If a problem has more questions, write down your answers in the same order as the order of
questions. In principle, this should help you.
Problem 1.
For each of the following languages, give the state diagram of a DFA with the specified
number of states that recognizes the language. The alphabet is Σ = {0, 1}.
1. {w: w contains at least one 0 and one 1}, with 4 states.
2. {w: w has 0 in every odd position}, with 3 states.
Problem 2.
Let A and B be two infinite countable sets. Show that A × B is also an infinite countable sets. You
need to show how to obtain an enumeration of A×B if you have an enumeration A = {f(1), f(2), . . .} and
an enumeration of B = {g(1), g(2), . . . , } (in other words you need to explain how you can list one-by-one
all the pairs in A × B.)