CSCE 235

Homework Assignment 8 (Programming)

Assigned:  March 14, 2008

Due: 12:30 p.m. March 31, 2008

(Homework 5 minutes late will not be accepted)

 

Since it is important for you to recognize whether a problem is a permutation one, or a repetition one, or a combination one, and so on, the following problems are not listed under particular topics.

 

1.   (10 points)  A DNA analysis has to deal with the four basic building blocks denoted as A, C, G, and T.  Suppose that a problem requires one to build a DNA string with at most three building blocks, and must have at least one building block.  How many ways are there to build such a string, assuming all combinations of building blocks are possible?

 

2.   (20 points)  You are a photographer at a photo shop.  A family of seven comes in to your shop: A grandpa, a grandma, a father, a mother, a daughter, and two sons.  Now, you need to arrange them to sit in a row of chairs for the big photo shoot. 

(a)    If the grandpa and grandma must sit next to each other, how many ways are there to arrange the family?

(b)   If the grandpa, father, and sons must sit together on one side, and the grandma, mother, and daughter must sit together on the other side, how many ways are there to arrange the family?

(c)    If the grandpa and grandma must sit next to each other, the father must sit next to the grandpa, the mother must sit next to the grandma, how many ways are there to arrange the family?

(d)   There seems to be a feud between the two sons and they insist to be sitting not next to each other.  How many ways are there to arrange the family?

 

3.   (10 points)  Suppose you are a Signal Specialist and you have been tasked to design flag signals for a communication protocol.  To send a signal, you have to raise flags on some of the 10 sequentially positioned flagposts.  You are only given three identical red flags, two identical blue flags, and two identical green flags.  You must use all seven given flags in your signal.  How many different signals do you have for the communication protocol?  (Some flagposts will not have any flags, so, for example, the signal of R-R-Null-B-Null-B-G-G-R-Null is different from the signal of R-R-Null-Null-B-Null-B-G-G-R.)

     

4.   (20 points)  The Head of the Department of Mathematical Sciences at a certain university has 12 mathematicians, seven computer scientists, and three statisticians in his employ.  He wishes to appoint some committees from among these 22 people.

(a)    In how many ways can he appoint a five-member committee?

(b)   In how many ways can he appoint a five-member committee with at least one statistician?

(c)    A certain professor of mathematics, Dr. G, and a certain colleague, Dr. P, refuse to serve together on the same committee.  In how many ways can the Head of the department appoint a five-member committee that does not contain both Dr. G and Dr. P?

(d)   In how many ways that a five-member committee can be appointed such that the number of mathematicians is greater than the number of computer scientists, and the number of computer scientists is greater than the number of statisticians?

     

5.   (15 points)  A computer company advertises that customers could build the most customized computers from the company.  For each customized computer, there are 15 attributes.  Each attribute has 4 choices.   A customer has the flexibility to pick a specific choice for each attribute for the computer that he or she wants to build.

(a)    How many ways are there to build a customized computer from the above company?

(b)   After one month of operating, the company announces that it will arbitrarily remove 5 attributes (e.g., color, RAM size, speed, monitor, and DVD) from each customer’s picks and fix the values for those selected removed attributes at the default values.  How many ways are there to build a customized computer, now, from the above company based on the announcement?

 

6.   (10 points)  In how many ways can 18 different books be given to Tara, Danny, Shannon, and Mike so that one person has six books, one has two books, and the other two people have five books each?

 

7.   (10 points)  Find the number of arrangements of the letters of each of the following words:

(a)    APPALACHIAN

(b)   ACONCAGUA

(c)    PERENES

(d)   HIMALAYA

     

8.   (25 points)  At a network testing site, there are five routers and a host.  The host sends out messages to these five routers for relaying the message further.  For your experiment, the host will send out only 5 messages.  Each message is addressed to a particular router.  However, you turn off the address reader of the host.  So, basically, the messages are sent out blindly, one to each router.

(a)    How many ways are there for every router to not receive its message correctly?

(b)    How many ways are there for at least one router to receive its message correctly?

(c)    How many ways are there for exactly one router to receive its message correctly?

(d)   How many ways are there for at least 2 routers to receive their messages correctly?

(e)    How many ways are there for at most 2 routers to receive their messages correctly?

 

9.   (20 points)  Suppose that on an American Idol contest, a judge must choose exactly 4 semifinalists out of a pool of 8 contestants, labeled #1 through #8.

(a)    In how many ways can the judge choose the 4 semifinalists?

(b)    In how many ways can the judge choose the 4 semifinalists if contestant #1 has been voted by the TV audience to become one of the 4 semifinalists?

(c)    In how many ways can the judge choose the 4 semifinalists if the judge must choose exactly one of the first four contestants?

(d)   In how many ways can the judge choose the 4 semifinalists if the judge must choose at most 3 semifinalists out of the last four contestants?

 

10. (10 points)  Use the Binomial Theorem to expand .  Simplify your answer.

     

11. (20 points)  Consider the binomial expansion of .

 

(a)    What are the first three terms? 

(b)   What are the last three terms? 

(c)    What is the seventh term?  The fifteenth term?

(d)   What is the coefficient of ?

 

12. (25 points)  Suppose that you are a landscape designer. You have been given eight (8) plants: five (5) are different types of roses, and three (3) are different types of evergreens.  Your task is to arrange these plants in a row in front of a house. 

(a)    How many ways are there to arrange these 8 plants such that no evergreens are planted next to each other?

(b)   If the first and the last plants of the row must be of types of roses, how many ways are there to arrange these 8 plants?

(c)    Suppose now the house owner decides that only five out of the eight given plants will be planted.  How many ways are there to arrange only five plants?

(d)   Assume that only five out of the eight given plants are to be planted.  How many ways are there to arrange these plants such that there is at least one evergreen?

 

Programming

 

13. (40 points)  Tutorial.  For this assignment, create a Web page that gives a tutorial on one of the following topics: repetitions and derangements.  For your tutorial, it must contain the following three items:  (a) a detailed description of your topic, (b) one real-world example illustrating the application of your topic, and (c) one multiple-choice problem regarding your topic that has the following (i) a well-defined problem, (ii) 5 multiple choices (one of them is the correct answer) and other students can choose one of the choices and submit the choice, and (iii) if the choice is correct, your Web page gives an acknowledgment; otherwise, your Web page gives an explanation for the correct answer.  Hand in your Web page together with any of its associated programming that you may create.  Make sure that your webpage can be run on cse server.  You may test your webpage by uploading it in the public_html directory in your home folder on cse server.  Then, you should be able to interact with your webpage by typing the following URL:

 

                        http://cse.unl.edu/~yourCseLoginName

 

      After the due date, we will have a class Website link to display all Web pages. 

 

      It is important for you to use your own real-world example.  Use your own description of the topic you choose.  Make your topic easy to understand and your problem meaningful.  Be creative, be imaginative

 

Problems based on (Goodaire and Parmenter 2002) and (Ross and Wright 1988).