EXERCISES
EXERCISES
2.1 Let N be the size of a sequence s of integers. Assume that an
element of s can be any one of v distinct values. Show that the
number of possible sequences is
N
i=0
v
i
.
2.2 An equivalence relation R on set S is reflexive, symmetric, and
transitive. Also, R partitions S into equivalence classes. Show that
each of the relations defined in Exercises 2.3 and 2.4 is an
equivalence relation.
2.3 Derive equivalence classes for the input variables listed below.
1. int pen_inventory; Current inventory level of writing pens.
2. string planet_name; Planet name.
3. operating system={“OS X”, “Windows XP”,
“Windows 2000”, “Unix”, “Linux”,
“Xinu”, “VxWorks”};
;Name of an operating system.
4. printer_class=set printer_ name; Set of printer names.
printer_class ...