You are on page 1of 12

Q1 Part A

Accepted Strings
Input: 101

Input: 010

Rejected Strings
Input: 0010

Input: 01

Q1 Part J
Accepted Strings
Input: 0110100
Input: 010101110100

Rejected Strings
Input: 1110
Input: 011000
Q2 Part 5

Diagram:

Screenshot:

Accepted Strings
Input: 10001110
Input: 0101010001
Input: 11111100
Rejected Strings
Input: 001001101
Input: 11101
Input: 001

Input: 11111101
Explanation:
A string is considered acceptable when it contains an even number of both 0s and 1s,
and it is also acceptable if it consists solely of either even numbered 0s or 1s. Additionally, a
string consisting only of 0s is deemed acceptable as it contains an even number of 0s and zero
1s, as 0 qualifies as an even number, and vice versa.

You might also like