The green and red Company manufactures two products, Product 1 and Product 2. Product 2 was developed as an attempt to enter a market closely related to that of Product 1. Product 2 is the more complex of the two products, requiring three hours of direct labour time per unit to manufacture compared to one and one-half hours of direct labour time for Product 1. Product 2 is produced on an automated production line.
Overhead is currently assigned to the products on the basis of direct labour-hours. The company estimated it would incur a total of $396,000 in manufacturing overhead costs and produce 5,500 units of Product 2 and 22,000 units of Product 1 during the current year. Unit costs for materials and direct labour are:
|
a. Compute the predetermined overhead rate under the current method of allocation and determine the unit product cost of each product for the current year.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In: Accounting
For the following exercises, given v, draw v, 3v and 1/2 v.
⟨−3, −2⟩
In: Math
Consider a distribution with the density function f(x) = x^2/3 for −1 ≤ x ≤ 2.
(a) Randomly pick a sample of size 20 from this distribution, find the probability that there are 2 to 4 (inclusive) of these taking negative values.In: Statistics and Probability
2. (25) My sons (“Boy 1” and “Boy 2”) are negotiating over how to divide a pile of 20 chocolates. Boy 1 will engage Boy 2 in up to three rounds of negotiations. The order of events is:
FIRST ROUND: Boy 1 makes Boy 2 an initial offer. Boy 2 accepts or rejects. If he accepts, the game ends and the two boys get their chocolates. If Boy 2 rejects, I punish them for not working together by eating 5 chocolates myself. The game then continues with 15 chocolates to be divided.
SECOND ROUND: Boy 2 makes an offer. Boy 1 accepts or rejects. If he accepts, the game ends and the two boys get their chocolates. If Boy 1 rejects, I eat 5 chocolates myself and the game continues with 10 chocolates to be divided.
THIRD ROUND: Boy 1 makes a final offer. Boy 2 accepts or rejects. If he accepts, the two boys get their chocolates. If Boy 2 rejects, the game ends and I eat all the remaining chocolates. Note that I am expecting you to make an assumption of spiteful players, all else equal. Said another way, I assume that “reject” will break the indifference of getting zero either way...
(a) (5) If we reach the third round of the game, what would be Boy 1’s offer?
(b) (5) Given that my sons know (a) in round 2, what would be Boy 2’s 2nd Round offer?
(c) (5) Given that my sons know (b) in round 1, what would be Boy 1’s 1st Round offer?
(d) (10) What is Boy 1’s first-round strategy? What is Boy 2’s first-round strategy? What is the equilibrium outcome of the game?
In: Economics
DATA: Grades
A- 10 B- 2 C- 1 D- 0 F- 2
Q23. a) If a committee with 2 student members is to be formed, what is the probability of forming a committee with one A grade and one F grade student?
Q24. If a committee with 3 student members is to be formed, what is the probability of forming a committee with two A grade and one B grade student?
Q25.If the records show that, the probability of failing (with grade F) this course is p, what is the probability that at most 2 students out of 15 fail this course? {Hint: use binomial distribution}
Q26.If the records show that, the probability for a student to get a grade B this course is p, what is the probability that exactly 4 students out of 15 will have a grade B for the course? {Hint: use binomial distribution}
Q27.What is the probability of selecting a grade A student for the first time either in 2nd or 3rd selection?
In: Statistics and Probability
2. Medium problems
2-1. Given a positive decimal number, write a function that transforms it into binary, and prints out the result. You may assume that the string contains at least 1 and no more than 9 decimal digits. The output should only include the binary digits followed by a new line.
Hint: You might need to convert a string to integer. Have a look at the stoi(string) in the C++11 string library. If you need to compile with C++11, include the compilation flag -std=c++11 in your compile command.
Signature: void print_as_binary(std::string decimal_number)
2-2. Given a binary number represented as an array, write a function that takes the array and its size as a parameter, and returns the integer value. You may assume that there are at least 1 and no more than 30 numbers in the array and that all the values are either 0 or 1. The array is ordered with most significant binary digit at the start (index 0) and the least significant digit at the end.
Signature: int binary_to_number(int binary_digits[], int number_of_digits)
Definition: a palindrome is a sequence that reads the same backwards as forwards. Hence, 101, 120021 and 1 are all numerical palindromes. A palindrome array would be of the form [1,2,2,1] for example. An empty array is a palindrome by definition.
2-3. Given an array of integers, write a function to calculate the sum of the elements if it is a palindrome array. If it is not a palindrome array, your function must return -2. Your function must call separate functions to check whether or not the array is a palindrome and to calculate the sum of its elements. If the length is 0 or negative each function must return -1 or false as its result.
Signature: int sum_if_a_palindrome(int integers[], int length)
Signature: bool is_a_palindrome(int integers[], int length)
Signature: int sum_elements(int integers[], int length)
2-4. Given an array of integers, write a function to determine its maximum and minimum elements and then return their sum. Your function must call separate functions to identify the maximum and minimum elements. If the length is 0 or negative each function must return -1 as its result.
Signature: int sum_min_and_max(int integers[], int length)
Signature: int max_integer(int integers[], int length)
Signature: int min_integer(int integers[], int length)
3. Tricky problems
With these problems, we are giving you a free hand at writing the signature of your functions. Follow the templates from the easier problems, and ask for help if unsure! The following two problems are set in the context of a supermarket checkout. There is only one checkout with a single line of customers each with items they are wanting to buy.
Note: The web submission system will ignore these two programs so no marks will be awarded for them even if you submit them.
3-1. Write code to capture the scenario: at the checkout, the customer who is first in the queue pays an amount equal to the value of his/her products and then leaves the supermarket. The next customer in the queue is then served. For each customer in the queue (you have initialised the queue with 10 customers), print out how much they have to pay.
3-2. Write code to capture the scenario: you have been serving customers for a while and your queue no longer has 10 customers in it. A new customer arrives at the checkout.
In: Computer Science
(a) Show that the sample variance s 2 = [Pn i=1(xi − x¯) 2 ]/(n − 1) can also be expressed as s 2 = [Pn i=1 x 2 i − ( Pn i=1 xi) 2 n ]/(n − 1). At a medical center, a sample of 36 days showed the following number of cardiograms done each day.
25 31 20 32 20 24 43 22 57 23 35 22 43 26 56 21 19 29 36 32 33 32 44 32 52 44 51 45 47 20 31 27 37 30 18 28
(b) (1 point) Find the sample mean ¯x and the sample variance s 2 x .
(c) (2 points) Construct a stem and leaf plot for the data and find the sample median.
(d) (3 points) Construct a 86% confidence interval for the population µ.
(e) (4 points) A researcher wishes to test the claim that the average number of cardiograms done each day is equal to or greater than 33. Is there evidence to support the claim at α = 0.05? Find the p-value.
(f) (1 point) Let x1, x2, · · ·, x36 be the data of 36 days of cardiograms above; let a and b be any nonzero constants. If y1 = a x1 +b, y2 = a x2 +b, · · ·, y36 = a x36 +b, and let ¯y and s 2 y be the sample mean and the sample variance of the yi ’s, respectively. What is the relationship between ¯x and ¯y? What is the relationship between s 2 x and s 2 y ?
(g) (5 points) Show that s 2 x is an unbiased estimator of the population mean σ 2 .
In: Statistics and Probability
Coin taking game
This game is played between 2 players, player 1 and player 2. There are two piles of coins. The values of a coin can be any integer. Both players know the values of all coins in both piles. Player 1 makes the first move, and play alternates between the players. A move consists of taking a coin from the top of either of the piles (either player can take from either pile). The game ends when both piles are empty. A player’s score is the sum of the values of all the coins they took during the game. The player with the higher score wins.
1 Winning the coin taking game
In this task you will write a function best_score(pile1, pile2) in python to determine optimal play for the coin taking game. It will determine the highest score which can be achieved by player 1, assuming that both players play optimally.
1.1 Input
Two lists, pile1 and pile2. These lists contain integers which represent the values of the coins in the game. The numbers in pile1 are the values of coins in the first pile, where pile1[I] is the value of the coin with i coins beneath it in the pile. pile2 represents the coins in the second pile in the same way. The piles may be empty.
1.2 Output
A tuple with two elements. The first is a single number which represents the highest score which player 1 can achieve. The second represents the choices made by both players during the game (assuming optimal play). The choices are represented by a list containing only the numbers 1 and 2, where a 1 indicates that the player took the top coin from pile1 on their turn, and 2 indicates that the player took the top coin from pile2 on their turn.
If multiple sequences of choices are optimal, any of these sequences is acceptable.
In: Computer Science
This program is about list comprehension.
list1 = [2, 5, 7, 8]
list2 = [1, 2]
(e) Use nested list comprehension with list1 and list2 as input sequences to generate this list:
[[3, 4], [6, 7], [8, 9], [9, 10]]
Display the list.
The following is the expected output.
Part e: [[3, 4], [6, 7], [8, 9], [9, 10]]
In: Computer Science
You have 2 strains of bacteria, strain 1 = trpA- trpB- trpC+ and strain 2 = trpA+ trpB+trpC-. You grow P1 transducing phage on strain 1 (you infect strain 1 with the phage), then infect strain 2 with this lysate and select for transductants on minimal medium (trpA,B,C mutants are all Trp auxotrophs). You get 1000 transductants growing with 0.1 ml lysate. You then infect strain 2 with your phage, then transduce strain 1 and get 15 transductants. a. What is the order of trpA, trpB, trpC? b. What is the genetic distance between trpA and trpC?
In: Biology