Narme:
9. Work one of the following problems. You may work the second problem for each problem you have time.
Problem 1: Convert the decimal number 201 to an octal number.
Problem 2: Convert the hexadecimal numeral C1E to a binary numeral.
Algorithm: Procedure base 2 expansion (n positive integer)
q = n
k = 0
while q > 0
a = q mod 2
q = q div 2
k = k + 1
return (a, ..., s, a)
Problem 2: Use induction to prove that if n is an integer 2 and G is a tree with n vertices, then G has n-1 edges.