In this assignment, you implement a 2D-matrix as a vector of vectors, and only use at() to access its elements.
Write a program that multiplies a 2D matrix with a vector. If you need to see the math, follow this link: https://mathinsight.org/matrix_vector_multiplication (Links to an external site.)
For simplicity, our matrix will be of size 3 x 3. Initialize the matrix as shown in to become
[1.0, 2.0, 3.0]
[4.0 ,5.0 ,6.0]
[7.0, 8.0, 9.0]
Read the three values of the vector to be multiplied on the right of the matrix from the user input. Then, multiply it and print the resulting vector to cout. The interaction should look like this:
Please enter the three vector coefficients 1 1 1 The result vector is [6, 15, 24]
Write a function that takes the matrix and the right-side vector as parameters and that returns the vector resulting from the multiplication.
The program must not use arrays, only vectors.
this program should be programmed using c++ only
In: Computer Science
In: Computer Science
1. Given two conditions P and Q, there are four ways in which they might be related to each other.
P is necessary but not sufficient for Q.
P is sufficient but not necessary for Q.
P is both necessary and sufficient for Q.
P is neither necessary nor sufficient for Q.
For each problem below, do the following;
i. Determine whether P is necessary, sufficient, both necessary and sufficient, or neither necessary nor sufficient for Q.
ii. Justify your answer for i. above.
iii. Write the associated implication, if any.
a) P = “each side is equal in length to each of the others”, Q = “being a square”
b) P = “having four sides”, Q = “being a triangle”
c) P = “being a parallelogram”, Q = “having four sides”
d) P = “the number can be represented as 2n+1 for some integer n”, Q = “the number is odd”
e) P = “the number is even”, Q = “the number is divisible by 8”
f) P = “having more than one laptop”, Q = “having three laptops”
g) P = “being a younger sibling”, Q = “having an older sister”
h) P = “being a younger brother”, Q = “having an older sibling”
In: Computer Science
In a household refrigerator with evaporator temperature -10 ° C and condenser pressure 1000 kPa R134a is used as refrigerant. Saturated steam at the compressor inlet The refrigerant that is in the state is in the state of saturated liquid at the outlet of the condenser. Entropy at the compressor outlet is 0.985 kJ / kgK. According to this,
a) Cycle T-s and P-h diagrams, showing saturation curves on the diagram Draw.
b) Calculate the isentropic efficiency of the compressor.
c) Find the cooling performance coefficient of the refrigerator.
d) What is the second law efficiency of this refrigerator?
PLEASE EXPLAİN STEP BY STEP
In: Mechanical Engineering
Consider what you have learned about dual coding thus far, and then post a response to the following:
Have you ever experienced essential processing overload?
Share an example. This experience may have been enjoyable and stimulating, but do you feel you learned what you needed in the process?
How might the principle of dual coding have helped reduce this overload?
In: Psychology
Below is the income statement of a publicly-traded biotech company from 2004 until 2007:
Year |
2004 |
2005 |
2006 |
2007 |
Revenue |
$0 |
$0 |
$0 |
$0 |
Expenses |
$0.2 million |
$0.7 million |
$2.2 million |
$4.8 million |
The company’s stock was trading for $2 in 2004 and is now trading for $7. Are investors irrational? Should the stock be sold short? Is it possible for a company in the biotech business to be worth something even though it has no current sales? What can justify the billion-dollar values of technology companies which have yet to earn any profits?
In: Finance
Which of the following statements are true? There may be
more than one true statement.
A.
Any linear combination of vectors can always be written in the form Ax for a suitable matrix A and vector x. |
B.
Every matrix equation Ax=b corresponds to a vector equation with the same solution set. |
C.
If the echelon form of the augmented matrix [A | b][A | b] has a leading entry in every row, then the equation Ax=b is inconsistent. |
D.
A vector b is a linear combination of the columns of a matrix A if and only if the equation Ax=b has at least one solution. |
E.
If the columns of the matrix A form a linearly independent set, then the equation Ax=b is consistent. |
F.
The solution set of a linear system whose augmented matrix is [a1 a2 a3 | b][a1 a2 a3 | b] is the same as the solution set of Ax=bAx=b, if A=[a1 a2 a3 ]A=[a1 a2 a3 ]. |
In: Advanced Math
In: Economics
The Outdoor Furniture Corporation manufactures two products, benches and picnic tables, for use in yards and parks. The firm has two main resources: its carpenters (labor force) and a supply of redwood for use in the furniture. During the next production cycle, 3201,320 hours of labor are available under a union agreement. The firm also has a stock of 2403,240 board feet of quality redwood. Each bench that Outdoor Furniture produces requires 88 labor-hours and 1212 board feet of redwood; each picnic table takes 66 labor-hours and 3030 board feet of redwood. Completed benches will yield a profit of $1010 each, and tables will result in a profit of $1515 each. How many benches and tables should Outdoor Furniture produce in order to obtain the largest possible profit?
The optimum solution is:
Number of benches produced equals= _____
(round your response to the nearest whole number).
Number of tables
produced equals=_____
(round your response to the nearest whole number).
Optimal solution value = _____
(round your response to the nearest whole dollar).
In: Operations Management
Explain the prognosis of an individual diagnosed with schizophrenia based on age and gender factors.
In: Psychology
PLEASE DO THIS IN C#: Back in my Day! Kids who grew up in the late 70s didn’t have a lot of options for video games, but they did have “Choose your own Adventure” books. These books were cool and let the reader make meaningful decisions. If they chose choice “A”, they would turn to a page of the book and continue their adventure. If they chose choice “B”, they would turn to a different page and read a different adventure. Your task is to design (pseudocode) and implement (source code) for a story that has four different outcomes based on two different user inputs. See appendix for checking string equality. Sample run 1: It is a dark and stormy night. Do you want to take an umbrella? (Y/N): Y Good - you have an umbrella. You start to walk down a path and hear a scream. You realize that the person screaming is YOU because you see a wolf! Do you fight with your umbrella or run? ((F)ight/(R)un): F You take out your umbrella and jab it into the wolf's paw! It runs away and you live another day. Sample run 2: It is a dark and stormy night. Do you want to take an umbrella? (Y/N): Y Good - you have an umbrella. You start to walk down a path and hear a scream. You realize that the person screaming is YOU because you see a wolf! Do you fight with your umbrella or run? ((F)ight/(R)un): R You begin running so fast, the umbrella opens and you fly away like Mary Poppins. You're a little embarrassed, but you see the wolf fading off in the distance. Sample run 3: It is a dark and stormy night. Do you want to take an umbrella? (Y/N): N You decide not to take an umbrella. You start to walk down a path and hear a scream. You realize that the person screaming is YOU because you see a wolf! Do you fight with your hands or run? ((F)ight/(R)un): F You begin fighting the wolf only to realize you had just eaten a McGrease® meal earlier. You fall dead from rigorous exercise, having had a heart attack.
In: Computer Science
A. What do antacids do? B. What are two bases that may be found listed on the labels of antacids? C. Write a balanced chemical reaction to show how one of the bases in part B does what you answered in part A.
In: Chemistry
Bharat Heavy Electricals Limited Concentrates on the Power Equipment Industry Bharat Heavy Electricals Limited (BHEL) is India’s largest engineering and manufacturing enterprise, operating in the energy sector, employing more than 42000 people. Established in 1956, it has established its presence in the heavy electrical equipment’s industry nationally as well as globally. Its vision is to be ‘a world class enterprise committed to enhancing stakeholder value’. Its mission statement is: ‘to be an Indian multinational engineering enterprise providing total business solutions through quality products, systems, and services in the fields of energy, industry, transportation, infrastructure, and other potential areas’. BHEL is a huge organization, manufacturing over 180 products categorized into 30 major product groups, catering to the core sectors of power generation and transmission, industry, transportation, telecommunications and renewable energy. It has 14 manufacturing divisions, four power sector regional centers, over 100 project sites, eight service centers and 18 regional offices. It acquires technology from abroad and develops its own technology at its research and development centers. The operations of BHEL are organized into three business sectors of power, industry and overseas business. Besides the business sector departments, there are the corporate functional departments of engineering and R & D, human resource development, finance and corporate planning and development. BHEL’s turnover experienced a growth of 29 per cent, while net profit increased by 44 per cent in 2006-07. BHEL has formulated a five-year strategic plan with the aim of achieving a sustainable profitable growth. The strategy is driven by a combination of organic and inorganic growth. Organic growth is planned through capacity and capability enhancement, designed to leverage the company’s core areas of power, supported by the industry, transmission, exports and spares and services businesses. For the purpose of inorganic growth, BHEL plans to pursue mergers and acquisition and joint ventures and grow operations both in domestic and export markets.
BHEL is involved in several strategic business initiatives at present for internationalization. These include targeting the export markets, positioning itself as a reputed engineering, procurement and construction (EPC) contractor globally, and looking for opportunities for overseas joint ventures. An example of a concentration strategy of BHEL in the power sector is the joint venture with another public enterprise, National Thermal Power Corporation, to perform EPC activities in the power sector. It is to be noted that NTPC as a power generation utility and BHEL as an EPC contractor have worked together on several domestic projects earlier, but without a formal partnership. BHEL also has joint ventures with GE of the US and Siemens AG of Germany. Other strategic initiatives include management contract for Bharat Pumps and Compressors Ltd. and a proposed takeover of Bharat Heavy Plates and Vessels, both being sister public sector enterprises. Despite its impressive performance, BHEL is unable to fulfil the requirements for power equipment in the country. The demand for power has been exceeding the growth and availability. There are serious concerns about energy shortages owing to inadequate generation and transmission, as well as inefficiencies in the power sector. Since this sector is a major part of the national infrastructure, problems in the power sector affect the overall economic growth of the country as well as its attractiveness as a destination for foreign investments. BHEL also faces stiff competition from international players in the power equipment sector, mainly of Korean and Chinese origin. There seems to be an undercurrent of conflict between the two governmental ministries of power and heavy industries. BHEL operates administratively under the Ministry of Heavy Industries but supplies mainly to the power sector that is under the Ministry of Power. There has been talk of establishing another power equipment company as a part of the NTPC for some time, with the purpose of lessening the burden on BHEL.
1) BHEL is mainly formulating and implementing concentration strategies nationally as well as globally, in the power equipment sector. Do you think it should broaden the scope of its strategies to include integration or diversification? Why?
2) Suppose BHEL plans to diversify its business. What areas should it diversify into? Give reasons to justify your choice.
answer must be 500 words and above
In: Operations Management
Write down all proofs in acceptable mathematical language: make sure that you mark the beginning and end of the proof, state every assumption, define every variable, give a justification for every assertion (e.g., by definition of…), and use complete, grammatically correct sentences.
Definitions:
• An integer ? is even if and only if there exists an integer ? such that ? = 2?. An integer ? is odd if and only if there exists an integer ? such that ? = 2? +1.
• Two integers have the same parity when they are both even or when they are both odd. Two integers have opposite parity when one is even and the other one is odd.
• An integer ? is divisible by an integer ? with ? ≠ 0, denoted ? | ?, if and only if there exists an integer ? such that ? = ??.
• A real number ? is rational if and only if there exist integers ? and ? with ? ≠ 0 such that ? = ?/?.
• For any real number ?, the absolute value of ?, denoted |?|, is defined as follows: |?| = { ? if ? ≥ 0 −? if ? < 0 2.
Prove each of the following statements using a direct proof, a proof by contrapositive, a proof by contradiction, or a proof by cases. For each statement, indicate which proof method you used, as well as the assumptions (what you suppose) and the conclusions (what you need to show) of the proof.
a. For all integers ?, ?, and ?, if ?? is not divisible by ?, then ? is not divisible by ?.
b. For all positive integers ?, ?, and ?, if ? is divisible by ? and ? is divisible by ?, then ? + ? is divisible by ?.
c. The difference of any rational number and any irrational number is irrational
d. There are no integers ? and ? such that ???+ ?? = ?.
e. Any two consecutive integers have opposite parity.
f. For all real numbers ? and ?, ???(?, ?) = ?+?−|?−?| ? and ???(?, ?) = ?+?+|?−?| ? , where ???(?, ?) and ???(?, ?) denote the minimum and the maximum of ? and ?, respectively.
In: Advanced Math
There is error in this java code. Pls debug.
// Prompt user for value to start
// Value must be between 1 and 20 inclusive
// At command line, count down to blastoff
// With a brief pause between each displayed value
import java.util.*;
public class DebugSix3
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
String userNumString;
int userNum, val;
final int MIN = 1;
final int MAX = 20;
System.out.println("Enter a number between " + MIN + " and " + MAX
+ " inclusive");
userNumString = input.next();
userNum = Interger.parseInt(userNumString);
while(userNum < MIN || userNum = MAX)
{
System.out.println("Number out of range" +
"\nEnter a number between " + MIN + " and " + MAX + "
inclusive");
userNumString = input.next();
userNum = Integer.parse(userNumString);
}
for(val = userNum; val < 0; --val)
{
System.out.print(val + " ");
for(int x = 0; x < 100000; ++x)
for(int y = 0; y < 10000; ++y);
// Adjust these numbers for faster or slower performance
}
System.out.println("Blastoff!");
}
}
In: Computer Science