Food Resource Mediator

 

Come up with a web-site that is a hub for food availability.
Community
• Registration for community members – login page for these type of users
• Registered member should now in real time any food availability from registered Food Pantries and Stores
• Registered members should know about any food-availabilty events. – ( Calendar or notification system regarding these events)
Food Panty and Stores
• Registration and login for these members
• Once logged in, this member can submit any food item that is immediately available. ( Form – food item, location, how many units/lbs). Once entered the member will know about this availability
Hub
• Server that holds the database for the community and the food pantry/stores
• Subscriber/ event system – once a food availability object (Form contain the food availability information) is submitted then all the community members that are registered will get a notification.
• Also make sure once the community member logs in this food availably object can be viewed.
• Make sure these objects are deleted, when there is no more availability. The Food pantry/store can edit the food object to specify no more availability, or a counter that will decrease the availability of that item once a community member picks it up.

Address-based trace processing

 

Option 1:

hex2bin: takes each hexadecimal address and converts it to an equivalent binary value. You can extend the number of bits to 32 bits to simplify your conversion but this is not a requirement. As an example, if the hex input is “f429a”, the output of hex2bin would be “00000000000011110100001010011010”( with padding to 32-bit) or “11110100001010011010” (without padding).

To help you start this assignment, I am providing you with a starter code that has all the libraries that you can import (do not import any more libraries) and binLookup. Your hex2bin function should call binLookup to convert each hex digit to an equivalent binary value.

— copy the following code to your traceProcP1.hs
import System.IO
import Data.List
import System.Environment

binLookup :: Char -> String
binLookup ‘0’ = “0000”
binLookup ‘1’ = “0001”
binLookup ‘2’ = “0010”
binLookup ‘3’ = “0011”
binLookup ‘4’ = “0100”
binLookup ‘5’ = “0101”
binLookup ‘6’ = “0110”
binLookup ‘7’ = “0111”
binLookup ‘8’ = “1000”
binLookup ‘9’ = “1001”
binLookup ‘a’ = “1010”
binLookup ‘b’ = “1011”
binLookup ‘c’ = “1100”
binLookup ‘d’ = “1101”
binLookup ‘e’ = “1110”
binLookup ‘f’ = “1111”
binLookup j = error “Your input is not a hex digit”
— end your copy here

bin2dec: takes each output of hex2bin and converts it to a decimal value. For example, if the output of hex2bin is “00000000000011110100001010011010”, the output of bin2dec is “1000090”. Your function should calculate this value by: 2^1 + 2^3 + 2^4 + 2^7 + 2^9 + 2^14 +2^16 + 2^17 + 2^18 + 2^19 (these are the bit positions with the value of 1).

=================================

Option 2:

hex2dec: takes each hexadecimal address and converts it to an equivalent decimal value. You can modify the starter code in Option 1 to create a look-up function that converts hexadecimal to decimal.

=================================

Once you have the addresses in decimal values, you can compute the number of occurrences for each address. You need to store the information using the following type:

[(Int, Int)] -> a list of tuples where the first element of each tuple is the number of accesses and the second element is the address in decimal. Thus, the addresses should all be unique (since all duplicated addresses are accounted for in the number of accesses element).

genOutput: takes the list of tuples and produces the output file (spice.dout), where the first column contains the numbers of accesses to address; the second column contains the decimal addresses. A tab separates the two columns. Your output is sorted based on the addresses (from the lowest address to the highest address). The provided oracle file Download oracle fileillustrates the required format.

main: is the main body of the program. It invokes all the necessary functions to complete the trace processing requirements. Compare your output file (spice.dout) to the oracle file for this part using diff -w command; it should report no differences.

Note that your program for part 1 should be named “traceProcP1.hs”. It will take two command-line arguments. The first argument is the name of the input file (e.g., spice.din), and the second argument is the name of the output file (e.g., spice.dout).

Part II – Page-based trace processing (32 points)

Using byte-addressable addresses is the finest granularity that we can observe memory accesses. However, we may also notice that some addresses only have very few accesses. Data migration from storage (solid-state drives or hard drives) to main memory occurs at a page granularity in a typical computer system. To better explain the paging concept, imagine that you have a long scroll that contains 1,000,000 characters. Let’s say you want to access character 567,489; finding this character in this long scroll can be quite an ordeal. Human overcomes this ordeal by packaging information into books. For example, we can partition this scroll into a book in which each page is containing 10,000 characters. As such, the book would have 1,000,000 / 10,000 or 100 pages. To find character 567,489, we need to find the page number and the offset within that page. The page number is 567,489 / 10,000 (or 56) and the page-offset is 567,489 % 10,000 (or 7,489).

Now, let’s think about this problem from the data migration perspective. In a 32-bit memory system, your address is from 0x00000000 to 0xFFFFFFFF or 2^32 addresses. Finding an address in this vast space requires partitioning the space into pages. Furthermore, partitioning also helps with lazy data movement; i.e., the system only needs to move pages containing the information currently needed into memory instead of moving the entire address space. Let’s assume that we have a page size of 2,048 bytes or 2^11. Given an address in hex (e.g., 0x2f2480a), we would find the page number by shifting the address to the right by 11 bits. Thus, in this example, our address in binary is 0000 0010 1111 0010 0100 1000 0000 1010. Shifting right by 11 bits would result in 0000 0000 0000 0101 1110 0100 1001 or 0x0005e49.

