CSCE 235

Homework Assignment 8 (Programming)

Assigned:  March 13, 2009

Due: 12:30 p.m. March 30, 2009

(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)    (5 points) If the grandpa and grandma must sit next to each other, how many ways are there to arrange the family?

(b)   (5 points) 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)    (5 points) 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)   (5 points) 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.   (25 points)  Suppose you are a communications code specialist. You have been given a task of coming up with codes for secured transmission.  You are given 7 unique symbols: *, !, #, <, >, &, and %.   

(a)    (5 points) How many unique 5-symbol codes (with each symbol used at most once) are there?

(b)    (5 points) How many unique 5-symbol codes (with each symbol used at most once) are there if “*” must be used?

(c)     (5 points) How many unique 5-symbol codes (with each symbol used at most once) are there if the sequence “<*>” must be used?

(d) (5 points) How many unique 5-symbol codes (with each symbol used at most once) are there if “*” and “!” cannot appear in the same code?

(e)    (5 points) How many unique 5-symbol codes are there if each symbol can be used more than once?

5.   (15 points)  A car company advertises that customers could build the most customized cars from the company.  For each customized car, there are 7 attributes.  Each attribute has 3 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, DVD options, seat cover options, etc.) from each customer’s picks and fix the values for these removed attributes at some default values to cut production costs.  How many ways are there to build a customized car, now, from the above company based on the announcement?

     

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

 

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

(a)    MISSISSIPPI

(b)   MISSOURI

(c)    RIOGRANDE

(d)   COLORADO

     

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.  (25 points)  Suppose that you are the coach of your local basketball camp for kids.  There are 25 kids in the camp with the following distribution:

 

Age Group

Boys

Girls

Total

8 years old

3

4

7

9 years old

5

4

9

10 years old

8

1

9

Total

16

9

25

 

(a)  (5 points) How many ways are there to form a basketball team of five players?

(b)  (5 points) How many ways are there to form a basketball team of three boys and two girls?

(c)  (5 points) How many ways are there to form a basketball team of five players with at least one boy?

(d) (10 points) How many ways are there to form a basketball team of five players with at least one 8-year old, at least one 9-year old, and at least one 10-year old?

 

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 the Chief Technology Officer (CTO) of a computer game company. You are at a convention to present 8 different games newly released by your company.  Five (5) are different types of online simulation (S) games, and three (3) are different types of first-person shooter (F) games.  Your task is to come up with a sequence of presenting these games in order to keep your audience interested.  Your subordinates all suggest ideas on how to sequence these games.  And too many ideas lead to too many options too quickly.  Finally, as CTO, you would like to find out the following:

(a)    How many ways are there to arrange these 8 games such that no first-person shooter games are presented next to each other?

(b)   If the first and the last games of the presentation must be of the online simulation type, how many ways are there to arrange these 8 games?

(c)    Suppose now that you decide that only five games will be presented.  How many ways are there to choose and then sequence only five games?

(d)   Assume that only five games are to be presented.  How many ways are there to choose and arrange these games such that there is at least one first-person shooter game?

 

Programming

 

13. (40 points)  Tutorial.  For this assignment, create a Web page that gives a tutorial on one of the following topics: permutations, combinations, repetitions, or derangements.  For your tutorial, it must contain the following three items:  (a) a detailed description of your topic and (b) one flash-animated exercise example. 

 

      For your flash-animated exercise example, you must use the following flash editor software, available for download at http://cse.unl.edu/~jhostetl/ife/.  We have provided an HTML template for you for you to plug in the tutorial and the flash-animated example.    If you have questions about the flash editor software, please contact Mr. Jesse Hostetler (jhostetl@cse.unl.edu), the chief designer and software developer of the software.  Important Note:  The software will be ready for download no later than March 23, 2009.

 

      Note that this example is open-ended.  Use your creativity and imagination to come up with a good flash-animated exercise example that best illustrate the topic of your choice.

 

      Submit your html page and your flash file to the CSE handin as usual.  We will then put all the pages online for all to visit. 

 

Make your topic easy to understand and your exercise example meaningful.  Be creative, be imaginative. While waiting for the flash editor software to become available, please spend some time thinking about what kind of exercise example that you would like to have.

 

 

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