Dynamic programming

Perform heapsort in the given max-heap, sort from largest to smallest value (descending order).
You should copy-paste template as many times as needed (and disregard extra nodes if they
appear in the template or in your later heaps’ drawings) and show each step/change.
Max-heap.
Take out 11 as the first element in sorted array of numbers. Then place … as a root node. Then…
This is the template to use.
Problem 2 [10pts]. BST, insertion
Insert key ‘7’ as a root for the following binary search tree.
Use left and right rotations as needed. (First, you need to add key ‘7’ to the tree in its correct
place, and then start rotating, as was shown in lecture). Show all steps.
Problem 3 [20pts].
Imagine you’re a tourist on Manhattan, and this grid models it. You start at upper left corner
(with coordinates 0,0) and should end up at the bottom right corner (with coordinates 4,4).
Weights on edges indicate how many attractions you will see if you walk on that street/avenue.
Your goal is to see as many attractions as possible.
Fill in the matrices A (values, max numbers of attractions one can see up to that “road
intersection”) and B (arrows, so one can reconstruct the path).
a) Using greedy approach
A:

B: (copy-paste appropriate arrows) → ↓ → ←
b) Using Dynamic programming
A:
B:
Problem 4 [10pts]. Knapsack problem
You are given 5 items with weights 4,1,3,3,2 and respective values of 10, 7, 8, 9, 11.
Find the most valuable combinations of items that would fit in a knapsack of weight 8, by
constructing a DP table and calculating all values in the table. For the last two rows, show
explicitly how you use the formula from the slides.
(You are asked to do this to show understanding. Usually by performing such task, you finally
“get” it and see why formula works and is correct and what it actually states )
Answer:
Problem 5 [10pts]. LCS
By constructing a DP table, find the longest common subsequence for the two given sequences:
S1: ACCTGATCGA
S2: CTTACAGTAC
Your table has to be constructed in a fashion as was done in lecture, and should contain numbers
which represent how many common characters are found by now, and arrows so the LCS is reconstructible.
Answer: LCS is

Sample Solution

The post Dynamic programming appeared first on homework handlers.

Government Intervention Analysis

Analyze 1 of the following government intervention programs:

Countercyclical fiscal policies (countering economic disruptions such as the housing bubble and the Great Recession)
US agriculture support programs
Assistance for Low Income Families (choose 1)
Housing vouchers
Earned Income Tax Credit (including Child Tax Credit)
Supplemental Nutrition Assistance Program (SNAP)
Low income healthcare (choose 1)
Medicaid (including Children’s Health Insurance Program).
Affordable Care Act expansion
Social insurance programs (choose 1)
Old Age, Survivors, and Disability Insurance (OASDI)
Medicare
Unemployment insurance
Write a 700- to 1,050-word summary of your analysis. Identify the intervention and the market failure leading up to the intervention. Complete the following in your paper:

Analyze the arguments for government intervention as opposed to arguments for market-based solutions.Hint:See the information about market failures.
Examine who has been helped and who has been hurt by the selected government intervention.
Examine externalities and unintended consequences of such intervention. For example, consider whether the SNAP program and health coverage for low-income families result in higher future tax revenues because low-income children grow up healthier and produce higher incomes over their lifetimes.
Analyze whether cost of the intervention you selected as a share of GDP or the number of participants is increasing,decreasing, or varies with the state of the economy, based on the cost trend(or number of participants) since its inception or since 2000.
Analyze credible economists’ opinions on the success or failure of the intervention that you chose in achieving its objectives.
Recommend whether the program should be continued as is, discontinued, or modified based on your conclusions. Defend your recommendation.
Note: Use of charts and graphs is encouraged with appropriate citations. Any charts or graphs retrieved from the Federal Reserve Bank of St. Louis FRED website may only be included when the data sources used by FRED are US government sources such as the Bureau of Economic Analysis or the Bureau of Labor Statistics.

Cite at least 2 academically credible sources.

Sample Solution

The post Government Intervention Analysis appeared first on homework handlers.

Countries that do not believe in comparative advantage

How do people respond to economic incentives?
Stories of positive or negative externalities
What’s the best healthcare system in the world?
Examples of behavioral economics
Differences between monopolies, monopolistic competition, oligopolies, and the perfectly competitive market
Income inequality throughout the world

Sample Solution

The post Countries that do not believe in comparative advantage appeared first on homework handlers.

Article Responses

Read the following article: Be Prepared: Seven Legal Considerations SMEs
Should Keep in Mind. https://www.entrepreneur.com/article/306241
Thinking about the business concept you would like to start, explain which of the seven legal considerations might impact you the most and why.

Sample Solution

The post Article Responses appeared first on homework handlers.