Unformatted text preview: CS 172: Computability and Complexity, Spring 2008 S. A. Seshia & A. Kulkarni HW 1: Introduction to DFAs and NFAs Assigned: January 24, 2008 Due in class: January 31, 2008 Note: Take time to write clear and concise solutions. Confused and longwinded answers may be penalized. Consult the course webpage for course policies on collaboration. 1. (4 points) A palindrome is a binary string which is equivalent to its reversal. For example, 1, 1001 and 00100 are palindromes, but 1011 is not. Prove that any evenlength palindrome must have the same number of ones in its first half as in its second half. (be sure to include your proof idea/sketch as well as the complete proof) 2. (6 points) (a) Design and draw a DFA which reads in a nonnegative integer written in binary, least significant bit first, and accepts exactly when the input is divisible by four. (There is no sign bit in the representation.) Specify what Q , Σ , δ , q , and F are for your DFA....
View
Full
Document
This homework help was uploaded on 01/29/2008 for the course CS 172 taught by Professor Seshia during the Spring '08 term at Berkeley.
 Spring '08
 Seshia

Click to edit the document details