If I tell you that I have 73 cents in American coins in my pocket and that I have the fewest number of coins possible, what combination of coins do I have? It turns out that I have 2 quarters (25 cents each), 2 dimes (10 cents each), 0 nickels (5 cents each), and 3 pennies (1 cent each).This very simple algorithm will always find the amount of change which equals a value using the smallest number of coins:numberOfQuarters = total / quarterValue total = total mod quarterValue numberOfDimes = total / dimeValue total = total mod dimeValue numberOfNickels = total / nickelValue total = total mod nickelValue numberOfPennies = total / pennyValueName your project FirstnameLastnameAssignment4Have your program do the following.Your source code must include the following documentation:Not yet, but this should be enough to go on.To turn in your application, find the folder containing your entire project (not the folder with the “java” file), zip it up, and turn it in.
A restaurant will print a bill for the customer at the end of a meal. This bill will include the price of the meal, the sales tax, and three suggested tip amounts based on the sum of the price and the sales tax for a low, medium, or high amount (which is typically 15%, 18%, and 20%). (The customer can still tip whatever they wish.) Last of all, it prints the name of the server. Write this program. The sales tax in Tennessee is 7%.There are complications in working with inputs of various types. You will be asked to read in inputs of various types and you should run to odd issues with your program. There is a section in the book on dealing with a mixture of nextLine and other next calls.Name your project FirstnameLastnameAssignment3Have your program do the following.Your source code must include the following documentation:Since we haven’t covered Java’s approach to number formatting, it’s okay that these numbers do not round to two decimal places.Welcome to Dr. Church’s Restaurant Bill Tool. Enter the bill amount: 12.50 Enter the server’s name: Charles MartinetSubtotal: 12.5 Sales Tax: 0.8750000000000001 15.0%: 2.00625 18.0%: 2.4074999999999998 20.0%: 2.6750000000000003Your server is Charles Martinet.To turn in your application, find the folder containing your entire project (not the folder with the “java” file), zip it up, and turn it in.
The “apsu” is a unit of measurement for measuring large tracks of land. Unfortunately it’s a unit that varies from student to student. For every student it will be different. It’s always the last five digits of your A-number in square feet. (Just go with it. I’m experimenting with my assignments.)For example, my A-number is “A00123456”. Therefore, 1 apsu is equal 23,456 square feet. For you, it will be different.Have your program do the following.Your source code must include the following documentation:Wecome to James Church’s Land Size Calculator. 1 apsu = 23456 square feet.Enter the length of a plot in feet: 660 Enter the width of a plot in feet: 360 Area in Square Feet: 237600 Area in Apsus: 10To turn in your application, find the foldering containing your entire project (not the folder with the “java” file), zip it up, and turn it in.
We need a variation on “Hello, world!”I need to learn about you. And the best way to learn about you is to ask you about yourself. Write a program which will display the following information, each on their own line.Your source code must include the following documentation:This is a variation of Page 106, Chapter 2, Programming Challenge 3.To turn in your application, find the foldering containing your entire project (not the folder with the “java” file), zip it up, and turn it in. I’ll have a video posted on how to do this in Windows. The process will be similar for Mac. If you use Linux and want me to make a video, I’ll show you how to use the command line (let’s be honest: if you use Linux, you are probably okay at figuring this out on your own.)
In this assignment, you will implement a group chat server that enables conversation between multiple group chat clients. Clients connect to the server and all the connected clients receive all the messages transmitted by any of the clients. This group communication is facilitated by the group chat server. A client reads the text typed by the user and sends it to the server. It is the responsibility of the server to relay that text to all the other clients. Clients receive the text relayed by the server and display it on the screen.You need to write two programs: GroupChatServer and GroupChatClient using sockets. The functionality of each of these programs is described below.The server’s job is to create a server socket and wait for new clients or messages from existing clients. If a new client is connected, that client is added to the list of active clients. If a null message is received from an existing client (which happens when a client exits), that client is removed from the list of active clients.To simultaneously watch for new clients and messages from multiple existing clients, you may use threads in ’java’ or select method in ’python’ or ’c’. You can find example usage of these approaches in TwoWayAsyncMesg.zip posted on the Blackboard. Once you unzip it, you will find three folders, ’c’, ’java’, and ’python’, corresponding to an implementation of the two-way messaging application in that programming language. Each folder contains two programs, TwoWayAsyncMesgServer and TwoWayAsyncMesgClient.The instructions on how to run them are given in the README.txt file in each folder.The client program first establishes a connection to the server at the given host and port and then sends the given name. Thereafter, the client’s job is to wait for either user input from the keyboard or messages from the server. Inputs from the user are sent to the server and the messages from the server are displayed on the screen. To implement this, you only need to make a minor change to the TwoWayAsyncMesgClient code.Submission (1) Create a zip file containing the GroupChatServer and GroupChatClient source files (2) Rename the zip file as YOURLASTNAME P2.zip (YOURLASTNAME in all caps); (3) Upload it in the Blackboard.Grade Breakdown (1) 10%: You submitted your assignment on-time and the files compile correctly. (2) 30%: Client code works correctly in sending its name and exchanging messages with server. (3) 30%: Server works correctly in relaying messages between clients. (4) 30%: Server works correctly in handling clients leaving and joining the group chat.
The purpose of this assignment is to familiarize you with network programming. You will obtain, compile, and run a simple network program. You will then implement an extension.Download the file OneWayMesg.zip from the Blackboard and unzip it. You will find three folders, ’c’, ’java’, and ’python’, corresponding to an implementation of the one-way messaging application in that programming language. Each folder contains two programs, OneWayMesgServer and OneWayMesgClient. The instructions on how to run them are given in the README.txt file in each folder.To see the interaction, run OneWayMesgClient and OneWayMesgServer in two separate terminals. Type something on the terminal where OneWayMesgClient is running, and see that OneWayMesgServer prints out the message. Note that OneWayMesgServer and OneWayMesgClient use a specific port to communicate.Your task is to modify OneWayMesgServer to create TwoWayMesgServer that accepts user input and sends it to the TwoWayMesgClient, which is a modified version of OneWayMesgClient that prints the received message on the terminal.You can complete this assignment in ’c/c++’, ’java’, or ’python’ language. Your server and client program should run with the following (python as an example): Server> python TwoWayMesgServer.py portNumber serverName Client> python TwoWayMesgClient.py localhost portNumber clientName The TwoWayMesgServer and TwoWayMesgClient output should look like this: Server> Waiting for a client … Client> Connected to server at (’localhost’, ’50000’) Server> Connected to a client at (’127.0.0.1’, ’60681’) Client> Hello Server Server> clientName: Hello Server Server> Hello Client – Client> serverName: Hello ClientThat’s it. Sounds simple, doesn’t it? Indeed, for experienced programmers, this assignment is trivial. Others should find this as an easy way to get started on network programming. Don’t simply download the source code and compile the programs; but make sure that you understand how the sockets are created and the connection is established. Start early and seek as much help as needed from the TA and the instructor.Submission (1) Create a zip file containing the new TwoWayMesgServer and TwoWayMesgClient source files (2) Rename the zip file as YOURLASTNAME P1.zip (YOURLASTNAME in all caps) (3) Upload it in the BlackboardGrade Breakdown (1) 25%: You submitted your assignment on-time; and the new, modified files compile correctly. Zero points if the files do not compile or you upload the original files. (2) 75%: Both TwoWayMesgClient and TwoWayMesgServer can print each other’s messages.
School for Business and Society Module Code: MAN00018H Module Title: Decision and Information Ha Open/Closed Assessment: Open Maximum Word Count: 2,500 words Release Date: End of Week 4 Submission Deadline: 11:00:00am UK Time on 30th January 2025 Weighting: 80% Important information A penalty of five marks will be deducted for late submissions that are made within the first hour after the deadline. Submissions that are more than one hour late but within the first 24 hours of the deadline will incur a penalty of ten marks. After the first 24 hours have passed, ten marks will be deducted for every 24 hours (or part thereof) that the submission is late for a total of 5 days. After 5 days it is treated as a non-submission and given a mark of zero. The consequences of non-submission are serious and can include de-registration from the University. If you are unable to complete your open assessment by the submission date indicated above because of Exceptional Circumstances you can apply for an extension. If unforeseeable and exceptional circumstances do occur, you must seek support and provide evidence as soon as possible at the time of the occurrence. Applications must be made before the deadline to be considered. Full details of the Exceptional Circumstances Policy and claim form can be found here: https://www.york.ac.uk/students/studying/progress/exceptional-circumstances Page 1 of 8 If you submit your open assessment on time but feel that your performance has been affected by Exceptional Circumstances you may submit an Exceptional Circumstances Affecting Assessment claim form by 7 days from the published assessment submission deadline. If you do not submit by the deadline indicated without good reason your claim will not be considered. Please take proper precautions to safeguard your work and remember to make backup copies of your data. The University provides all its students with storage space on the University server and you should save and back up any work in progress on this server on a regular basis. Computer failure and theft of your equipment or storage media are not considered exceptional circumstances and extensions cannot be granted for work lost for these reasons Word count requirements The word count for this assignment is 2,500 words. You must state on the front of your assignment the number of words used and this will be checked. The main text for this assignment must be word-processed in Arial, font 12, double spacing, minimum 2 cm margins all around. You must observe the word count specified in this assignment brief. The School has a policy of accepting variations to the recommended word count of plus or minus 5%. What does this mean for you? Markers will mark your work up to the word count maximum plus 5% and then will stop marking; therefore all words which are in excess of the word count plus 5% will not be marked. Where your word count is more than 5% below that specified, it is likely that this will result in a lack of analytical depth or relevant content, which will be reflected in the mark assigned. What is in the word count? The word count includes: - the main text, including in-text reference citations and quotations. The word count does not include: -Appendices. These may be used to include supporting data, which may be too detailed or complex to include as a Table. They are not a device to Page 2 of 8 incorporate material, which would otherwise cause you to exceed the word limit. -Title page -Contents page -Abstract/executive summary -Tables, figures, legends -Reference lists -Acknowledgements Page 3 of 8 Assignment: Case Background A manufacturing company has the following areas of concern and has hired you as a Consultant to analyse them and write a technical report in order to help the manager make informed decisions. Area 1: Decision trees This company is considering expansion of its current capacity, the options are to build a small, a medium or a large plant. Of course, there is also the option of doing nothing. The new plant would introduce a new product and potential marketability of that product is relatively unknown, forecasts say it is 70% likely that the market will be unfavourable. If a large plant is built and a favourable market exists, a profit of £80,000 would be realised. However, an unfavourable market for this plant would yield a £30,000 loss. If a medium plant was built it would generate £40,000 profit within a favourable market, but a loss of £10,000 would result from unfavourable market. A small plant, on the other hand, would return £20,000 with favourable market conditions and lose £5,000 in an unfavourable market. There is an option to get hold on an updated forecast that could provide some key information for the decision. The manager knows, from previous experience, that the reliability of the updated forecast in relation to the original forecast, is as follows. Original forecast Updated forecast Favourable Unfavourable Favourable 0.50 0.50 Unfavourable 0.40 0.60 Area 2: Data mining Last month, the marketing department sent a mailing to 15,000 of the company’s existing customers with a special offer. The response was exciting: 5% of them responded, which brought in £15,000 in revenue. The manager is now considering continuing the program, with a budget of £10,000, which will allow the marketing department to target another 10,000 customers (out of your customer base of 50,000). The manager does not want to just target them randomly, as previously done. So, the idea is to classify the customers into two categories of responsive and non-responsive to this offer, and only target those from the responsive category. The manager has asked you to build two data mining models for the classification purpose, i.e., a tree model and a K-nearest Neighbours model. Therefore, you need to evaluate them before deciding which model is preferable. Page 4 of 8 Area 3: Linear Programming There are four different types of products made at the company: Sweet, Salty, Sour and Plain. In order to meet demand, the company needs to make at least 950 Kg. of Sweet, between 450 and 550 Kg. of Salty, no more than 300 Kg of Sour and no more than 400 Kg. of Plain. Each Kg. of the products contains 65%, 45%, 15%, 100% of Ingredient 1 with the remaining weight made of Ingredient 2. The company has 1000 Kg. of ingredient 1 and 800 Kg. of ingredient 2 for use next week. Each machine has 56 hours of time available next week. The following table shows the time required for each product on each machine: Machine Minutes required per Kg. Sweet Salty Sour Plain A 1 0.8 0.6 0.9 B 2 1.5 1 1.75 C 1 0.7 0.2 0 D 2.5 1.6 1.25 1 The financial manager has presented the following: Sweet Salty Sour Plain Total Sales Revenue 5000 2000 1000 1500 9500 Variable Costs Page 5 of 8 Direct materials 1200 550 150 300 2200 Direct labour 1000 440 100 120 1660 Manufacturing overhead 350 120 35 100 605 Selling and Administrative 550 200 60 150 960 Allocated fixed costs Manufacturing overhead 700 350 100 140 1290 Selling and Administrative 600 280 85 120 1085 Net Profit 600 60 470 570 1700 Units sold 2500 1400 800 1000 5700 Net Profit per Unit 0.24 0.04 0.59 0.57 0.30 Prior to conducting any analyses, you meet with the manager at the company to verify what are the aims and objectives of the project-report that you need to produce. Meeting with the manager The manager tells you that the report should be concerned with three equally important areas: Area 1: Decision trees. The manager wants you to provide a structured approach and a graphical representation to explain the expansion problem, Page 6 of 8 first with the original forecast to calculate the expected monetary values for each option, and to provide recommendations based on your analysis. Second, the manager wants you to consider the updated forecast information and to help them decide what is the value of the imperfect information. Finally, to recommend a course of action. Area 2: Data mining. The manager wants you to present and describe the confusion matrix and explain how you will fill it out for one of the models. Then, present and describe the cost/benefit matrix for this case. Also, justify why these matrices are important for evaluating data mining models. Next, show the evaluation function you will use to compare the models. Finally, discuss how the confusion and cost/benefit matrices come into play in this evaluation function. Area 3: Linear Programming. The manager wants you to conduct a thorough Linear Programming analysis including sensitivity analysis using a spreadsheet modelling software such as MS Excel Solver. The manager wants to know in particular: (a) What is the optimal production of each type of product they should make in order to increase net profit per unit and (b) Explain the meaning of the shadow price results for two results in the sensitivity report. Report Presentation The manager wants you to write a report to support your analyses and findings. Your report to the manager should be structured to include the following points: 1. Brief introduction. This should detail the purpose and structure of the report. 2. Research Strategy. This section should include but not be limited to, the following for each area of the project: a. plan, outline and justification of the modelling method used b. implementation issues (e.g. modelling assumptions) 3. Data analysis. This section should include but not be limited to, the following discussions for each area: a. relevant graphical and/or tabular output b. description of concerns raised with the data and the models used c. description of how you determined the types of model(s) to use 4. Discussion of the results. This section should include but not be limited to, the following for each area: a. summary presentations of the findings from your analyses b. the benefits/downsides of using your selected models for this case study c. any insights or suggestions based on your findings Page 7 of 8 5. References: provide some evidence of reading, all referencing must be in Harvard format (look beyond the module notes) 6. Appendices (only required if necessary). Summarise your work, using selected MS Excel output, in a word-processed report with all appropriate results and analyses. Note: you should only include important output such as charts, graphs and tabular data that support or enhance your report. You should not include all output generated; you must be selective. Summarising output in your own tabular format is acceptable. Your report should be no more than 2500 words; this limit excludes tables, figures, captions, table of contents, references and appendices. Beyond this, if you are not sure then assume it is included in the word limit. Your report should be written using size 12 Arial font, justified and use double line spacing (this lends itself to easier reading). Divide your report into sections with clear headings (use the format described in points 1-6), summarise key points up front. You should provide a clear report title. Pay attention to the professional appearance and use of language. Do not use ‘clip art’ or fancy fonts and page borders. Figures and tables should be legible, correctly titled and include a caption. Avoid the use of footnotes and tabloid style presentation. Show correct use of grammar with no spelling errors. Use appendices only if necessary and choose to use them for their relevance and not as a continuation of the debate (or they will be included as part of the word count). The style of the report should be appropriate to a management report and NOT like an essay.
Homework 1: P-MachineCOP 3402: Systems SoftwareSpring 2025See Webcourses for due dates. PurposeIn this homework you will form a team and implement a virtual machine called the P-machine.Teams must be either 1 person team or 2 people team.Directions(100 points) Implement and submit the P-machine as described in the rest of this document. For the implementation, your code must be written in ANSI standard C and must compile with gcc and run correctly on Eustis. We recommend using the flag -Wall and fixing all warnings.What to ReadOur recommended book is Systems Software: Essential Concepts (by Montagne) in which we recommend reading chapters 1-3. In this assignment, you will implement a virtual machine (VM) known as the P-machine (PM/0). P-Machine ArchitectureThe P-machine is a stack machine that conceptually has one memory area called the process address space (PAS). The process address space is divided into three contiguous segments: The first 10 locations, called “unused”, the “text”, which contains the instructions for the VM to execute and the “stack,” which is organized as a data-stack to be used by the PM/0 CPU.RegistersThe PM/0 has a few built-in registers used for its execution: The registers are named:• base pointer (BP), which points to the base of the current activation record• stack pointer (SP), which points to the current top of the stack. The stack grows downwards., • program counter (PC), which points to the next instruction to be executed.• Instruction Register (IR), which store the instruction to be executedThe use of these registers will be explained in detail below. The stack grows downwards.Instruction FormatThe Instruction Set Architecture (ISA) of the PM/0 hasinstructions that each have three components, which are integers (i.e., they have the C type int) named as follows.OPis the operation code. Lindicates the lexicographical level (We will give more details on L below)Mdepending of the operators it indicates:- A number (when OP is LIT or INC).- A program address (when OP is JMP, JPC, or CAL).- A data address (when OP is LOD, STO)- The identity of the arithmetic/relational operation associated to the OPR op-code. (e.g. OPR 0 2 (ADD) or OPR 0 4 (MUL)) The list of instructions for the ISA can be found in Appendix A and B.P-Machine CyclesThe PM/0 instruction cycle conceptually does the following for each instruction: The PM/0 instruction cycle is carried out in two steps. The first step is the fetch cycle, where the instruction pointed to by the program counter (PC) is fetched from the “text” segment, placed in the instruction register (IR) and the PC is incremented to point to the next instruction in the code list. In the second stepthe instruction in the IR is executed using the “stack” segment. (This does not mean that the instruction is stored in the “stack segment.”)Fetch Cycle:1.- IR.OP ß pas[pc]IR.L ß pas[pc + 1] IR.M ß pas[pc + 2](note that each instruction need 3 entries in array “TEXT”. 2.- (PCß PC + 3). Execute Cycle:The op-code (OP) component in the IR register (IR.OP) indicates the operation to be executed. For example, if IRencodes the instruction “2 0 2”, then the machine adds the top two elements of the stack, popping them off the stack in the process, and stores the result in the top of the stack (so in the end sp is one less than it was at the start). Note that arithmetic overflows and underflows happen as in C int arithmetic. PM/0 initial/Default ValuesWhen the PM/0 starts execution. BP == 499, SP == 500, and PC == 10; This means that execution starts with the “text segment” element 10. Similarly, the initial “stack” segment values are all zero (BP=499 and SP = BP + 1). The figure bellow illustrates the process address space: Last instruction BP SP 0 10 PAS UNUSED TEXT OP L M STACK ??? 499 500 PC Size Limits Initial values for PM/0 CPU registers are:BP = 499 SP = BP + 1; PC = 10;Initial process address space values are all zero: pas[0] =0, pas[1] =0, pas[3] =0…..[n-1] = 0. Constant Values:ARRAY_SIZE is 500 Note: Be aware that in PM/0 the stack is growing downwardsAssignment Instructions and Guidelines: 1. The VM must be written in C and must run on Eustis3. If it runs in your PC but not on Eustis, for us it does not run.2. The input file name should be read as a command line argument at runtime, for example: $ ./a.out input.txt (A deduction of 5 points will be applied to submissions that do not implement this).3. Program output should be printed to the screen, and should follow the formatting of the example in Appendix C. A deduction of 5 points will be applied to submissions that do not implement this.4. Submit to Webcourses:a) A readme text file indicating how to compile and run the VMb) The source code of your PM/0 VM which should be named “vm.c”c) A signed sheet indicating the contribution of each team member to the project.d) Student names should be written in the header comment of each source code file, in the readme, and in the comments of the submissione) Do not change the ISA. Do not add instructions or combine instructions. Do not change the format of the input. If you do so, your grade will be zero.f) Include comments in your program. If you do not comments, your grade will be zero.g) Do not implement each VM instruction with a function. If you do, a penalty of -100 will be applied to your grade. You should only have functions: main, base, auxiliary functions to print but you must not use functions to implement instructions or FETCH. (Appendix D).h) The team member(s) must be the same for all projects. In case of problems within the team. The team will be split and each member must continue working as a one-member team for all other projects.i) On late submissions:o One day late 10% off.o Two days late 20% off.o Submissions will not be accepted after two days.o Resubmissions are not accepted after two days.o Your latest submission is the one that will be graded. We will be using a bash script to test your programs. This means your program should follow the output guidelines listed (see Appendix C for an example). You don’t need to be concerned about whitespace beyond newline characters. We use diff -w. Rubric:If you submit a program from another semester or we detect plagiarism your grade is F for this course. Using functions to implement instructions even if only one is implemented that way, means that your grade will be “zero”.Pointers and handling of dynamic data structures is not allowed. If you do your grade is “zero”. Only file pointer is allowed.-100 – Does not compile10 – Compiles25 – Produces lines of meaningful execution before segfaulting or looping infinitely5 – Follows IO specifications (takes command line argument for input file name and prints output to console)10 – README.txt containing author names5 – Fetch cycle is implemented correctly10 – Well commented source code5 – Arithmetic instructions are implemented correctly5 – Read and write instructions are implemented correctly10 – Load and store instructions are implemented correctly10 – Call and return instructions are implemented correctly5 – Follows formatting guidelines correctly, source code is named vm.cAppendix A Instruction Set Architecture (ISA) – (eventually we will use “stack” to refer to the stack segment in PAS) In the following tables, italicized names (such as p) are meta-variables that refer to integers. If an instruction’s field is notated as “-“, then its value does not matter (we use 0 as a placeholder for such values in examples). ISA:01 – LIT0, MPushes a constant value (literal) M onto the stack 02 – OPR0, MOperation to be performed on the data at the top of the stack. (orreturn from function) 03 – LODL, MLoad value to top of stack from the stack location at offset M from L lexicographical levels down04 – STOL, MStore value at top of stack in the stack location at offset M from L lexicographical levels down 05 – CALL, MCall procedure at code index M (generates new Activation Record and PC ß M) 06 – INC0, MAllocate M memory words (increment SP by M). First threeare reserved to Static Link (SL), Dynamic Link (DL), and Return Address (RA) 07 – JMP0, MJump to instruction M (PC ßM) 08 – JPC 0, MJump to instruction M if top stack element is 0 09 – SYS 0, 1Write the top stack element to the screen SYS 0, 2Read in input from the user and store it on top of the stack SYS 0, 3End of program (Set “eop” flag to zero) OP Code Number OP Mnemonic L M Comment (Explanation)01 LIT 0 n Literal push: sp ß sp- 1; pas[sp] ßn 02 RTN 0 0 Returns from a subroutine is encoded 0 0 0 and restores the caller’s AR:sp ← bp + 1; bp ← pas[sp - 2]; pc ← pas[sp -3];03 LOD n a Load value to top of stack from the stack location at offset o from n lexicographical levels downsp ß sp - 1;pas[sp] ß pas[base(bp, n) - o];04 STO n o Store value at top of stack in the stack location at offset o from n lexicographical levels downpas[base(bp, n) - o] ß pas[sp];sp = sp +1;05 CAL n a Call the procedure at code address a, generating a new activation record and setting PC to a:pas[sp - 1] ß base(bp, n); /* static link (SL)pas[sp - 2] ß bp;/* dynamic link (DL)pas[sp - 3] ß pc; /*return address (RA)bp ß sp - 1;pc ß a;06 INC 0 n Allocate n locals on the stacksp ß sp - n;07 JMP 0 a Jump to address a:PC ← a08 JPC 0 a Jump conditionally: if the value in stack[sp] is 0, then jump to a and pop the stack:if (stack[SP] == 0) then { pc (← a; } sp ← sp+109 SYS 0 1 Output of the value in stack[SP] to standard output as a character and pop:putc(stack[sp]); sp ← sp+1(You can use printf if you wish) SYS 0 2 Read an integer, as character value, from standard input (stdin) and store it on the top of the stack.sp ← sp-1; stack[sp] ← getc(); (You can use fscanf if you wish) SYS 0 3 Halt the program (Set “eop” flag to zero) Appendix B (Arithmetic/Logical Instructions) ISA Pseudo Code 02 – OPR 0, #(1
Tutorial EG501V Computational Fluid Dynamics (AY 2023/24) Tutorial 3. Discretization: start-up flow in a thin fluid layer In Lecture Notes 2 & Tutorial 2 we derived a parabolic PDE for the flow between two parallel plates. Initially both plates and the fluid between them are at rest. At time equal zero the upper plate starts moving with a constant velocity u0 , see the figure. The PDE reads (Eq. 2.2 in Lecture Notes 2) with ux the flow velocity in x-direction that depends on they-location and time t; ν = μρ is the kinematic viscosity of the fluid and is a constant. In Lecture Notes 3 it was shown how to discretize a parabolic PDE (there in temperature T) and to eventually come up with an update rule (Eq. 3.5) that describes how to determine the situation at a new time instant (j+1) if the situation at the old time instant (j) is known. Your assignment (1) Follow the same procedure as in Lecture Notes 3 to derive an update rule for the velocity ux at time instant j+1 ( ux ,i ,j+1 where the index i stands for they-location in the fluid film). (2) Consider the specific situation where L=5 mm, u0 =1 m/s, and ν =10-6 m2/s. Discretize y such that △y =1 mm (i.e. divide the distance L in five equal portions) and take time steps of △t =0.1 s. Determine the velocity in the fluid layer after one and two time steps (i.e. at t=0.1 s and t=0.2 s).
FN3142 QUANTITATIVE FINANCE PRELIMINARY EXAM 2018 Question 1 a) When do we say that one forecast encompasses" another? 30 marks b) Describe a test for forecast encompassing. 40 marks c) What null hypotheses would you test to analyse forecast encompassing when there are 3 competing forecasts rather than 2? 30 marks Question 2 a) Describe using an example what is collective data snooping. 25 marks b) Describe using an example what is individual data snooping. 25 marks c) Discuss the differences between collective data snooping and individual data snooping. 25 marks d) Give two counterexamples to the claim that prices should follow a random walk in an efficient market. 25 marks Question 3 For VaR calculations at 5% critical level consider using a historical simulation method and a GARCH method for forecasting volatility. After building the so called hit variables the following regressions are run, where the numbers in parentheses are standard errors for the parameter estimates: a) Describe how the above regression output can be used to test the accuracy of the VaR forecasts from these two models. 30 marks b) Based on the above tests what conclusions can you draw. 20 marks c) Define the violation ratio related to unconditional coverage tests for VaR forecasts. 20 marks d) If the population violation ratio is defined as VR0 ≡ E[VR], show that testing VR0 = 1 is exactly equivalent to testing E[Hitt] = α. 30 marks Question 4 a) Define “white noise”. 20 marks b) What is iid white noise? 20 marks c) What additional conditions do you need to add such that a white noise Gaussian? 20 marks d) If {Yt}t≥0 is an AR(1) process, calculate the unconditional variance of Yt. 20 marks e) For the AR(1) process from part (d) calculate the R2 measure and give an interpretation of the result. 20 marks
Math 3100/5100 - Written Homework 3 Due: Thursday, January 30 at 11:59 pm on Gradescope Complete the following problems worth 35 total points. You must show all work and include justifications to receive full credit. When submitting your work on Gradescope, please double check that your scans/images are clear and that you matched each problem with the correct page(s) of your work when prompted. 1. (4 points) To show that the set A of odd numbers is countable, we considered in class the function f : N → A such that f (k) = 2k − 1. Prove that f is a bijection. 2. (4 points) To show that the set of integers Z is countable, we considered in class the function f : N → Z such that Prove that f is a bijection. 3. (5 points) Definition. Let Λ be a nonempty set and suppose that for each α ∈ Λ, there is a correspond- ing set Aα . The family of sets {Aα | α ∈ Λ} is called an indexed family of sets indexed by Λ . Each α ∈ Λ is called an index and Λ is called an indexing set. Let Λ be a nonempty subset of N. Let {Aα }α ∈Λ be an indexed family of countable sets. Prove that ∪α ∈ΛAα is a countable set. (Hint: Since each Aα is countable, there is an injection gα : Aα → N. Define f : ∪α ∈ΛAα → N×Nby f(x) = (gα0 (x), α0), where α0 is the smallest natural number of Λ such that x ∈ Aα0 . Show that f is injective). 4. (4 points) Let a, b, candd be any real numbers such that a < band c < d. Show that [a, b] and [c.d] have the same cardinality. 5. (4 points) Show that (0, 1] and [0, 1] have the same cardinality. 6. (4 points) Let P and Q be infinite sets. Prove that iff : Q → P is a bijection then Q is uncountable if and only ifP is uncountable. Do not use proof by contradiction. 7. Recall that a sequence a = {ak} ∞ k=1 of numbers is an infinite list a = (a1 , a2 , a3, a4 , ...) where each element akis a number. Let S be the set of sequences whose elements are either 0 or 1, in other words, For example, the following sequences are elements of the set S: a = (0, 0, 0, 0, 0, 0, ...) ∈ S b = (0, 1, 0, 1, 0, 1, ...) ∈ S c = (0, 0, 1, 1, 0, 0, ...) ∈ S d = (1, 1, 1, 1, 1, 1, ...) ∈ S (a) (3 points) Give two non-trivial examples of functions from N to S. (b) (4 points) Consider the function f : S → P(N) defined as f (a) = {k ∈ N | ak = 1} where P(N) is the power set of N. Hence,f takes a sequence a ∈ S and outputs the indices where a is equal to 1. For example: f (0, 0, 0, 0, 0, 0, 0, 0, ...) = 0/ f (1, 0, 1, 0, 1, 0, 1, 0, ...) = {1, 3, 5, 7, ...} f (0, 0, 1, 1, 0, 0, 0, 0, ...) = {3, 4} f (1, 1, 1, 1, 1, 1, 1, 1, ...) = {1, 2, 3, 4, 5, 6, ....} = N Prove that f : S → N is a bijection. (c) (3 points) Combine part (b), Problem 6 and Cantor’s theorem to thoroughly explain whether S is countable or uncountable. 8. (BONUS, 5 points) Prove the following generalization of the result of Problem 3: if Λ is a countable set, and {Aα }α ∈Λ is an indexed family of countable sets, then ∪α ∈ΛAα is a countable set.
Database Architecture & Design 4.2 (2025) Assignment 1 - Transaction Management “A Transaction is a group of SQL statements that you combine into a single logical unit of work. ” You must design and implement a Relational Database, based on a topic of your own choosing to demonstrate Transaction Management in MySQL. The database must have a minimum of 3 tables. You must implement at least 3 different SQL Transactions to show your understanding of Transaction Management. You must also write a 1000-word report explaining the ACID principles in relation to Transaction Management and explaining how your transactions adhere to the principles. Your report should also include a Transaction State Diagram, using your Transactions to illustrate the stages. Finally, you must create a ScreenCast (max 7 minutes) explaining in detail your Transaction Management solution and showing a demonstration of your Stored Procedures working. Deliverables • SQL file containing all the code to create your database, create tables, populate with sample data (minimum of 10 records) and stored procedure code. • 1000-word report • Screencast
1 Part 1: Optimising a Rasterizer (40 marks) This section carries a total of 40 marks. The goal of this part of assignment is to enhance your understanding of games rendering pipelines by optimising a given rasterizer via any optimisation you see fit and culminating with using multithreading in C++. You will measure performance improvements and test your solutions on provided scenes and a custom one of your own creation. You will be provided with a base rasterizer implemented in C++. This code already includes the following: · Geometrical transformations (translation, scaling, rotation, perspective transformation etc.). · Basic rasterization logic to render triangles (including interpolation of normals, depth etc.) · Basic lighting model Your first task is to thoroughly understand the base code. We will refer to this version as the base rasterizer. Optimisation Your first task is to optimise the base code as you see fit. For each optimisation you include, explain why and how you completed that task. Provide the results of your optimisations when compared to the base rasterizer for the 3 scenes (see below). When providing comparisons you can group your optimisations together, for example, you could optimise all the matrix and vector calculations and group them into one group entitled transformation optimisations. When doing the comparisons make sure that you are using a release version of the code and keep the same settings. Please report on the settings and present these as a screenshot in the report. Multithreading Your second task is to add multithreading to your code via the use of C++ std::thread library. Your task is to try and achieve the best speedup for the given number of threads on your Warwick-issued machine (up to 11 threads; although you can show results for 22 threads with the use of hyperthreading). The behaviour of the multithreaded version must correspond that that of the base rasterizer. You are permitted to present more than one way of dividing the tasks for parallelism and provide results for all your solutions. Provide a detailed description of your solution and how your tasks are broken down and how the solution avoids any race conditions. Provide comparisons with base rasterizer for the three scenes. You should provide overall results which include the optimisations from a) also. Results can be presented in multiple ways but a speedup graph is required for each scene. Scene Testing Two pre-designed scenes will be provided and the code will be available for these: · Scene 1: Provided. · Scene 2: Provided. · Scene 3: Develop your own scene which showcases different parallel issues and optimisations. Basic primitives are sufficient for this scene. Explain your choice of scene in the report. Evaluate your implementation's performance on these scenes and compare it with the base rasterizer. 2 Report (25 marks) The report carries a total of 25 marks. It should be broken down cleanly split into two parts, one for Part 1 and one for Part 2. For Part 1, include: Section 1: an overall introduction about what has been achieved in the overall. Section 2: a detailed description of each optimisation in sub sections with performance results. Show code for the optimisation and where in the code it was changed. Section 3: a detailed description of the parallel strategy(ies) employed and performance results. Use sub-sections for the different strategies. Section 4: Conclusion based on outcomes and future work given more time.
CEGE0030 - ROADS AND UNDERGROUND INFRASTRUCTURES Academic year: 2024-25 Assignment: Coursework on Roads Weight: 20% Deadline: 7th of February 2025, 2:00 pm Type of submission: Electronic copy (in Turnitin, Moodle). Only one student per group submits. Type of assignment: groups of 3 students Word count limit: 2,500 words excluding reference list, tables, graphs and figures, and appendices Brief: The objective of this project is to design a new road in the area of Sheffield, alignmening with infrastructure development priorities in the Midlands and Northern England. The road connects two villages and comprises two lanes (one per direction), with a total daily average traffic flow of 9,500 vehicles (70/30% split). The traffic study indicates that 35% of vehicles are heavy, with each tupically having three axles. The road’s design life is set at 40 years. The chosen cross-section is on a straight reach of the road (no curvature in the plan view), and the alignment raises the road elevation by 1.2 m above the natural ground level. Materials and Geotechnical Conditions • Natural Ground: Moderate plastic clay (CH), with: o California Bearing Ratio (CBR): 5% o Maximum Dry Density (Proctor Test): 1620 kg/m³ (15% water content) o Bulk Gravity: 2670 kg/m³ o Natural Water Content: 25% • Local Material Availability: 1. Poorly Graded Sand (SP) (3 km away): o CBR: 27% o Optimum Dry Density: 1950 kg/m³ (10% water content) o Bulk Gravity: 2650 kg/m³ o Natural Water Content: 8% o Suitable for subgrade but not as base or subbase. 2. Well-Graded Gravel with some fines (GW) (15 km away): o CBR: 85% o Optimum Dry Density: 2100 kg/m³ (7.5% water content) o Bulk Gravity: 2650 kg/m³ o Natural Water Content: 6% o Suitable for subbase but not as a base layer. • Cross-Section Details o Lane Width: 3.8 m per lane. o Shoulder Width: 1.5 m each side. o Pavement Lateral slope: 1:1.2. o Embankment Laterail Slope: 1:1.5 (V:H). o The pavement layers are homogeneous across the full cross-section, including the shoulders. Required Tasks 1. Pavement Design Use the classical CBR methodology to design a flexible pavement solution. Specify the materials selected for: • Subgrade • Subbase (if needed) • Base • Surface layers Include across-sectional engineering plot with descriptions of materials, sizes, and units. Justify your solution and why this better than other options, based on cost effectiveness, construction procedures, environmental aspects, etc. 2. Embankment Analysis Assume: • All layers are compacted to 95% of their optimum dry density. • The phreatic level aligns with the current natural soil level. • Embankment water content is initially at its natural level. Determine: • Final void ratio, dry density, and density with moisture for the embankment material. • Effective vertical normal stress at the subgrade level. • Elastic settlement of the natural soil due to embankment and pavement weight. 3. Rainfall Impact Analysis Assume: • Lateral drainage is blocked. • Longitudinal road slope is null. • Rainfall intensity equals the average daily rate for Sheffield over three consecutive days (source:Met Office). Evaluate: whether the water level will reach the subgrade and recalculate effective normal stresses after the rainfall. Updated Costs of the materials The following costs reflect current UK market rates (as of January 2025): 1. Transport of Embankment Material: £2.0/m³ per km. 2. Compaction (to 95% Modified Proctor): £65/m³ . 3. Hydraulically Bound Layers: £90/m³ (final density: 2400 kg/m³). 4. Granular Material for Base: £60/m³ (final density: 1950 kg/m³; CBR: 90%). 5. Granular Material for Subbase: £40/m³ (final density: 1750 kg/m³; CBR: 55%). 6. Asphalt Concrete: £135/m³ (final density: 2500 kg/m³). For additional costs are needed, include sources and justification. References Provide all sources used for calculations, material costs, and rainfall data in your report. Note: Ensure all assumptions are justified, and calculations are clearly presented for full transparency and credit allocation. Use of Generative AI: The use of Generative AI (GenAI) is permitted for the review and improvement of the style of your report. However, it should not be used for performing calculations or generating results. Ensure that all calculations and results are your own work. Figure 1. Compaction curves (PM) for the three possible subgrades
Department of Electrical Engineering and Electronics ELEC373 Digital Systems Design Assignments 1 and 2 Random Number Generator Module ELEC373 Coursework name Assignment 1 and Assignment 2 Component weight Assignment 1 = 15%, Assignment 2 = 25% Semester 1 HE Level 6 Lab location PC labs 301, 304 as timetabled, at other times for private study Work Individually Timetabled time 12 hours (3 hours per week - Wednesday 2pm - 5pm) Suggested private study 10 hours including report writing Assessment method Individual, formal word-processed reports (Block diagrams and ASMs can be hand drawn and scanned into the report) Submission format Online via CANVAS Submission deadline Assignment 1: 23:59 on Sunday 17th November 2024 Assignment 2: 23:59 on Sunday 9th February 2025 Late submission Standard university penalty applies Resit opportunity August resit period (if total module failed) Marking policy Marked and moderated independently Anonymous marking Yes Feedback Via comments on CANVAS Learning outcomes LO1: Ability to design digital systems using the ASM design method LO2: Ability to implement digital systems using the Verilog Hardware Description Language ELEC 373 Verilog Assignments 1 & 2 (2024-2025) Assignment Overview These assignments have been set to get you familiar with designing digital systems and synthesising them from a Verilog description. You should develop your design using Altera’s Quartus II V13.0-SP1. The first assignment is for you to undertake the first two stages of the design process i.e. the conceptual design, communicated by block diagrams, and the embodiment design communicated by ASM charts. You will also be coding some blocks in Verilog and simulating them to prove they function correctly. The second assignment will require you to develop the full system in Verilog to prove that it works, although you can use a “bdf” file to connect your blocks together. You will be allowed to modify your design based on the feedback from the first assignment. You will test your design on a DE2 board in the EEE Department. Assignments Outline Many games of chance require a random number as input, be it from the throw of a dice or a ball on a roulette wheel. Your objective is to develop a design which will display random decimal numbers on the 7 segment displays of the DE2 board. For this example we will use the numbers as our selection for the national lottery where the choice of numbers starts at 1 and goes up to the last two digits of your University ID (add 20 to this number if the last two digits of your number are less than 30). Your system operation should be as follows: 1. The operator presses KEYV to start the sequence. 2. The operator then presses KEYW and the first number is displayed on HEXX for Y seconds. 3. The system then starts counting again and the operator repeats stage 2. However, note that a number previously selected can’t be selected again. 4. The process is repeated until the number of numbers selected is equal to Z1. Remember that you should be careful about how you handle asynchronous inputs. Report - Assignment 1 Your report should include the following. 1. Description of Architecture(s) and Controller(s) (with block diagrams showing interconnections). 2. ASM Charts for all Algorithmic State Machines. (1 page per ASM) 3. Commented Verilog code for each module for the Seven Segment Decoder and any counters you have in your design. 4. Full simulations of the Seven Segment Decoder and any counters you have in your design, with annotations indicating what the simulation proves. 5. Photographs of the 7 segment decoders working. 6. Discussion and Conclusions about the design choices made. You should also submit your design and report via CANVAS. Make sure all the files need to compile, simulate and test the modules under Quartus 13.0SP1 are included in a single zip file. The report should be attached as a separate Word file. You should structure your report about each module, i.e. include ASM, then, where appropriate, Verilog code, then simulation results consecutively for each module rather than grouping all the ASMs together. All pages should be at the correct orientation for reading on a monitor. Report - Assignment 2 Your report should include the following. 1. Description of Architecture(s) and Controller(s) (with block diagrams showing interconnections). 2. ASM Charts for all Algorithmic State Machines. (1 page per ASM) 3. Commented Verilog code for each module. 4. Full simulations for each module you have in your design, with annotations indicating what the simulation proves. 5. RTL Schematic of the full system. 6. Simulation of the full system. (With annotations and maximum ½ page on any comments) 7. Photographs of the system in operation. 8. Explanation of experimental test results. (Max 1 page) Is it truly random? 9. Conclusion (Maximum ½ page) 10. Signed demonstrators check sheet if you design has been checked You should also submit your design and report via CANVAS. Make sure all the files need to compile, simulate and test the design under Quartus 13.0SP1 are included in a single zip file. The report should be attached as a separate Word file. You should structure your report about each module, i.e. include ASM, then Verilog code, then simulation results consecutively for each module rather than grouping all the ASMs together. All pages should be at the correct orientation for reading on a monitor. Warning When marking the reports I will be looking very closely for any signs of collusion, as this is unacceptable. I need to assess your own ability not that of your friend or colleague. If I find any evidence of collusion then the formal University rules will be followed which may result in your suspension. Assignment 1 Submission Deadline You only need to submit an Electronic copy: Sunday 17th November 2024 @ 11:59pm. You also need to submit a ZIP file of your modules by the same date and time. Assignment 2 Submission Deadline You only need to submit an Electronic copy: Sunday 9th February 2025 @ 11:59pm. You also need to submit a ZIP file of your modules by the same date and time. Hint The challenging part to this assignment is preventing duplicate numbers being generated. However, you will get more marks for a working system that does generate duplicate numbers than for one that fails to work whilst attempting to eliminate duplicate numbers.
SAMPLE FINAL EXAM – ECONOMICS FOR BUSINESS 2 The exam will be marked out of 100 marks. This exam is worth 60% of the overall subject assessment. This exam contains two sections. You must answer all questions in Sections A and B SECTION A [60 marks] • 6 short answer questions. Each question is worth 10 marks. • Write your answers as clearly as possible. • Clearly label each question that you are answering SECTION B [40 marks] • 2 case study question. Each question is worth 20 marks. • Write your answers as clearly as possible. • Clearly label each question that you are answering INSTRUCTIONS Time Allowed: 120 minutes. This is a closed book examination. No uploading of files. Non-programmable scientific calculators are permitted. You may write your answers on paper before typing them in the text box provided for your answer. You are allowed blank working paper. If asked show both sides of this paper to the camera before you start your exam. Question 1 Mars Limited produces and sells boxes in a perfectly competitive market at a price of $20. The total cost (in dollars) of producing Q boxes per day is given by the following cost function: C(Q) = 30 + 10Q + Q2 1.1. Find the profit maximising output. [2 marks] 1.2. Find the total cost (TC) and total variable cost (TVC) of the firm at this output calculated in sub-question (1). [2 marks] 1.3. Find average variable cost (AVC) and average total cost (ATC) of the firm at this output calculated in sub-question (1). [2 marks] 1.4. Find the profit of the firm at this output calculated in sub-question (1). [2 marks] 1.5. Will this firm shut down in the short run? Will this firm exit in the long run? [2 marks] Question 2 Use the information in the following table, which summarizes the payoffs (i.e., profit) of two firms that must decide between an average-quality and a high quality product, to answer the questions that follow: Firm 2 Average quality High quality Firm 1 Average quality 700,700 500,1200 High quality 1200,500 1000,1000 2.1. What is each player’s dominant strategy? Explain your reasoning.. [2 marks] 2.2. Is there a Nash equilibrium? If so, what is it? [2 marks] 2.3. Is this an example of a prisoner’s dilemma game? [2 marks] 2.4. Differentiate between cooperative and non-cooperative oligopoly. [2 marks] 2.5. Discuss the major characteristics of oligopoly. [2 marks] Question 3 Sigma Limited produces and sells organic apples in a perfectly competitive market at a price of $5 per kilo. Sigma Limited hires its labour in a perfectly competitive labour market at an hourly wage of $20. The production function of the firm is given by: Q(L) = 100L - 4L2 3.1. Compute the marginal product of labour (Hint: The answer must be a function of L). [2 marks] 3.2. Does the marginal product increase or decrease when we hire more labour? Explain the economic reason for such behaviour of the marginal product of labour. [2 marks] 3.3. Compute the value of the marginal product of labour. [2 marks] 3.4. What quantity of labour will this firm choose to hire and why? [2 marks] 3.5. Without calculation, if the price of apples increases, what will happen to the labour demand curve? [2 marks] Question 4 Assume an economy is in a recession where real GDP is below the potential output. 4.1. Discuss how the government could use fiscal policy to deal with the recession. [2 marks] 4.2. Discuss how the Reserve Bank of Australia (RBA) could use monetary policy to deal with the recession. [2 marks] 4.3. Explain the effect on aggregate expenditure (AE) curve when we use fiscal policy and monetary policy in sub-question (1) and (2). [2 marks] 4.4. The consumption function is C = 8,000 + 0.8Y, estimate the multiplier in this economy. [2 marks] 4.5. Explain how real GDP and the price level will adjust in the long run according to Classical economics without government and RBA intervention. [2 marks] Question 5 Suppose that a country’s production is described by the following production function Y = A K0.2 L0.8 5.1. Calculate the country’s GDP and GDP per capita if A = 10, K=40, and L=30. What will happen to the production level if both K and L doubles? What is the economic interpretation of your results? [2 marks] 5.2. Calculate marginal product of labour (MPL) and marginal product of capital (MPK). State the relationship between L and MPL. State the relationship between K and MPK. Discuss the economic interpretation of your answer. [2 marks] 5.3. Calculate the country’s GDP, GDP per capita, MPL and MPK if A = 10, K=30, and L=80. Discuss the economic interpretation of your answer. [2 marks] 5.4. What can government do to raise productivity and living standards? [2 marks] 5.5. If China has a growth rate of 7% per annum, how long does it take to double its GDP? [2 marks] Question 6 Illustrate the effects of the following three scenarios on both the short-run and long-run Phillips curves (either shift and its direction or movement). 6.1. A reduction in the natural rate of unemployment. [2 marks] 6.2. An increase in the price of imported oil. [2 marks] 6.3. A reduction in government spending. [2 marks] 6.4. Suppose the government reduces taxes by $100 million, that there is no crowding-out effect, and that the marginal propensity to consume is 0.8. What is the total effect of the tax cut on aggregate demand? [2 marks] 6.5. Suppose the government increases government spending by $100 million, that there is no crowding-out effect, and that the marginal propensity to consume is 0.8. What is the total effect of the increase in government purchases on aggregate demand? [2 marks] PART B Question 7 (20 marks) Read the article titled " Cyclone Debbie leaves a sour taste for sugar cane growers" and answer the following questions Cyclone Debbie leaves a sour taste for sugar cane growers. Cyclone Debbie crossed the coast near the Whitsunday islands in March 28, 2017 and tore a path from Bowen in QLD down to Northern New South Wales bringing 260 kph winds, torrential rains and flooding. The storm caused a total of $3.5 billion in damage. The cost to Queensland’s sugar industry, in destroyed cane infrastructure and equipment was $250 million. Cane growers Queensland chairman Paul Schembri said 125,000ha of cane farms from Bowen to south of Mackay were severely damaged. Sugar production volume loss on average was 20 to 25% from the three regions of Burdekin, Proserpine and Mackay that produce 50% of Australia’s national sugar cane crop. The losses would also far exceed that for many individual cane farms in the most severely affected locations. The cyclone disrupted production methods. Most sugar cane is mechanically harvested whilst still green and the canes are standing upright. However, the cyclone winds caused damage to farm structures and bent and flattened the canes. Torrential rains then flooded the fields and farm tracks with debris. Sprawled crops make mechanical harvesting difficult. After the damaged cane dries out and fine weather returns, the green leaves at the top turn toward the sun to try to stand up again but the cane stick itself often remains flattened and bent on the ground. There is a risk of damage to mechanical harvesters from cane in that condition and excessive leaf and other unseen debris in the fields. The smaller crop yields less tonnes to spread costs over and even where mechanical harvesters can still be used, the excessive leaf and other debris in the fields slows harvesting time down, increasing costs further. Many cane growers resorted to burning the flattened cane in the fields of excess leaf and debris, to salvage some harvest, a method not used for decades. This is a more labour intensive method of harvesting. Cyclone Debbie’s timing was not good for sugar cane growers. The cane was nowhere near its traditional harvest time (December) so couldn’t be harvested early. The best some farmers hoped for was that the cane ‘would straighten itself up’ . In addition, the global sugar price had been above US $22 cents in 2016 but had fallen to between U.S. $12 cents and U.S. $13 cents per pound by August 2017, after trader realisations that a global surplus was emerging. One bank analyst linked sugar prices to the oil price, which had been under downward pressure for two years. This then put pressure on the ethanol price in Brazil, forcing Brazilian sugar mills to reduce ethanol production and increase sugar production. Good weather also prevailed in South East Asian cane growing nations contributing to the emerging global surplus. The price fall was further exaggerated by speculators who were selling on the market. Some cane growers may not have suffered the price fall as badly as others if they had secured earlier more favourable forward pricing contracts over their crop. Australian cane growers claimed that the price was approaching “cost of production” even without the cleanup and damage costs caused by Cyclone Debbie. Growers were forced to search hard for cost cuts such as reducing the nutrient or irrigation or maintenance inputs despite knowing such cuts would impair next year’s product quality. The Indian Government then declared subsidies for its sugar industry in September 2017, indicating further increases in global production, causing the global price to fall below the cost of production. The Australian sugar industry receives no government price support and 80% of Australian sugar is exported, so the industry is trade exposed to global sugar market price volatility. Cane growers Proserpine manager Mike Porter said growers just had to follow the appropriate steps; “There is nothing else you can do. This is an export industry, so we are captured by both the international commodity price and the exchange rate. We don’t have control over either fundamentals.” One Queensland cane grower estimated his loss at $400,00 - $500,000 in 2017 on the back of the cyclone, global sugar glut and subsequent very dry conditions through 2017 and 2018, claiming recovery would take him five years. However, for many farms total recovery may never be possible, leaving them vulnerable to future climate events. 7.1 What market structure most appropriately describes the sugar cane growing industry? 7.2 Explain what the likely short run effect of the cyclone is on the cost curves of a sugar cane growing firm in the cyclone affected region? 7.3 Explain using the relevant market structure model, the likely short run effect of the cyclone on the profits and quantities produced by sugar cane growing farms in the cyclone affected region 7.4 What is the long term response in the industry to the existence of economic losses, economic profits or normal profit? How will the changes from Q.5.2 and Q.5.3 affect the firm’s profit position in both the short run and long run? Question 8 (20 marks) Read the article titled " Wages, consumption and GDP growth remain sluggish despite an increase in employment " and answer the following questions. Wages, consumption and GDP growth remain sluggish despite an increase in employment. In the ten years prior to the global financial crisis Australia’s real GDP grew 3.4% on average per year, decelerating to 1.6% in 2009 after the turmoil. Australia showed resilience being one of the few developed nations that still recorded growth in 2009. Since then Australia’s real GDP growth has averaged below 3% but grew just 2.3% for the year ended December 2018 (seasonally adjusted). Inflation continues to be low, yet all key measures of inflation are now currently below the Reserve Bank’s preferred 2 to 3% band. The economic indicators that signal the start of a downturn are emerging in many advanced economies including Australia. Australian households are carrying a high total private sector debt ratio of 121 percent of GDP in June 2018, making us less resilient to future shocks. Australia is also seeing the lowest growth in wages as a percentage of economic activity since 1959 when official records commenced. This is despite mostly growth year on year in labour productivity over the same period. The clear downward trend in wages share of GDP is visible from 1980 to current, despite short term small fluctuations, with labour compensation as a percentage of GDP falling from 56% in 1980 to 46.5% in 2018. Nominal wage growth has now been around 2% a year since 2015. Record numbers of Australians are also working a second job. The number exceeded one million persons at the end of 2018 having increased by more than 20% in the past two years. Since 2010 the wage price index shows the real value of wages growth has fallen from 7% to 2.3% whilst secondary jobs have risen from 3.8% to 6.3% of total jobs over the same period. Secondary job roles feature work like caring, office temping, call centre answering, uber driving and other delivery services, and healthcare and social assistance work. Despite a small rise in the employment statistics in the years since the GFC, underemployment levels have risen from just 2.5% in 1980 to 9% of the labour force in 2018. Underemployment needs to be considered in context with headline employment figures. Younger Australians are more affected by underemployment and disproportionately so. 31% of workers aged 15-19 and 20% of workers aged 20 – 24 are underemployed. Underemployment in other age demographics does not exceed 9%. According to the OECD, Australia has the highest proportion of “temporary” (including casual) jobs in the OECD. With higher underemployment levels the headline employment rate is therefore likely to include a significant number of people who want more work and cannot get it as well as those who may be working two jobs to make ends meet, indicating that the labour force is underutilised. In an open letter signed by 124 Labour Market, Employment Relations and Labour Law Researchers, Dr Stanford Jim Stanford, economist, claimed Australia was in the grip of a “wages crisis” that “isn’t going to fix itself” citing an “unprecedented slowdown” despite the employment growth. The economists called for various measures as a matter of urgency to tackle the crisis, including raising the minimum wage, strengthening collective wage bargaining, relaxing caps on the public sector and limiting the ability of private firms to outsource. Professor John Quiggin, one signatory to the letter commented; “for decades, government policy has been designed to weaken unions and push wages down. It’s time to put that process into reverse.” Australia’s current Treasurer declined to respond to the written concerns of labour market experts. The Prime Minister countered that increasing wages costs on businesses would contribute to loss of jobs. The argument is that tax cuts for business owners will drive investment and create more jobs. The Business Council of Australia supports the idea of business tax cuts and similarly argues against ‘tinkering with wages’ lest it cause ‘higher prices and lost jobs’ . Some businesses claim they are now suffering because of sluggish consumption. The $310 billion retail sector remains largely in recession due to both low wage growth and high debt carried by households. Retail sales growth slowed to 2.2% in the 2018 year. One market adviser warns that big box retail is “slowly dying” with even heavyweights like Bunnings and Dan Murphy’s now facing “significant store closures.” The physical retail sector has already taken a hit from the growth of online shopping. Many jobs in stores like Kmart, Woolworths, Coles and others have been lost to automation such as electronic scan and pay systems. Other local jobs have been lost to the complete automation of factories and outsourcing of call centre operations. Slow wages growth forces households to reduce their discretionary spending or look for lower priced goods and services. Wages are for the most part spent locally and there will be flow on effects to businesses from stagnant wages growth. Ultimately businesses will see this in lower sales, despite having interests in also keeping cost structures low by pushing for flexible wages and flexible work patterns from their workers. There is a government policy trade off that must be managed well to avoid low wages growth feeding into low consumption growth, thus dragging down economic growth. The signs are there, in the current dilemma that the RBA is attempting to grapple with. Why with a rise in employment are Consumption and GDP growth not meeting predicted growth rates? Questions: 8.1 What does an economy’s potential output level represent and how is this related to the main types of unemployment? 8.2 What do current unemployment, GDP and inflation statistics suggest about what stage of the business cycle the Australian economy is currently in? 8.3 Using the AD/AS model, and assuming the economy starts at full employment, explain in words the effect of reduced consumption by households. 8.4 Using the AD/AS model, and assuming the economy starts below full employment, explain in words the effect of a decrease in the rate of consumption and the long run self-correction of the economy.
INMR95 Assessment Details Assessment Details IMPORTANT NOTE: The final report must be submitted to the Turnitin submission as a word document by itself (i.e., not as a zip file with other stuff such as source code). The source code, new generated data, and anything else such as e.g. R shiny app (optional) will be submitted separately in a different link on Blackboard. This link is contained in the folder names “Submission for Supporting Files” under the folder “Assessment”. Section 1 – Descriptive Analytics Introduction Case study: Student satisfaction is a KPI for most, if not all higher education institutes. There are a range of reasons why students may or may not be satisfied with their courses. The Turkiye Student Evaluation Datasets gives us a small insight into the complexities that drive student experience; you have been hired by a company called HigherEdCo ltd. as a higher education consultant to perform. several multivariate analyses that will indicate the factors that impact student experience (according to the data collected). Your analysis should be approached critically, and variable as well as method selections should be justified. You MUST reduce the dimensionality of this dataset. The dataset you will be working with is the Turkiye Student Evaluation Data Set (Gunduz & Fokue, 2013). The dataset is made up of the following variables: instr: Instructor's identifier; values taken from {1,2,3} class: Course code (descriptor); values taken from {1-13} repeat: Number of times the student is taking this course; values taken from {0,1,2,3,...} attendance: Code of the level of attendance; values from {0, 1, 2, 3, 4} difficulty: Level of difficulty of the course as perceived by the student; values taken from {1,2,3,4,5} Q1: The semester course content, teaching method and evaluation system were provided at the start. Q2: The course aims and objectives were clearly stated at the beginning of the period. Q3: The course was worth the amount of credit assigned to it. Q4: The course was taught according to the syllabus announced on the first day of class. Q5: The class discussions, homework assignments, applications and studies were satisfactory. Q6: The textbook and other courses resources were sufficient and up to date. Q7: The course allowed field work, applications, laboratory, discussion and other studies. Q8: The quizzes, assignments, projects and exams contributed to helping the learning. Q9: I greatly enjoyed the class and was eager to actively participate during the lectures. Q10: My initial expectations about the course were met at the end of the period or year. Q11: The course was relevant and beneficial to my professional development. Q12: The course helped me look at life and the world with a new perspective. Q13: The Instructor's knowledge was relevant and up to date. Q14: The Instructor came prepared for classes. Q15: The Instructor taught in accordance with the announced lesson plan. Q16: The Instructor was committed to the course and was understandable. Q17: The Instructor arrived on time for classes. Q18: The Instructor has a smooth and easy to follow delivery/speech. Q19: The Instructor made effective use of class hours. Q20: The Instructor explained the course and was eager to be helpful to students. Q21: The Instructor demonstrated a positive approach to students. Q22: The Instructor was open and respectful of the views of students about the course. Q23: The Instructor encouraged participation in the course. Q24: The Instructor gave relevant homework assignments/projects, and helped/guided students. Q25: The Instructor responded to questions about the course inside and outside of the course. Q26: The Instructor's evaluation system (midterm and final questions, projects, assignments, etc.) effectively measured the course objectives. Q27: The Instructor provided solutions to exams and discussed them with students. Q28: The Instructor treated all students in a right and objective manner. It’s up to you to choose your independent and dependent variable(s), as well as the tests you will run. However, everything you do needs to be justified, i.e., you need to explain why you chose to use that particular test, why you treated a certain variable as e.g., categorical, and why you transformed variables (if applicable). In short, a good project will critically analyse the results obtained and identify its limitations. The more detailed and exhaustive your analysis, the more likely you are to score a high grade (see marking scheme). Make sure to include figures and tables to support your findings. Expected Project Output In the end you need to submit a section with the following headings: 1. Introduction (briefly what your aim was for the analysis and your research question) 2. Process (what types of statistical testing did you use to answer the research question and the rationale for using said methods). 3. Results (the results of all the analyses, including figures, tables, and test outputs). The output needs to be written for an academic audience. You must also submit: · Your new csv file with any new variables you extracted/modified from the data. You must name this exploratory.csv · Your R script. that shows, with comments, step by step the process you took to analyse the data. You must name this exploratory.R · Anything else that you feel is relevant is welcome (but not required) Section 2 – Predictive Analytics Case study: You have been hired as a consultant to provide data-driven recommendations to the marketing department of the German-Hellenic bank. The bank has supplied you with anonymised data (the data we will be using has been supplied by Moro et al. (2014), and can be found in the UCI website). Here is a list of the variables: Input variables: # bank client data: 1 - age (numeric) 2 - job : type of job (categorical: 'admin.','blue-collar','entrepreneur','housemaid','management','retired','self-employed','services','student','technician','unemployed','unknown') 3 - marital : marital status (categorical: 'divorced','married','single','unknown'; note: 'divorced' means divorced or widowed) 4 - education (categorical: 'basic.4y','basic.6y','basic.9y','high.school','illiterate','professional.course','university.degree','unknown') 5 - default: has credit in default? (categorical: 'no','yes','unknown') 6 – balance: Account balance 7 - housing: has housing loan? (categorical: 'no','yes','unknown') 8 - loan: has personal loan? (categorical: 'no','yes','unknown') # related with the last contact of the current campaign: 9 - contact: contact communication type (categorical: 'cellular','telephone') 10 - month: last contact month of year (categorical: 'jan', 'feb', 'mar', ..., 'nov', 'dec') 11 - day_of_week: last contact day of the week (categorical: 'mon','tue','wed','thu','fri') 12 - duration: last contact duration, in seconds (numeric). Important note: this attribute highly affects the output target (e.g., if duration=0 then y='no'). Yet, the duration is not known before a call is performed. Also, after the end of the call y is obviously known. Thus, this input should only be included for benchmark purposes and should be discarded if the intention is to have a realistic predictive model. # other attributes: 13 - campaign: number of contacts performed during this campaign and for this client (numeric, includes last contact) 14 - pdays: number of days that passed by after the client was last contacted from a previous campaign (numeric; 999 means client was not previously contacted) 15 - previous: number of contacts performed before this campaign and for this client (numeric) 16 - poutcome: outcome of the previous marketing campaign (categorical: 'failure','nonexistent','success') # social and economic context attributes Output variable (desired target): 17 - y - has the client subscribed a term deposit? (binary: 'yes','no') Note that variable 12 should be discarded. The original data set has outcome variable 17 as the desired output. However, you do not necessarily need to focus on this variable. You are expected to explore other relationships in the data and present interesting findings to your client (hint: look at balance for example). You should build multiple models for comparisons, but present two final models on two different outcome variables. All actions taken need to be critically analysed and justified. The more detailed and exhaustive your analysis, the more likely you are to score a high grade (see marking scheme). Your outcome variables can be categorical, continuous, or a mix of both (i.e., one model as a classification model, one as a regression model). Expected Project Output In the end you need to submit a section with the following headings: 1. Introduction (briefly what your aim was for the analysis, along with your research question) 2. Process (what types of models did you use to answer the research question and the rationale for using said modelling techniques). 3. Results (the results of the analyses and the models, including model performance and model comparisons). All the output needs to be written for an academic audience. You must also submit: · Your new csv file with any new variables you extracted/modified from the data. You must name this analysis.csv · Your R script. that shows, with comments, step by step the process you took to analyse the data. You must name this analysis.R · A R shiny app or anything else you feel is relevant (optional) Section 3 – Prescriptive Analytics In this section you will form. data-driven recommendations using your findings from Section 1 and Section 2 for your two clients. You can expect your audience to be a layman audience with little to no understanding of statistics and modelling. Therefore, unlike the results is section 1 and 2, your report needs to be written in such a way that a layman audience can understand it. Ultimately you need to make a convincing argument that states how your client should proceed based on the results of your findings. You are expected to use a critical approach by using the results obtained to both generate recommendations and identify limitations. You can include an interactive Shiny R app, which is optional but will increase your likelihood of delivering a more robust solution. Expected Project Output In the end you need to submit a document with the following headings: 1. Client: HigherEdCo ltd. - Executive summary 2. Aims and Objectives 3. Analysis 4. Recommendations 5. Limitations 1. Client: German-Hellenic Bank. - Executive summary 2. Aims and Objectives 3. Analysis 4. Recommendations 5. Limitations References Gunduz, G. & Fokoue, E. (2013). UCI Machine Learning Repository [[https://archive.ics.uci.edu]]. Irvine, CA: University of California, School of Information and Computer Science. S. Moro, P. Cortez and P. Rita. A Data-Driven Approach to Predict the Success of Bank Telemarketing. Decision Support Systems, Elsevier, 62:22-31, June 2014
MIE1628 Due Date: Feb 8, 2025 Assignment 1 Clustering Techniques with Hadoop MapReduce (70 marks) • No submission is accepted via email. We have no exception. • Students are responsible for submitting the correct files on time. • Assignments submitted up to 48 hours late will incur a 20% penalty. • Your grade will be zero if you submit your answer after 48 hours. Contact your TA for any questions related to this assignment or post clarification questions to the Piazza platform. Java programming language is recommended for this assignment, but you can use python as well. This assignment explores the application of k-means clustering and canopy selection within the MapReduce framework. It emphasizes a deeper understanding of the algorithms, their limitations, and efficient implementation strategies. All code should be well-documented and follow best practices. You must clearly explain your design choices and justify your implementation decisions in your report. Part 1: Line Counting with MapReduce (20 marks) 1. (15 marks) Implement a MapReduce program to count the number of lines in a large text file (shakespeare.txt). Analyze the performance of your implementation, considering factors such as the number of mappers and reducers, input file size, and network communication overhead. Provide a detailed performance analysis, including graphs as needed and a discussion of optimization strategies. (Implement using Hadoop MapReduce) 2. (5 marks) Propose at least one optimization strategy to improve the efficiency of your line counting MapReduce program. Justify your choice of optimization and quantify its impact on performance. (Describe in words) Part 2: K-Means Clustering on MapReduce (30 marks) 3. (5 marks) Propose a distributed k-means clustering algorithm using MapReduce. Use the provided dataset (data_points.txt). Your implementation should handle a variable number of clusters. Thoroughly explain your algorithm, including the partitioning strategy, centroid calculation, and convergence criteria. Discuss the choice of distance metric and its rationale. (Describe in words) 4. (20 marks) Experiment with different values of k = 5 and 9). For each k, report the cluster centroids, the number of iterations required for convergence (or the maximum iterations reached), the computation time, and a qualitative analysis of the resulting clusters. Visualize your results where possible (e.g., scatter plot of data points with cluster assignments). Analyze the impact of k on the quality of the clustering results and the computational cost. (Implement using Hadoop MapReduce) 5. (5 marks) Critically evaluate the performance of your k-means implementation. Discuss the impact of data distribution and the choice of distance metric (Euclidean, Manhattan, etc.) on the algorithm's performance and convergence. Analyze the scalability of your implementation – how does runtime change if you increase the dataset size? (Describe in words) Part 3: Canopy Clustering and Optimization (15 marks) Read the provided paper, research as needed and then answer the below questions in words. 6. (5 marks) Explain the advantages and disadvantages of using k-means clustering with MapReduce. Discuss the trade-offs between parallelization, communication overhead, and the inherent limitations of the k-means algorithm itself. (Describe in words) 7. (5 marks) How do you implement Canopy Clustering as a pre-processing step fork-means. Justify your choice of distance metrics for the canopy and k-means stages. Explain how your implementation reduces the number of distance comparisons in the subsequent k- means phase. Clearly explain the parameters used for Canopy Clustering and their impact on the results. (Describe in words) 8. (5 marks) How do you integrate Canopy Clustering into your MapReduce-based k-means algorithm. Compare the performance (runtime and cluster quality) of k-means with and without Canopy Clustering as a pre-processing step. (Describe in words) Deliverables: • (5 marks) A detailed report explaining your approach, methodology, results, analysis, and conclusions. Include visualizations, tables, graphs, and performance measurements as appropriate. o Your report should demonstrate a clear understanding of the algorithms, their limitations, and the practical challenges of implementing them in a distributed environment. o A code file (well-commented and organized) should be submitted along with the runtime output screenshots. o Include references as appropriate.