This preview shows pages 1–4. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 8. (5 points) Evaluate the following: a) 1/2 b) 3.7 c) 8 d) 1/2 e) 3/2 + 1/3 Csci 2610, Fall 2008 Exam 2 2008.10.08 3 9. (15 points) A B, the symmetric difference of A and B, contains all elements in either A or B, but not in both A and B. Use a semantic proof to show that A B = (A B) (B A). Csci 2610, Fall 2008 Exam 2 2008.10.08 4 10. (10 points) A palindrome is a sequence that reads the same forward and backward. Examples include MOM, TOOT, ABLE WAS I ERE I SAW ELBA, and NOW, SIR, A WAR IS NEVER EVENSIR, A WAR IS WON! (Sometimes we make allowances for punctuation and spaces.) Write an algorithm hat accepts a list of n characters and returns 1 if the list is a palindrome and 0 otherwise. Your algorithm only needs to find simple palindromes, like the first three above. Dont worry about palindromes that require the elimination of punctuation and the shuffling of spaces....
View
Full
Document
 Fall '08
 smith
 Computer Science

Click to edit the document details