In the late 1990s, the U.S. government ran a surplus for the first time in decades. It instituted a buyback program, whereby the Treasury bought outstanding government bonds. How would this program affect the bond market price, yield, and quantity of bonds? How might it affect the liquidity of government bonds?
In: Economics
A fast growth share has the first dividend (t=1) of $1.48. Dividends are then expected to grow at a rate of 6 percent p.a. for a further 2 years. It then will settle to a constant-growth rate of 2.3 percent. . If the required rate of return is 12 percent, what is the current price of the share? (
In: Finance
In: Finance
an investment pays 2600 per year for the first 7 years, 5200 per year for the next 7 years and 7800 per year the following 10 years (all payments are at the end of each year). if the discount rate is 12.85% compounding quarterly, what is the fair price of the investment?
In: Finance
We see that this computes the product of two matrices. Add a new kernel code, called sum, to compute the sum of the two matrices.
#include <stdio.h>
#include <math.h>
#include <sys/time.h>
#define TILE_WIDTH 2
#define WIDTH 6
// Kernel function execute by the device (GPU)
__global__ void
product (float *d_a, float *d_b, float *d_c, const int n) {
int col = blockIdx.x * blockDim.x + threadIdx.x
;
int row = blockIdx.y * blockDim.y + threadIdx.y
;
float sum = 0;
if (row < n && col < n) {
for (int i = 0 ; i<n ; ++i)
{
sum += d_a[row * n
+ i ] * d_b[i * n + col] ;
}
d_c[row * n + col] = sum;
}
}
// Utility function to print the input matrix
void printMatrix (float m[][WIDTH]) {
int i, j;
for (i = 0; i<WIDTH; ++i) {
for (j = 0; j< WIDTH; ++j)
{
printf ("%d\t",
(int)m[i][j]);
}
printf ("\n");
}
}
// Main function execute by the host (CPU)
int main () {
// host matrices
float host_a[WIDTH][WIDTH],
host_b[WIDTH][WIDTH],
host_c[WIDTH][WIDTH];
// device arrays
float *device_a, *device_b, *device_c;
int i, j;
// initialize host matrices using random numbers
time_t t;
srand ((unsigned) time(&t));
for (i = 0; i<WIDTH; ++i) {
for (j = 0; j<WIDTH; j++) {
host_a[i][j] =
(float) (rand() % 50);
host_b[i][j] =
(float) (rand() % 50);
}
}
printf ("Matrix A:\n");
printMatrix (host_a);
printf ("\n");
printf ("Matrix B:\n");
printMatrix (host_b);
printf ("\n");
// allocate device memory for input matrices
size_t deviceSize = WIDTH * WIDTH * sizeof
(float);
cudaMalloc ((void **) &device_a,
deviceSize);
cudaMalloc ((void **) &device_b,
deviceSize);
// copy host matrices to device
cudaMemcpy (device_a, host_a, deviceSize,
cudaMemcpyHostToDevice );
cudaMemcpy (device_b, host_b, deviceSize,
cudaMemcpyHostToDevice );
// allocate device memory to store computed
result
cudaMalloc((void **) &device_c, deviceSize)
;
dim3 dimBlock (WIDTH, WIDTH);
dim3 dimGrid (WIDTH/TILE_WIDTH,
WIDTH/TILE_WIDTH);
product<<<dimGrid, dimBlock>>>
(device_a, device_b, device_c, WIDTH);
// copy result from device back to host
cudaMemcpy (host_c, device_c, deviceSize,
cudaMemcpyDeviceToHost);
// output the computed result matrix
printf ("A x B: \n");
printMatrix (host_c);
cudaFree (device_a);
cudaFree (device_b);
cudaFree (device_c);
return 0;
}
In: Computer Science
use cpp
1 a)Write a console program which creates an array of size 100 integers. Then use Fibonacci function Fib(n) to fill up the array with Fib(n) for n = 3 to n = 103: So this means the array looks like: { Fib(3), Fib(4), Fib(5), ...., Fib[102) }. For this part of assignment you should first write a recursive Fib(n) funcion, as was done in class.For testing, print out the 100 integers.
1 b) For second part of this assignment, you must modify the
Fib(n) you wrote for part a) so that it uses the array you fill in
part a, to compute Fib (n+1) using Fib(n) and Fib(n-1)
already saved in the array.This way we do not compute the same Fib
numbers many times.
In: Computer Science
b) Assume that someone has collected a set of measurements and wants some statistical data about them. Write a program that asks a user for measurements and prints the average, the maximum, and minimum measurement. User should be allowed to enter as many measurements as they want, until entering a negative measurement. The negative measurement should not be processed, but is just used to indicate that the user has finished entering measurements. (Do not use a list to store the measurements) (Working in Python 3.7 (Spyder))
c) For numbers from 2 to 100 print a series of lines indicating which numbers are divisors of other numbers. For each, print out "X divides Y", where X<=Y, and both X and Y are between 2 and 100. First few lines will be 2 divides 2, 3 divides 3...etc (Working in Python 3.7)
In: Computer Science
[P3](15pts) A manufacturing plant determines how many units of standard toys and luxury toys to produce using the available machines. The first machine has the capacity to produce 300 standard toys, or 250 luxury toys per hour. The second machine can produce 400 standard toys, or 100 luxury toys. (i.e. it takes 1/400 of an hour to produce a single standard toy, and 1/100 of an hour to produce a single luxury toy from machine 2). Regular toys sell for $50 and costs $20 per item, and luxury toys sell for $120 and costs $45 per item to produce. How would you determine the production schedule to maximize profit? Formulate the problem, do not solve. (for this problem only, assume you can sell all you produce)
In: Operations Management
During 2018, Pina Inc., a furniture store, issued two different series of bonds, details of which follow:
First issue: 670 $100, 10% bonds, at par, each convertible into 6 common shares.
Second issue: 390 $100, 7% bonds, at par, each convertible into 3 common shares.
For the year ended December 31, 2020, the company had net income of $53,850. Throughout 2020, 2,500 common shares were outstanding; none of the bonds were converted or redeemed. The company’s tax rate was 19%. (For simplicity, ignore the requirement to record the debt and equity portions of the convertible bond separately).
1. Calculate basic earnings per share for the year ended December 31, 2020.
2. Calculate diluted earnings per share for the year ended December 31, 2020.
In: Accounting
The following table shows the weekly demand and supply in the market for orange juice in Houston.
|
Price |
Quantity Demanded |
Quantity Supplied |
|---|---|---|
|
(Dollars per gallon of orange juice) |
(Gallons of orange juice) |
(Gallons of orange juice) |
| 2 | 500 | 50 |
| 4 | 400 | 150 |
| 6 | 300 | 200 |
| 8 | 200 | 300 |
| 10 | 100 | 450 |
On the following graph, plot the demand for orange juice using the blue point (circle symbol). Next, plot the supply of orange juice using the orange point (square symbol). Finally, use the black point (plus symbol) to indicate the equilibrium price and quantity in the market for orange juice.
Note: Plot your points in the order in which you would like them connected. Line segments will connect the points automatically.
DemandSupplyEquilibrium PRICE (Dollars per gallon of orange juice) QUANTITY (Gallons of orange juice)
In: Economics