Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Please help ! Consider the following regular expressions: 1

Please help ! Consider the following regular expressions: 1

Computer Science

Please help ! Consider the following regular expressions: 1. letter = w | x | y | z 2. LETTER = W | X | Y | Z

3. digit = 5 | 6 | 7 | 8

4. α = (digit∗ • letter • LETTER) ∗

5. ρ = letter • digit • LETTER

6. φ = (digit∗ | digit) • letter∗

7. ω = LETTER • digit • digit • LETTER∗

 

(10 points, 2 each) For each of the following fill in the blank with ∈ or ∈ (recall that L(R) for regular expression R is the language of R).

wZ55wZ ______ L(α)

W8z ___________ L(ρ)

www8 _________ L(φ)

W55ZWz _______ L(ω)

wW ________ L(α)

 

(20 points) If we call getToken() repeatedly on input 5W58WZw5WzW5zW until the end of input is reached, the sequence of tokens returned is the following (assume longest prefix matching is used and ties are broken in favor of tokens that appear first first in the list)

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE