(i) two programmes only?
(ii) one programme only?
16. Consider the set of digits {1,3, 4,5,7,8,9}
a)If the digits cannot be repeated and if the middle digit must be an odd digit, how many three-digit numbers can be formed?
b)If the digits can be repeated, how many positive numbers less than 1000 can be formed?
17. Each telephone number in a city consists of 7 digits, the first of which must be 3 or 4. a) How many telephone numbers are possible?
b) How many telephone numbers start with 4 and contain the digit 5 at least once?
c) How many telephone numbers have no repeated digits?
18.In a dance class, the instructor taught 15 different movements. For a class presentation, the student has to perform 4 or 5 movements in sequence. What is the number of different presentation if
a) there is no restrictions?
b)the first and last movements must be the same?
Imagine you own two shops selling cakes. You are tracking the number of cakes sold in each shop each day over a ten day period. Each cake in Shop 1 makes 3 dollars profit. Each cake in Shop 2 makes 4 dollars profit.
The following arrays contain the cakes sold in each shop over the 10 consecutive days.
shop1=[4, 5, 3, 6, 0, 5, 5, 6, 4, 5]
shop2=[5, 3, 1, 1, 3, 5, 3, 6, 3, 3]
Write a MATLAB program that computes the running profit of each shop and displays one of
the following messages (whichever applies) after each round n for n = 1, 2, . . . , 10:
Shop 1 is leading
Shop 2 is leading
It is a tie
Also, at the end of your program, use the find command to identify (and display) the rounds
in which the number of sales (not profit) were the same for the two shops, and use the length
command to compute (and display) the number of such days. Include appropriate headings in
your output.
The heart beat rate has to be well regulated to provide enough oxygenated blood
throughout the body and so depends on feedback with the body’s oxygen demand. A simple discrete model of heart beat regulation is given by:
xt+1 = kxt(1 - xt)
Here xt represents the normalised heart beat rate at time t recorded once per minute. That is, the normalisation involves dividing the actual hear rate in beats per minute by 80 beats per minute.
The parameter k is a positive real number (hopefully) greater than 0.
(a) Assuming k = 1 what are the steady state solutions (also known as fixed points) for xt? That is, when xt+1 = xt
(b) Assuming k = 2 what are the fixed points?
(c) Write a MATLAB program using array operations to generate a table (with headings) of the normalised heart beat rate per minute starting at time t = 0 with the value of x0 entered by the user. Run your program with the maximum time set to 30 minutes. Show table and MATLAB code for x0 = 0.1 and k = 2
Find, showing all working, a recursive definition of the sequence with general term
tn = 6 (n + 1)!/3n, n >= 1
There are 3 black balls, 4 blue balls and 5 red balls in a box. In how many ways can we choose 3 balls at the same time with different colors?
Which of these sentences are propositions? What are the truth values of those that are propositions?
Let p and q be the propositions “The election is decided” and “The votes have been counted” respectively. Express ~p as an English sentence. *