553.420/620 Probability Assignment #03 1. When n and k are nonnegative integers with 0 ≤ k ≤ n, the binomial coefficient can the thought of as the number of subsets of size k from an n-element set and either of the following formulas can be used to compute it: Now let x ≠ 0 be any real number. With an abuse of notation, when k any nonnegative integer, we can define For example, and Let r ≥ 1 and y ≥ 0 both be integers. Show Remark. The binomial coefficient on the right is called the negative binomial coefficient for this reason. 2. Simplify the following completely with justification. If you are appealing to a theorem or identity, be sure to carefully show what, where, and how it is being used. In all of these expressions n > 0 is an integer. (a) (b) (c) In the expansion (2x − 1)10 what is the coefficient of x5? Justify your assertion. (d) When n is odd, find a simple expression with justification for 3. Consider a standard deck of 52 cards. The following are separate questions unless noted otherwise. (a) We deal 13 cards to a player. What’s the probability they have 3 clubs, 3 diamonds, 3 hearts, and 4 spades. (b) We deal 13 cards to each of 4 players – a Bridge deal. What’s the probability that one player gets all 4 Aces and another player gets all 4 Kings? 4. An urn has 4 balls: 1 blue, 1 green, 1 red and 1 yellow. We draw 4 balls with replacement. (a) Find the probability we see 2 blue and 2 green balls. (b) Find the probability we see two of one color and 2 of another. (c) Find the probability that we are missing at least one color. Please: answer this two ways: one way using inclusion exclusion, another way by considering the complement event. (d) Find the probability we get exactly two of one color and one each of two other colors. 5. (a) I deal you 5 cards from a deck of 52. How many 5-card hands are possible? (b) Now I take 5 decks of 52 cards and shuffle them together (for 52 × 5 = 260 cards total). I then deal you 5 cards. How many possible 5-card hands now? 6. KPOT offers twelve (12) different items on their lunch buffet. They have a special that allows guests to select any four (repetition allowed) items from their buffet table. For example, a guest can take all four items to be fried shrimp, for instance. How many selections are possible? 7. A license plate is 3 letters from the 26 possible repetition allowed followed by 3 digits from 0 thru 9 with repetition allowed. The speed cameras on the Gwynns Falls Parkway are weird: they can only record which letters and which digits appeared on the speeding car but not the order they appear on the plate. How many distinct recordings can these cameras make? 8. We have 10 cards numbered 0 thru 9. The cards are shuffled and lined up. If the line up starts or ends with two even digits, we win a prize. Compute the probability we win a prize. 9. How many sequences of coin tosses have exactly y tails before the rth head? You can assume that both y and r are positive integers. 10. (a) In class we illustrated the inclusion-exclusion rules and how one could get the inclusion-exclusion rule for 3 events from that of two events. Your job is to show that the inclusion-exclusion rule 4 sets follows from that of the one for three sets and two sets. Hint: Think of P(A1 ∪ A2 ∪ A3 ∪ A4) as P([A1 ∪ A2 ∪ A3] ∪ A4). (b) A hat has 12 pieces of paper in it with 4 number 1’s, 4 number 2’s, and 4 number 3’s well-mixed in the hat. A person reaches in and selects 4 pieces of paper at once. What’s the probability they are missing at least one of the numbers in their selection?
Assignment 1 1 Goal In this project, you will work in groups of at most 3 to design a pinhole camera. All the team members get the same grade. The pinhole camera (also called the “camera obscura”) is essentially a dark box with a pinhole on one face and a screen on the opposite face. Light reflecting off an object is directed through the pinhole to the screen, and an inverted image of the object forms on the screen. The caveat is that it is hard to see the image formed with the naked eye. To be able to see the image, we will use a digital camera with a long exposure time (15-30 seconds) attached to the pinhole camera. A diagram of the setup is shown in Fig. 1. 2 Task 1 Follow the steps below to build your pinhole camera: • Find a cardboard box. It does not have to be too big, but it does have to ultimately be “lightproof”; a shoebox will work fine. The cardboard box should be such that the distance between the pinhole and the screen is longer than the minimum focus of the digital camera, so you do not get a blurry image. • Obtain a digital camera with the ability to capture images with long exposure time (15 to 30 seconds). Note that with certain apps you can capture long exposure images even with your smartphones. • Determine which face of the box should be your screen. Cover the inside of this face with white paper; printer paper is fine. • Cover the rest of the faces on the inside with black paper. Use duct tape (best to use black tape) to make sure the papers are stuck to the box. • Create the pinhole on the opposite face of the screen. Putting the pinhole directly on the cardbox is not a good idea since 1) the cardboard is thick which limits the field of view of your camera and 2) this design is not flexible and won’t let you try capturing images with different pinhole sizes. To alleviate this issue first cut a hole in the box and cover this hole with card paper. The pinhole will be punched into the card paper. This way you can change your pinhole by changing the card paper. • Duct tape your box (black tape is the best) to make your box light proof. 3 Task 2 Follow the steps below to capture images using your pinhole camera • Take the setup to a nice sunny area.Figure 1: Pinhole camera • Point the pinhole in the direction of an object of interest. • Set up the digital camera so that it will capture a long exposure image. • Shoot, and hold still for 15-30 seconds. The exposure time depends on the brightness of the scene and the size of the pinhole. Use three size of the pinhole, e.g., 1 mm, 3 mm, and 5 mm. Note that, these are just suggestions. The point is to capture images with small, medium, and large pinhole sizes. You don’t need to measure the diameter of the hole to be exactly these values. Make your design so that you can easily switch between card papers with different hole sizes. For all three pinhole sizes capture two scenes (6 images). Also capture an image of the scene with your cellphone to be able to compare it to your captured images. 4 Extra Credit • Perform light painting. You can use the camera (not the pinhole one) to capture these images. Show two examples. • Build stereo pinhole camera to create an anaglyph image. Make sure you capture an anaglyph image and not two separate images with different filters. Also you do not need to perform any correspondence, disparity, or depth estimation. 5 Write up For each scene include four images (three images for the three pinhole sizes and an image of the scene with cellphone camera) in your report. Specify the settings for each image, i.e., pinhole size, exposure. You need to analyze the images by discussing the effect of the pinhole size on the image quality and required exposure time. You should also include images of your pinhole camera itself. If you do any of the extra credit items, you need to include and discuss them in your report. 6 Graduate Credit Graduate students have to do both extra credit items to get the full credit. 7 Deliverables For this assignment you only need to submit a report in the pdf format. Make sure you have written the name of all your team members on top of the report. Otherwise, no grade can be given to the other team members. Only one student will submit the report through Canvas on behalf of the entire team. All the team members will receive the same grade. 8 Ruberic Total credit: [100 points] [40 points] – Designing the pinhole camera [40 points] – Capturing images of two scenes with three different pinhole sizes [20 points] – Analyzing the results Extra credit: [10 points] [02 points] – Light painting [08 points] – Stereo pinhole 9 Acknowlegements
Mock Challenge Project The folder /mock-cp contains a minimal sample AIxCC ASC Challenge Project. Your goal is to use LLMs to find and patch security vulnerabilities in the project. Copy mock-cp to your home directory: cp -r /mock-cp $HOME/ Tasks: 1. (4pt) Write Python code to generate two files: a proof of vulnerabilty (POV) x.bin and a patch x.diff, such that ◦ x.bin triggers a vulnerability and x.diff patches the vulnerability ◦ You can use the best LLMs (such as those from OpenAI, Anthropic, Google) for this task ◦ Measure the cost and speed 2. (Bonus 1pt) Modify your code to use a local LLM (e.g., llama3.1-8b), and optimize the speed ◦ llama3.1-8b is already running on the server by ollama at port 11434, try the following: curl http://localhost:11434/v1/chat/completions -H “Content-Type: application/json” -d ‘{ “model”: “llama3.1”, “max_tokens”: 28, “messages”: [ { “role”: “system”, “content”: “You are a helpful assistant.” }, { “role”: “user”, “content”: “Where is Texas A&M?” } ] }’ Submission • Python code for Task 1 and Task 2 (optional) • A report that describes your solution and results (including remaining challenges and failures if any) • Limit your report to three pages with 10pt font size What’s in this repository src/ – this directory is where CP source code is loaded, analyzed, and built from. run.sh – a script that provides a CRS with a standardized interface to interact with the challenge project. exemplar_only – this folder contains sample POVs and patches. Initial Building git -C src/samples reset –hard HEAD ./run.sh -x build How to validate a proof of vulnerability The following command fails: • ./run.sh -x run_pov x.bin filein_harness • The output contains ERROR: AddressSanitizer: global-buffer-overflow How to validate a patch The following two commands both succeed: • ./run.sh -x build x.diff samples • ./run.sh -x run_pov x.bin filein_harness Sample Usage The below sample usage mirrors what the challenge evaluator does in the challenge project verification pipeline ./run.sh -x build ./run.sh -x run_tests ./run.sh -x run_pov exemplar_only/cpv_1/blobs/sample_solve.bin filein_harness ./run.sh -x run_pov exemplar_only/cpv_2/blobs/sample_solve.bin filein_harness ./run.sh -x build exemplar_only/cpv_1/patches/samples/good_patch.diff samples ./run.sh -x run_pov exemplar_only/cpv_1/blobs/sample_solve.bin filein_harness ./run.sh -x run_tests git -C src/samples reset –hard HEAD ./run.sh -x build exemplar_only/cpv_2/patches/samples/good_patch.diff samples ./run.sh -x run_pov exemplar_only/cpv_2/blobs/sample_solve.bin filein_harness ./run.sh -x run_tests git -C src/samples reset –hard HEAD ./run.sh -x build exemplar_only/cpv_1/patches/samples/bad_patch.diff samples ./run.sh -x run_pov exemplar_only/cpv_1/blobs/sample_solve.bin filein_harness ./run.sh -x run_tests git -C src/samples reset –hard HEAD ./run.sh -x build exemplar_only/cpv_2/patches/samples/bad_patch.diff samples ./run.sh -x run_pov exemplar_only/cpv_2/blobs/sample_solve.bin filein_harness ./run.sh -x run_tests
Cryptography: Projects (Deadline: 10:00am, 2025-01-17) Finish one project from Project One, Project Two and Project Three. Submit your source codes. If you submitted source codes for > 1 projects, TAs may arbitrarily choose one and grade it. 1 Project One (100 points) In this project, you will implement the garbled circuit based protocol for computing GE(a, b), where a = a2a1a0 ∈ {0, 1} 3 and b = b2b1b0 ∈ {0, 1} 3 . The implementation should contain (1) a procedure that takes a boolean circuit of GE(a, b) as input and outputs a garbled circuit of GE(a, b); and (2) a procedure that takes a garbled circuit of GE(a, b) and a set of input labels as input, evaluates the garbled circuit, and produces an output label. For simplicity, you do not need to implement OT. Instead, you may ask Alice to directly send the labels corresponding Bob’s input bits to Bob. Hints. Given a length-preserving PRF H : {0, 1} n × {0, 1} n → {0, 1} n, the function G : {0, 1} n → {0, 1} 2n defined by G(k) = Hk(1)∥Hk(2) is a length-doubling PRG. For simplicity, you may define a keyed function F : {0, 1} n × {0, 1} n → {0, 1} 2n as follows Fk(x) = G(Hk(x)), ∀k, x ∈ {0, 1} n and use F as the length-doubling PRF. You may choose DES (n = 64) or AES (n = 128) as H. 2 Project Two (100 points) In this project you will design a single-server private information retrieval (PIR) system that allows a client to privately retrieve any item xi from a database x = x1 . . . xn such that (1) The client’s retrieval index i ∈ {1, . . . , n} remains secret for the database server; (2) The client only needs to communicate O(n 1/3) Paillier ciphertexts with the database server; (3) The client learns no information about other database items, i.e., {xj : 1 ≤ j ≤ n, j ≠ i}. Note that the PIR system in lecture 21 requires the client to communicate O(n 1/2) Paillier ciphertexts with the server and so does not satisfy (2); the system does not satisfy (3), even if the client is honest. Hints. You may represent the database as a cube {Xu,v,w : u, v, w ∈ {1, . . . , n1/3}}; let the client send three query vectors to the server; and let the server compress the whole database into a constant number of Paillier ciphertexts that contain no information about {xj : 1 ≤ j ≤ n, j ≠ i}. 3 Project Three (100 points) In this project, you will gain experience creating transactions using the BlockCypher testnet blockchains and Bitcoin Script. This project consists of 3 questions, each of which is explained below. The starter code we provide uses python-bitcoinlib, a free, low-level Python 3 library for manipulating Bitcoin transactions. 3.1 Project Background 3.1.1 Anatomy of a Bitcoin Transaction Figure 1: Each TxIn references the TxOut of a previous transaction, and a TxIn is only valid if its scriptSig outputs True when prepended to the TxOut’s scriptPubKey. Bitcoin transactions are fundamentally a list of outputs, each of which is associated with an amount of bitcoin that is “locked” with a puzzle in the form. of a program called a scriptPubKey (also sometimes called a “smart contract”), and a list of inputs, each of which references an output from the list of outputs and includes the “answer” to that output’s puzzle in the form. of a program called a scriptSig. Validating a scriptSig consists of appending the associated scriptPubKey to it, running the combined script. and ensuring that it outputs True. Most transactions are “PayToPublicKeyHash” or “P2PKH” transactions, where the scriptSig is a list of the recipient’s public key and signature, and the scriptPubKey performs cryptographic checks on those values to ensure that the public key hashes to the recipient’s bitcoin address and the signature is valid. Each transaction input is referred to as a TxIn, and each transaction output is referred to as a TxOut. The situation for a transaction with a single input and single output is summarized by Figure 1 above. The sum of the bitcoin in the unspent outputs to a transaction must not exceed the sum of the inputs for the transaction to be valid. The difference between the total input and total output is implicitly taken to be a transaction fee, as a miner can modify a received transaction and add an output to their address to make up the difference before including it in a block. For the first 3 questions in this project, the transactions you create will consume one input and create one PayToPublicKeyHash output that sends an amount of bitcoin back to the testnet faucet. For these exercises, you will want to take the fee into account when specifying how much to send and subtract a bit from the amount in the output you’re sending, say 0.001 BTC (this is just to be safe, you can probably include a fee as low as 0.00001 BTC if your funds are running low). If you do not include a fee, it is likely that your transaction will never be added to the blockchain. Since BlockCypher (see Section 3.1.3) will delete transactions that remain unconfirmed after a day or two, it is very important that you include a fee to make sure that your transactions are eventually confirmed. 3.1.2 Script. Opcodes Your code will use the Bitcoin stack machine’s opcodes, which are documented on the Bitcoin wiki [1]. When composing programs for your transactions’ scriptPubKeys and scriptSigs you may specify opcodes by using their names verbatim. For example, below is an example of a function that returns a scriptPubKey that cannot be spent, but rather acts as storage space for an arbitrary piece of data that someone may want to save to the blockchain using the OP RETURN opcode. def save_message_scriptPubKey(message): return [OP_RETURN, message] Examples of some opcodes that you will likely be making use of include OP_DUP, OP_CHECKSIG, OP_EQUALVERIFY, and OP_CHECKMULTISIG, but you will end up using additional ones as well. 3.1.3 Overview of Testnets Rather than having you download the entire testnet blockchain and run a bitcoin client on your machine, we will be making use of an online block explorer to upload and view transactions. The one that we will be using is called BlockCypher, which features a nice web interface as well as an API for submitting raw transactions that the starter code uses to broadcast the transactions you create for the exercises. After completing and running the code for each exercise, BlockCypher will return a JSON representation of your newly created transaction, which will be printed to your terminal. An example transaction object along with the meaning of each field can be found at BlockCypher’s developer API documentation at https://www.blockcypher.com/dev/bitcoin/#tx. Of particular interest for the purposes of this project will be the hash, inputs, and outputs fields. Note that you will be using only one test network (“testnet”) for this project: the BlockCypher testnet for question 1-3. These will be useful in testing your code. As part of these exercises, you will request coins to some addresses (more details below). 3.2 Getting Started 1. Download the starter code from the course website, navigate to the directory and run pip install -r requirements.txt to intall the required dependencies. For this project, ensure that you are using Python 3. If you are not using a Python virtual environment, you must do two things differently. First, use pip3 instead of pip to install packages to Python 3. Second, use the python3 command to run scripts instead of python to run with the Python 3 interpreter. 2. Make sure you understand the structure of Bitcoin transactions and read the references in the Recommended Reading section below if you would like more information. 3. Read over the starter code. Here is a summary of what each of the files contain: lib/split_test_coins.py: You will run this script. to split your coins across multiple unspent transaction outputs (UTXOs). You will have to edit this file to input details about which transaction output you are splitting, the UTXO index, etc. lib/config.py: You will modify this file to include the private keys for your users. Note that you will make a web request to generate my_private_key. There are comments in config.py and instructions during setup for how to do this. lib/utils.py: Contains various util methods. You are not expected to modify this file. Q1.py, Q2a.y, Q2b.py, Q3a.py, Q3b.py: You will have to modify the various scriptSig and scriptPubKey methods, as well as fill the transaction parameters. Note that for question 3, you will have to generate additional private and public keys for customers using the web requests to BlockCypher. docs/transactions.py You are expected to fill this file with the transaction ids generated for questions 1-3. 4. Be sure to start early on this project, as block confirmation times can vary depending on how busy the network is! 3.3 Setup 1. Open lib/config.py and read the file. Note that there are several users that you will need to generate private keys and addresses for. 2. First, we are going to create generate key pairs for you on the BlockCypher testnet. (a) Sign up for an account with Blockcypher to get an API token here: https://accounts.blockcypher.com/ (b) Create BCY testnet keys for you and place into lib/config.py. curl -X POST ’https://api.blockcypher.com/v1/bcy/test/addrs?token=YOURTOKEN’ Note, if you copy this command directly into your terminal from this handout, you’ll likely need to delete and retype the ’ for the command to work. (c) Record the transaction hash the faucet provides as you will need it later. Viewing the trans-action in a block explorer (e.g. https://live.blockcypher.com/) will also let you know which output of the transaction corresponds to your address, and you will need this utxo index for the next step as well. If the faucet doesn’t give you a transaction hash, you can also paste the user address into the block explorer and find the transaction that way. 3. Give your address bitcoin on the Blockcypher testnet (BCY) and record the transaction hash. curl -d ’{"address": "BCY_ADDRESS", "amount": 100000}’ https://api.blockcypher.com/v1/bcy/test/faucet?token=YOURTOKEN Note, if you copy this command directly into your terminal from this handout, you’ll likely need to delete and retype the ’{ and the }’, delete the , and condense the command into one line for it to work. 4. The faucets will give you one spendable output, but we would like to have multiple outputs to spend in case we accidentally lock some with invalid scripts. Edit the parameters at the bottom of split_test_coins.py, where txid_to_spend is the transaction hash from the faucet to your address, utxo index is 0 if your output was first in the faucet transaction and 1 if it was second, and n is the number of outputs you want your test coins split evenly into, and run the program with python split_test_coins.py. A perfect run through of questions 1-3 would require n = 3 for your address, one for each exercise, but if you anticipate accidentally locking an output due to a faulty script. a couple times per exercise then you might want to set n to something higher like 8 so that you don’t have to wait to access the faucet again or have to try with a different Bitcoin address. If split_test_coins.py was successful, you should get back some information about the transaction. Record the transaction hash, as each exercise will be spending an output from this transaction and will refer to it using this hash. Note: The faucet transaction would need to be fully verified (at least 6/6 confirmations) before you can split the coins you received. Waiting times will vary based on how busy the network is. 5. At the end, verify that you created BlockCypher Testnet addresses for you. You should have some coins on this blockchain. Give yourself a pat on the back for finishing a long setup. Now it’s time to explore creating transactions with Bitcoin Script. 3.4 Questions For each of the questions below, you will use the Bitcoin Script. opcodes to create transactions. To publish each transaction created for the exercises, edit the parameters at the bottom of the file to specify which transaction output the solution should be run with along with the amount to send in the transaction. If the scripts you write aren’t valid, an exception will be thrown before they’re published. For questions 1-3, make sure to record the transaction hash of the created transaction and write it to docs/transactions.py. After completing each exercise, look up the transaction hash in a blockchain explorer to verify whether the transaction was picked up by the network. Make sure that all your transactions have been posted successfully before submitting their hashes. Exercise 1. Open Q1.py and complete the scripts labelled with TODOs to redeem an output you own and send it back to the faucet with a standard PayToPublicKeyHash transaction. The faucet address is already included in the starter code for you. Your functions should return a list consisting of only OP codes and parameters passed into the function. Exercise 2. For question 2, we will generate a transaction that is dependent on some constants. (a) Open Q2a.py. Generate a transaction that can be redeemed by the solution (x, y) to the following system of two linear equations: x + y = (first half of your suid) and x − y = (second half or your suid) For an integer solution to exist, the rightmost digit of the first and second halves of your suid must either be both even or both odd. Therefore, you can change the rightmost digit of the second half of your suid to match the evenness or oddness of the righmost digit of the first half. Make sure you use OP ADD and OP SUB in your scriptPubKey. (b) Open Q2b.py. Redeem the transaction you generated above. The redemption script. should be as small as possible. That is, a valid scriptSig should consist of simply pushing two integers x and y to the stack. Exercise 3. Next, we will create a multi-sig transaction involving four parties. (a) Open Q3a.py. Generate a multi-sig transaction involving four parties such that the trans-action can be redeemed by the first party (bank) combined with any one of the 3 others (customers) but not by only the customers or only the bank. You may assume the role of the bank for this problem so that the bank’s private key is your private key and the bank’s public key is your public key. Generate the customers’ keys using web requests and paste them in Q3a.py. (b) Open Q3b.py. Redeem the transaction and make sure that the scriptSig is as small as possible. You can use any legal combination of signatures to redeem the transaction but make sure that all combinations would have worked. 3.5 Submitting your code Record your transaction hashes in the docs/transactions.py file for questions 1-3. The hashes should be listed one per line in the same order as the questions. 3.6 Recommended Reading 1. Bitcoin Script. https://en.bitcoin.it/wiki/Script. 2. Bitcoin Transaction Format: https://en.bitcoin.it/wiki/Transaction 3. Bitcoin Transaction Details: https://privatekeys.org/2018/04/17/anatomy-of-a-bitcoin-transaction/
MATH-UA 131 – 011 / 016 — MFE I · Term: Fall 2024 · Prerequisite: SAT / AB / … scores, Placement exam, or C or more in Precalculus · Email: Office: · Office hours: Thursdays 9:30 – 11:00, WWH 805 · Lectures: MW 8:00 – 9:15 AM, Silver 207 (Sec 11) TR 8:00 – 9:15 AM, WWH 109 (Sec 16) · Recitations: Fridays, register and check details on Albert Course information This is the first semester of a sequence designed to give you the intuition to think about economic ideas in mathematical terms and interpret mathematical concepts in the context of economics. Your understanding of economics and mathematics both will improve after this sequence. Mathematics is increasingly important in terms of the expression and communication of ideas in economics. A thorough knowledge of mathematics is indispensable for understanding almost all fields of economics, including both applied and theoretical fields. In particular, understanding of elements of calculus and linear algebra are crucial to the study of economics, and this class is designed to provide such appropriate mathematical tools. The formal derivations of the mathematical concepts needed will be the heart of this class. Economic models can often be easily and precisely described in terms of mathematical notation, when words and graphs would fail or mislead us. Therefore, as applications of the mathematical concepts covered in class, examples and motivation will be drawn from important topics in economics. Some key topics, roughly in order of their appearance in the course, include: • notion of functions, classical functions; • limits and continuity; • derivatives and their interpretation; differentiation rules; • inverse functions, exponential functions, logarithmic functions; • linear approximation, elasticity; • local and global extrema, higher-order derivatives, convexity; • function of several variables, partial derivatives; • optimization for functions of several variables. Class material Books · Essential Calculus: Early Transcendentals, 2nd ed., by James Stewart. · Essential Mathematics for Economic Analysis (4th or 5th ed.), Sydsaeter & al. The course will mostly follow Stewart’s book. Sydsaeter’s book contains more applications to economics and is also recommended if you intend to follow up with MFE II. The course will be self-contained and you are not required to obtain either textbook. It is still recommended that you get Stewart’s book (in any way format that you desire) as you can use it as a reference and to get more details on the topics covered in class. MFE II and MFE III will also use Stewart’s book. Campuswire Campuswire is an online forum. This is where you should ask any questions regarding the course. For personal questions, please do not send me an email, and instead DM me on Campuswire. I will periodically answer questions on Campuswire, but it should first and foremost remain your own platform. Campuswire is accessible through Brightspace. Gradescope Your homework will have to be scanned and submitted on Gradescope before the deadline. After it is graded, you will see your grade and the comments from the grader there. Gradescope is available through Brightspace. You will receive a link to register at the beginning of the term. Quizzes will also be administered through Gradescope. Google Drive All course documents, assignments, and their solutions are available in the Google Drive (link on Brightspace). Course organization A typical week will consist of two lectures, one recitation, one homework assignment, and one quiz. Please see the schedule for details. · We will meet twice every week for lectures. · On Fridays, you will have a recitation with your TA to work on some exercises covering the topics of the current week. · A homework assignment will be due on Sunday. It will contain more advanced and conceptual questions, as well as applications to economics. · One quiz on these topics will be due on Gradescope on Monday. You can do the quiz any time on Monday, and you will have 20 minutes to complete it. Grading policy Your final grade will be calculated with the following weights. · Homework (15%). The lowest grade will be dropped. · Attendance in recitation (4%). Two absences are allowed. -1% for each subsequent absence, for any reason. · Presenting exercises in recitation (3 x 2%). For writing an exercise on the blackboard during recitation. · Quizzes (5%). The two lowest grades are dropped (including missed assignments). · Midterm (30%). See schedule. · Final exam (40%). See schedule. The final will count for 50% if it is better than the midterm, 40% otherwise. Your grade out of 100 will then be computed and translated into a letter grade according to the following cutoffs. These cutoffs may be adjusted to your advantage. [93,100] [90,93) [87,90) [83,87) [80,83) [75,80) [65,75) [50,65) [0,50) A A- B+ B B- C+ C D F Class policies Absences Missing lectures will hinder your ability to keep up with the class. In exceptional circumstances when you need to miss a class, catch up asap using the notes and documents available in the Google drive. There is no need to let your instructor know of an absence, except if you miss an exam. In this case, you have to let your instructor know in advance. Absence will only be excused in case of illness, religious observation, family emergencies, or university-sanctioned events. Exams 1 will need to be made up within a week. If you miss Exam 2 and are in good standing in the class, you will be given an Incomplete and will need to take the exam later (typically at the beginning of the next term). Please let your instructor know asap of any circumstance that would hinder your ability to keep up with the class for a significant amount of time. Missed assignments No delay will be accepted for any reason to hand in homework, so make sure to upload your work to Gradescope in advance. Assignments that are not uploaded on time will count as 0. You can resubmit an assignment as many times as you wish until the deadline, but only your final version will be checked. Make sure that you upload all the pages and match each page with each exercise. Since quizzes are online and you have 24h to do them, no extension will be given. Once you open the quiz, you have 30 minutes to finish it. If you encounter any issue, you can still go back to the quiz within these 30 minutes. Your answers are automatically recorded, even if you do not click on the “submit” button. The platforms are very easy to use and set up for your convenience. It is thus your responsibility to learn how to use Gradescope using the resources provided. Therefore, having “technical issues” is not a reason for missed or incomplete work. What if I am feeling sick? Please stay home and follow NYU’s guidelines. The rules outlined in the previous paragraphs still apply, and you should let your instructor know in advance if you cannot make it to an exam. Please note that this is an in-person class. You cannot “opt-in” to take it online or remotely, and the lectures will not be available on Zoom. Grade appeal Assignments will be graded within a week. You then have three days to request a regrade. You should do so through the “Regrade request” feature on Gradescope. Before doing this, please make sure to read the solution carefully, and understand if your work was correct and complete. Typical reasons for losing points despite a correct answer are: · no explanation was given; · details of the computation were not written; · the work was illegible or too dirty; · part of a question was not answered. Please keep in mind that grading mistakes can happen, but are rare, so the regrading feature should be used parsimoniously, and abuses will be punished. Communication Questions regarding the class should be asked publicly on Campuswire. However, please check beforehand that the answer is not already answered there, and that the information is not already available in the syllabus or in the schedule. To discuss personal matters, send a DM on Campuswire. Please do not ask for exceptions or extensions since none will be granted. In any message that you send, please observe basic rules of respect and politeness, and allow a reasonable amount of time for an answer. You can call your instructor Prof. / Professor (Normand). Tutoring The math department and the University Learning Center provide free tutoring. See details on Brightspace. Calculators Calculators are not allowed during quizzes or exams. For homework assignments, you may use a calculator or computational software to check your results, to perform. tedious algebra (like adding fractions or a lot of numbers), or to compute approximations (e.g., logarithms or exponentials). However, all “calculus” computations (computing derivatives, integrals, etc.) and formal algebra should be done by hand, with all details shown. To know how many details you should show, follow this rule of thumb: between one line and the next one, you should be able to do all computations in your head. Tests No calculators, course notes, book, or any other documents are allowed during the exams. For quizzes, you can use your notes, the book, and any document available in the Google Drive. You may not use any calculator, computing software, AI, or any other type of assistance. Quizzes should be done by yourself without the assistance of anyone else. Any suspicion of cheating will be investigated and punished.
AC5803 Assignment 1 Part a b c d e Total Marks (a). Type your answer to part (a) here (b). Type your answer to part (b) here … (5). Type journal entries as follows: Part a. Date Account Name Amount Jan. 1 Dr. Cash 10,000 Cr. Sales Revenue 10,000 Assignment 1: [Total = 50 marks] Due: Beginning of week 5 class. Late submission will not be accepted. The Brady Company has the following balance sheet at Dec. 31, 2022. The Brady Company Balance Sheet as of Dec. 31, 2022 Assets Liabilities Cash 160,000 Bank Loan 50,000 Inventory 40,000 Equity Shareholder Capital 150,000 Total 200,000 Total 200,000 The company has the following transactions in 2023: (1). Jan. 1, signed a three-year service contract with Manning Company, and received full payment of $30,000. (2). Feb. 28, paid two years’ office rental starting from Mar. 1. The total payment is $48,000. (3). April 1, purchased a machine for $100,000. The machine has an expected useful life of 20 years, and residual value of $10,000. (4). July 26, sell inventory to Rogers Company on credit for 20,000, inventory worth 15,000 delivered. (5). Dec. 1, announced dividends $10,000 to shareholders, to be paid on Mar. 31, 2024. (6). Dec. 15, received $5,000 payment from Rogers Company. (7). Dec. 31, recorded total wages $40,000 to all employees, to be paid on Jan. 1, 2024. Additional (i). The bank loan is borrowed on Dec. 31, 20202022. It is for 5 years with annual interest rate 4%. Interest payment is to be made on January 1 and July 1 of each year. (No interest payment on Jan. 1 2023.) (ii). Depreciation for PPE (such as machine) starts in the month of acquisition, using the straight-line method. (iii). Dec. 31, it is estimated that 40% of the amount due from Rogers Company may not be paid. (iv). For expenses, clearly specify the type of expenses such as COGS, etc in your journal entries. Do not simply use expense. Required a. Prepare journal entry for the above transactions. [25 marks] b. Prepare adjusting entries at Dec. 31, 2023. [25 marks]
Complete the following set of tasks using the 2003 Chinese General Social Survey (CGSS2003) data. Note: You can copy and paste your Stata commands and results. 1. Previous research has shown that demographic and socioeconomic factors may affect individual income. Those factors include gender, age, age squared, marital status, education, hukou status, employment status, etc. Use multiple linear regression to investigate the determinants of income. a) Write down the regression model, i.e., β0 + β1X1 + β2X2 + β3X3 + …+ βnXn + u (Xis are independent variables). b) Create the variables you need. Summarize descriptive statistics (mean/percentage, standard deviation, etc.) in a table. c) Use Stata to run the regression model. Explain the goodness of fit (use R squared) and significance (use F test) of the model. d) Holding other factors fixed, what is the difference in monthly income between men and women? Test whether this difference is statistically significant. e) Holding other factors fixed, what are economic returns to education? Test whether this difference is statistically significant. f) Based on the findings at question “e”, can we conclude that that education will lead to economic inequality? If not, why? Explain your reason and make further analysis to support your argument. g) Does the economic return to education differ by gender? First draw a scatterplot to show the relationship between man and women. Then use regress to test the question and visualize your results. Remember to state clearly your hypothesis. h) There are some outliers in variable “income”. Please try two different coding strategies to deal with the outlier problem and run your regression in question “f” using different coding strategies. Compare the results and explain which one you think would be a better strategy.
Electrical Machines (EE4003) In-class questions Q1 Explain what is the meaning of B'g = KsBg. Q2 (1) How to consider the fringing effect at the iron core edges and at the pole edges when calculating the airgap m.m.f.? (2) Will the fringing effect increase or reduce the magnetic reluctance of the airgap? Q3 (1) How to determine the slot width of stator when initially design a synchronous motor? (2) How to determine the slot depth of stator when initially design a synchronous motor? (3) How to determine the yoke width of stator when initially design a synchronous motor?
APM236 HW1 Due date: Sat Jan 18 before 9pm on Crowdmark Note: In each homework 3-4 questions will be selected for grading. “The work is quite feasible, and is the only thing in our power... Let go of the past. We must only begin. Believe me and you will see.” Epictetus talking about the work of learning. Please submit the following 6 problems on Crowdmark. (1) (a) Sketch the set of solutions to the following set of inequalities. Is it a convex set? Is it a bounded set? Explain. x − y ≤ 10 3x + 2y ≥ 12 x − 2y ≥ 0 (b) Sketch the set of solutions to the following set of inequalities. Here a is a non-negative number. Is it a convex set? Is it a bounded set? Explain. x − y + a ≤ 10 3x + 2y − a ≥ 12 x − 2y − a ≥ 0 Note that when a = 0 you get the set in part (a). Also note that when a is large enough the set becomes empty. (c) Sketch the set of solutions to the following set of equations/inequalities and label the extreme points. x + y + z ≤ 10 x + 2y ≥ 6 x, y, z ≥ 0 (2) Let w0, w1, w2, . . . be a sequence of points in R n . Now define MS(0) := w0, and for every k ≥ 1, define MS(k) := 0.9MS(k−1)+0.1wk. So for example MS(1) := 0.9MS(0)+0.1w1, and MS(2) := 0.9MS(1)+0.1w2. Prove that for all k ≥ 0, MS(k) ∈ convex hull{w0, w1, . . . , wk}. Hint: start by proving this for k = 0, 1, 2 and once you see the pattern use induction. Note that the expression 0.9MS(k − 1) + 0.1wk is a convex combination of MS(k − 1) and wk. Remark: this question is related to an optimization technique called rmsprop use in Ma-chine Learning to train neural networks. You do not need to know anything about neural netwroks to solve this problen, but if you are interested in some context you can watch the video Hinton 6.5. (3) In this question you will show that the composition of affine functions is an affine function. One place this fact comes up is in neural networks where each neuron in a layer of neurons is an affine function of the neurons in the previous layer. You do not need to know anything about neural netwroks to solve this problen, but if you are interested in more details you can watch the video Hinton 2.1. (a) Suppose y is an affine function of the zi ’s: y = a + P i vizi . And suppose each zi is an affine function of the xj ’s: zi = P j (wijxj + bj ). Show that y is an affine function of the xj ’s. Here a, vi , wij , bj are all fixed numbers. Hint: composition of functions. (b) Show the same thing as in part (a) but now use vector notation. That is, show that if y(z) = v T z + a is an affine function of z and z(x) = W x + b is an affine of x then the composition y(z(x)) is an affine function of x. Here v, b are fixed vectors, W is a fixed matrix, and a a fixed scalar. (c) Show that if y(z) = v T z is a linear function of z and z(x) = W x a linear function of x then the composition y(z(x)) is a linear function of x. Hint: this is easy once you recall that a linear function is a special case of an affine function and so can use part (a) or part (b) as you prefer. (4) (a) Let f : R n → R 1 be a function and let C := {(x, y) ∈ R n × R 1 | y ≥ f(x)} be the set of points above the graph of f. Prove that f is a convex function iff C is a convex set. Hint: use the definitions of convex functions and convex sets. It may be useful to draw a picture in the case when n = 1. (b) Show that the function f : R n → R given by f(x) = ||x|| is a convex function. Here ||x|| := p x 2 1 + · · · + x 2 n = √ x · x is the norm of the vector x. Hint: use the triangle inequality: ||a + b|| ≤ ||a|| + ||b|| for all a, b ∈ R n and then apply part (b). (c) Let f1, f2 : R n → R be two convex functions. Use part (a) to show that the function f(x) := max{f1(x), f2(x)} is convex. Note: the value of f at x is the maximum of the two numbers f1(x) and f2(x). For example max{x, −x} is the absolute value |x| of x. (d) Use parts (b)-(c) above to show that the function max{|x|, 1} is a convex function. Here x ∈ R 1 . (5) (a) Prove that a convex polytope has finitely many extreme points. Hint: KB Theorem 1.5 and Theorem 1.6. (b) Suppose you are given the following fact: the set of extreme points of a disc {x ∈ R 2 | x 2 1 + x 2 2 ≤ r 2} is its boundary, i.e. the set {x ∈ R 2 | x 2 1 + x 2 2 = r 2}. Now consider the intersection of two discs S := {x ∈ R 2 | (x1 + 1)2 +x 2 2 ≤ 2} ∩ {x ∈ R 2 | (x1 −1)2 +x 2 2 ≤ 2} (see diagram at top). Show that the set of extreme point of S is its boundary {x ∈ R 2 | (x1 + 1)2 + x 2 2 = 2, x1 ≤ 0} ∪ {x ∈ R 2 | (x1 − 1)2 + x 2 2 = 2, x1 ≥ 0}. Hint: draw a picture and use the fact above. (c) Prove that the set S is not a convex polytope. (6) In this question you will classify all polyhedrons in R 1 . Recall that any polyhedron in R 1 is of the form. P := {x ∈ R 1 | aix ≤ bi for i = 1, ..., k} where the ai ’s and the bi ’s are numbers. (a) Show that any (non-empty) polyhedron in R 1 has one of 4 types: (a) a single point, (b) a closed interval, (c) a half closed infinite interval (i.e. of the form. (−∞, a] or [a, ∞)) or (d) all of R 1 . (b) What do polytopes in R 1 look like? Explain. (c) Try to classify polyhedrons in R 2 by making a list of as many types of polyhedrons you can think of. Hint: you should contemplate what the word “type” could possibly mean in this context. The following problems are for practice only and are not to be turned in. (7) Give an example to demonstrate that Theorem 1.7(2) as stated in KB p.87 is incorrect. Suggest a way of correcting it. (8) Textbook (Kolman and Beck) section 1.3: # 26 (9) Textbook (Kolman and Beck) section 1.3: # 37
Written Assignment & Oral Presentation Assignment for Advanced Financial Risk Management (125781) Semester 2, 2024 Due: 5pm, 18 October, 2024 This material consists of two Assignments (Part 1 and Part 2) and contributes 40% toward your total mark in this course, 30% for Part 1 (Assessment 2) and 10% for Part 2 (Assessment 3). (Updated) PART 1: Journal Article Reading Report (Length limit: less than 2000 words) For this part, you are required to read a journal article on a specific topic related to financial risk management. You can start from reading one from the following two articles (available in the Stream) and write a report to show your understanding of a research report which is good preparation to develop your own research skills. Phan, Nguyen and Faff (2014), “Uncovering the asymmetric linkage between financial derivatives and firm value – The case of oil and gas exploration and production companies”, Energy Economics”, 45, 340-352. Chernenko and Faulkender (2011), “The Two Sides of Derivatives Usage: Hedging and Speculating with Interest Rate Swaps”, Journal of Financial and Quantitative Analysis, Vol 46, No. 6 1727-1754. These are the suggested sections in your report: • Introduction (of the topic), • Literature review (mainly using the contents in the article) • Tested relation (or hypothesis), • Testing summary on method, data description and test results, • Conclusion(s) and further discussion. The last section (added to the above sections and not included in the sample report) is on recent trends (of the topic). To meet the requirement, you are required to do a literature search via Massey University library website via “Article databases” (https://www.massey.ac.nz/study/library/). You can do the search using some keywords of the topic. You are expected to identify 3 to 5 journal articles to comment on the recent trends. Among them, at least 2 of them (can either be published or working papers) are most recent (2020 onwards) works. • Working papers can be found from Social Science Research Network: http://papers.ssrn.com/sol3/DisplayAbstractSearch.cfm • If you are not sure how to conduct a good literature review, here are some examples of excellent literature reviews: o “Anomalies and Market Efficiency,” G. William Schwert, 2005, Handbook of the Economics and Finance, Elsevier Science. o “A Survey of Behavioral Finance,” Barberis, N., and Thaler, R., 2005, Handbook of the Economics and Finance, Elsevier Science. Special notes (and part of the marking criteria): 1) Please carefully read the University Policy on Academic Honesty and Plagiarism. “Plagiarism means presenting someone else's work, words or ideas as your own. It's a type of cheating and doing it in an assignment at Massey can mean that you have to answer to an allegation of breaching academic integrity. A link to the Student Guide to Academic Integrity at Massey University is here (Academic integrity student guide - Massey University). Please also read the content in How we deal with academic integrity breaches. These are the common points for your attention. It is NOT acceptable to: Copy another student’s work, in part or in total, or an official answer from either the current class or from a previous class. Allow other students to copy your work, in part or in total. Copy your own work if it has already been submitted for assessment elsewhere. Provide students in future years with copies of your assignments. Copy and paste sections from internet sourced documents or pages. Have another person prepare and/or write your assignment (or parts of your assignment) on your behalf. 2) You are required to use a standard format of citations and provide a list of references at the end of the report. The details of the requirement is available via the link:Find rules for creating a reference list on OWLL. PART 2: Oral Presentation requirement: You should prepare a presentation of 4 to 5 minutes to meet the requirement in the following case study. The oral presentation task is an individual assignment. You are required to submit two (or three) files (in the Oral Presentation Drop-Box): 1) A PowerPoint file of presentation covering your answers for the questions raised in the end of the Case Study description. (It is recommended to submit the Excel file to show your calculation details.) 2) A video record (mp4 format is preferred) of your presentation following the contents in your presentation file of the above 1). Grading Sheet for Oral presentation Part (Score out of 10) ▪ Structure of the presentation (easy to follow, well organized presentation file) /4 ▪ Effective communication of main points /3 ▪ Clarity of speaking (e.g., coherence) /1.5 ▪ Timekeeping and speed of speaking /1.5 Case Study – financial risk analysis and hedging strategy A pension fund manager expects to receive an inflow of funds in 90 days time and would like to invest some of the funds in a certain stock. The stock price today is $25. The fund manager would be very happy if in 90 days’ time the stock was selling for $25. But he is worried about the possible stock price rising in the period, so he decided to hedge the risk with futures or option markets. He asks you as a financial consultant to help him to make the decision. The maximum price the manager would pay for the stock is $30. You have estimated that the stock price will be distributed somewhere around current price in 90 days. The detail distribution is expressed in Table 1. Table 1 The first hedging strategy is to use the stock’s futures contract. The current price for the futures contract with 90 days maturity is $25.20. You can also hedge the risk with stock options. The current option quotes are listed in Table 2. Table 2 You are also provided with a third opportunity. An innovative financial institution offers you the following type of contract. If the stock price is above $30, you can buy the stock at $30. If the stock price is below the $X, you buy the stock at a price of $X. If the stock price is between X and 30, you will pay the spot price. The lower bound, X, is set by the financial institution such that the value of the contract is zero. Current market information provides you with the following information: Volatility of the stock (σ) 27.25 percent Discount Rate (rc) 6.00 percent (continuous interest rate) * Assuming a 365-day year for both volatility and risk free rate. Requirements: a. The following table shows the net effect of being unhedged for various price scenarios. Examine the table and discuss the pension fund manager’s risk exposure if he remainsunhedged. Stock price 13 20 25 30 35 37 Net effect 12 5 0 -5 -10 -12 b. Show how the futures contract can be used to hedge the risk, what payoffs will there be for the hedged portfolio? (Follow the format of the table in (a) ) c. If you use options to hedge the risk, which option would you choose and what will the payoffs for the hedged position be? d. For the contract provided by the financial institution, can you identify the two implicit options? (Hint: Buying Call and Writing Put). Explain why with their net values associated with different stock prices. e. Since the lower bound X, is such that the value of the overall contract is zero, determine the lower bound X for the contract. (Hint: you need to pay a premium for buying a call option and you will receive a premium for writing a put option. The X value is determined by the condition that the call premium paid equalsthe put premium received. You need to us Black-Scholes model and the trial- and-error method to find the X value) f. Summarize the payoffs for the three hedging strategies: futures contract, option contract and financial institution’s contract in the table provided below. ←------Hedged Payoffs--------→ Financial Stock price average Probability Futures Option Institution 13 to 15 14 0.01 r analysis. 15 to 17 16 0.02 17 to 19 18 0.04 19 to 21 20 0.09 21 to 23 22 0.15 23 to 25 24 0.19 25 to 27 26 0.19 27 to 29 28 0.15 29 to 31 30 0.09 31 to 33 32 0.04 33 to 35 34 0.02 35 to 37 36 0.01 Expected Values: g. In the same table as (f) compute the expected value of each alternative. h. Which hedging strategy would you recommend to the fund manager? Discuss why. Have considered the risk difference in your assessment?
GEOL 106 – Winter 2025 ASSIGNMENT 1 – Climate Proxies and Climate Change Due Date: January 31* (11:59 PM, Kingston time) Mark: /23 A few things before starting. • I provide an answer sheet (in Word format) where you can write your answers. Please use this sheet, it makes it easier for the TAs to be consistent in their marking. You need to save as a PDF to submit. • note that you will be only able to upload the answer sheet as a PDF in OnQ • information I give you to read through prior to the questions can be useful. *this is the due date without the 3-day grace period PART 1 – Climate Proxies Climate change is not a new phenomenon; it has been occurring throughout Earth history. Part 1 of the assignment examines palaeoclimate data from Earth history and the present. Through use of archives and proxies, Earth scientists can travel back in time and discover what the climate was like in the Earth’s past. By understanding climate change in the past, scientists gain insight into how current conditions fit or diverge from previous behaviour, and how the future climate might look. We discussed climate archives and proxies in class and how they can be used to learn about past climate. This assignment focuses on proxy data (from ice and salt cores) which can be used to reconstruct palaeoclimates. Ice Core Data By looking at past concentrations of greenhouse gases (such as CO2 and methane) in air bubbles found in ice cores, scientists can calculate how modern amounts of these gases compare to those of the past and can compare past concentrations of greenhouse gasses to temperature at that time. Ice cores have been collected since the 1950s from locations throughout the world, but the majority come from the ice sheets of Greenland and Antarctica. The ice core data you will be using was collected from Lake Vostok (see above right image). Conditions of glacial ice formation here provide excellent time resolution, and air bubbles in the ice core preserve actual samples of the Earth’s palaeo-atmosphere. Similar to tree rings, ice cores preserve annual layers which are the result in seasonal differences in snow properties. These annual layers, as well as dust trapped in the ice allow scientists can determine how old a layer of ice is. 19 cm long section of ice core from Antarctica. This section contains 11 annual layers with summer layers (arrowed) sandwiched between darker winter layers. (from the US National Oceanic and Atmospheric Administration) Through analysis of ice cores, scientists learn about glacial-interglacial cycles, changing atmospheric CO2levels, and climate stability over the last tens of thousands of years. The ice contains air bubbles, and scientists use the isotopic composition oxygen to determine the global average temperature at the time the snow fell. In addition, bubbles of air became trapped in each layer of ice as the snow turned into glacial ice. With temperature and CO2 concentration data, scientists can analyze whether variations in CO2 concentrations in the atmosphere correlates with changes in average global temperatures. Examining Ice Core Data You will use ice core data from the East Antarctic Ice Sheet. The ice core is from a drilling operation that drilled to a depth of 3.2 km at the Vostok research station. At this depth in the ice sheet, the drill has reached layers of ice about 420,000 years old. Use the information given as well as the graphs to answer the following questions. Examine the following graph. 1. This is a smaller version of a graph available in the Graphs file. Let’s look at the X-axis first. Which point is younger? Point A or Point B? (1 mark) 2. What variable does the Y-axis show? (1 mark)? Does 0°C correspond to the freezing point of water? (1 mark) 3. What are the temperatures compared to the modern average at Point A and Point B? (2 marks) (include units) 4. Now, look at graph (the blue line). Briefly describe trends as you move from ~ 250,000 to 150,000 years ago (1 mark). In the past, did the Earth warm up faster than it cooled down? (1 mark). The graph below (and in the Graphs file) shows atmospheric CO2 concentrations over the last 420,000 years, extracted from the Vostok ice core. The CO2 concentrations are given in parts per million (ppm). Think of a CO2 value of 230 ppm on the graph as a baseline. The amount of CO2 in the atmosphere was low when its concentration was less than 230 ppm, and becoming higher when its concentration was above 230 ppm. Data from Petit, J.R. et al. (1999), Nature, 399, 429-436 5. What was the ~ atmospheric CO2 concentration 350,000 years ago? (1 mark) I will accept a limited range of values. 6. Do times of low atmospheric CO2 on the carbon dioxide graph correspond to the times of cooler temperatures seen on the age vs temperature graph? (1 mark) Salt Core Data In arid climates, layers of halite (salt) in sedimentary rocks form when salty water evaporates and the salt collects at the bottom of the lake or seabed. Halite (NaCl), which is known as table salt, is a common evaporite mineral. During the formation of halite crystals, microscopic bubbles of fluid are trapped within the crystal. These bubbles are known as fluid inclusions and can be seen in the images below. At times, an air bubble may also be present. Analyzing both the liquid and vapour portions of the fluid inclusions gives information on palaeo-temperatures and atmospheric composition. An interesting note – these fluid inclusions have also been found to contain micro-organisms. Example of a ‘salt core’. The pinkish/reddish/brownish material are evaporites. This core is 830 million years old. Examples of fluid inclusions (L) containing air bubbles (V). The air bubbles contain ‘snapshots’ of atmospheric composition at the time of formation. The graph (right) depicts palaeoclimate data for the past 150,000 years from 4 locations (including Vostok). Answer the following questions about the data from the 4 cores. 7. From 90,000 years ago to the present, is there similarity among the temperature curves from the different locations? (1 mark) 8. If so, which cores generally matchup? (1 mark) 9. Which one(s) seem to reflect a different palaeoclimate history than the others? (1 mark) 10. Based upon these observations, which cores might reflect global climate trends more than local climate trends? (1 mark) Recently, a Canadian scientist was in the news due to their involvement in an ice drilling project at Little Dome C / Concordia Station in Antarctica. Drilling at this location is part of the Beyond EPICA project . Read the articles (available in OnQ) and answer the following questions. 11. How long was the ice core? (1 mark) 12. How far back in geological time does the ice core reach? (1 mark) 13. What episode in Earth history do the scientists involved in the project want to study and why? (2 marks) PART 2 - Present-Day Climate Change We are living in the Holocene epoch, which began close to 11,700 years ago. The average amount of CO2 in the atmosphere during the Holocene epoch was 280 ppm up until about 1780 AD. The more recent concentrations of CO2 in the atmosphere are not depicted in the Vostok ice core data, which stops around 250 years before present (BP). 14. Using the Keeling Curve (linkin OnQ), report the current atmospheric CO2 concentration and the date. (1 mark) 15. What is your CO2 birth number? Using the interactive plot at NOAA’s Global Monitoring Laboratory (linkin OnQ), determine the following. a. What is your CO2 birth number (just use month and year)? (1 mark) b. If your instructor was born (not saying I was) in October 1980, what is their CO2 birth number? (1 mark) c. How much have CO2 concentrations changed (in ppm) from October 1980 to October 1990? (1 mark) d. How much have CO2 concentrations changed (in ppm) from your birthday (month and year) to 10 years later? For example, if you were born in January 2004 compare this value to January 2014. (1 mark) e. Do the answers in c andd indicate an increasing rate at which CO2 is accumulating in the atmosphere? (1 mark)
ELEN 4810 Final Exam 1. Discrete Fourier Transform. and Fast Fourier Transform. Consider two discrete time signals u[n] and v[n], which satisfy u[n] ≠ 0, n = 0, 4, 8, 12, . . . , 60, u[n] = 0 else, v[n] ≠ 0, n = 0, 8, 16, 24, . . . , 56, v[n] = 0 else. Set y = u ∗ v. Please answer the following questions: Part A. Suppose we compute y via the Discrete Fourier Transform, via For what choices of N does this operation correctly compute y? Part B. In this part, we use the structure of u and v to compute y[n] more efficiently (similar to the Fast Fourier Transform). Let ¯u and ¯v be downsampled versions of u and v: u¯ = u ↓ 4, v¯ = v ↓ 8. Let U¯[k] = DFT32n u¯ o [k], V¯ [k] = DFT16n v¯ o [k], Y [k] = DFT128n y o [k]. Please give an expression for Y [k] in terms of U¯ and V¯ . 2. Z Transform. Consider the following rational transfer function H(z): Part a. What are the poles and zeros of H? Part b. Assuming the system is causal, please specify the region of convergence (ROC) and the impulse response h[n]. Part c. Assuming the system is stable, please specify the region of convergence (ROC) and the impulse response h[n]. Part d. Which of the following best describes the system? LOW PASS BAND PASS HIGH PASS ALL PASS 3. Spectrograms. The following question has two parts. Part (a). A signal x[n] has the form. for some scalars α, β, γ, τ . Which of the four figures above is the spectrogram of the signal? For full credit, please justify your answer. Part (b). A linear chirp signal is passed through a canonical generalized linear phase system whose impulse response has length 5,and satisfies h[0] = 1. Above are the spectrograms for z[n] (left) and yn] = h*x[n] (right). Both spectrograms are generated with a Discrete Fourier Transform. (DFT) of length N = 512. Please answer the following questions as accurately as possible, given the available information: (b.i) What type of canonical generalized linear phase system is this? (b.ii) What is the group delay grd[H(ew)]? (b.iii) Please sketch the pole-zero diagram of H(z), using the axes on the next page. Please labelany repeated poles and zeros with their multiplicity. 4. Filter Design by Windowing. In this problem, we design a low-pass filter by windowing. We set The corresponding time-domain target is We use a rectangular window and set h[n] = w[n] htarget[n]. The impulse response h[n] is plotted below, for L = 80: Part A. Does the filter h[n] have generalized linear phase? Why or why not? Part B. In lecture, we discussed Kaiser windowing, which uses a different choice of w[n]. What is the main advantage of Kaiser windowing compared to the rectangular window used in part A? Part C. What are the two main advantages of design by L∞ optimization, compared to design by windowing? Part D. Let h[n] be our designed impulse response, H(z) its Z-transform, and let ζ1, . . . , ζM denote the zeros of H(z). Suppose we generate a new filter by setting hnew[n] = (−1)nh[n]. Please give an expression for the zeros ζ1 ′ , . . . , ζM ′ of Hnew(z) in terms of the zeros ζ1, . . . , ζM. Part E. Which of the following best characterizes the filter hnew[n]? Why? LOW PASS BAND PASS HIGH PASS ALL PASS
ESE 572: Analog Integrated Circuits Homework 1 1. (2 pts) A MOS transistor in the active region is measured to have a drain current of 20 μA when VDS = VGS-VT. When VDS is increased by 0.5 V, ID increases to 23 μA. Estimate the output impedance, r0, and the output impedance constant, λ . 2. (3 pts) Using the device parameters for the 0.18 μm technology PMOS device at the end of this HW and L = 0.2 μm, select the device width and required VGS to bias a transistor with an intrinsic gain of Ai = 10 and transconductance gm = 0.5 mA/V. What dc current consumption is required? 3. (3 pts) For the circuit below plot IX and gm as a function of VX as VX varies from 0 to 1.2 V. Assume M1 has a (W/L) = (3.5μm/0.35μm) and the model parameters for the 0.35 μmtechnology given at the end of the HW. Assume VDD = 2V and the source is tied to the body. 4. (3 pts) For the circuit below plot IX as a function of VX as VX varies from 0 to 2 V. Assume M1 has a (W/L) = (3.5μm/0.35μm) and the model parameters for the 0.35 μm technology. You may ignore the body effect. 5. (3 pts) For the circuit below plot IX and gm as a function of VX as VX varies from 0 to 1.2 V. Assume M1 has a (W/L) = (5μm/0.5μm) and the model parameters for the 0.5 μm technology given at the end of this HW. 6. (3 pts) For the circuit below plot Vout as a function of Vinas Vin varies from 0 to 1.2 V. Assume M1 has a (W/L) = (5μm/0.5μm) and the model parameters for the 0.5 μm technology. Assume R1 = 20 kΩ and VDD = 3V. 7. (2 pt) Draw the transistor level schematic for the structure below 8. (3 pts) For the circuit in problem 7, assume that (W/L)M1 = 35 μm/0.35 μm, (W/L)M2 = 35 μm/1.4 μm, and ID1 = ID2 = 0.5 mA when both devices are in saturation. Assume VDD = 3V and the 0.35 μm model parameters. Recall that λ ∝ 1/L. (a) Calculate the small-signal voltage gain. (b) Calculate the maximum output voltage swing while both devices are saturated. 9. (4 pts) For the circuit below, assume that (W/L)1 = 50/0.5, RD = 2 kΩ, and λ= 0. Assume VDD = 3V and the 0.5 µm model parameters. (a) What is the small-signal gain if M1 is in saturation andID = 1 mA? (b) What input voltage places M1 at the edge of the triode region? What is the small-signal gain under this condition? (c) What input voltage drives M1 into the triode region by 50 mV? What is the small-signal gain under this condition? 10. (4 pts) Suppose the common source amplifier from problem 9 is to provide an output swing from 1 V to 2.5 V. (a) Calculate the input voltages that yield Vout = 1 V and Vout = 2.5 V. (b) Calculate the drain current and the transconductance of M1 for both cases. (c) How much does the small-signal gain, gmRD, vary as the output goes from 1 V to 2.5 V? (Variation of small-signal gain can be viewed as nonlinearity.)
GEOL 106 - ENVIRONMENTAL GEOLOGY AND NATURAL HAZARDS Winter 2025 Course Description The relationship between human-kind and our ever-changing planet, with a focus on natural geologic hazards (volcanic eruptions, earthquakes, landslides, tsunamis, mass movement, floods, extraterrestrial impacts, etc.), and environmental impacts which result from population and land-use expansion and our increased use of water, energy and mineral resources. A study of the sources and impact of pollution and global climate change. Public perception of and response to geological risk. Intended Student Learning Outcomes To complete this course, students will demonstrate their ability to: 1. identify and explain the causes of a variety of natural hazards 2. evaluate the impacts of natural hazards on humans and human infrastructure 3. begin to formulate a plan to mitigate risks from natural hazards 4. identify Earth resources used to support human societies and ways they are exploited 5. critically discuss the ways in which human activities influence the environment and vice versa Course Materials A textbook is not required for this course. Knowing that some learners benefit from having a textbook, I recommend ‘Introduction to Environmental Geology’ by Edward Keller. Any edition is acceptable; limited numbers are available at the Queen’s bookstore. If there is a reading that I think will benefit you, I will provide it. All other course material will be available and accessible via OnQ. Land Acknowledgment Let us acknowledge that Queen’s University is situated on traditional Anishinaabe and Haudenosaunee territory. To acknowledge this traditional territory is to recognize its longer history, one predating the establishment of the earliest European colonies. It is also to acknowledge this territory’s significance for the Indigenous Peoples who lived, and continue to live, upon it and whose practices and spiritualties are tied to the land and continue to develop in relationship to the territory and its other inhabitants today. In this course we will reflect on the impacts that the way we live and interact with the Earth has an impact on the land (geosphere, atmosphere, hydrosphere, biosphere), and past, present, and future communities and generations. Equity, Diversity, and Inclusivity Statement Queen’s University recognizes that the values of equity and diversity are vital to and in harmony with its educational mission and standards of excellence. It acknowledges that direct, indirect, and systemic discrimination exists within our institutional structures, policies, and practices and in our community. These take many forms and work to differentially advantage and disadvantage persons across social identities such as race, ethnicity, disability, gender identity, sexual orientation, faith, and socioeconomic status, among other examples. In discussing topics covered in this class, we will learn about how these identities can increase a person’s vulnerability to natural hazards. I will work to promote an anti-discriminatory, anti-racist, and accountable environment where everyone feels welcome. Every member of this class is asked to show respect for every other member. Building A Classroom Community University is a place to share, question, and challenge ideas. Each student brings a different lived experience from which to draw upon. You (and I will as well) can help to create a safer, more respectful classroom community for learners by following these guidelines: 1. Assume the best of others and expect the best of them. 2. Acknowledge the impact of oppression on other people’s lives and make sure your words and tone are respectful and inclusive. 3. Recognize and value the experiences, abilities, and knowledge each person brings to the course. 4. Pay close attention to what your peers say/write before you respond. Think through and re-read what you have written before you post online or send your comments to others. 5. It’s ok to disagree with ideas, but do not make personal attacks. 6. Be open to having your ideas challenged and challenge others with the intent of facilitating growth. 7. Look for opportunities to agree with one another, building on and intentionally referencing peers’ thoughts and ideas; disagree without making personal attacks, demeaning, or embarrassing others. Name/Pronoun If, for whatever reason, you wish to change how your name appears in OnQ and/or on class lists, please follow these steps. You may also use this process to add your pronouns to the appearance of your name. 1. Loginto SOLUS 2. Click on Personal Information tab 3. Click on the Names tab 4. Click on the Add New Name tab 5. Choose Preferred from the Name Type drop down menu 6. Enter the name you would like to appear in OnQ and/or on class lists 7. Click Save
125.811 Advanced Risk Analytics Summer semester, 2024 - 2025 Individual Assignment: Market Risk and Credit Risk Modelling (30 marks) Please prepare your modelling report with related tables, figures, interpretations, and explanations based on the following tasks. You need to submit one word or PDF file for your report. Please copy and paste your Eviews result tables into your report. Part I - Market Risk Modelling (21 marks) GARCH and EWMA models (Review Week 4 Practice Notes 1) 1. Goto https://www.nasdaq.com and download five-year historical daily closing prices of a stock of your choice. 2. (3 marks) Calculate the logarithm returns for the stock. Analyse and discuss the stock return characteristics, including return mean, median, minimum, maximum, skewness, kurtosis, serial correlation, and volatility clustering. 3. (4 marks) Based on analyses in Step 2, build an appropriate GARCH model for the return volatility and explain why the model specification is appropriate. (Note that: you need to capture the serial correlation of the return level using ARMA model) . 4. (3 marks) Based on the analyses in Step 2, establish an appropriate EWMA return volatility model. 5. (3 marks) Forecast one day volatility using GARCHand EWMA model based on above steps 3 and 4. Dynamic Conditional Correlation - Bivariate GARCH model (Review Week 4 Practice Notes 2) 1. Using one pair of data (including the spot and futures prices) from the givendata file on stream (file name: Data for assessment 2) . Look at the first tab of the file for the assigned data for your group (students in one group would use the same data, but the assignment is individual assignment) . 2. (4 marks) Estimate their dynamic conditional correlation using the DCC-MGARCH(1,1) model. 3. (4 marks) Based on the estimated dynamic conditional correlation (pt) and estimated standard deviation of the spot (σs,t) and futures (σF,t), calculate the dynamic optimal hedge ratio as follows: Part II - Credit Risk Modelling (9 marks) 1. Employ the Mortgage.csv and lgd.csv datasets downloaded from http://www.creditriskanalytics.net/datasets.html 2. (5 marks) Build the best Probability of Default model you could and assess its performance. 3. (4 marks) Find a relevant literature on probability of default model. Explain and discuss the probability of default model in that paper and compare that model with your model (no more than one page of writing) .
DMS ECO2103 Macroeconomics Instructions for CA1 Individual Assignment, January 2025 Semester The purpose of this individual assignment is to enable you to use relevant analytical tools and macroeconomic concepts (not necessarily all of them) that you have learnt in Lectures 1 to 4. Choosing Articles as References for Analysis Search through newspapers, journals, magazines or internet for THREE articles that are relevant to the concepts discussed in Lecture 1 to Lecture 4. Quote the source of the article in your report or if the article is obtained from the web, quote the web address. Include a screenshot of the articles in the reference list section. You have the flexibility to choose (a) all 3 articles from one country or (b) 3 articles from various countries. But only articles selected from 1 NOVEMBER 2024 onwards will be accepted. The articles selected should be in English and based on the following topics: Article 1 - Lecture Topic 1: Introduction to Macroeconomics, GDP and Economic Growth Article 2 - Lecture Topic 2: Inflation and the Price Level Article 3 - Lecture Topic 3: Wages and Unemployment OR Lecture Topic 4: Saving, Capital Formation, Financial Markets and Financial System Each article should deal with a different macroeconomic aspect of the country (for example, GDP growth, labour productivity, wages and unemployment, price level and inflation or national saving and capital formation). Analyzing your Country For each of the 3 articles, summarize the article first and followed by an analysis of the macroeconomic performance of the country based on the article. The analysis must cross- reference to concepts discussed in one particular lecture topic. You are required to use the lecture notes and textbook to help you better illustrate your analysis. If you extract exact phrases or sentences, please put them in quotation marks in your report. Explain your understanding of the article using the economic concept and knowledge discussed in the lecture. Establish the linkage between the article and the economic concept under the particular lecture session and topic. Draw diagrams to support your analysis if needed. Writing your Report Write a summary report for each country based on your analysis. Combine and organize all your work in a single word document. Use Times New Roman Font Size 12pt. Number your pages. Use single line spacing. Save as Word document. Your report should have a word count ranging from 1000 to 1500. Each Analysis (Part 3 - 5 in the template below) should have at least 250 words. Submission of Report Submit the Word version of your report via Canvas. Reports submitted through other ways (e.g. through email or hardcopy to the lecturer) will not be accepted. Template for Report Use the following template or outline for your report: 1. Title: DMS Macroeconomics Individual Assignment Date of Report: 2. Content Page List the topics and chapters in the report. 3. Chapter 1 - Analysis on Topic 1 a. Source: Put down the title of the article and its source, or if the article is obtained from the web, quote the web address. b. Summary: Briefly discuss the main points of the article. c. Analysis: Using the concepts in the lecture to relate to the article and analyze the situation. 4. Chapter 2 - Analysis on Topic 2 a. Source: b. Summary: c. Analysis: 5. Chapter 3 - Analysis on Topic 3 or Topic 4 7. Conclusion Summarize the main findings of your analysis 8. References Put down the source of articles, title and Internet link if the articles are obtained from the web. Insert a screenshot of each article after quoting the source and title. Do NOT type in or “copy and paste” the articles as this will affect the plagiarism index. Indicate other sources of reference, data, or materials used in your report. SAMPLE A sample at the end of the document is included to provide guidance on article selection and report analysis. Please note that you should NOT use the sample articles for your report. No part of the sample maybe copied and reproduced for your report. Important Dates 1. CA1 Deadline: 22 January 2025 (Wednesday), 11.59 am Submit your report via Canvas. Only reports submitted via Canvas will be accepted. The distribution of marks will be as follows: CA1 30% Component Weightage Selection of relevant articles & content page 5% Summary and analysis supported by economic theory/graphs/diagrams 80% Conclusion 10% Reference list 5% Total 100% 2. CA2 Deadline: 3 February 2025, 12 noon - 7 February 2025, 11 59am You have 1 attempt to compete the CA2 online quiz comprising 20 MCQs within the timeframe indicated above. (Topics 1 - 6) CA2 (online quiz) 20% 3. Final exam 50%: 3 March 2025, 2 30pm - 4 30pm CA Submission CAs must be submitted online via Canvas. Please read through instructions in Canvas and CA outline carefully before submitting. If you have further queries, please read the FAQ. If after you have read the FAQ, you need assistance on Canvas submission, please email to [email protected] or call 6248 9393 Option 4. For non-Canvas issues please email [email protected]. Please email with your "Live@Edu email account". Email from other addresses will not be entertained. If issues raised are covered, you will be directed to read through instructions in the CA outline, Canvas and the FAQ. Please take time read through before raising issues.
Electrical Machines (EE4003) In-class questions Q1 As shown in Fig. Q1, the stator core and the rotor core are two iron cylinders. The iron core length is 10 cm. The average diameter of the airgap D is 10 cm. The airgap between the stator core and the rotor core is 0.1 cm. A coil in the airgap has 10 turns and the coil pitch is 180o. The current in the coil i = sin(2πft) (where the frequency f = 50 Hz). The figure on the right in Fig. Q1 shows the magnetic flux line. Assume that the m.m.f. drop in the stator core and the rotor core can be neglected, and the magnetic flux density between the two sides of the coil in the airgap is uniformly distributed. i) Calculate the m.m.f. drop in the airgap. ii) Calculate the magnetic flux density B in the airgap. iii) Calculate the e.m.f. in the coil. iv) Calculate the self inductance of the coil. v) Is the magnetic field in the airgap pulsating or rotating with time? Fig. Q1
COMP507- ITPM Semester 1 2024 ASSIGNMENT #2 (100 marks) Contribution to final marks: 50% Must get a minimum of 35/100 marks in this assignment to get an overall pass for this paper Submission Requirements: · This is an individual assignment. The cover page must have your ID number and Name (in full) · Please use 1.5-line spacing and 12-point font (no handwritten assignment will be marked except for drawing the AOA diagram) · Include page numbers. Task1: Project Cost Control (30 marks) You are required to control the budget for the MYH project. Below is the Business Case of the project. Table 1 Business Case for MYH 1.1 What is the total budget at completion (BAC) for the project? (3 marks) Assume that the work for the first week is completed in the project. The following information has been provided as a result of work done so far. Plan Value (PV) = $400, 000 Earned Value (EV) = $250, 000 Actual Cost (AC) = $600, 000 Answer the following questions (1.2 – 1.6). You must show all the workings to support your answers. 1.2 Explain a likely reason for the difference between PV and AC for the first week of this project. (5 marks) 1.3 Calculate the cost variance (CV) and the cost performance index (CPI) for the first week of this project. Is the project under or over budget? (7 marks) 1.4 Calculate the schedule variance (SV) and the schedule performance index (SPI) for the first week of this project. Is the project ahead of or behind schedule? (7 marks) 1.5 Calculate the new estimate at completion (EAC) for this project after the completion of the first week’s work. (4 marks) 1.6 Calculate how long it will now take to finish this project after working on the project for a week. (4 marks) Task 2: Project schedule development (35 marks) Table 2 shown below provides the activities (A to L) and their three-point estimates for an Auckland City IT Infrastructure (LAN Network) project. Table 2 Activities Schedule for Auckland City IT Infrastructure Project Task Predecessor Optimistic duration (Day) Most Likely duration (Day) Pessimistic duration (Day) Task effort A - 12 14 26 B - 14 18 24 C A 21 23 32 D A 12 17 26 E C 11 13 16 F D 16 19 21 G B 8 6 11 H B 6 4 12 I E, F, G 8 6 13 J H 8 7 16 K J 9 7 13 L I, K 10 8 12 3.1 Complete the PERT estimation to show the duration of each activity. (10 marks) 3.2 Draw the network diagram (AOA) to show the order in which all the activities will be undertaken in this project. The diagram must be clearly labelled. (5 marks) 3.3 List all the possible paths for this project with their total durations. (4 marks) 3.4 Clearly identify and briefly explain the critical path for this project. (10 marks) 3.5 This network is expected to be up and running within 4 months from the time the work on the project is started. Does this opening date appear feasible? Justify with your calculations. (6 marks) Task 3: Project selection (15 marks) You are required to perform. analysis to help identify the order in which the projects will be undertaken from the available four projects. 3.1 Use the information below to create a table that must show the weighted score and priority for each project for a software vendor environment. (10 marks) The factors that impact the success of a project include (a) the availability of a principal engineer (20%); (b) a development team assigned based on at least 4 senior software engineers with local development experience (20%); (c) availability of a product manager as an on-site customer) (20%); (d) support for the project from the sales and marketing team (20%); (e) availability of an agile tester (10%); and (f) an established product backlog based on high-level requirements (10%). Table 3 below provides the scores based on these factors for each project. Table 3 Criteria for Projects 1-4 Project / Criteria a b c d e f Project 1 65 45 45 60 55 60 Project 2 70 65 55 65 85 70 Project 3 75 70 75 75 85 50 Project 4 60 70 75 75 85 70 3.2 Explain the order in which these 4 projects should be undertaken. Justify with your calculations. (5 marks) Task 4: Project selection (20 marks) 4.1 Based on the information provided below, perform. a quantitative risk analysis using a decision tree diagram to calculate the expected monetary value (EMV) and contingency reserve for each project. (10 marks) Project Risks Chance of Outcome Estimated Impact Expected monetary value (EMV) Contingency reserve Project 1 Risk 1 40% -$ 60,000 Risk 2 60% -$ 70,000 Risk 3 55% $ 80,000 Risk 3 55% -$ 30,000 Risk 3 25% -$ 80,000