The x-bar and R values for 20 samples of size five are shown in Table 10E.6. Specifications on this product have been established as 0.550 +/- 0.02.
Table 10.E.8
| Sample No. | X Bar | R |
| 1 | 0.549 | 0.0025 |
| 2 | 0.548 | 0.0021 |
| 3 | 0.548 | 0.0023 |
| 4 | 0.551 | 0.0029 |
| 5 | 0.553 | 0.0018 |
| 6 | 0.552 | 0.0017 |
| 7 | 0.550 | 0.0020 |
| 8 | 0.551 | 0.0024 |
| 9 | 0.553 | 0.0022 |
| 10 | 0.556 | 0.0028 |
| 11 | 0.547 | 0.0020 |
| 12 | 0.545 | 0.0030 |
| 13 | 0.549 | 0.0031 |
| 14 | 0.552 | 0.0022 |
| 15 | 0.550 | 0.0023 |
| 16 | 0.548 | 0.0021 |
| 17 | 0.556 | 0.0019 |
| 18 | 0.546 | 0.0018 |
| 19 | 0.550 | 0.0021 |
| 20 | 0.551 | 0.022 |
(a) Construct a modified control chart with α=0.0013, assuming that if the true process
fraction nonconforming is as large as 1%, the process is unacceptable.
(b) Suppose that if the true process fraction nonconforming is as large as 1%, we would like an
acceptance control chart to detect this out-of control condition with probability 0.90.
Construct this acceptance control chart, and compare it to the chart obtained in part (a).
In: Math
How can i quit this python program.
#********************************************************************************
#Program : SearchClassInfo.py
#Description: This program will ask a user to enter 6 courses and
will allow him
# to search a class by course number, room number, intructor or
time,
# the program will run until the user stop it.
#********************************************************************************
from os import sys
def main():
#Definition of 4 lists
courses = []
rooms = []
instructors = []
times = []
#Allow user to enter six courses
for x in range(2):
Course_Number =input('Enter the course number: ')
Room_Number = input('Enter a room number: ')
Instructor =input('Enter the Instructor of the course: ')
Time = input('Enter the time the course meets: ')
#Add elements in appriate list.
courses.append(Course_Number)
rooms.append(Room_Number)
instructors.append(Instructor)
times.append(Time)
loop = 1 #initialisation of a flag.
while loop != 0:
try:
#Display a menu of four choices to make to search a class.
print('\nEnter 1 to search by course number: ')
print('Enter 2 to search by room number: ')
print('Enter 3 to search by instructor: ')
print('enter 4 to search by time: ')
choice = int(input('Enter your choice: '))#ask user to enter his
choise for search.
if choice == 1 :
#ask user to enter course number for search of corresponding
elements.
Course_Number = input('Enter a course number: ')
if Course_Number in courses: #verify if the couse number entered is
in the list
#extract the index of the course number in list.
i=courses.index(Course_Number)
#printing elements on the same index as course number in other
lists.
print('\nThe detail for course',courses[i], 'are:'
'\nRoom:', rooms[i],
'\nInstructor:',instructors[i],
'\nTime:',times[i], end=' ''\n')
else:#message to alerte when course number does not exit
print('\nThis course number is not on schedule')
elif choice == 2 :
# #ask user to enter room number for search of corresponding
elements.
Room_Number = input('Enter a room number: ')
if Room_Number in rooms:#verify if the room number entered is in
the list
#extract the index of the room number in list.
i=rooms.index(Room_Number)
#printing elements on the same index as room number in other
lists.
print('\nThe detail for course',courses[i], 'are:'
'\nRoom:', rooms[i],
'\nInstructor:',instructors[i],
'\nTime:',times[i], end=' ' '\n')
else:#message to alerte when room number does not exit
print('\nThis room number is not on schedule')
elif choice == 3 :
Instructor = input('Enter the Instructor of the course: ')
if Instructor in instructors:
i=instructors.index(Instructor)
print('\nThe detail for course',courses[i], 'are:'
'\nRoom:', rooms[i],
'\nInstructor:',instructors[i],
'\nTime:',times[i], end=' ' '\n')
else:
print('\nThis instructor is not on schedule')
elif choice == 4 :
Time = input('Enter the time the course meets: ')
if Time in times:
i=times.index(Time)
print('\nThe detail for course',courses[i], 'are:'
'\nRoom:', rooms[i],
'\nInstructor:',instructors[i],
'\nTime:',times[i], end=' ' '\n')
else:
print('\nThis time is not on schedule')
elif choice!=' ':
print('Choice goes from 1--->4')
loop = 0
print('\nDo you want to continue? Enter y for yes')
control = input(' ')
if control == 'y'or'Y':
loop = 1
elif control!=' ':
sys.exit(0)
except:
print('incorrect choice, must be 1,2,3 or4')
pass
main()
In: Computer Science
Foreign market entry mode – International joint venture vs. Exporting ABYZ Company is a successful Australian business. Currently, it manufactures within Australia and exports its products to overseas markets. From the perspective of ABYZ Company, discuss why the use of Exporting might be a more appropriate international foreign market entry mode than entering through a Foreign Direct Investment (FDI) Greenfields approach. Discuss the advantages and disadvantages of both for the company. Recommended length is approximately 250 words. (dont paste anothers need a new one)
In: Finance
Chapter 17 Betty to the Rescue
—T.S. Eliot
Sometimes angels work behind the scenes in secret ways. Betty Mavis was an unsuspected angel for Supervisor Mark Armen of Glacier Hills Township. Glacier Hills was just north of the city of Westminister. Armen had been a political science professor at Ansell College in Westminister, but he was a resident of Glacier Hills, and when the opportunity present itself, he decided a tour of duty in public service was in order. He still had to get elected. Several students helped in his campaign and all were supportive. Particularly helpful was graduate student Paul Turwill. Tur-will took the lead in getting together volunteers to knock on every door in Glacier Hills. He also talked residents into having signs on their lawn. In the true sense of the word, he was a go-getter. After long summer nights of campaigning, Armen and Turwill and those students who were over 21 would gather at the Knolls Tavern to discuss their activities. Betty Mavis often came along, usually with a textbook in hand, and always with a smile.
Armen told Turwill that he would help him get a job with the township if he were to be elected and a job opening was available. The election was a success, and as it happened, the previous, outgoing supervisor had a secretary who indicated she wished to resign when her boss left office. That created an opening for a secretary. Armen approached the township clerk, another elected official who served as personnel director. Armen was told that he could choose anyone he wished to be his secretary. He brought up the possibilities of having Turwill serve instead as his assistant, but with the understanding that Turwill and Armen would take care of all of the secretarial tasks of the supervisor’s office. The clerk had no problem with that arrangement, and at the first meeting led by new Supervisor Mark Armen, the issue was placed in front of the full board, and it was discussed briefly. There was no opposition when it was established that Turwill could type and he had had some clerical work experience. Turwill was hired. He was able to continue with his master’s degree program as all his remaining classes were in the evening. He agreed not to take any class on Monday night, as that was when the township board meetings were.
Political leaders often praise the patronage system. If an official is given the power to make an appointment untied to arms-length merit considerations and open competition, it is considered a plus. This is what Mark Armen had been teaching right out of the textbooks in his political personnel classes. He had his classes read George Washington Plunkitt,1 which explained that the only way you can motivate staff is if you get to select them unhindered by rules and examinations. Patronage was the key to loyalty. When Armen the professor yielded to Armen the political leader, it didn’t seem to work out that way at all. Turwill was a big mistake. He immediately took on a lazy air. He did not show respect to other members of the staff, mostly older women who, while a bit stern in demeanor, had efficiently taken care of township business over the previous 3 decades. Stern was the nature of most workers in the community of German immigrants—many of whom were recent immigrants. Turwill was a bit sloppy in his work. Armen had to have letters retyped, and after a while just took on the task of typing his letters by himself.
Armen was outgoing and liked to joke around with citizens and students alike. He was into jogging, and would tour the township streets in his running outfit two or three mornings a week. He actually used the running to look at sites for rezoning or other issues that had come up in meetings. It was a good way to keep in touch with the citizens. He would wave and smile at constituents and even stop to chat if the occasion called for it. Some of the solid citizens took offense at this style of activity. They were especially critical when they would phone the township and ask for the supervisor only to get Turwill to answer in a sarcastic way that the supervisor was out jogging.
Armen was very concerned when some of Turwill’s college friends would stop by and have closed-door meetings with him. Armen also had an impression that Turwill and his friends would go behind the township hall and participate in recreational drug activity. Armen was well aware that many of the students on campus did drugs, and he had seen Turwill smoking on occasion. The township hall was not the place, and working hours were not the time.
A patronage appointee cannot be easily fired. This is especially the case if he or she earned the job through hard political work. This is the case when someone won an appointment through the recommendation of a close friend. A patronage appointee who knows this may use this. The patronage appointee may take on a feeling that he already paid his dues for the job and he doesn’t have to work as hard as others for their pay. Such was the case with Turwill. Armen pondered solutions, and he knew that any direct action would have costs in friendships on campus, and in respect from his township colleagues who had gone along with his judgment when Turwill was hired. The solution to the problem of Turwill was not easy. Armen’s first thought was to move him to some work outside of the township hall. Armen did let Turwill know that he could not defend him if anyone else saw him smoking marijuana about the premises, and Turwill seemed to understand the warning.
Armen thought about putting Turwill with the township work crews, but that was mostly manual labor, and Armen was not going to make Turwill a supervisor of work crews—where the workers were more skilled than he was. Fortunately the township received a neighborhood development grant for a poor area near the river—Riverdale. The grant entailed hiring crews to clean up the streets, paint houses, and conduct recreational programs. Armen put Turwill in charge of organizing teams to go to the Riverdale area and to work with them. While Turwill thought the work was a bit demeaning, he thought it was less boring that being at township hall all day. He seemed to be doing a satisfactory job in Riverdale. Armen only worried about the fall—in 2 months the Riverdale project would be over—then he would have the Tur-will project on his hands again.
Ah! The day of miracles. One day in August, Turwill came into Armen’s office with a big smile and announced that there was an opening for an assistant public works director in the city of Westminister, and the pay was 40% higher than his current salary. He asked if he should apply.
Armen put on his professor’s hat for a moment and said, “Paul, you know you are welcome here. I owe you this; I know I wouldn’t be here without your work. But the job you have here has to be considered temporary—I am here on a 2-year term; you know my job here is temporary too. You do not have a career job here; there is no career ladder. Westminister is a big city, a post like assistant public works director can have a career ladder. And I can’t raise your salary. Believe me, I know I owe you, and I know you can work hard, and I’ll let the people in Westminister know you are a good student and you can work hard. My professorial advice is simply ‘go for it.’”
Armen made a few inquiries about the position in Westminister, and he found that they wanted a person with a master’s degree and experience, and that they were conducting a national search. His brief moments of thinking that the “Paul problem” was being solved ended. On the other hand, maybe his talk with Turwill could encourage him to look for other jobs, too. But hopes dashed can be hopes revived. Two days later Turwill told the supervisor that he had made the list of ten finalists for the job at Westminister. Armen was indeed a bit dumbfounded.
The next week Turwill was invited for a personal interview. He reported back to Armen with another smile on his face. He had been the first candidate interviewed, because they were talking to people in the local area first. He related that the interview had gone extremely well. In the course of discussions about work experience Turwill had told the Westminister director of public works that he had worked on sidewalk construction crews during summers of his college years. The director asked where, and Turwill replied in Geddes, where he grew up. Geddes was a town of 10,000, forty miles to the west of Glacier Hills.
“You grew up in Geddes?” the director had exclaimed. “So did I. Turwill, your name is? Is that right?”
“Yes, Paul Turwill.”
The director asked, “Do you know Tom Turwill?”
“Of course,” Turwill replied. “That’s my father.”
“I can’t believe it. Your father, wow! You must be that little kid he brought to the class picnics,” the director said. “Your father was my best buddy all though school. The stories I won’t tell you, wow!”
And so went the interview. The director said he would call Turwill in a few days.
The next day the director called Mark Armen. Armen gave Turwill a toned-down good recommendation, but the director sensed something. He asked, “You’re not trying to get rid of him are you?”
Without giving a direct answer, Supervisor Armen repeated the essence of his conversation with Turwill. “I am also Paul’s professor at the college, and I have to reflect on what the job here means and what your job would mean for his career. You are offering a professional public administration post with career opportunities. His job here is simply more limited. He is certainly welcome to stay here, but you are presenting a real professional opportunity and he is capable of taking advantage of it and doing a good job.”
Armen worried that his line of bull might not be effective, but he let it rest, and the director thanked him for his views on Turwill. Turwill got the job.
Armen dropped into the Knolls a few weeks later and Betty Mavis strolled in, books in hand. He asked her how the term was going. She said, “This internship and one more class and I’ve got my degree.”
“Hey, great, tell me about your internship,” Armen said.
Mavis said, “You should know about my internship, you helped set it up last fall.”
Armen sort of remembered and said, “Something to do with personnel, at the county.”
“Right on personnel, but it is the personnel department with the city of Westminister, and let me tell you, I saved your friend Paul’s butt, too.”
Armen inquired as to how she had done that.
Mavis related that the applicants for the assistant public works director were on her desk, and a screening committee had selected ten for interviews. Turwill’s application was in the pile of rejected applications. Mavis said she simply took out the bottom application from the pile of ten and placed Turwill’s into the second spot. Evidently, the director just grabbed the pile of ten and sorted out the locals, and Tur-will was the first one to get an interview call. Mavis heard he had gotten the job, but she hadn’t told anyone how he got the interview. Turwill told her that she had really saved him. She said she thought so because Turwill was always complaining about his township job.
Armen had not thought about Mavis’s graduation, and Mavis had not brought up the subject. But Armen knew she was a waitress at a nice restaurant, the Great Lakes Steakhouse. Armen went into the tavern the week after graduation, and Mavis was there again. This time she was direct.
“Hey, Professor, when you going to take care of me? When do I get a job?”
Armen said, “O.K. Right now, this is your job interview.”
They went though her courses, the jobs she had held, and her skill levels.
Armen said, “Look, I never filled Paul Turwill’s job, and I told the clerk I really didn’t need an assistant, but I know we have a backlog of clerical work, and we could use some organization. You come in tomorrow, and we’ll discuss your job with the clerk.”
The next day Mavis was hired. Armen returned to teaching when his 2-year term ended. Mavis’s new job was a clerical job, but over the next 25 years she grew her position into a professional position. The word in township hall was that she made the place work. Indeed she was even recognized by the Greater Westminister Women’s Club as “Professional Woman of the Year.”
Rethinking patronage—sometimes it can work out O.K.
Questions
In: Economics
The amount of I3–(aq) in a solution can be determined by titration with a solution containing a known concentration of S2O32–(aq) (thiosulfate ion). The determination is based on the net ionic equation
2S2O32-(aq) + I3- (aq)---------> S4O62-(aq) + 3I-(aq)
Given that it requires 40.1 mL of 0.340 M Na2S2O3(aq) to titrate a 15.0-mL sample of I3–(aq), calculate the molarity of I3–(aq) in the solution.
In: Chemistry
OpenACC.
Insert OpenACC directives to improve the performance only within the matmul function. Enhance the comments throughout.
Clearly identify, in your report, the execution time of your implementation the algorithm. How large do the matrices need to be before the performance of a P100 exceeds that of 28 cores on Bridges (using square matrices with power of two order)?
///////////////////////////////////////////////////////////////////////////////
// matmul.c
//
// Procedures:
//
// main generates matrices and tests matmul
// matmul basic, brute force matrix multiply
///////////////////////////////////////////////////////////////////////////////
#include <stdio.h>
#include <sys/time.h>
///////////////////////////////////////////////////////////////////////////////
// int main( int argc, char *argv[] )
// Description: Generates two matrices and then calls matmul to
multiply them.
// Finally, it verifies that the results are
correct.
//
// Parameters:
// argc I/P int The
number of arguments on the command line
// argv I/P char
*[] The arguments on the command line
// main O/P int
Status code
///////////////////////////////////////////////////////////////////////////////
#ifndef L
#define L (1*1024/1)
#endif
#ifndef M
#ifdef SQUARE
#define M L
#else
#define M (1*1024/1)
#endif
#endif
#ifndef N
#ifdef SQUARE
#define N L
#else
#define N (1*1024/1)
#endif
#endif
float A[L*M], B[M*N], C[L*N];
int matmul( int l, int m, int n, float *A, float *B, float *C );
int main( int argc, char *argv[] )
{
int i, j, k;
#ifdef OMP
#pragma omp parallel
{
int np = omp_get_num_procs();
fprintf( stderr, "Threads = %d\n", np );
}
#endif
for( i=0; i<L; i++ )
for( j=0; j<M; j++ )
{
if( i <= j )
{
A[i*M+j] = (float) (i*M+j+1);
}
else
{
A[i*M+j] = 0.0;
A[i*M+j] = (float) (i*M+j+1);
}
}
for( j=0; j<M; j++ )
for( k=0; k<N; k++ )
{
if( j <= k )
{
if( k < M )
B[j*N+k] = 1.0;
else
B[j*N+k] = B[j*N+k-1] + 1.0;
}
else
{
B[j*N+k] = 0.0;
}
}
for( i=0; i<L; i++ )
for( k=0; k<N; k++ )
{
C[i*N+k] = - (float) L*M*N;
}
struct timeval start, stop;
gettimeofday( &start, NULL );
matmul( L, M, N, A, B, C );
gettimeofday( &stop, NULL );
float elapsed = ( (stop.tv_sec-start.tv_sec) +
(stop.tv_usec-start.tv_usec)/(float)1000000 );
float flops = ( 2 * (float)L * (float)M * (float)N ) / elapsed;
printf( "L=%d, M=%d, N=%d, elapsed=%g,
flops=%g\n",
L, M, N, elapsed, flops );
#ifdef DEBUG
printf( "A:\n" );
for( i=0; i<L; i++ )
{
printf( "%g", A[i*M] );
for( j=1; j<M; j++ )
{
printf( " %g", A[i*M+j] );
}
printf( "\n" );
}
printf( "B:\n" );
for( j=0; j<M; j++ )
{
printf( "%g", B[j*N] );
for( k=1; k<N; k++ )
{
printf( " %g", B[j*N+k] );
}
printf( "\n" );
}
printf( "C:\n" );
for( i=0; i<L; i++ )
{
printf( "%g", C[i*N] );
for( k=1; k<N; k++ )
{
printf( " %g", C[i*N+k] );
}
printf( "\n" );
}
#endif
}
///////////////////////////////////////////////////////////////////////////////
// int main( int argc, char *argv[] )
// Description: Generates two matrices and then calls matmul to
multiply them.
// Finally, it verifies that the results are
correct.
//
// Parameters:
// l I/P int The
first dimension of A and C
// m I/P int The
second dimension of A and first of B
// n I/P int The
second dimension of B and C
// A I/P float *
The first input matrix
// B I/P float *
The second input matrix
// C O/P float *
The output matrix
// matmul O/P int
Status code
///////////////////////////////////////////////////////////////////////////////
int matmul( int l, int m, int n, float *restrict A, float *restrict
B, float *restrict C )
{
int i, j, k;
for( i=0; i<l; i++ )
// Loop
over the rows of A and C.
for( k=0; k<n; k++ )
// Loop over the columns of B
and C
{
// Initialize the output element for the inner
// product of row i of A with column j of B
C[i*n+k] = 0;
for( j=0; j<m; j++ )
// Loop over the columns of A
and C
{
C[i*n+k] += A[i*m+j] *
B[j*n+k]; // Compute the inner product
}
}
}
In: Computer Science
The double acetylation of the drug morphine gives a historically important compound. Discuss.
In: Chemistry
2. Discuss the theories of sexuality listed in the textbook. Describe each theory clearly.
a) The Social Constructionist Perspective
b) The Integrative Perspective
c) Queer Theory.
In: Psychology
The cable lifting an elevator is wrapped around a
1.2-m-diameter cylinder that is turned by the elevator's motor. The elevator is moving upward at a speed of 2.6 m/s . It then slows to a stop, while the cylinder turns one complete revolution.
How long does it take for the elevator to stop?
In: Physics
You are a cognitive psychologist who has developed a new treatment for depression. Currently, the most effective treatments for depression are behavioral treatments and pharmacological treatments (treatments involving medication). In order to validate your new treatment, you need to show that it is at least as effective as behavioral treatment and medication. You conduct a clinical trial to determine the effectiveness of your treatment by randomly assigning 60 individuals with depression to four treatment groups: a Control group (n = 15), a Cognitive Therapy group (n = 15), a Behavioral Therapy group (n = 15), and a Pharmacological Therapy group (n = 15). After 6 weeks of treatment, you assess depression using the Beck Depression Inventory (BDI; range: 0 – 63 with 0 indicating no depression and 63 indicating severe depression). Use the 6 steps of hypothesis testing and SPSS to determine whether the groups differ in terms of scores on the BDI. Use the SPSS #2 to conduct the statistical test, record your answers on the answer sheet and attach SPSS output.
|
Control |
Pharmacological Therapy |
Behavioral Therapy |
Cognitive Therapy |
|
74 |
79 |
44 |
55 |
|
70 |
89 |
68 |
48 |
|
83 |
89 |
71 |
64 |
|
66 |
75 |
35 |
40 |
|
90 |
67 |
62 |
30 |
|
97 |
74 |
65 |
31 |
|
104 |
90 |
70 |
63 |
|
100 |
81 |
65 |
30 |
|
75 |
65 |
45 |
64 |
|
92 |
68 |
41 |
69 |
|
89 |
85 |
46 |
45 |
|
70 |
71 |
68 |
39 |
|
83 |
69 |
69 |
31 |
|
95 |
67 |
39 |
66 |
|
108 |
70 |
42 |
3 |
a) What is the appropriate statistical test to answer question? (0.5 pt)
b) Step 1: What is your prediction regarding the results of the statistical test? (0.5 pt)
c) Step 2: Set up hypotheses (2 pts)
H0 (1 pt):
H1 (1 pt):
d) Step 3: Set criteria for decision (2 pts)
Critical value (1 pt):
Decision Rule (1 pt):
e) Step 5: Report Results (2 pts) – Must include test statistic (0.5 pts), degrees of freedom (0.5 pts), p-value (0.5 pts), and appropriate measure of effect size (0.5 pts)
f) Post-hoc comparisons (1 pt) – Conduct Tukey’s HSD and report differences between groups by using “>”, “<”, or “=” to demonstrate which group’s mean is greater than the other (The first two have been filled out as a guide).
|
Post-hoc Comparisons |
||
|
Control |
= |
Pharmacological |
|
Control |
< |
Behavioral |
|
Control |
Cognitive |
|
|
Behavioral |
Pharmacological |
|
|
Behavioral |
Pharmacological |
|
|
Cognitive |
Pharmacological |
|
g) Step 6: Interpret the results of the statistical test
in terms of the research question (1 pt)
SPSS DATA
Control 74
Control 70
Control 83
Control 66
Control 90
Control 97
Control 104
Control 100
Control 75
Control 92
Control 89
Control 70
Control 83
Control 95
Control 108
Pharmacological Therapy 79
Pharmacological Therapy 89
Pharmacological Therapy 89
Pharmacological Therapy 75
Pharmacological Therapy 67
Pharmacological Therapy 74
Pharmacological Therapy 90
Pharmacological Therapy 81
Pharmacological Therapy 65
Pharmacological Therapy 68
Pharmacological Therapy 85
Pharmacological Therapy 71
Pharmacological Therapy 69
Pharmacological Therapy 67
Pharmacological Therapy 70
Behavioral Therapy 44
Behavioral Therapy 68
Behavioral Therapy 71
Behavioral Therapy 35
Behavioral Therapy 62
Behavioral Therapy 65
Behavioral Therapy 70
Behavioral Therapy 65
Behavioral Therapy 45
Behavioral Therapy 41
Behavioral Therapy 46
Behavioral Therapy 68
Behavioral Therapy 69
Behavioral Therapy 39
Behavioral Therapy 42
Cognitive Therapy 55
Cognitive Therapy 48
Cognitive Therapy 64
Cognitive Therapy 40
Cognitive Therapy 30
Cognitive Therapy 31
Cognitive Therapy 63
Cognitive Therapy 30
Cognitive Therapy 64
Cognitive Therapy 69
Cognitive Therapy 45
Cognitive Therapy 39
Cognitive Therapy 31
Cognitive Therapy 66
Cognitive Therapy 36
In: Math
| Nutrient | Peanuts | Raisins | M&Ms | Mini-pretzels |
| Calories(kcal) | 855 | 435 | 1024 | 162 |
| Protein (g) | 34.57 | 4.67 | 9.01 | 3.87 |
| Fat (g) | 72.50 | 0.67 | 43.95 | 1.49 |
| Carbohydrates (g) | 31.40 | 114.74 | 148.12 | 33.68 |
Suppose you want to make at most 10 cups of trail mix, using all of the ingredients. You dont want either ingredient to dominate the mixture so you want each ingredient to contribute at least 10% of the total volume of the mix made. You want the entire amount of trail mix to have no more than 7000 calories and you want to maximize the the amount of carbohydrates in the mix. (Use "solver" or an equivalent program because the simplex method gets to complicated)
1) What constraints must be placed on the objective function?
2) Find the number of cups of each ingredient in the mix so the amount of carbohydrates is maximized.
3) How many grams of carbohydrates are in a cup of the final mix? How many calories?
4) Under all the constraints given about, what recipe for the trail mix will maximize the amount of protein in the mix? How many grams of protein are in a cup of the mix? Calories?
5) Consider making a batch of trail mix under the following conditions: You still want to make at most 10 cups of trail mix, and you still want each of the ingredients to contribute at least 10% of the total volume of the mix made. You want the entire amount of trail mix you make to have at least 1000 grams of carboyhydrates, and you want to minimize the amount of fat in the mix. What recipe for trial mix will minimize the amount of fat in the mix?
6) How much fat, protein and carbohydrates are in a cup of this mix?
7) How many calories are in a cup of this mix?
In: Chemistry
Please do in Java source
Social Security Payout. If you’re taking this course, chances are that you’re going to make a pretty good salary – especially 3 to 5 years after you graduate. When you look at your paycheck, one of the taxes you pay is called Social Security. In simplest terms, it’s a way to pay into a system and receive money back when you retire (and the longer you work and the higher your salary, the higher your monthly benefit). Interestingly, your employer will pay the same amount for you. The current tax rate is 6.2% until you make approximately $132,900. For this assignment, we’re going to help out hourly employees. Design (pseudocode) and implement (source code) a program that asks users how much they make per hour, the number of hours they work per week, and calculates the yearly income. For the second half, the program should calculate and display the amount of Social Security tax the user will pay for that year. You must write and use at least two functions in addition to the main function. At least one function must not have a void return type. Note, don’t forget to put the keywords “public” and “static” in front of your functions. Document your code and properly label the input prompt and the outputs as shown below.
Sample run 1: Enter hourly wage: 10
Enter your hours per week: 40
You will earn $20800.0 per year
You will pay $1289.6 in Social Security tax
Sample run 2: Enter hourly wage: 40
Enter your hours per week: 60
You will earn $124800.0 per year
You will pay $7737.6 in Social Security tax
In: Computer Science
In the game of Lucky Sevens, the player rolls a pair of dice. If the dots add up to 7, the player wins $4; otherwise, the player loses $1. Suppose that, to entice the gullible, a casino tells players that there are many ways to win: (1, 6), (2, 5), and soon. A little mathematical analysis reveals that there are not enough ways to win to make the game worthwhile; however, because many people's eyes glaze over at the first mention of mathematics “wins $4”.
Your challenge is to write a program that demonstrates the futility of playing the game. Your Python program should take as input the amount of money that the player wants to put into the pot, and play the game until the pot is empty.
The program should have at least TWO functions (Input validation and Sum of the dots of user’s two dice). Like the program 1, your code should be user-friendly and able to handle all possible user input. The game should be able to allow a user to ply as many times as she/he wants.
The program should print a table as following:
Number of rolls Win or Loss Current value of the pot
1 Put $10
2 Win $14
3 Loss $11
4
## Loss $0
You lost your money after ## rolls of play.
The maximum amount of money in the pot during the playing is $##.
Do you want to play again?
At that point the player’s pot is empty (the Current value of the pot is zero), the program should display the number of rolls it took to break the player, as well as maximum amount of money in the pot during the playing.
Again, add good comments to your program.
Test your program with $5, $10 and $20.
In: Computer Science