CS172 hw1

CS172 hw1 - CS 172 Computability and Complexity Spring 2008...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

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 long-winded 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 even-length 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 non-negative 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.

Ask a homework question - tutors are online