The amount of I3–(aq) in a solution can be determined by titration with a solution containing...

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...

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.

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...

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...

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...

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...

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...

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...

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

what it doing anthropology ?

what it doing anthropology ?

In: Other

Specifically answer this prompt: Have you ever experienced a time where you (as either a buyer...

Specifically answer this prompt: Have you ever experienced a time where you (as either a buyer or a seller) had more (or less) information about the quality of the product or the available prices of close substitutes to the product? Explain your situation.

One common example is: used car sales. Buyers sometimes have a lot less information than sellers about the quality of the used car.

A story from your experience about the lack of "full information" in a market you have participated in.

In: Economics

Write a C++ program that reads daily weather observation data from a file and writes monthly...

Write a C++ program that reads daily weather observation data from a file and writes monthly and annual summaries of the daily data to a file.

a. The daily weather data will be contained in a file named wx_data.txt, with each line of the file representing the weather data for a single day.

b. For each day, the date, precipitation amount, maximum temperature, and minimum temperature will be provided as tab-separated data with the following format: 20180101 0.02 37 23 20180102 0.00 42 18 <...data for the remainder of the year here...>

c. For the first entry in the daily data above, the date is 20180101 (1 January 2018), the precipitation amount is 0.02 inches, the maximum temperature is 37°F, and the minimum temperature is 23°F.

d. You may assume that the weather data is complete (i.e., there is data for each day of every month of the year) and that the data contains no errors.

2. The program must read from file each daily weather observation and write a summary by month and year to a file named wx_summary.txt.

a. The output that is written to file must have the following format:

-------------------

January

-------------------

Precipitation

Total: 3.12

Average: 0.10

Temperature

Maximum: 62

Minimum: 39

-------------------

February

-------------------

Precipitation

Total: 10.18

Average: 0.36

Temperature

Maximum: 78

Minimum: 64

-------------------

March

-------------------

Precipitation

Total: 2.02

Average: 0.07

Temperature

Maximum: 73

Minimum: 53

-------------------

April

-------------------

Precipitation

Total: 3.99

Average: 0.13

Temperature

Maximum: 77

Minimum: 58

-------------------

May

-------------------

Precipitation

Total: 3.73

Average: 0.12

Temperature

Maximum: 87

Minimum: 77

-------------------

June

-------------------

Precipitation

Total: 8.47

Average: 0.28

Temperature

Maximum: 92

Minimum: 75

-------------------

July

-------------------

Precipitation

Total: 6.79

Average: 0.22

Temperature

Maximum: 89

Minimum: 74

-------------------

August

-------------------

Precipitation

Total: 7.54

Average: 0.24

Temperature

Maximum: 82

Minimum: 74

-------------------

September

-------------------

Precipitation

Total: 18.25

Average: 0.61

Temperature

Maximum: 89

Minimum: 74

-------------------

October

-------------------

Precipitation

Total: 3.75

Average: 0.12

Temperature

Maximum: 82

Minimum: 72

-------------------

November

-------------------

Precipitation

Total: 5.62

Average: 0.19

Temperature

Maximum: 77

Minimum: 63

-------------------

December

-------------------

Precipitation

Total: 16.55

Average: 0.53

Temperature

Maximum: 72

Minimum: 67

-------------------

Max temp for year: 98 in May

Min temp for year: 21 in January

Max precip for year: 18.25 in September

In: Computer Science

A refrigeration system is working on vapour compression cycle using R134a as refrigerant. The objective is...

A refrigeration system is working on vapour compression cycle using R134a as refrigerant. The objective is to keep the refrigerated space at temperature of 243K. The vapours enter the compressor at 0.6 bar and at 239K and after compression leaves at 12 bar and 338K. The condenser is water cooled, in which water is supplied at 291 K at mass flow rate of 15 Kg/hr. and leaves at 299K. The refrigerant leaves the condenser temperature of 315K after rejecting heat. The compressor is not perfectly insulated and it absorbs 450 J/sec of heat from the surrounding. Analyze the refrigerator by determining

Dryness fraction of refrigerant (x) at inlet of evaporator inlet, Refrigeration load in tones of refrigeration, COP of the refrigerator

Draw TS diagram of the process and label all operating temperature and pressure

In: Mechanical Engineering

Explain how to use a Scanner object to read information from a page on the internet....

Explain how to use a Scanner object to read information from a page on the internet. Give an example.

Explain what a wrapper classes are and how they are used in Java. Give an example.

What is an ArrayList object? How does is it similar to and how does it differ from a traditional array.

What is inheritance? How is it useful in software projects. How is the is-a test related to inheritance?

What is an exception? Explain how to use try/catch blocks to prevent a program from crashing.

What is refactoring? What are some of the ways that Eclipse can help you with refactoring?

What is the output? Explain how you obtain this answer by hand, not using a computer.

String alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
for(int i = 1; i <= 26; i *= 2) {
   System.out.print(alphabet.charAt(i - 1));
}

What is the output? Explain how you obtain this answer by hand, not using a computer.

int n = 500;
int count = 0;
while (n > 1) {
    if (n % 2 == 0) {
        n /= 3;
    }
    else {
        n /= 2;
    }
    count++;
}
System.out.println(count);

A Java Swing application contains this paintComponent method for a panel. Sketch what is drawn by this method.

public void paintComponent(Graphics g) {
    super.paintComponent(g);    
    g.setColor(Color.black);
    g.fillRect(100, 100, 200, 100);
    g.fillRect(300, 200, 200, 100);
    g.fillRect(500, 100, 200, 100);
}

In: Computer Science

An aqueous solution of magnesium oxalate is prepared by dissolving 4.46 g of magnesium oxalate in...

An aqueous solution of magnesium oxalate is prepared by dissolving 4.46 g of magnesium oxalate in 1.51×102 g of water. The density of the solution is 1.01 g mL-1.

a) Determine the mass percent of magnesium oxalate in the solution.

b) Determine the mole fraction of magnesium oxalate in the solution.

An aqueous solution of nickel(II) chloride is prepared by dissolving 5.61 g of nickel(II) chloride in 4.53×102 g of water. The density of the solution is 1.34 g mL-1.


Determine the molarity (in mol/L) of nickel(II) chloride in the solution.

In: Chemistry