Part1: Write a program in C/C++ to solve the 0/1 knapsack problem using (i) Dynamic Programming based algorithm and (ii) Branch and Bound Search based algorithm Go through the related text and implement each of these algorithms using the efficient data structure. Show the results of different steps of these algorithms for an instance of the 0/1 Knapsack problem with number of items, n=4. The capacity of the knapsack, weights and profits of the items may be generated randomly with the condition that the capacity of the knapsack is such that all items can not be accommodated in the knapsack. But, at the same time, at least one item can be accommodated in the knapsack. Part2: Analyze the complexity of these algorithms (Run each of the two algorithms for a set of ten randomly generated 0/1 knapsack instances (with n=4) and compute the time taken by the selected implementation in each run. Compute average time taken by each of these two algorithms
In: Computer Science
Hi! I have some geology ?'s:
23. To account for the incredible distances traveled by some of the Columbia River Flood Basalts to reach the Pacific Coast, possible explanations include which of the following (more than one answer is recommended):
A. the pre-existing uniform gradual slope toward the Pacific Coast all across Oregon and Washington from their eastern borders to the ocean.
B. the initial high temperature of the lava from these eruptions.
C. the low viscosity of the lava from these eruptions.
D. the filling in of low topography by early flows, flattening the landscape for later flows.
E. solidifying and crusting over of the upper surface of flows, providing insulation to maintain high temperature and low viscosity of flows over great distances.
F. volcanic vents providing freshly erupting lava all along the Columbia River to the ocean.
G. the Oregon coast was much further east at the time of these eruptions, making the journey actually far shorter than it appears today.
24. The methods of monitoring used by USGS volcanologists to accurately predict the 1991 eruption of Mt Pinatubo in the Philippines and save thousands of lives included which of these:
A. seismometers revealing subterranean magma movements
B. sonar measuring tectonic ground movements
C. GPS to figure out where they actually were
D. watching snakes, frogs, chickens, and pigs
E. visual monitoring by flyovers to inspect lava effusions
F. gas spectrometers to measure volcanic de-gassing
G. satellite data to detect thermal anomalies
In: Other
Write a class (and a client class to test it) that encapsulates a tic-tac-toe board. A tic-tac-toe board looks like a table of three rows and three columns partially or completely filled with the characters X and O. At any point, a cell of that table could be empty or could contain an X or an O. You should have one instance variable, a two-dimensional array of values representing the tic-tac-toe board.
This game should involve one human player vs. the computer (aka, it should be a one player game). At the start of each game, randomly select if the computer will play X or O and who (i.e. human or computer) will make the first move.
Your default constructor should instantiate the array so that it represents an empty board.
You should include the following methods:
a method that generates a valid play by the computer and displays the board after each play.
a method that requests a valid play from the human and displays the board after each play.
a method to display the tic-tac-toe board.
a method checking if a player has won based on the contents of the board; this method takes no parameter. It returns X if the "X player" has won, O if the "O player" has won, T if the game was a tie. A player wins if he or she has placed an X (or an O) in all cells in a row, all cells in a column, or all cells in one of the diagonals.
NOTE: Be sure to display the board after each move. You must provide clear prompts for the human player to select a space on the tic-tac-toe board.
Input Validation: Verify that all moves by the human player are to a valid space on the tic-tac-toe board. An incorrect choice should not halt or terminate the game. Also, no human vs. human mode should be included in the program. Just Human vs. the Computer is what the game should only involve.
In: Computer Science
Exercise Overview
Interpersonal skills refer to the ability to communicate with, understand, and motivate individuals and groups. Implicit in this definition is the notion that a manager should try to understand important characteristics of the work group(s) being supervised. Diagnostic skills help managers visualize and understand the most appropriate response to a situation. This also relates to assessing how various things are related to one another. This exercise will give you insight into the importance of both interpersonal and diagnostic skills as they relate to managing groups and teams in organizations.
Exercise Background
In other cases managers are promoted, transferred, or reassigned to a different job and take over an existing group or team. At one extreme they may inherit a highly functional and productive group; at the other extreme they may inherit a group that is dysfunctional and that has a lot of internal problems. And, of course, there are many potential possibilities between these two extremes.
Therefore, it is important that managers have the skills needed to carefully assess the current dynamics of a group in order not to create problems where none exists or to solve problems that do exist. The questions that follow focus on different scenarios in which such insights may be needed.
You have been appointed to lead a new team. The purpose of this team is to assess different potential locations for a new warehouse and to make a recommendation back to senior management. Your team has been given 30 days to make a recommendation. What type of team is this?
Management team
Quality circle
Virtual team
Problem-solving team
Work team
You have been appointed to lead an existing group. Your boss, who informed you of the assignment, made these comments: “These people have some real issues. They have been a problem for years. They stick together like family but never seem to get much work done.” Which of these would best describe this group?
High cohesiveness, high performance norms
Low cohesiveness, low performance norms
Low cohesiveness, high performance norms
High cohesiveness, low performance norms
Which of these observations is correct? Check all that apply.
In some cases, managers may want to resolve or eliminate conflict.
Conflict always decreases a team’s performance.
In some cases, managers may want to control conflict.
In some situations, managers may want to stimulate conflict.
In: Operations Management
Oslo Company prepared the following contribution format income statement based on a sales volume of 1,000 units (the relevant range of production is 500 units to 1,500 units):
Sales | $ | 25,000 |
Variable expenses | 17,500 | |
Contribution margin | 7,500 | |
Fixed expenses | 4,200 | |
Net operating income | $ | 3,300 |
1. What is the contribution margin per unit? (Round your answer to 2 decimal places.)
2. What is the contribution margin ratio?
3. What is the variable expense ratio?
4. If sales increase to 1,001 units, what would be the increase in net operating income? (Round your answer to 2 decimal places.)
5. If sales decline to 900 units, what would be the net operating income?
6. If the selling price increases by $2 per unit and the sales volume decreases by 100 units, what would be the net operating income?
7. If the variable cost per unit increases by $1, spending on advertising increases by $1,150, and unit sales increase by 130 units, what would be the net operating income?
8. What is the break-even point in unit sales?
9. What is the break-even point in dollar sales?
10. How many units must be sold to achieve a target profit of $4,500?
11. What is the margin of safety in dollars? What is the margin of safety percentage?
12. What is the degree of operating leverage? (Round your answer to 2 decimal places.)
13. Using the degree of operating leverage, what is the estimated percent increase in net operating income of a 5% increase in sales? (Round your intermediate calculations and final answer to 2 decimal places.)
14. Assume that the amounts of the company’s total variable expenses and total fixed expenses were reversed. In other words, assume that the total variable expenses are $4,200 and the total fixed expenses are $17,500. Under this scenario and assuming that total sales remain the same, what is the degree of operating leverage? (Round your answer to 2 decimal places.)
15. Assume that the amounts of the company’s total variable expenses and total fixed expenses were reversed. In other words, assume that the total variable expenses are $4,200 and the total fixed expenses are $17,500. Given this scenario and assuming that total sales remain the same. Using the degree of calculated operating leverage, what is the estimated percent increase in net operating income of a 5% increase in sales? (Round your intermediate calculations and final answer to 2 decimal places.)
In: Accounting
Consider a 5-by-20 integer array grades:
a) Write a declaration for grades.
b) How many rows does the array have?
c) How many columns does the array have?
d) How many elements does the array have?
e) Write the names of all elements in the first column of the
array.
f) Write the name of the element in the third row and second column
of the array.
g) Write a single statement to assign the value 100 to the element
in the first row and second column.
h) Write a nested loop to get all the elements from the
keyboard.
i) Write a nested for statement to initialize all elements to
zero.
j) Write a statement that copies the values from an array double
mathGrades[20]into the
elements of the first row of grades.
k) Write a series of statements that determine and print the
highest value in the first row of grades.
l) Write a statement to display the elements in column 2 of the
array.
m) Write a statement to calculate the average of the elements in
the first row.
n) Write a series of statements that prints the array grades in a
tabular format. List the
column subscripts as headings across the top and list the row
subscripts at the left of
each row.
In: Computer Science
Include as an attachment a copy of the related "recent monthly data (last 20 years) about how the New International Trade Agreement between US, Mexico and Canada replaced NAFTA.
In: Economics
In: Operations Management
Ryanair company has many management problems, one specific of
them being overloading on the staff & staff losing their
jobs.
1. Can you briefly investigate the specific problem using relevant
management theory?
2. Can you suggest recommendations for solving the problem?
In: Operations Management
#promt the user to enter student name for i in range(0, 3): print ("Enter student's first and last name") #variable for name name = input() #prompt the user to enter number of book purchased print ("Enter the number of book the student purchased this month") #varibale for number of book book_number = input() book_number = int (book_number) #point = int (point) if (book_number <=0): points = 0 elif (book_number <=3): points = 5 elif (book_number <=6): points = 10 elif (book_number <=8): points = 15 elif (book_number ==9): points = 20 else : points = 25 print (name , "earned" ,points)
this is my python code but it is not printing all the names and points, just printing the last one.
In: Computer Science
The objective of this assignment is to look at two aspects of testing, one is an exploration of the theory of testing, the second is the exploration of a practical software tool.
You should pick a specific topic in software testing and explore it in a bit of detail, issues you could look at include: Functional testing, Compatibility testing, Static testing, Dynamic testing, White box testing, Black box testing, Grey box testing, Visual testing, Unit testing, Integration testing, Regression testing, Alpha testing, Beta testing, Usability testing, Certification, etc. or whatever you want.
Write between one page and one and a half pages on the topic, and include at least four references you use - this can be websites, papers, videos or books. Use the six thinking hats as a model for the structure of the article you write so do an Introduction Section (blue hat), some facts and details about the topic (white hat), the benefits of this topic (yellow hat), the shortcomings around this topic (black hat), the alternatives or interesting facts or examples about this topic (green hat), your views and reflections on this topic (red hat), and a conclusion at the end (another blue hat). Additionally include a simple MindMap about the topic.
In: Computer Science
Write the code for following problem. [6 marks] The class Movie is started below. An instance of class Movie represents a film. This class has the following three class variables: title, which is a String representing the title of the movie studio, which is a String representing the studio that made the movie rating, which is a String representing the rating of the movie (i.e. PG13, R, etc) public class Movie { private String title; private String studio; private String rating; // your code goes here } a) Write a constructor for the class Movie, which takes a String representing the title of the movie, a String representing the studio, and a String representing the rating as its arguments, and sets the respective class variables to these values. b) Write a second constructor for the class Movie, which takes a String representing the title of the movie and a String representing the studio as its arguments, and sets the respective class variables to these values, while the class variable rating is set to "PG". c) Write a method get PG, which takes an array of base type Movie as its argument, and returns a new array of only those movies in the input array with a rating of "PG". You may assume the input array is full of Movie instances. The returned array need not be full. d) Write a piece of code that creates an instance of the class Movie with the title “XYZ Royale”, the studio “ABC Productions”, and the rating “PG13”.
In: Computer Science
Explain the key differences between using if statements to check for null values and using Optional types and why we might prefer that latter.
In: Computer Science
Please examine and make an financial assessment on Ford over the last 5 years compared to the auto industury? [200 words or more][Will give thumbs up]
In: Economics
How does Adler perceive the relationship between the mind and the body.
what do he see as the primary goal of humans?
when does Adler believe people hav formed the basis for their adult personality? What can someone do to change it after that?
what does Adler mean by his term style of life and how hoes this relate to personality?
In: Psychology