[This is a copy of an email I sent about how to do this homework]

--------------------------

 

In your answers to all the questions that ask you to give the number of some type of objects (which is a majority of this homework), please give the answer first of all in the "abstract" form, and only then (and this is entirely optional), you can compute the numerical value of the answer .  It's the first form that we'll grade, not the latter!!!

What do I mean by "abstract" form?  For example, if you are asked what's the number of 4-digit numerical pins which contain digit 7, your answer could be stated as:

10^4 - 9^4

[because the set of 4-digit pins which contain 7 is the set of all 4-digit pins, whose cardinality is 10^4, minus the set of those 4-digit pins that do not contain 7, and the cardinality of that latter set is 9^4, because it's a set of 4-character strings each of which is chosen from a 9-element set of all digits except 7.] (*)

Or it can be stated as follows (but that's more complicated):

4*9^3 + 6*9^2 + 4*9 + 1

[because the set of the pins that contain at least one 7 can also be represented as a union of four disjoint sets:  a set of all 4-digit pins that contain exactly one 7, which contains 4*9^3 elements, the set of all 4-digit pins that contain exactly two 7's, which has 6*9^2 elements, a set of 4-digit pins that contain exactly three 7's, which has 4*9 elements, and a set of pins that contain exactly four 7's, and this set contains a single pin...] (**)

(Btw, you can see how much easier the problem becomes if you find a good way to count:  It's up to you to find an easy way to count, to make the problem easier for yourself, but we'll not penalize a more difficult way if you choose to follow it.)

If you give *either* of the above answers and leave it at this, you are going to get full credit.

(We must therefore forewarn you that if you come up with some unusual way of counting you might get no credit at first, and it'll be your job later on to just convince us that your way of counting was correct, in which case we'll of course change your grade.)

However, if *in addition* you compute this answer numerically, e.g. you answer:

10^4 - 9^4 = 10,000 - 6,561 = 3,439

That's of course fine, but we'll only grade the correctness of the "10^4 - 9^4" part.

(Actually, if you have two ways of counting something, computing it numerically is an excellent way to check if your counting ways are correct, so there's a point to doing that, but we don't require it and we'll not grade it.)

On the other hand, if you just give us an answer 3,439 then we'll give you *no points even though your answer is numerically correct*.  Let me repeat this:  You get NO POINTS FOR
JUST A NUMERICAL ANSWER (except of problem 20 in 5.1, see below).

In problem 20 in section 5.1, you don’t have to compute expressions like floor(1000/7), floor(1000/11), floor(1000/77), etc.  [I’m using the word “floor” for a floor function here because I cannot find the proper symbol for it in this text editor, but you should use the correct notation for the floor and ceiling functions.]  We'll accept answer(s) using sums/differences/products of terms of this type, and providing the numerical values of such expressions is optional.  However, if you choose to just provide numerical answers, it's fine *in this one exercise only*.

Also, unless we explicitly say so (and we have added a request for brief justification to quite a few questions), it's up to you to provide an explanation of the kind I gave in (*) or (**).  It's a good idea that you always do this anyway because, first of all, this is a way for you to see if your logic is correct, and second, if you make a typo or a local error, there's no way for the grader to understand what and why you are writing unless he/she sees your verbal explanations.