Wednesday, 22 April 2020

Discrete Mathematics

Discrete Mathematics
5.1  Define a sequence   as follows.
for 
a) Find the following: (0 points)
b) What is the general formula for  ?  (3 points)
c) Use regular (not strong) mathematical induction to prove that your formula is correct.(7 points)
5.2  (10 points)The Tribonacci sequence is defined by   ,   for  .  Use strong induction to prove that   for all n.
A3/3.1 Describe a non-recursive algorithm that takes a list of integers   and finds the index of the last even number in the list.  If there is no even number on the list, return   . Write your answer in pseudo-code or any well-known procedural language like Python, Java, C++, …. (5 points)
You may assume that you have a function even?  built in to your language. even?  will return TRUE for even numbers and FALSE for odd numbers.
E.g. For the list   = 5, 6, 7, 8, 9 your program should return 4 because   is the last even number on the list.
Click Here For More Details on How to Work on this Paper......
Need a Professional Writer to Work on this Paper? Click Here and Get this Essay Done ………
procedureIndex_of_Last_Even ( integers)
8.3 (7.3) Recall the Fibonacci numbers we defined in class (here denoted by  ),
for  One could prove by induction that the following relationships hold for the Fibonacci numbers.
a) Use the given recursions to compute   and  .  Show your work. (2 points)
b) Write a recursive algorithm in pseudo-code or any well-known procedural language like Python, Java, C++, &c to compute   based on the above recurrences.  (8 points)
procedureFib( )3.2/3.2(2.5 points each)
  a) Find C and k to show that   is 
  b) True or False?:   is 
    If true, find C and k to show this. If false, explain why.
   c) True or False?:   is 
    If true, find C and k to show this. If false, explain why.
   d) True or False?:   is 
     If true, find C and k to show this. If false, explain why.
3.3 Give a big-Theta estimate for the number of additions in the following algorithm. Express your answer in the form   where  (2.5 points each)
a)procedure p(n)
i = 1
while (i< n):
i = i *2
return i
This algorithm is 
(Write your answer in the parentheses above)
b)
procedure p(n)
i = 1
while (i< n):
      j = 1
    while (j < n):
          j = j + 2
i =  i + 1
return i
This algorithm is 
(Write your answer in the parentheses above)
8.3 Consider the procedure T given below.
procedure T (n: positive integer)
if n < 2:
return 1
else:
   for i = 1 to n:
 for j = 1 to n:
return 
Let   be the number of additions in the procedure for an input of n and note that  satisfies a recurrence relation

of the form .
a) Determine the values of a, b, c, and d.(4 points)
b) Apply The Master Theorem (given below) to T to determine its complexity. (1 point)
Master Theorem
Given  , then
 is 
This algorithm is 
(Write your answer in the parentheses above)
6.1  (5.1)  Hexadecimal numbers are made using the sixteen digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.
(2.5 points each)
a) How many 5 digit hexadecimal numbers that do not start with the digit 0 and do not end with the digit 0?
b) How many 5 digit hexadecimal numbers start with a letter or end with a letter but not both?
c) How many 5 digit hexadecimal numbers start with a letter or end with a letter or both?
d) How many 5 digit hexadecimal numbers where all digits are consecutive? E.g. 01234, 89ABC, …
    Note: the numbers can’t “wrap-around”:  EF0123 is not allowed.
6.3/5.3 A class has 21 students and is to be divided into indistinguishable groups. I.e, The two groups ABC and DEF

are the same as the two groups DEF and ABC
a) How many ways to divide the students into three groups of 7?(2.5 points)
b) How many ways to divide the students into seven groups of 3?(2.5 points)
6.5/8.3 (5.5/7.3) You have 12 bones that you want to distribute to three dogs. 
  a) How many ways to do this?(3 points)
  b) How many ways to do this if each dog gets at least 2 bones?(3 points)
  c) How many ways to do this if each dog gets at most 5 bones?(4 points)
7.1  An urn contains 7 red balls, 7 white balls and 7 blue balls. 
       5 balls are randomly picked from the urn without replacement.
a) What is the probability that all of the balls are red?(2 points)
    b) What is the probability that all of the balls are the same color?(2 points)
    c) What is the probability that none of the balls are blue? (3 points)
d) What is the probability that 3 balls are red and 2 balls are white?(3 points)
6.4/5.4 Assuming  , prove that  .
Hints: a) Work with   instead. 
b) You did some similar calculations in Calculus 2 using the Ratio Test. 
c) Subtracting k from both sides of the inequality might be useful.
Extra Credit:
6.2 Consider the first 250 Fibonacci numbers 
a) Fill in the blank with the largest possible integer that will make a true sentence.  (1 point)
There are at least __ that have the same remainder when
 divided by 11.
b) Fill in the blank with the largest possible integer that will make a true sentence.  (1 point)
There are at least 19 that have the same remainder when
 divided by ___.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.