For part two, we will assume that our page size is 2,048 bytes (again 2^11). Your task is to produce an output file (spice_page.dout) that contains the number of accesses to each page. To do so, you need to modify your program in Part 1 to convert each address in spice.din Download spice.dinto its corresponding page number (i.e., by shifting right by 11 bits) and then report each page’s access. You also need to filter out any page that has 99 accesses or fewer. Your output is sorted based on the page numbers (from the lowest page number to the highest page number). Again, do not import any more libraries. Compare spice_page.dout to the oracle file Download oracle filefor this part using diff -w command; it should report no differences.

multiple regression.

 

will continue your practice as a critical consumer of research. You will critically evaluate a scholarly article related to multiple regression.

Write a 2-page critique of the article. In your critique, include responses to the following:
• Why did the authors use multiple regression?
• Do you think it’s the most appropriate choice? Why or why not?
• Did the authors display the data?
• Do the results stand alone? Why or why not?
• Did the authors report effect size? If yes, is this meaningful?

Monte Carlo Methods

 

 

1 Background
1.1 Stock Options
The trader has calibrated a specialised risk neutral process for some underlying stock price. Given the
current stock is S0, market prices indicate the risk-neutral distribution of the stock price at time t is given
by:
St ∼ N(f(S0, t), v2
(S0, t)) (1)
for some calibrated functions f and v
2
.
If (1) describes the risk neutral distribution, then the formula to value a call option V with payoff
g(S)
at time t = T is given by
V (S0, 0) = e
−rT E
Q[g(ST )]. (2)
Then to carry out a Monte Carlo valuation of an option, we may use samples from a standard random
normal distribution
φ ∼ N(0, 1) (3)
to write the equation
ST = f(S0, T) + v(S0, T)φ. (4)
Equation (5) then generates a single random path, from which we can value a payoff
V
i = e
−rT g

f(S0, T) + v(S0, T)φ
i

. (5)
If n simulations are performed, then (as described in the notes) we merely average out the V
i
to yield
an approximation for the value of the portfolio, i.e.
V (S0, t = 0) =
Pi=n
i=1 V
i
n
(6)
Note that if we write
z =
X − f(S0, T)
v(S0, T)
,
then a Put Option V with a terminal condition
V (S, T) = max(X − S, 0)
written on the asset S has the analytic solution
V (S0, t = 0) = 
XN(z) + v(S0, T)
1


e
−z
2/2 − f(S0, T)N(z)

e
−rT
,
where N(z) is the standard cummulative normal distribution.
1
Created in Master PDF Editor
1.2 Path Dependent Options
Now assume that the stochastic process follow a standard Geometric Brownian motion governed by
dS = (µ − D0)Sdt + σSdW.
Then the following options will depend on S(tk) which are the share prices at K + 1 equally spaced sampling
times t0, t1, …, tK with t0 = 0 and tK = T (unlike part (a), the computation cannot proceed from t = 0 to
t = T in one step). Full details are given the the lecture notes – but the important point to note is that
S
i
tk = S
i
tk−1
exp[(r − D0 −
1
2
σ
2
)(tk − tk−1) + σ
p
tk − tk−1φi
]
to estimate the underlying asset values at each time, where each of the K increments dWk involves drawing
φk from a Normal distribution.
Asian Option
Assume that a discretely sampled Asian option has a payoff depending on the discretely sampled average
given by
A =
1
K
X
K
k=1
S(tk).
Then we can write
V (S, A, t = T) = f(S, A),
where f is the payoff function depending the type of option.
There are different classes of Asian option, resulting in different payoff conditions. In this coursework we
look at simple European style call or put options. A fixed strike call option will have the payoff
f(S, A) = max(A − X, 0)
where X is the strike price and a floating strike call option would be
f(S, A) = max(S − A, 0).
where A is sometimes calles the average strike price.
A fixed strike put option will have the payoff
f(S, A) = max(X − A, 0)
where X is the strike price and a floating strike put option would be
f(S, A) = max(A − S, 0).
where A is the strike price.
Lookback Option
The discretely sampled Lookback option has a payoff depending on the discretely sampled maximum or
minimum given by
A = max
k
S(tk),
or
A = min
k
S(tk).
Then we can write
V (S, A, t = T) = f(S, A),

 

Commitment Statements

Generate a commitment statement which:

Demonstrates your responsibility in adhering to education policy.

Explain your capacity for leadership and innovation as an early childhood professional.

Describes your ability to argue for social justice and ethical practice in early childhood education

Reflection

Discuss what ‘leadership’ means to you.

Describe the type of leader you want to be and why.

Identify why it is important to be an innovative leader in early childhood education.

Share why it is important to uphold social justice as an early childhood education leader.

Identify your strengths and areas for improvement in professional knowledge and skills, based on your experience in this course.

 

Environmental Conservation Activity

 

In place of this semester’s Environmental Conservation Activity, I would like you to do the following report.
Below are three topics which are currently debated by countries in the negotiations on climate change. Choose one of the following topics, research it, and write a report of 3-5 pages. The report should include both sides of the argument and which position you take on the issue and why. This is to be a complete, fully referenced report. Reports which are copied material or with no references will be given a zero.

Loss and Damage – Developing countries want a mechanism for compensation from future damages from climate change (beyond adaptation). Developed countries do not want to held to be legally liable.
Public Climate Financing – Developed countries pledged to mobilize $100 billion per year in climate finance. However, these countries are far off that figure. Developing countries have criticized not only this but the fact that much of the finance provided has been loans, etc. not real funds.
Participation – At the Conference of Parties (COP) meetings fossil fuel representatives from the fossil fuel industries were present in the countries’ teams. But small developing countries had only small teams and NGO’s were intentionally kept away from the meetings. (Note that all decisions are done by consensus)