A state is divided into R*C cities.The government has launched an initiative to find the cities which are dominated by coders. Each city may or may not have coders residing in it. If the city is dominated by coders, it is marked with 1 else it is marked with 0. Two cities are termed as connected cities if they both are dominated by coders and can be reached by moving vertically, horizontally, or diagonally.
Example:
The given is the state with 3*3 cities and their dominance representation.
City[1, 1] is directly connected to City[1, 2].
City[1, 2] is directly connected to City[1, 1], City[1, 3] and City[2, 3].
City[1, 3] is directly connected to City[1, 2] and City[2, 3].
City[2, 3] is directly connected to City[1, 2] and City[1, 3].
City[3, 1] is not connected to any of the other coder dominant cities.
One or more coder dominant connected cities form the Coding belt. In a belt, there may be coder dominant cities which are not directly connected but can be reached by moving through other dominant cities. It is possible that there are multiple coding belts in the state.
Example:
The given is the state with 3*3 cities and their dominance representation.
For the given example, there are two coding belts. C1 represents Coding Belt 1 and C2 represents Coding Belt 2.
The government wants to find the number of coder dominant cities in the largest coding belt.
The government will give you the credits in the initiative. Can you help the government?
Note: For the given example, there are 4 coder dominant cities in
the largest coding belt.
Input Format
The first line of input consists of two space-separated integers, number of rows, R, and number of columns, C.
Next R lines each consist of C space-separated integers.
Constraints
1<= R, C <=10
Output Format
Print the number of coder dominant cities in the largest Coding
belt.
Sample TestCase 1
Input
5 51 1 1 0 00 1 1 0 00 0 0 0 11 0 0 1 11 1 0 0 1
Output
5
Explanation
There are three belts in the given 5*5 cities.
Coding Belt 1 (C1): Number of Coder Dominant Cities = 5
Coding Belt 2 (C2): Number of Coder Dominant Cities = 4
Coding Belt 3 (C3): Number of Coder Dominant Cities = 3
In: Computer Science
Below are returns on the stock A and S&P500 index. All numbers are in decimals (-0.0222 is equivalent to -2.22%). A S_P500 -0.0222 0.0032 -0.0048 -0.0058 0.1333 0.0434 0.0765 0.1081 -0.0161 -0.0121 0.1250 0.1400 0.0145 0.0368 -0.0475 -0.0454 0.0430 0.0577 -0.0260 -0.1374 0.0071 0.0064 0.0249 0.0186 0.0850 0.0215 -0.0624 -0.0752 0.0933 0.0365 0.0456 0.0528 -0.0632 -0.0131 0.0450 0.0009 0.0200 0.0017 0.0280 0.0985 What is the sample standard deviation of the S&P500 returns? Please write an answer in decimals. For example, 12.34% would be 0.1234. Also, round your answer to the fourth decimal
In: Operations Management
Until recently, many philosophers and psychologists thought that unconscious emotions are impossible. It was believed that the essence of an emotion is to be felt. However, if we are not aware of something it cannot be felt. Hence, it was concluded that we must be conscious of our emotions.
For this research project your job is to find empirical evidence supporting the existence of unconscious emotions. Your data should be distinct from anything you read in A General Theory of Love. You can find your data online, just be sure to cite your source. Once you have the data, explain why it supports the existence of unconscious emotions. In your write up, make sure to address the skeptic, that is, someone who believes there cannot be unconscious emotions.
Minimum length 500 words.
In: Psychology
Randomly generate 0, 1, or 2 in a 100 by 100 2d array.
For each entry in the 2d array, count the number of 0’s and 1’s in
the surrounding entries.
Save the result in two 2d arrays: one for the number of 0’s, one
for the number of 1’s.
For example:
0 0 1
2 1 0
0 0 0
The number of 0’s for a[0][0] is 1; the number of 1’s for
a[0][0] is 1;
The number of 0’s for a[0][1] is 2; the number of 1’s for a[0][1]
is 2;
The number of 0’s for a[0][2] is 2; the number of 1’s for a[0][2]
is 1;
The number of 0’s for a[1][0] is 4; the number of 1’s for a[1][0]
is 1;
The number of 0’s for a[1][1] is 6; the number of 1’s for a[1][1]
is 1;
The number of 0’s for a[1][2] is 3; the number of 1’s for a[1][2]
is 2;
The number of 0’s for a[2][0] is 1; the number of 1’s for a[2][0]
is 1;
The number of 0’s for a[2][1] is 3; the number of 1’s for a[2][1]
is 1;
The number of 0’s for a[2][2] is 2; the number of 1’s for a[2][2]
is 1;
In: Computer Science
3.1 Bratko states that iterative deepening combines the best
properties of breadth-first search and depth-first search and is
therefore, in practice, often the best choice
amongst the basic search methods. Discuss this statement.
3.2 Discuss the concept of the ‘locality’ of the effects of actions
in the context of planning problems.
In: Computer Science
Declare two 2d arrays n0[MAX_ROW][MAX_COL], n1
[MAX_ROW][MAX_COL].
Then, loop through the 2d array and save the results in n0 and
n1:
for (i=0; i<MAX_ROW; i++)
for (j=0; j<MAX_COL;j++){
//calculate number of
zeros around entry a[i][j]
n0[i][j] =
//calculate number of
ones around entry a[i][j]
n1[i][j] =
}
Set the MAX_ROW and MAX_COL to a small number and display all three 2d arrays on the screen to verify that the calculations are correct. You may still use command-line inputs as in the example program to set the actual size of the array (must be less than or equal to MAX_ROW, MAX_COL.
In: Computer Science
A) What is “Strategic Workforce Planning”?
B) In 5 sentences or less, in your opinion, what is the most critical aspect of Strategic Workforce Planning?
In: Operations Management
You are going to begin the process of data gathering. There are three types of data you will be gathering – Administrative, Technical and Physical. For this assignment, you will be gathering your administrative data. This data will be created by you for your fictitious company. You may use as many resources as you need in order to develop this data. The Internet, data from real companies, and data you just make up on your own may be used. Areas of data that need to be gathered are as follows:
All of the above information will be documented in the risk assessment. In some cases it will be tested and questions to appropriate personnel will be asked.
In: Computer Science
URGENT QUESTION!!! Please answer this question with detailed explanation. Thank you.
A solution is made by mixing 100mL of 0.1 M HCl with 100 mL of 0.1 M NH3 at 25C (degrees celcius). What is the pH of the final solution? (Kb for NH3 = 1.8 x 10-5)
In: Chemistry
1. Review the biological factors involved in the regulation of hunger. Make sure you discuss what areas of the brain may be involved with hunger and what blood chemicals are involved.
2. Review what is known regarding roots of obseity. Distinguish between the set point and the setting point hypotheses.
3. Describe the need for achievement and afflication. Identify some of the characteristics associated with each of these needs. How are these needs often assessed?
In: Psychology
Week 3 Stock Journal
This is the first of three stock journal assignments that you will
complete during this course. For this assignment, two templates
have been provided for your use. In one template, you will enter
your chosen companies, the share prices, and the number of shares
you will be purchasing given your budget of $25K. The other
template is where you will write your rationale/summary. Please
download both templates, and complete, save, then upload both
templates to Blackboard when submitting your work.
Scenario
Capital markets and the ability to raise funds for
corporate uses are essential to the U.S. economic system. For this
assignment, imagine that you have $25,000 to invest in U.S.
companies. You are buying used stock. The company got the money
when it issued the stock originally. You will be buying it from an
existing owner.
You are investing, or buying, the stock because you believe the
company will make money and pay you a dividend in cash. Each share
of stock that you buy entitles you to any dividend declared and a
vote at the annual stockholders' meeting.
The stock also allows you the ability to earn your money back by
selling the stock. Of course, investing in stocks is risky and
there is the possibility that the stock you buy will be worth less
when you want your money back. The company is not obligated to give
you any of your money back. You will only get your money back if
another investor wants to buy your stock.
Instructions
Using the above scenario and the resources listed below, complete the following directions for your Week 3 Stock Journal entry:
Select three US companies that are publicly traded using your knowledge and experience and make sure you are practicing good diversification. Jim Cramer, Money Manager, on CNBC, plays a game at the end of his show called "Am I Diversified." Check out the short clip, Am I Diversified - Mad Money [Video], to get a sense of industry diversification.
Ideas for Sources of Information: There are many ways
to find such companies and the stock prices, including the New York
Stock Exchange, Google Finance, NASDAQ, andYahoo!
Finance.
Describe how you will divide $25,000 across the three companies (e.g. $10,000 in Company 1, $10,000 in Company 2, and $5,000 in Company 3).
You decide the amount you are investing in each
company. You do not have to provide any analysis to justify your
decisions.
Provide a reason for picking each company.
For example, you might invest in Ford because that
company gets a lot of your money and you hear that Ford is doing
well, and will continue to do well.
Identify the number of shares you are buying, and the price of the shares you are buying for each company.
Once you decide the companies and the amount for each
company, determine how many shares you can buy. For example, if
Company 1 is selling for $42.16, then you may buy $10,000/$42.16,
or 237.19 shares. But you cannot buy a part of a share, so you
decide to buy either 237 or 238. In this example, you buy 237
shares at $42.16 per share, investing $9,991.92. You won’t be able
to buy exactly $10,000, or $5,000, or $25,000, but it will be
relatively close.
In: Operations Management
Explain what would hypothetically happen to the amount of ATP available to a cell if the entire Cori cycle (glucose going to lactate and then back to glucose) were to occur and remain within that single cell? Justify your response by providing specific numbers of ATP generated or used in the different parts of the cycle.
In: Chemistry
Write C code to approximate Sin(x) and Cos(x) function using Taylor’s series. The angle x is expressed in radians. Use the first FIVE terms of Taylor’s series to approximate Sine/Cosine function.
a. Compare your Taylor’s series approximation of Sine/Cosine function with the math.h implementation of sin and cos function.
b. Determine tan(x) from Taylor’s series approximation of Sine/Cosine functions, for x = 0, PI/4, PI/2, PI. Use PI = 3.14159.
In: Computer Science
An electron has an initial velocity of (12.0j + 15.0k) km/s and a constant acceleration of (2.00*10^12 i) m/s^2 in a region in which uniform electric and magentic fields are present. If B=(400*10^-6 i)T, find the electric field
In: Physics
Q1. What is:
Quality? Total Quality? Total Quality Management? And Quality Culture?
Q2. Explain the role of the leadership and top management in total quality.
Q3. Explain the role of the customer in total quality.
Q4. Explain the role of the employees in total quality.
Q5. List four benefits of total quality management.
In: Operations Management