kaplan MM250 Unit 8 assignment kaplan MM250 Unit 8 assignment Question Unit 8: Algorithms - Assignment Total points for Assignment: 35 points. Assignments must be submitted as a Microsoft Word document and uploaded to the Dropbox for Unit 8. All Assignments are due by Tuesday at 11:59 PM ET of the assigned Unit. NOTE: Assignment problems should not be posted to the Discussion threads. Questions on the Assignment problems should be addressed to the instructor by sending an email or by attending office hours. You must show your work on all problems. If a problem is worth 2 points and you only show the answer, then you will receive only 1 point credit. If you use a calculator or online website, give the source and tell me exactly what you provided as input. For example, if you used Excel to compute 16 * 16, state “I typed =16*16 into Excel and got 256. You may type your answer right into this document. Part I. Basic Computations 1. (5 points) Consider the following pseudo code for determining any sum in this form: ComputeSum: INPUT m sum = 0 for k = 6 to m do sum = sum + 5*k^2 + 2*k -10 next k OUTPUT sum a. Are the inputs and outputs for this algorithm well defined? Explain. b. Identify an iterative operation in this algorithm. 2. ( 5 points) Consider this algorithm used to sort an array in this form: 5 8 6 3 5 1 6 19 7 4 S(n) = BUBBLESORT: INPUT S, n (an array called S, with n elements) FOR i = 1 to n – 1 FOR j = 1 to n – 1 if S(j) > S(J+1) then exchange the contents of S(j) with S(j+1) NEXT NEXT OUTPUT S Using the following grid, show a trace for this algorithm using the following values: Part II. Case Study Season Finale: Unlocking the Treasure The directors and producers of the “Patty Madeye Mysteries” have decided that the season finale for the show will be filmed in a secret location. They have identifed a remote island and visited it to determine what facilities and features are available on the island. The interns that were sent to scout out the island only had time to draw this map of the island and collect some other information. In order to open the lock to the treasure chest, you will need to solve a puzzle using discrete math. Shown below are the paths and distances that connect the 7 locations on the map. From To Distance (in meters) C D 80 D E 25 E G 80 D G 80 D A 100 A F 80 A G 80 B A 25 C B 25 C E 100 B E 100 G F 25 B F 80 A C 80 Clue #1: (3 points) One of the things that the film crew will need to know about is the condition of light during the day at the island. The only marking on the island was this binary representation of the longitude. Convert this longitude to decimal so that the crew can estimate time of sunrise and sunset. Show your work. Longitude: Answer: Clue #2. (3 points) The cast and crew will be staying in the 8 tents shown in the Tent Village. Two of the tents will be set aside for to be used for “Hair and Makeup” (one for the males, one for the females). How many different ways can you select these special tents out of the 8 available? Answer: Clue #3. (3 points) Since the natives on this remote island only speak Spanish, it is important to know how many people in the cast & crew of 56 people. The producers have provided the following information and asked you to prepare a Venn Diagram depicting the various sets and subsets of this group. F = {members of the film crew} S = {members of the cast & crew who speak Spanish} M = {male members of the cast & crew} n(F) = 10 n(S) = 14 n(M) = 15 n(F and S) = 4 n(F and M) = 5 n(M and S and F) = 3 n(M or S or F) = 28 How many members of the cast & crew are male and speak Spanish, but are NOT on the Film Crew? Answer: Clue #4. (3 points) A strange children’s game was found on the island with the following markings: 53 56 59 62 … Determine the 20th element of the sequence using the general term for the sequence. Answer Clue #5. (3 points) This clue requires solving a logic problem: p: cast member is male q: cast member speaks Spanish r: cast member has short hair s: it is NOT raining If a cast member is male and has short hair, does not speak Spanish, and it is raining, determine the truth value for the following expression: Answer: Answer: Clue #7. (2 points) Determine a Minimum Spanning Tree for the graph described by the paths on the island, using the distances between the locations as weights. What is the weight of the resulting spanning tree? Answer: Clue #8. (5 points) Record your clues here, then use the following algorithm to determine the 5 digit combination to unlock the treasure. Clue #1: Longitude expressed in decimal: Clue #2: Number of combinations: Clue #3: n(M + S +~F) Clue #4: Clue #5: Truth Value Clue #6: Path, Circuit, or None? Clue #7: Weight of spanning tree: DIGIT1 DIGIT2 DIGIT3 DIGIT4 DIGIT5