Assignment Chef icon Assignment Chef

Browse assignments

Assignment catalog

33,401 assignments available

[SOLVED] Assignment 01 Data storage and databases

Assignment 01 – Data storage and databases You are required to complete and submit answers to both Task 1 and Task 2 of this assignment. Answers should be submitted in a single Word document. Please rename your document with your student ID followed by ‘_Assignment01’. Example: 12345678_Assignment01.docx Important Background Information Before starting the tasks, it is helpful to understand how Moodle stores information about quizzes and the questions they contain. Moodle separates quizzes and questions into different tables. When you add questions to a quiz, Moodle does not store the questions directly inside the quiz. Instead, it uses a linking table: Key Tables: •   quiz: Stores information about the quiz (e.g., name, course, timing). •   question: Stores all questions in the Moodle system. •   quiz_slots: Connects quizzes to questions. Table relationships: quiz.id-------quiz_slots.quizid question.id--------quiz_slots.questionid So: •   A quiz can have many slots (quiz_slots), •    Each slot points to a specific question in the question bank. You will use this understanding in both the ERD and SQL tasks below. Task 1 This task centres around the Quiz activity in Moodle. As preparation, create at least three quizzes in your Moodle courses. Add a few questions to each quiz (e.g., multiple- choice or short answer), and then attempt your quizzes using student accounts. To ensure a variety of data for your queries: •   Set different values for the “Attempts allowed” setting across your quizzes. •   You must have at least one quiz where only 1 attempt is allowed. •   You must also have at least two quizzes where more than 1 attempt is allowed. •    Each student account should have attempted at least one quiz more than once. These steps will help generate the data needed to complete the tasks in this assignment effectively. You will use Usermin to explore the Moodle database. In Usermin, search for quiz and question to locate the related tables. To view the latest data, remember to Refresh the tables after each activity on Moodle. a) Exploring key tables [3 marks] Explain the main purpose of the following tables. For each, provide a couple of sentences describing what the table is for and mention a few meaningful fields that illustrate its role (Do not just list the fields) •   mdl_quiz •   mdl_quiz_attempts •   mdl_quiz_slots •   mdl_question Provide screenshots of these tables showing the table data after you have created quizzes, added questions, and made attempts as students. b) Entity Relationship Diagram (ERD) [5 marks] Draw an ERD for the Quiz concept using the following six entities: •   quiz •   quiz_attempts •   quiz_slots •   question • user •   course In your ERD: •    Indicate Primary Key (PK) and Foreign Key (FK) using standard notation •   Show cardinalities between entities •    Include a few meaningful fields (e.g., quiz name, user ID, question next) to make the domain concept clear. •   You do not need to list all the fields for every entity. Notes: •   Use the same ERD notation style. as shown in course materials. •   You can draw by hand or use a diagramming tool. •   Test your model with actual data from your Moodle site. Creating a couple of quizzes and answering questions will help you see how the tables are connected. c) Understanding Quiz settings [3 marks] Quizzes allow teachers to control how many attempts students are allowed. This is set using the “Attempts allowed” setting in the Moodle quiz activity. For this part, perform. the following: 1.   Locate this setting in your Moodle site and take a screenshot. 2.   Explain: a.   What happens in the database when a student takes the quiz multiple times? and what entries appear in mdl_quiz_attempts table? b.   What happens ifa teacher changes the number of allowed attempts after some students have already attempted the quiz? For example, ifa quiz initially allows only 1 attempt and later this is changed to 3 attempts, what happens to: i.   Students who had already attempted the quiz once before the change. ii.   Students who had not yet attempted it. Task 2 For each of the given scenarios, provide the SQL statement (typed as text so we can copy/paste) and a screenshot of the query result in Usermin. Notes: •    Make sure your Moodle site contains enough data (multiple quizzes, questions, and attempts) so that your query results are meaningful. •    Do not just provide screenshots. You must include the SQL code as well. •    Remember to refresh your tables in Usermin after making changes in Moodle. a) [1.5 marks] Show the id and name of all quiz activities on your site, along with the id, shortname, and fullname of the course each quiz belongs to. b) [1.5 marks] List all quizzes that allow more than one attempt. Show the quiz id, quiz name, and the number of attempts allowed. c) [2 marks] Display the slot number, question name, question type and question text for all questions in two selected quizzes. d) [2 marks] Show the total number of quiz attempts across your site, and the number of unique users who have attempted any quiz. e) [2 marks] List all students who have attempted quizzes. Show the quiz name, the student’s first name and last name, and their attempt number. Order the results by quiz name, then last name.

$25.00 View

[SOLVED] Question 4 Arrow-Debreu Economy

Question 4. Arrow-Debreu Economy         (7 marks) Consider a world in which there are only two dates: 0 and 1. At date 1 there are three possible staten of nature: a good weather state (G), a fair weather state (P), and a bad weather state (B), Denote S, as the set of these states, Le, h CSi - (G,F,B), The state at date zero in known. Denote probabilities of the three states as n - (0.4,0.3,0.3). There is one non-storable consumption good, apple. There are three consumers in this economy. Their preferences over apples are exactly the same and are given by the following expected utility function where subscript. k=1, 2,3 denotes each consumer. In period O, the three consumers have a linear utility and, in period 1, the threcrconsumers have the same instantaneous utility function: where y = 0.2 (the coefficient of relative risk aversion). The consumers' time discount factor, B, is 0.98. The consumers differ in their endowments, which are given in the table below:d Assume that atomic (Arrow-Debreu) securities are traded in this economy. One unit of 'G security' sells at time 0 at a price qo and pays one unit of consumption at time 1 if state 'G' occurs and nothing otherwise. One unit of 'F security' sells at time O at a price qp and pays one unit of consumption at time 1 if state 'F' occurs and nothing otherwise. One unit of 'B security' sells at time 0 at a price qp and pays one unit of consumption in state 'B' only, 1. Write down the consumer's budget constraint for all times and states, and define a Market Equilibrium in this economy. Is there any trade of atomic (Arrow-Debreu) securities possible in this economy? (1 mark) 2. Write down the Lagrangian for the consumer's optimisation problem, find the first order necessary conditions, and characterise the equilibrium (L.e., compute the optimal allocations and prices defined in the equilibrium). (2 marks) 3. At the equilibrium, calculate the forward price and risk premium for each atomic security. What do your results suggest about the consumers' preference? (1 mark) Suppose that instead of atomic (Arrow-Debreu) securities there are three linearly independent securities, a riskless bond, a stock, and a one-period put option on this stock available for trade in this economy. The riskless bond pays 1 apple in every state, the stock pays 2, 1 and 0 apples in G, F and B, respectively. The put option has a strike price of 1. 4. Write down the budget constraint for each consumer using the newly available securities. (1 mark) 5. Write down the Lagrangian for the consumer's optimisation problem, find the first order necessary conditions, and characterise the equilibrium (i.e., compute equilibrium allocations and prices of the newly available securities). (1 mark) 6. Now, price the newly available securities using the atomic prices from part 2. Com ment on your results in light of the arbitrage-free markets. (1 mark)

$25.00 View

[SOLVED] COMPSCI 111/111G Lab Assignment 02Word Processing

Hello, dear friend, you can consult us at any time if you have any questions, add COMPSCI 111/111G CHAPTER 2 Lab Assignment 02—Word Processing Title: Word Processing Due: No later than 11:59pm on Friday the 8th of August. Aims: Use Microsoft Word to format a document. Become familiar with the standard formatting tools, drawing tools, and styles. 2.1 Preparation Before attending this lab, you should: • Read this lab assignment thoroughly. 2.2 Obtaining the Lab Resources The resources required to complete this lab can be obtained from the COMPSCI 111 page on Canvas. Download the Lab02.zip archive from the COMPSCI 111 page on Canvas under Assignments → Lab 2 , to your COMPSCI111 folder in your USB drive. You can then unzip the archive to obtain the Lab2 folder contain the required files. 2.3 Introduction In this lab you are required to take a file containing plain text and use Microsoft Word to produce a professional looking document like the one at the end of the lab assignment (pages 38 to 40). Microsoft Word is part of the Microsoft Office 365 suite of office applications. Copy the Lab02 folder onto your USB drive. The original text can be found in a file called NineMensMorris.txt in your Lab02 folder. To get started, follow the steps listed below: 1. Open the text file called NineMensMorris.txt by double-clicking on the file. 2. Choose Select all from the Edit menu. 3. Choose Copy from the Edit menu. 4. Close the file. 5. Start the Microsoft Word application. You can find Microsoft Word in the Start menu. 6. Paste the text into the Word document by clicking in the Home tab 7. Save the document in your Lab02 folder by clicking on in the title bar. Use the name NineMensMorris.docx The text should be displayed in the MS-Word document. However, the formatting marks are not displayed by default. Before we start making changes, we should display the formatting marks. To view the formatting marks, simply click in the HOME tab. The formatting marks will not be printed, they merely serve as a guide. Q1: What are text editors commonly used for? 2.4 Page Setup The first thing to do is to set up the overall formatting used for the entire docu-ment. Follow the steps below: 1. Click on the margins icon in the Layout tab. Select Custom Margins... from the Margins submenu. 2. Set all the margins to 2 cm (not the gutters). 3. Click on the Paper tab and make sure the paper size is set to A4. 4. Click OK Adjust the size of the window if necessary, so that you can see the entire width of the page. 2.5 Edit the text We should make any required changes to the actual text. The first section, which contains the text: Nine Men’s Morris is a strategy board game for two players that emerged from the Roman Empire. The game is also known as Nine Man Morris, The Mill Game, and Cowboy Checkers and was once printed on the back of checkerboards. Nine Men’s Morris is a solved game in which either player can force the game into a draw. has paragraph marks at the end of every line. Delete these so that the text forms a single paragraph. 2.6 Using user-defined styles In the Home tab, a style. for a particular document part can be chosen. A style. is a predefined set of text properties such as font, font size and colour. By using styles instead of choosing the font, colour, etc. of every piece of text individually, it is much easier to change the appearance of the parts that have been formatted with a particular style. later on. All we need to do is change the definition of the style, and all parts using that style. will change as well. Normal We will start by modifying the style. that is used by Normal text. This will change the font used for all the text on the page. Follow the steps below: 1. Right-click on the style. called Normal. Choose to Modify the style. 2. Change the appearance of the Normal style. as follows: • Set the font to be Verdana 11pt. • Set the alignment to be Justified • Under the Format menu at the bottom left corner select Paragraph – Set the spacing to be 0 pt before, 0 pt after, and “Single” line spacing Section Heading We will now create a new style. to use for the headings on the page. Follow the steps below: 1. Click on the symbol at the bottom right corner of the the “Styles” section in the Home tab. 2. Click on the (New Style) button. 3. Enter “Section Heading” as the name of the style. 4. Select “Normal” in the Style. based on: field. 5. Use the options to change the appearance of the Section Heading style. as follows: • Choose Format → Font . Set the style. to be bold and the size to be 16 point. Tick the box that uses the effect of “Small Caps”. • Click OK • Choose Format → Border . Set the width of the border to be 3pt. Click the button that applies the border below the paragraph. • Click OK Apply this style. to all the section headings in the document (i.e. apply it to the text: Game Rules, Strategy, Variants, and History). To apply the style, simply click on the text that you want to change, then click on the style. that you wish to apply (in this case, “Section Heading”). Subsection Heading Create another new style. called “Subsection Heading”. Set the appearance of the style. as follows: • Make sure “Subsection Heading” is based on the “Normal” style. • Set the style. of the font to be bold. • Set the size of the font to be 14 point. Apply this style. to all the subsection headings (i.e. apply it to the text: Placing Pieces, Moving Pieces, Flying, Three Men’s Morris, Six Men’s Morris and Twelve Men’s Morris). Main Heading Create one last style. called “Main Heading”. Set the appearance of the style. as follows: • Make sure “Main Heading” is based on the “Normal” style. • Set the style. of the font to be bold. • Set the size of the font to be 24 point. • Set the alignment of the paragraph to be right aligned. • Choose Format → Border . Set the width of the border to be 6pt. Click the button that applies the border below the paragraph. Apply this style. to the main heading “Nine Men’s Morris”. Q2: State two advantages of using user defined styles. 2.7 Headers and Footers Headers and footers are pieces of text that will appear on every page of your document. Header You can access the header of a document by right-clicking into the top margin of a document, and choosing Edit Header from the context menu. After doing this, the Header & Footer Tools tab appears, as shown below: You can now enter text into the header of the document. Insert the text “Printed for” followed by your username. Align the header text to the left side of the page. Q3: What is a header? Footer Add a footer to the document by right-clicking into the bottom margin of the document, and choosing Edit Footer from the context menu. Again, the Header & Footer Tools tab will appear. The footer should contain the text “X of Y”, where X is the page number and Y is the total number of pages e.g. 1 of 2. You should use the menus on the Header & Footer Tools tab: choose Quick Parts → Field... and a dialogue window opens with a list of available fields on the left side. Select the field “Page” and press OK to insert a page number at the current cursor position. Type the word “of” then select the field “NumPages” to insert the total number of pages in the document. Align the text so that it is centred. When you have finished with the Headers and Footers, simply click in the Header & Footer Tools tab. Q4: What is a footer? 2.8 Footnotes A footnote is a small note at the bottom of a page that provides more information about something in the main text. We will add a small footnote that describes the source of this document. Follow the steps below: 1. Move the cursor (insert point) to the end of the first section heading (just after the text “Game Rules”). 2. Choose References → Insert Footnote to insert a new footnote at the bottom of the page. 3. Type in the text “Based heavily on material from Wikipedia.” as a footnote. Q5: What is the difference between a footer and a footnote? 2.9 Section Breaks and Columns A section break is a separation of different parts in a document, so that the parts can have different formatting. Follow the steps below to insert a section break into your document: 1. Move the cursor so that it is immediately before the section heading “Game Rules” on the first page. 2. Choose Layout → Breaks → Continuous . Once the page has been split into two different sections, we will change the second section so that it uses two columns. To do this, follow the steps below: 1. Move the cursor anywhere in the second section. 2. Choose Layout → Columns → Two . 2.10 Pictures We have now finished with the formatting of the main text. We will insert a picture to make the document a little more interesting. For the picture: 1. Click on the blank line before the paragraph in the “Strategy” section. 2. Choose Insert → Pictures . 3. Navigate to the Lab2 folder, choose the file called Board.png and click the Insert button. 4. Once the picture is inserted, add a blank line before and after the picture so that it does not appear cramped. You can use the sample document provided at the end of the chapter to check whether you have inserted the image in the correct location.

$25.00 View

[SOLVED] FIT1047 Introduction to computer systems networks and security S2 2025 Assignment 1

FIT1047 Introduction to computer systems, networks and security – S2 2025 Assignment 1 – Numbers, Encodings and Boolean Logic Purpose In this assignment, you will demonstrate your knowledge of number systems, character encodings and that you can construct and simplify Boolean formulas and circuits. The assignment relates to Unit Learning Outcomes 1 and 2. Your task Part 1: Submit your reflections (Weeks 1 . 3). See details below. Part 2: Complete the individual tasks as detailed in the instructions below. You need to submit a document that details your workings, as well as Logisim files for the resulting circuits. Part 3: Complete the in.class test. In-person attendance required.  You must come to your allocated Applied session (for Australian cohort) / Workshop session (for Malaysian cohort) in week 4 in-person. See Moodle and announcements for more details. Value 15% of your total marks for the unit. See below for how marks and grades are determined. Word Limit No overall word limit (see instructions for word limits of individual tasks) Due Date Part 1 and 2: 11:55 PM Friday 15 August 2025 Part 3: During your allocated applied session (Australian cohort) / workshop session (Malaysian cohort) in Week 4 (18-22 August 2025) Submission ●   Via Moodle Assignment Submission. ●    Turnitin will be used for similarity checking of all submissions. Please  ignore the following error message from Turnitin for zip files or other non-document files:   ●    DRAFT upload confirmation email from Turnitin is not a submission. You must click the submit button to accept terms and conditions in Moodle. DRAFT submissions will not be assessed. ●    Do not use GDrive/OneDrive/etc. shared links for submission. Please export the document(s) as a PDF and then upload it in Moodle for grading. ●    Once the submission is confirmed, any requests to revert it back to DRAFT will not be accepted. Also, any incorrect, corrupted, empty or wrong file type submission will not be assessed. Please check carefully before confirming your submission.   ●    This is an individual assignment (group work is not permitted). ●    Handwritten work, including digital work created by touchscreen/digitizer technologies, will not be assessed. ●    Logisim circuits will be assessed using version 3.9.0 (link is in Moodle). ●    In this assessment, you must not use generative artificial intelligence (AI) to generate any materials or content in relation to the assessment task. Assessment Criteria Marks are awarded for the correctness of the calculations, the explanations of how the tasks were solved, and the documentation of test cases where required. The marking rubric in Moodle shows an individual marks breakdown. If no or insufficient reflections are submitted (Part 1), the overall marks for this assignment are capped at 30 (i.e., 50% of the overall mark). Late Penalties ●    5% deduction per calendar day or part thereof for up to one week ●    Submissions more than 7 calendar days after the due date will receive a mark of zero (0) and no assessment feedback will be provided. Support Resources See Moodle Assessment page Feedback Feedback will be provided on student work via: ●    general cohort performance ●    specific student feedback ten working days post submission INSTRUCTIONS This assignment has three parts. Make sure you read the instructions carefully. For Part 1, collect your reflections for Weeks 1 - 3 from each week’s Ed Lesson and create a single PDF document. You can simply copy/paste your reflections, but please add headings for each week. Please refer to the template as a reference of the structure of your reflections. While it is optional to follow the template, you are required to have your reflections specific to the topics covered in the corresponding weeks. The word count of reflection must be more than 100 words (excluding the headings provided in the template) in each week. Submit your PDF through the Moodle Assignment 1 Part 1 activity. For Part 2, you need to submit two files through the Moodle Assignment 1 Part 2 activity: 1)    A PDF document with the answers to the questions and your workings. 2)    A separate .zip archive with the Logisim files (do NOT save as PDF file for your Logisim files) along with your individualised assignment specification. Part 3 is an in-class test during your allocated Applied session (for Australian cohort) / Workshop session (for Malaysian cohort) in Week 4. Instructions will be available separately. How are marks and grades determined? Part 2 and Part 3 are worth 30 marks each. The overall mark is the sum of the two individual marks. The assignment is worth 15% of the unit’s marks. If no meaningful or insufficient reflections are submitted for Part 1, the overall mark will be: -    30 if the sum of Part 2 and Part 3 is greater than or equal to 30; -    the sum of Part 2 and Part 3, otherwise. Detailed Instructions for Part 2: Boolean Algebra (30 marks total) Follow the link on Moodle to access your personalised truth table for this task. Important: Your truth table is different from the one other students are working on. Only download the file while you are correctly logged into Moodle with your own student account. Submitting work based on an incorrect truth table will be investigated as a potential breach of academic integrity. The truth table you download describes a Boolean function with four input values X1,X2,X3,X4 and two output values Z1,Z2. The main result of this part will be a logical circuit correctly implementing this Boolean function in the Logisim simulator. Each task below needs to be documented and explained. Task 2.1: Boolean Algebra Expressions (10 marks) Write the Boolean function as Boolean algebra terms using the Sum of Product (SOP) form. First, think about how to deal with the two outputs. Then, describe each single row, in the truth table, in terms of Boolean algebra. Finally, combine the terms for single rows into larger terms. Briefly explain these steps for your particular truth table (e.g., explain for one particular row how you come up with the Boolean terms for that row, and then explain how you combine all rows). This explanation should be no more than a few sentences. Also, write the Boolean function as Boolean algebra terms using the Product of Sum (POS) form. with a brief explanation of steps (e.g. how you combine all rows). Note that details of  POS are not covered in lectures/workshops/applied classes and you are required to find out how it works and come up with the Boolean function. Notation: Use the following symbols and notation for writing Boolean algebra expressions. Variables are upper-case (e.g., X1, Z2). Boolean AND is written without a symbol, e.g., X1X2 . Boolean OR is written with the + symbol, e.g. X1  +  X2 . Negation is written using an overline, e.g., X1 . Important: when writing terms like NOT X1 AND NOT X2, there must be a clear gap in the overlines, e.g., X1 X2 . Tip: you can use the equation function in Word or Google Docs to create overlines. Task 2.2: Logical circuit in Logisim (10 marks) Model the resulting Boolean terms (using SOP form) from Task 2.1 in a single Logisim   circuit, using only the basic gates AND, OR, NOT. You can use gates with more than two inputs. Check the template on the last page for how to structure your circuit. Briefly explain your construction (as for Task 2.1, a short explanation is enough). Test your circuit using values from the truth table and document at least 3 test cases. You can take screenshots of your Logisim window to document the tests. For each test case, state clearly the expected input and output values, in terms of a table or labels on the screenshot. Task 2.3: Optimised circuit (10 marks) The goal of this task is to find a minimal circuit using only AND, OR, and NOT gates. Based on the truth table and Boolean algebra terms of SOP from Task 2.1, optimise the function using Karnaugh maps. You will need to create two Karnaugh maps, one for each output. Your documentation must show 1)  the maps, 2)  the groups found in the maps 3)  the reduced Boolean functions derived from the maps and how the maps relate to terms in the optimised Boolean functions. Then, use Logisim to create a minimal circuit, using only AND, OR, and NOT gates. Test your circuit using values from the truth table and document at least 3 test cases. You can take screenshots of your Logisim window to document the tests. For each test case, state clearly the expected input and output values, in terms of a table or labels on the screenshot. Submission Checklist Altogether, you should submit the following files: ●   Part 1 ○    1 PDF file for your reflections (Weeks 1 - 3) ●   Part 2 ○    1 PDF file - your answers to the questions ○    1 ZIP file containing the following files: ●   2 Logisim files ●    1 PDF file for your individual truth table Please check CAREFULLY before confirming your submissions. Any requests to revert the submission back to DRAFT will not be accepted. DRAFT submissions will not be assessed. Also, any incorrect, corrupted, empty or wrong file type submission will not be assessed.    

$25.00 View

[SOLVED] MECM10006 Communication for Changemaking

MECM10006 Communication for Changemaking Due: Tuesday, 19 August, 9:00am | Word limit: 500 words | Weight: 15% | submitted via Canvas LMS Task Summary: The Media Analysis assignment comprises two brief analytical paragraphs of max. 250 words each (250 words +/-10% each) in which you critically engage with the latest news. In total, the assignment comprises 500 words. Please note that the deadline for this assignment is 9am on Tuesday, 19 August, not midnight! Guide for Media Analysis For each paragraph you will: Locate and read three hard news articles (print or online): one from a mainstream/Indigenous Australian publication, one from a foreign publication, one from either – you choose. You must at least read one article from an Indigenous Australian publication. They must be different publications. You must not use the same publication twice. Your final submission will prove that you read six news articles, from six different publications: two Australian publications (mainstream and Indigenous), two foreign publications, and two more. All articles should be in English. Type: Only compare hard news stories. Do not mix in op-eds, profiles or other types of text that are more subjective and opinionated by nature. This assignment is about analysing how information is presented in factual stories. Topic: The three articles that you compare for one analysis must be on the same issue. Do not compare, for example, “Tokyo Olympics opening ceremony director Kentaro Kobayashi fired for past comments on the Holocaust” with “On eve of Opening Ceremonies, Simone Biles looks ready and U.S. softball beats Canada” and “Army to Oust Lieutenant for Making Holocaust Jokes on TikTok”. For example, you can compare: Simes, J. (2024, July 16) Canadian government apologises for treatment of Dakota and Lakota nations. National Indigenous Times. Canadian government apologises for treatment of Dak... | NIT Canada Apologizes to Dakota-Lakota Nations for Injustice. (2024, July 16). Mirage News. https://www.miragenews.com/canada-apologizes-to-dakota-lakota-nations-for-1275782/ Apology “a significant step” says Wahpeton Dakota Nation Chief, but only if accompanied by action. (2024, July 16). Prince Albert Daily Herald. https://paherald.sk.ca/apology-a-significant-step-says-wahpeton-dakota-nation-chief-but-only-if-accompanied-by-action/ Currency: All articles must have been published between 28 July 2025 and 17 August 2025. The three articles you compare in one analysis should be from the same day (see example above). Otherwise, it is no surprise if they contain different information. Writing: Begin by summarising the information contained in the articles in 2-3 sentences. Then analyse and compare the information provided and think CRITICALLY! Some points you may want to consider: Is the information presented in the article biased? Is the author excluding relevant information or placing particular emphasis on some information? What information is only marginally addressed? Who owns the publication? Do these owners have their own (e.g. political) agenda and does this affect the content? Whose voices are included/excluded? Look at the people involved in the article, the writer, the researcher, the people funding the research - are they influencing how the data is being presented? What are the values and beliefs of these people? Think for yourself. Add your own questions. MUST: Support your opinion with thoughtful reasoning and explanations. Word length & Formatting Please ensure you submit all two paragraphs in one Word document – doc or docx only. Top tip: Use the Template provided in Support. Your file name should include your name. Ensure your work is 1.5 or double-spaced. Keep copies of ALL your assignments on your computer / backed up online. Your analyses should each be 250 words +/-10%. The headlines and references will not be part of your word count. Please indicate the word count at the end of each analysis. You do not need to include a copy of the articles. Referencing As mentioned in the lecture and the subject guide, you must always cite your sources. The Library provides useful resources for helping you manage your citations and references. This rule applies to all assignments. Please provide a reference section after each reflection for the three articles you compared. You may use any reference style. you like (e.g. APA, MLA, Harvard etc.). Just be consistent and please indicate the reference style. you chose, e.g. References (APA7). These references do not count towards your overall word count.

$25.00 View

[SOLVED] Assignment INFO1110

Assignment (INFO1110) Introduction The assignment is an individual assessment. It contributes 30% of your final marks. The due date for the assignment is on 9th May 2024, 11:59 pm (Sydney time). This is an assignment, and staff are not permitted to give guidance on your code or how to solve a specific problem. That is the purpose of the assessment that you are required to perform. to achieve the grade. You may ask clarification questions about the assignment description. This is often necessary to implement functionality that may need further understanding to complete. If you have a question to ask on Ed, please search before asking. With a cohort of almost 2000 students, chances are that someone has already asked a question you have planned to ask. Do not wait too long before starting. This assignment needs time and sustained effort. Remember that you should not be posting any assignment code publicly (including Ed), as this would constitute academic dishonesty. Submissions Late submissions are not accepted unless an approved special consideration or special arrangement in the form. of a Simple Extension or Extension of time has been granted. Please inform. staff if you have been granted this. All submissions must be made via Ed, including any supporting documentation that is produced during the planning of the program design such as flowcharts, pseudocodes, and UML class diagrams. You may submit as many times before the due date, there is 0 penalty for submitting multiple times. We will use the latest submission received before the due date for marking. Request to grade files and derive marks from a combination of different submissions will not be accepted. It is your responsibility to check that your submission is complete and it meets the following rules: The Python programs must be able to compile and run within the Ed environment provided. The Python version that is currently being used on Ed is Python 3.11.8. Only the files given in the scaffold code will be started by the auto-marker. You are free to write additional python files, but you must implement all functions and classes provided in the scaffold. Ensure that you have submitted these files with the correct file name as given in the questions' scaffold: board_displayer.py emitter.py input_parser.py laser_circuit.py mirror.py photon.py receiver.py run.py sorter.py Your submission must also include a circuit_for_testing.py and test.py file which will be used for the manual grading process. All files specified above must include your name, SID, and unikey in the following format (order matters!). A placeholder has been provided at the top of the file in the docstring. Providing incorrect details will cause your submission to fail all test cases. Name: Xxx Yyy SID: XXXXXXXXX Unikey: xxxxXXXX If you attempt to deceive the auto-grader, obfuscate your code, or do not answer the question by hard coding, 0 marks will be awarded for the question. Marks Marks are allocated by the automatic test cases passed for each section, as well as manual grading by your tutor. Automatic Test Cases (20/30) Your marks for this component will be based purely on the automatic test cases you pass. There are 3 types of automatic test cases, all contributing to your mark: Public: The name of these test cases describes what it is testing, and additionally gives you feedback on what you got wrong e.g. incorrect output, incorrect return values from functions, etc. Students can easily see what they got right and wrong. Hidden: The test case is only named Hidden testcase and does not provide detailed feedback. You will only be able to see if you passed it or not. The idea behind this is to encourage students to carefully read through the assignment description and ensure its reflected in their program. Private: These tests will only be visible after the deadline. You will not know how many private test cases there are until the assignment is graded and returned. There are several features for this assignment, with each one having their own marking proportion. As example, the first feature SET-MY-CIRCUIT weighs 25% of the automatic test cases. This means passing all public, hidden and private test cases for this feature gets you 5 out of the 20 marks. Manual Grading (10/30) Manual grading will assess the style, layout, and comments, correctness of test case implementation in test.py and your responses in the test_plan.md document. The test.py file will be executed during the marking process. Style. marking is only applied for reasonable attempts, those which have code beyond the initial scaffold and are passing at least some test cases. The style. guide for this assessment can be found on the official Python website https://peps.python.org/pep-0008/. In addition to the official style. guide, you can also refer to these resources: Code style. guide - Part 1 Code style. guide - Part 2 If there's an issue running the program, the tutor will not be responsible to debug your program, so please ensure it runs as expected before making it your final submission.

$25.00 View

[SOLVED] Money and Banking Exercise Set 2 Spring 2024 Processing

Money and Banking Spring 2024 Exercise Set 2 Due Thursday, 2/29 It is allowed to work together on problem sets. However, each student must submit an individual solution sheet on Courseworks. In case of collaboration, the names of students you worked with should be stated on top of the first page of the solution sheet. This problem set consists of four questions. You can obtain a maximum of 60 points. Question 1   [20 points] Consider the following bond market. It is common knowledge that the bond pays either $40 or $100 at t=1. Both states are equally likely. Agent S owns the bond. Since he needs cash at t=0 he is willing to sell the bond at a discount of Δ = $4. It means if the true value of the bond is $40 agent S is willing to sell it for at least $36. If the true value of the bond is $100 agent S is willing to sell it for at least $96. Agent B is interested in buying the bond. If the true value of the bond is $40 (or $100) agent B is willing to buy it for at most $40 (or $100). The seller (agent S) proposes a price to sell the bond. Both agents are risk neutral and maximize expected utility. a)        What price does the seller offer in equilibrium? Is there trade?  [3 Points] Now suppose agent B is a sophisticated buyer. After seeing the price offer of the seller, the buyer can try to learn something about the bond. If agent B spends $8 on information acquisition, he can find out the true value of the bond. b)        Suppose the seller offers the expected payoff of the bond and thus the price p=$70. What is the best response of the buyer? Should the seller offer this price?   [4 Points] c)         Suppose the seller offers a price p=$66. What is the best response of the buyer? Should the seller offer this price?    [4 Points] d)        Suppose the seller offers a price p=$96. What is the best response of the buyer? [3 Points] e)         Is there any price at which agent S is willing to sell and agent B is willing to buy? Please provide a complete proof.    [6 Points] Question 2   [16 points] Now suppose there is a rating agency in the above bond market. The rating agency evaluates the company that issued the bond. The buyer can acquire information at cost of $8. Suppose the rating agency announces an AA rating, i.e. there is a 10% probability that the payoff of the bond is $40. a)        Is there trade in equilibrium? If so, what is the price the seller is offering? [8 Points] Suppose the rating agency announces a BB rating, i.e. there is a 90% probability that the payoff of the bond is $40. b)        Is there trade in equilibrium? If so, what is the price the seller is offering? [4 Points] c)         How does the rating agency create liquidity in the bond market? Please provide an intuitive explanation. [4 Points] Question 3   [12 points] Consider the following economy with three dates (t=0, 1, 2). A firm needs to raise I=$100 to finance a project at t=0. At t=2, the project generates $400 if it is a success or pays off nothing if it is a failure. Both cases are equal likely. At t=1, the firm learns about the outcome of the project. There is an early consumer who has w=$100 at t=0 and the utility function uE  = cE0  +1.2. min[cE1,100] + max[cE1  −100,0]+ cE2 . There is a late consumer who has W=$320 at t=1 and the utility function  uL   = cL0  + cL1  + cL2 . Suppose the firm issues equity at t=0 to raise $100. As a listed company, at t=1 the firm reports whether the project is a failure or success.  If the early consumer buys equity at t=0, he sells his equity holding to the late consumer at t=1 after the announcement of the firm. a)         What equity contract does the firm offer the early consumer so as to get $100?  What is the fraction of equity the firm is selling? [6 Points] b)        What is the price of the equity at t=1? What is the expected utility of the early consumer at t=0? [4 Points] c)         What is the expected profit of the firm at t=0? [2 Points] Question 4  [12 points] Now suppose there is bank in the above economy. The bank provides loans to firms and keeps  information secret. Consumers do not observe whether the project is a failure or success. At t=2 the bank is liquidated and consumers who have deposits with the bank get back what the bank owns them at t=2. The bank offers the early consumer the following demand deposit contract. If the early consumer deposits $100 at t=0, he can withdraw $100 at t=1. The bank offers the late consumer the following contract. If he deposits $100 at t=1, he gets back the loan that the firm repays to the bank since the bank is liquidated at t=2. a)         What loan contract does the firm offer the bank to get $100? Does the early consumer deposit $100 at t=0 and does the late consumer deposit $100 at t=1? [10 Points] b)        What is the expected profit of the firm?  [2 Points]

$25.00 View

[SOLVED] AP Macroeconomics Mock Test 1

AP Macroeconomics Mock Test 1 1. The concept of opportunity cost would no longer be relevant if (A) poverty in an economy no longer existed (B) the supply of all resources were unlimited (C) resources were allocated efficiently (D) real wages were flexible (E) all current incomes were invested in technological research 2. On the basis of the diagram above showing an economy's production possibilities curve for two goods, which of the following statements must be true? I. The opportunity cost of moving from point P to point R is 10 units of Y. II. The opportunity cost of moving from point R to point P is 8 units of X. III. The opportunity cost of moving from point Q to point R is 0 units of Y. (A) I only (B) III only (C) I and II only (D) II and III only (E) I, II, and III 3. Suppose two countries are each capable of individually producing two given commodities. Instead, each specializes by producing the commodity for which it has a comparative advantage and then trades with the other country. Which of the following is most likely to result? (A) The two countries will become more independent of each other. (B) Unemployment will increase in one country and decrease in the other. (C) There will be more efficient production in one country but less efficient production in the other. (D) Both countries will become better off. (E) Both countries will be producing their commodity inefficiently. 4. Assume that for consumers, pears and apples are substitutes. It is announced that pesticides used on most apples may be dangerous to consumers’ health. As a result of this announcement, which of the following market changes is most likely to occur in the short run in the pear market? 5. A leftward shift of the supply curve for computers could be caused by which of the following in the short run? (A) A decrease in the number of computer manufacturers (B) A decease in taxes on computer manufacturers (C) A decrease in the price of computers (D) A decrease in the price of components used to assemble computers (E) An increase in the price of mobile devices, a substitute good 6. Which of the following is true according to the circular flow model? (A) Firms are suppliers in both the product and factor markets. (B) Firms are demanders in the product markets and suppliers in the factor markets. (C) Households are demanders in both the product and factor markets. (D) Households are demanders in the product markets and suppliers in the factor markets. (E) The government is a demander in the product market only. 7. As a measure of economic welfare, gross domestic product underestimates a country's production of goods and services when there is an increase in (A) the production of military goods (B) the production of antipollution devices (C) crime prevention services (D) household production (E) legal services 8. Which of the following individuals is classified as unemployed? (A) A fifteen-year-old high school student who is looking for a babysitting job (B) A laid-off computer programmer who has given up looking for a new job (C) A parent who works in an after-school day care center for 15 hours a week (D) A recent college graduate who is looking for her first job (E) A mayor who lost an election and retired 9. The consumer price index (CPI) does not measure the true cost of inflation because (A) improvements in the quality of goods or services are not fully reflected (B) lenders are better off when actual inflation is less than anticipated inflation (C) borrowers are better off when actual inflation is greater than anticipated inflation (D) changes in consumers’ real income are not accounted for (E) consumers may substitute toward more expensive goods without being significantly worse off 10. A lender will realize unexpected benefit when the (A) actual inflation rate is higher than the anticipated inflation rate (B) actual inflation rate is lower than the anticipated inflation rate (C) rate of interest is greater than the actual rate of inflation (D) rate of interest is less than the actual rate of inflation (E) rate of interest equals the actual rate of inflation 11. The nation of Turboland produces only two goods, X and Y. The prices and final quantities produced of the two goods in 1993 and the base year of 1992 are shown in the table below. What are the nominal GDP and real GDP in 1993? (A) Nominal GDP is $90, Real GDP is $96 (B) Nominal GDP is $74, Real GDP is $96 (C) Nominal GDP is $70, Real GDP is $96 (D) Nominal GDP is $96, Real GDP is $90 (E) Nominal GDP is $96, Real GDP is $74 12. The figure above shows data for actual real GDP and potential real GDP from year 1 to year 6 for an economy. Which of the following is true based on this figure? (A) The economy is in expansion from year 1 to year 3 . (B) The economy is in recession from year 3 to year 5 . (C) There is an inflationary gap from year 2 to year 4. (D) The economy is at full employment in year 5 . (E) The economy is in long-run equilibrium in year 2. 13. When an economy is in equilibrium at potential gross domestic product, the actual unemployment rate is (A) equal to the cyclical rate (B) greater than the natural rate (C) less than the natural rate (D) equal to the natural rate (E) equal to zero 14. Which of the following changes would cause an economy’s aggregate demand curve to shift to the right? (A) An increase in spending on imports (B) An increase in autonomous consumption spending (C) An increase in interest rates (D) A decrease in the money supply (E) A decrease in the overall price level in the economy 15. If the marginal propensity to consume is 0.75, then a $100 increase in investment will result in a maximum increase in equilibrium real gross domestic product of (A) $40.00 (B) $100.00 (C) $133.33 (D) $400.00 (E) $500.00 16. Which of the following will most likely cause the short-run aggregate supply curve to shift to the left? (A) A decrease in nominal wages (B) A decrease in the expected rate of inflation (C) An increase in energy prices (D) An increase in the price level (E) An increase in the size of the labor force 17. Which of the following must be true in the long run? (A) Production increases when prices increase. (B) An increase in the price level reduces aggregate demand. (C) The natural rate of unemployment is not affected by changes in production capacity. (D) Full employment increases when price level decreases. (E) Prices and wages are flexible.

$25.00 View

[SOLVED] CEG8403 DoTI 2023-24

CEG8403 DoTI 2023-24 Reminder: Use a diagram and show your method of calculating. All answers should be correct to the nearest millimetre. 1 Horizontal Alignment Two straight sections of road are to be linked by a circular arc with symmetrical clothoid transition curves between the straight and curved sections. Deflection angle between the two straight sections Φ Radius of the circular arc R Rate of gain of radial acceleration q Design speed of the road 100kph a)           What is the length of the circular arc? b)           What is the minimum distance between the intersection point of the tangents and the alignment? [16 marks] 2 Vertical Alignment A parabolic vertical summit curve between two gradients has been designed in accordance with desirable minimum standards given in CD109 – Highway Link Design. Approach gradient g1 Departure gradient g2 Summit level hsum Chainage of the vertical intersection point                                         2513.615 m Design speed                                                                                               120kph a)           What is the chainage and level at each end of the curve? b)           Between what chainages is the level greater than 42m? [20 marks] 3 Horizontal Alignment An existing road with a design speed of 85 km/h passes from one tangent through a right hand circular arc onto a second tangent, and then through a left hand circular arc onto a third tangent which is parallel to the first.  The circular arcs are joined to the straights by clothoid transition curves. Radius of both circular arcs R Rate of gain of radial acceleration on all transitions q Length of straight between the two curves Lstr Length of both circular arcs 250 m a)    What is the perpendicular distance between the parallel straight sections? b)    Using the same tangents and Intersection Points, the arc radii are increased to 2500m and the transition curves upgraded to a design speed of 120 km/h.  How long is the straight section between the two curves after this redesign? [20 marks] 4 Vertical Alignment Design A road must be designed to cross some railway tracks. The approaches are both flat, with no horizontal curvature and are at the same level. The vertical alignment comprises a level approach at ground level, a sag curve, a single crest curve over the railway, and a sag curve returning to ground level. The maximum permitted gradient is 6%, and lengths of this gradient may be used between the crest and sag curves if required.  The railway tracks are at ground level, and are [W] metres wide. The road alignment must be at least [h] metres above ground level over this entire width. Width of the railway tracks W Clearance (height) between rail tracks and alignment h a)    Design the shortest combination of vertical curves using the desirable minimum standards from CD109 – Highway Link Design for a design speed of 60kph. Give your answers in a table with the following headings: Element description (hog, sag or gradient) Length (m) K value or Gradient (%) Start Level (m) End Level (m) Sag curve 0 b)   Show how much shorter the alignment could be made if the crest curve is redesigned to one step below desirable minimum K value, but all the other constraints remain the same.  Tabulate your answer as in section (a), and state the change in length due to the redesign. [24 marks] 5 Horizontal Alignment Two straight sections of road are to be linked by a wholly transitional curve comprising two clothoid spiral curves with differing rates of gain of radial acceleration. Deflection angle between the two straight sections of road Φ Design Speed V Rate of gain of radial acceleration for entry transition curve q1 Rate of gain of radial acceleration for exit transition curve q2 Answers required: a)           What is the value of the point radius where the two transition curves meet? b)           What is the distance between the horizontal intersection point where the two straight sections of road intersect, and the centre of the circle of which the point radius mentioned in part (a) above  is a part? [20 marks]

$25.00 View

[SOLVED] Economics of Business 2 Spring 2024 Tutorial III

Economics of Business 2 Spring 2024 Tutorial III Initially posted on Jan. 04, 2024 (VERSION 1) Read the following materials and answer the questions: Problem 1*: Lecture Note 4, Train Ch.4 Goal - Understanding the Ramsey Prices: Linear Independent Demands Problem 2**: Lecture Note 4, Train Ch. 4 Goal - Understanding the Ramsey prices with positive marginal costs Problem 3**: Lecture Note 5, Train Ch. 5 Goal - Understanding the Vogelsang-Finsinger Mechanism Problem 4*: Lecture Note 6, Train Ch. 6 (Specifically, Section 6.2) Goal - Understanding the Loeb-Magat Mechanism Problem 5**: Lecture Note 6, Train Ch. 6 (Specifically, Section 6.3) Goal - Understanding the Sappington-Sibley Mechanism * Answers are provided in Tutorials. ** Online answers are provided. Office Hours: - Hisayuki YOSHIMOTO: Wed.  9:00-9:55am, Thu.  9:00-9:55am (during the Semester 2 teaching period, except vacation and traveling periods), Zoom on- line room (link posted on Moodle) Note that office hours are for students who have studied materials and have some detailed/clarifying questions. Thus, office hours are not for solving prob- lems together with students or for re-explaining rudimentary concepts already addressed in the lecture but are for clarifying students’ specific/intellectual ques- tions (often with useful hints and tips to enhance students’ understandings). Questions related to tutorial problems are welcome. Use the office hours wisely to obtain better comprehension over the course materials. Motto: Let’s get many economic insights behind equations and numbers. Tip: Suggested to organize a student-studying group to solve and discuss prob- lems well. 1. Ramsey Prices with Linear Independent Linear Demands On the (fictional) Econo Kingdom Island, gas markets are monopolized by only one gas supplier, WhattaGas, that supplies gas to the island citizens. On the island, there are only two types of gas buyers: (H) Household buy- ers that have the demand function QH   = 1 ✁ sH  . PH , and (B) Business buyers that have the demand function QB   = 1 ✁ sB  . PB   where sH   = 1 and sB   = .   See the footnote.    It turns out that the island has in- exhaustible natural gas resources from the underlying volcano, and the marginal cost of gas production is zero (MC = 0). However,  WhattaGas incurs the fixed cost of F = 0.48 (unit is in hundreds of millions of pounds [i.e.  $100,000,000]) for the maintenance of island-wide gas pipeline sys- tem. Currently, WhattaGas  charges monopolistic prices in each market. To avoid explosive gas prices, the king has asked you to investigate the introduction of the Ramsey Prices so that they maximize the total surplus without a negative profit. (a) Draw the two figures of inverse demand functions, one for Household buyers (H) and the other for Business buyers (H). Separate the elastic and inelastic portions of demand for each buyers. At PH  = PB  = , which market has higher elasticity? (i.e. which market is more price sensitive?) (b) Calculate the (unregulated) monopolistic prices (PH(M)  and PB(M)) and quantities (QH(M)  and QB(M)) for each market. (c) If the king enforces WhattaGas to charge P = MC (first-best price) in each market, how much will the sales quantities in each marekt (QH(F)B  and QB(F)B ) be? (d) By using the demand functions, show that consumer surplus is CSi  = .s(Q) where i  ∈ {H, B}.   Then, by using the results in (b) and (c), calculate aggregate consumer surpluses under monopolistic prices CSM  = CSH(M) + CSB(M) and under first-best prices CSFB  = CSH(F B) + CSB(F B) . (e) The aggregate consumer surplus/welfare is defined by CS = CSH (QH )+ CSB (QB ).  An isowelfare contour is a combination of QH   and QB that gives the same level of CS. Graph five diferent levels of isowel- fare contours on the Q1-Q2  plane.

$25.00 View

[SOLVED] Economics of Business 2 Spring 2024 Tutorial II

Economics of Business 2 Spring 2024 Tutorial II Initially posted on Jan. 04, 2024 (VERSION 1) Read the following materials and answer the questions: Problem 1**: Lecture Note 1, Train (1991) Ch.1 Goal - Understanding the Rate of Return (RoR) regulation Problem 2*: Lecture Note 2, Train Ch.2 (Specifically, pp. 72-81) Goal - Understanding Return on Output (RoO) and Return on Sales/Revenue (RoS) regulations Problem 3**: Lecture Note 2, Train Ch.2 (Specifically, pp. 81-88) Goal - Understanding Return on Cost (RoC) regulation Problem 4**: Lecture Note 2, Train Ch.2 (Specifically, Section 2.5) Goal - Understanding Perfect Price Discrimination Problem 5*: Lecture Note 3, Train Ch.3 (Specifically, Section 3.2) Goal - Understanding a profit maximization problem under uncertainty Problem 6**: Lecture Note 3, Train Ch.3 Goal - Understanding the Rate of Return regulation under uncertainty * Answers are provided in Tutorials. ** Online answers are provided. O ce Hours: - Hisayuki YOSHIMOTO: Wed.  9:00-9:55am, Thu.  9:00-9:55am (during the Semester 2 teaching period, except vacation and traveling periods), Zoom on- line room (link posted on Moodle) Note that office hours are for students who have studied materials and have some detailed/clarifying questions. Thus, o ce hours are not for solving prob- lems together with students or for re-explaining rudimentary concepts already addressed in the lecture but are for clarifying students’ specific/intellectual ques- tions (often with useful hints and tips to enhance students’ understandings). Questions related to tutorial problems are welcome. Use the office hours wisely to obtain better comprehension over the course materials. Motto: Let’s get many economic insights behind equations and numbers. Tip: Suggested to organize a student-studying group to solve and discuss prob- lems well. 1. Rate of Return (RoR) Regulation On the (fictional) Econo Kingdom Island, there is only one parcel de- livery service Parcels-of-the-Caribbean  that supplies the delivery service to the island citizens.  The daily (single-day) demand function of par- cel service on the island is given by Q(P) = 100 ✁ P  (Quantity unit is in parcels), and the production function of Parcels-of-the-Caribbean is known as Q(K, L) = KL, where K is measured by the number of delivery vans and L is measured by the number of delivery workers. On the island, the wage of the postal labor is w = £168, and the rental fee of van is r = £168 (See footnote).  For simplicity, there is no fixed cost.  The current mo- nopolistic price of parcel service is PM   = £64 per shipment. The king is concerned about the expensive price of parcel service on the island and has asked you to start the investigation for government regulation. (a) Calculate the inverse demand function and the marginal revenue function. (b) Draw the figure of the inverse demand function and the marginal revenue function. Separate the inverse demand function into the portions of elastic and inelastic demands on the figure.  (Note: In Problem 1, we have learned MR = 0 divides elastic and inelastic portions of demand). Answer: (c) Write Parcels-of-the-Caribbean’s profit function π(K, L). (d) Given the information that the monopolistic price is PM   = £64 per shipment, how many parcels (QM ) does Parcels-of-the-Caribbean de- liver? Calculate the monopolistic quantity of delivery service (QM ). (e) Based on Parcels-of-the-Caribbean’s production function Q(K, L) = KL, draw the figure of isoquant curves. Also, based on the cost func- tion Cost = rK + wL, draw the cost-minimizing isocost lines. (f) In the previous problem, we have learned that the cost-minimizing condition (the kissing condition) is Use this condition to derive the cost-minimizing input choices of cap- ital (K * ) and labor (L* ) to produce QM . Table 1: Summary Table (g) Calculate the profit (πM ), consumer surplus (CSM ), and total sur- plus (TSM ) under the (unregulated) monopolization. Then, fill out the column of “unregulated optimal” in the summary table. (h) How much is the capital labor ratio (L*/K*) under the (unregulated) monopolization of parcel service? (i) The king has now asked you to apply the Rate of Return regulation. Your assistant creates the figure of the isoprofit contours as below. The top of the profit hill is at (K * ; L* ) = (6; 6), as you have solved before. You suggest to the king to set the allowed rate of return on capital to be $27 per capital. Under this regulation, Parcels-of-the- Caribbean’s optimal input choices are known as (KROR ; LROR ) = (8; 5).  The hill sihouette with L = 5 is plotted below. How much is the output (QROR ), profit (πROR ), consumer surplus (CSROR ), and total surplus (TSROR ) after this regulation?  Does the total surplus increase under this ROR regulation, compared to the unregulated total surplus? State your economic insights (within 70 words). Then, complete the column of “regulated optimal” on the summary table. (j) How much is the capital labor ratio ( ) after this ROR regu- lation?  Does it increase or decrease, compared to the unregulated capital labor ratio ( )?  State your economic insights with the phrase “ine cient input choices” (within 70 words). (k) If Parcels-of-the-Caribbean is not regulated, what are the cost-minimizing input choices that allow to produce the quantity of QROR? Use the cost-minimizing condition derived before.  Why doesn’t Parcels-of- the-Caribbean use the cost-minimizing inputs under ROR regulation? State your economic insights as a consultant (within 100 words). 2. Return on Output  (RoO) vs Return on  Sales/Revenue  (RoS) Regulation Somewhere in the Caribbean, there is the (fictional) Econo Kingdom Is- land. On the island, there is only one bus transportation supplier, Yellow Banana-Marine Bus, that supplies bus transportation service with yellow buses to the island citizens. It is known that the inverse demand for bus service is P  = 7 ✁ Q on the island, where P is a bus-ticket price (unit is in pounds) and Q is the number of passenger rides (unit is in tens of thousand of rides [i.e. 10,000 rides]). The Yellow Banana-Marine Bus has the production function of transportation service Q(K, L) = KL, where K  is the value of bus vehicles (unit is in tens of thousands of pounds [i.e.  $10,000]), and L is the bus driver working hours (unit is in tens of thousands of hours [i.e.   10,000h]).  For simplicity, we assume that L  = 0.1 and w  = 10  (so a bus driver’s wage is 10 pounds per hour) and are fixed due to the unchangeable labor contract.  In addition, the Yellow Banana-Marine Bus’s fixed cost is F = 4 (unit is in tens of thou- sands of pounds [i.e.  $10,000]).  Under these assumptions, the produc- tion function becomes Q(K) = K, and the total cost function becomes TotalCost(K) = rK + wL + F = K + 10 . 0.1 + 4 = K + 5. (Note: based on this cost function, we can re-interpret the fixed cost as F1  = 5, instead of F = 4, in this question (The unit of fixed cost is in tens of thousands of pounds [i.e. $10,000]). Also, the interest rate (rental rate) is r = 1 on the island.    The king appreciated your previous economic consultation and has asked you again to investigate this monopolized bus market. (a) Derive the marginal cost function.  Then, draw the figure of inverse demand, marginal revenue, marginal cost, and average cost func- tions.  On the figure, separate the elastic and inelastic portions of demand. FYI, the inverse demand and average cost functions inter- sect at (Q, P) = (5, 2).  Then, calculate the monopolistic quantity QM  and price PM . (b) Calculate the consumer surplus CSM , profit πM , and total surplus TSM  under this monopolization. Now, the king introduces the Return on Output (RoO) regulation. The king sets the allowed profit per unit of output at kRoO   = 3/4. The figure below depicts the feasible and allowed profits. (c) Concisely describe the Return on Output (RoO) regulation (within 50 words). (d) How much does the monopolist earn (πRoO ) under this RoO regu- lation? Also, how much is the consumer surplus (CSRoO ) and total surplus (TSRoO )? (e) Does Yellow Banana-Marine Bus  have an incentive to waste its in- puts under RoO? Also, can the RoO regulation make the firm produce the output at which the demand becomes inelastic? (f) If kRoO  is infinitesimally close to 0, can the island attain infinitesi- mally the chose to second-best outcome?  If so, how much will the total surplus be?  If he does, what will happen to the firm’s profit? State the economic insights as an economic consultant (within 100 words). Alternately, the king considers introducing the Return on Sales/Revenue (RoS) regulation.  Under the RoS regulation, the government regu-lates an allowed profit to be where the kRoS is the proportion of sales/revenue that can be retained as an allowed profit. The king plans to set kRoS  = . (g) Derive the revenue and allowed profit functions. Then, calculate the allowed profit maximizing level of output and the maximum value of allowed profit. (Note: the feasible profit, revenue, and allowed profit are plotted as below ) (h) How much output does  Yellow  Banana-Marine  Bus   choose under this RoS regulation?  How much is the monopolist’s profit (πRoS ), consumer surplus (CSRoS ) and total surplus (TSRoS )?  Does the monopolist have an incentive to waste its inputs? (i) Briefly state what will happen when the king sets kRoS  infinitesimally close to zero. Also, under this RoS regulation, can the king make the monopolist produce a quantity that falls into the inelastic portion of demand? As a consultant, state your economic insights (within 100 words). 3. Return on Cost (RoC) Regulation Note: This problem is the sequel to the problem in Tutorial I. On the (fictional) Econo Kingdom Island, there is only one parcel de- livery service, Parcels-of-the-Caribbean, that supplies the delivery service to the island citizens. The inverse demand function of parcel service on the island is given by P  = 100 ✁ Q, and the production function of Parcels- of-the-Caribbean  is known as Q(K, L) = KL, where K  is measured by the number of delivery vans and L is measured by the number of delivery workers. On the island, the wage of the postal labor is w = £168, and the rental fee of van is r = £168.  For simplicity, there is no fixed cost.  The current monopolistic price of parcel service is PM   = £64 per shipment. The king is concerned about the expensive price of parcel service on the island and has asked you to start the investigation for government reg- ulation.  The feasible profit in this problem is plotted below.  Note that the maximum of unregulated profit is attained at (K, L) = (6, 6), and the units of variables are the same as previously defined. (a) Derive the revenue [Revenue(Q)], marginal revenue [MR(Q)], cost [Cost(K, L)], and profit [π(K, L)] functions.  Then, draw the figure of the inverse demand and marginal revenue functions. Furthermore, separate the inverse demand function into the portions of elastic and inelastic demands on the figure. (b) Based on the Parcels-of-the-Caribbean’s production function Q(K, L) = KL and cost function Cost(K, L), draw the figure of isoquant curves  and isocost lines.  Also, by using the “kiss” condition (see Tutorial I), derive the expansion path. (c) Given the information that the monopolistic price is PM    = £64 per shipment, how many parcels (QM ) does Parcels-of-the-Caribbean deliver?  How much capital (KM ) and labor (LM ) are required to cost-minimizingly produce QM? In addition, derive the monopolistic profit πM , consumer surplus CSM , and total surplus TSM . Now, the king considers introducing the Return on Cost (RoC) regu- lation. Under the RoC regulation, the firm’s allowed profit becomes where kRoC   is the proportion of costs that the firm is allowed to retain as profit.  After the regulation, (i) feasible profit, (ii) allowed profit, (iii) feasible and allowed profits, and (iv) feasible and allowed profit (viewed from a diferent angle) look as plotted below. (d) The constraint curve (see Train Ch.2, Figure 2.12, pp.  83) has its top at (K; L; π) = (7; 7; 147). Calculate the kRoC  in this regulation. Answer: (e) Briefly discuss (within 100 words) if the monopolist has an incentive to e ciently use inputs under this RoC regulation. You may use the expansion path derived in (b). (f) How much output does the monopolist produce under this RoC regu- lation? Also, calculate the (allowed) profit (πRoC ), consumer surplus (CSRoC ), and total surplus (TSRoC ).  Compared to the answer in (c), how much increase in total surplus does the island gain? (g) The king further considers reducing the kRoC   toward 0 so that the monopolist produces a quantity that falls into the inelastic portion of demand. As his trusted economic consultant, discuss if this plan would work or not (within 200 words). 4. Perfect Price Discrimination and Full Surplus Extraction This continues from Tutorial I, the cigarette monopolization by Smokes- A-Lot  on the island.  The demand for cigarettes on the island is Q(p) = 20 ✁ 2P (and the inverse demand function is P (Q) = 10 ✁ Q). The mo- nopolistic cigarette supplier Smokes-A-Lot has the marginal cost MC = 2 and fixed cost F = 7.5. So, the average cost function is AC  FYI, the average cost function and the demand function intersect at (Q, P) = (15, 2.5).  The units of variables are the same as previously defined. (a) Re-draw the figure of inverse demand, marginal cost and average cost functions. (b) One day, the CEO of Smokes-A-Lot visits the used-book store on the island and finds a book, “Willingness  To  Pay:   The  Secret  of Island Smokers ,” that precisely describes, by name, each and every island citizen’s willingness to pay for cigarettes (i.e.  individual demand function). The CEO immediately buys the book (the book price is almost free) and decides to implement perfect price discrimination in the cigarette market with the information given in the book. Accord- ing to this amazing (and magical) book, the CEO sells the first box of cigarettes at £10 to a buyer who has the highest willingness to pay on the island.    Then, he sells the second box at slightly lower than £10 to a buyer who has the second highest willingness to pay.  He continues to sell more cigarette boxes at incrementally lower prices (perfect price discrimination). Under this perfect price discrimination, when will the CEO stop low- ering the price of another box of cigarettes?  Does he stop selling at the average cost price or at the marginal cost price?  State your economic insights (within 100 words). Usually, the monopolist sets a single price for its products to maxi- mize its profit (Law of Uniform Price). Contrarily, under the perfect information and under the perfect price discrimination, the monopo- list can set “many/numerous” prices to discriminate each consumer at each of his/her purchasing quantity.  As a result, it is optimal to keep incrementally decreasing prices until the price is equal to the marginal cost, MC = 2. It is not profit maximizing for the monopo- list to stop selling at the average cost (P = 2.5) as it can earn more profit by selling products at prices above marginal cost and earn more profit. (c) How much profit (πPPD ) does Smokes-A-Lot  gain after this per- fect price discrimination? Also, how much is the consumer surplus (CSP PD ) and total surplus (TSP PD )? Is this result the first-best or the second-best outcome? The monopolist earns all surplus above the marginal cost with T talSurplus = 2/1 . 8 . 16 - 7.5 = 56.5 (million pounds), and this is the first-best outcome. (d) Does Smokes-A-Lot  have incentive to minimize its cost under the perfect price discrimination?  State your economic insight as a con- sultant (within 100 words). (e) (Almost) Full Surplus Extraction: The king gets the idea to sell the monopoly right (exclusive right) of cigarette sales to Smokes-A- Lot to raise money.  After purchasing this monopoly right, Smokes- A-Lot will be the o cial monopolistic cigarette supplier on the island with perfect price discrimination. The king asks you as an economic consultant to set the price on this monopoly right. What price would you suggest for this monopoly right?  (Hint: What is the maximum amount of money the king can extract from Smokes-A-Lot  without making the firm earn a zero or negative profit?) The king sets the monopoly right price infinitesimally close to 56.5 million pounds.  At this price Smokes-A-Lot  can earn an infinitesi- mally small profit (that is higher than but close to zero profit) and keep producing cigarettes. The king extracts the (infinitesimally close to) full total surplus. 5. Monopolistic Firm's Profit Maximization under Uncertainty On the (fictional) Econo Kingdom Island, there is one royal rugby team, Scrum Rummies, that is a member of the Caribbean international rugby league. It is well known that the performance of the team varies across seasons. The team has good performance with probability Pr(Good) = and bad performance with probability Pr(Bad) = . It is also known that the inverse demand for season tickets for the good performance season is P (Q) = 20 ✁ Q.  (Note that the unit of price is in hundreds of pounds [i.e.$100] while that of quantity is in thousands [i.e. 1,000 season ticket]). Also, the demand for season tickets for the bad performance season is P (Q) = 10 ✁ Q. However, the island citizens, including the king, do not know the team’s performance before the season. Rugby is a major sport on the island, and the king’s agency, a for-profit firm, sells the season tickets. For simplicity, there are no marginal or fixed cost for selling tickets. Also, only season tickets are sold to the island citizens. (a) If the island citizens and the king knew the team’s performance was going to be good, what would the king set the ticket price at to maximize profit? Derive the profit function, then solve for the profit maximizing ticket quantity (QG ) and price (PG ).  How much would the profit (πG ) be? (b) If the island citizens and the king knew the team’s performance was going to be bad, what would the king set the ticket price at to max- imize profit?  Derive the profit function, then solve for the profit maximizing ticket quantity (QB ) and price (PB ).  How much would the profit (πB ) be? (c) In reality, the king does not know the team’s performance before the season, yet he needs to set a season ticket price.  You, as a trusted economic consultant of the king, make a suggestion to the king to maximize the expected profit. Derive the expected profit function. (d) Draw the profit functions under good performance and bad perfor- mance. Also, draw the expected profit function. (Note: The horizon- tal axis is the ticket sales quantity, and the vertical axis is [expected] profits.) (e) How much is the ticket price (PE ) that maximizes expected profit? Is it higher or lower than the answers of (PG ) calculated in (a)? State your economic insights (within 50 words).

$25.00 View

[SOLVED] Homework 3 Practice Problems for Final Exams Part 3

Homework 3: Practice Problems for Final Exams Part 3 Question 1 0.5 / 0.5 pts A Walmart bond paying 5% coupon annually due in 4 years is selling at 91% of par value. The table below summarizes the spot rates. t   spot rate 1   3.20% 2   4.00% 3   4.90% 4   5.60% What should be the price of a bond from Walmart that offers 3% coupon and is due in 3 years (assume par=100). 91% 89.35% 102.55% None of these Question 2 0.5 / 0.5 pts The par yields are 4.5% for the one-year bond, 5.00% for the two-year bond, and 5.8% for the three-year benchmark bond. What is the forward rate (f3) for discounting CFs from year 3 to year 2? 7.57% 5.86% 5.01% None of this Question 3 0.5 / 0.5 pts A bond with par value of 100 paying 5% annual coupon is due after 3 years. Assume the following Forward rates for the four paths. t   LL   LH   HL   HH 1   2%   2%   2%   2% 2   4.50%   4.50%   6%  6% 3   5%   7%   7%   9% Value the bond (at time 0) by using path-wise valuation. 93.82 92.06 100.99 None of these. Question 4 0.5 / 0.5 pts The one-year forward rates are as follows(1) currently, F0,1 is 5%; (2) one years from now, F1,1 is 6.5%; (3) 2 years from now, F2,1 is 4%. A three-year 6% annual coupon bond is callable at par after 1 and 2 years from now. What is the value of the callable bond (as a percentage of par). 100.51 100 101.92 None of these Question 5 0.5 / 0.5 pts A bond with par value of 100 pays annual coupon of 5%; it is maturing in two years. The bond is callable at par at the end of year 1. The 1-year short rate is currently 2%. After one year (T=1), Forward Rate can be 8% or 4%; both scenarios are equally likely. What is the bond price at time 0? 97.22 102.55 100.84 None of these Question 6 0.5 / 0.5 pts The expected annual growth rate for a firm is 5% , the volatility is 25%. It's Debt-to-asset ratio is 50%. What is the probability of default (assuming debt is due in five years)? 8.99% 7.56% 23.11% None of these

$25.00 View

[SOLVED] Cs6300 individual project: transformtxt deliverable 3

This part of the document is provided to help you track where you are in the individual project. This section will be updated in future deliverables.ProvidedExpectedProvidedExpectedProvidedExpectedIn this deliverable, you will provide your own implementation of the transformtxt utility, written on the Main.java file. Your implementation must pass all of the test cases that you submitted as part of Deliverable 2 (D2). In addition, we will assume that someone else in your team developed a set of additional test cases, independently from you. Your code will also have to pass these additional tests.Please note that these tests all pass on the reference implementation we provided for D2, so they should be “compatible” with your own tests (as long as they passed in D2). Similar to D2, we are expecting the test class MyMainTest to be self-contained; that is, MyMainTest should not rely on any external classes or resources. However, you may use different classes or files to implement the transformtxt utility. Make sure not to make calls to System.exit() within your tests, as that creates problems for JUnit. For this deliverable, you should not modify or delete any of your D2 tests, but you may append additional tests to MyMainTest. Even if you later realize that your original D2 tests are inadequate or somehow do not test the intended program behavior, do not modify the original tests as it will result in a penalty. Instead, append improved tests to MyMainTest.Your grade for this deliverable will consist of two parts:Following are the steps to commit and submit this deliverable:javac -cp lib/* -d classes src/edu/gatech/seclass/transformtxt/*.java test/edu/gatech/seclass/transformtxt/*.javajava -cp classes:lib/* org.junit.platform.console.ConsoleLauncher –select-class edu.gatech.seclass.transformtxt.MyMainTest As soon as you submit, Gradescope will grade your submission by: If any of the above steps fails, you will see a grade of 0 and an error message with some diagnostic information. Please note that, as before, if your submission does not pass the Gradescope checks, it will receive a 0. Conversely, if Gradescope can successfully compile and run your code and both sets of tests, you will immediately receive a grade that is your actual grade for this deliverable (assuming you did not modify your D2 tests). Note that you can resubmit as many times as you want before the deadline.Unlike other assignments, this deliverable is not available to submit on Gradescope until the previous deliverable is due. That is, deliverable 3 will be available on Gradescope 48 hours after this assignment is released on Canvas.The test results that you see in Gradescope tell you whether a given test passed or not. If the test didn’t pass, Gradescope should show the difference between expected and actual outputs. For ease of readability, Gradescope will output newlines as “↵“, tabs as “⇥”, and a single space as ” “. Note that these values are not explicit and not expected as output of the transformtxt program; instead, they are replaced to make the Gradescope output easier to read. For example, if the expected output of a test is“Hello,tworld ” + System.lineSeparator()then Gradescope will show a message like… expected but was …If you need clarifications on a specific test or Gradescope output, please post privately on Ed Discussion (if appropriate, we will make it public) and make sure to add, when applicable:The bottom line is that, to make the interaction efficient, you should make your posts as self-contained and easy-to-check as possible. The faster we can respond to the posts, the more students we can help. Although we tested the autograder, it may still handle some corner cases incorrectly. If you receive feedback that seems to be incorrect, please contact us on Ed Discussion using the approach we describe above.In addition, if you think you have a legitimate reason to modify your D2 tests, reach out to us privately on Ed Discussion and provide all the necessary details, to include a justification for why specific tests passed the reference implementation, but failed in your implementation. We believe this should not be necessary, but we cannot completely exclude some rare corner cases. Answer: No, you can only delete or modify tests that did not pass in deliverable 2.Answer: It is recommended you use git-diff or the github interface to compare commits with the commits from your D2 active submission and D3 active submission. This will let you know which statements, if any, were changed.Answer: Unfortunately, we cannot give any further guidance from what was given in the assignment instructions above and/or feedback given from the Gradescope autograder.Answer: Yes, although there are some details to be aware of (1) make sure the autograder runs without problems, (2) ensure that the libraries must not be made specifically for any version of the assignment in the past or present, and (3) you are responsible for behavior of the library, and we will not help debug problems if you run into Gradescope issues using third party dependencies. We would like to caution that using such libraries may cause problems (such as the program exiting abruptly, etc.), and students should be extra careful and aware of what these libraries do.Answer: Yes, this shouldn’t result in an error and does not change any behavior. This will replace the substring “-w” with “all”. This happens because we parse -r first, so “-w” “all” becomes the parameters for -r, just like any other string. Answer: We cannot reveal any of the scenarios tested against.

$25.00 View

[SOLVED] Assignment 3 cmput 328

For Part 1, you are required to implement a Vision Transformer (ViT) and perform classification tasks on the CIFAR-10 dataset. The file vit submission.py contains incomplete code for the ViT model and the training function. Marks are allocated to different parts of the incomplete implementation, and your task is to complete the missing code and train the ViT model on the CIFAR-10 train dataset for submission. You are given vit submission.py and vit main.py. Please do not make any changes to vit main.py as you will not be submitting this file. vit submission.py provides the template code to start your implementation with specific requirements in the comment sections. In addition to completing the code for ViT training, there are a few additional requirements: • During training, at least 3 data augmentation techniques must be applied. • During training, a learning rate scheduler must be used. Failure to meet any of the above requirements will result in mark deductions for the respective parts. 1.1 Grading Please note that your code will not be debugged during grading, and there is no runtime penalty for this part. However, any submission that fails to run or achieves an accuracy below the specified accuracy threshold will receive no marks. More details on the marking criteria for Part 1 are provided below: • Code (2.5% out of 5%): Your code will be assessed for correctness. All missing components in vit submission.py must be completed to receive full marks for this part. Partial marks may be assigned based on the correctness of the implementation. • Accuracy (2.5% out of 5%): Your ViT model must achieve a minimum test accuracy of 65% on the CIFAR-10 test dataset. Marks will not be scaled linearly, and any submission with a test accuracy below 65% will receive no marks for this part.For Part 2, you are required to implement an image captioning model using the Huggingface Transformer library. Specifically, you will build a Sequence-to-Sequence (seq2seq) model that generates a text caption given an input image. This model will utilize a pretrained ViT (i.e. Google’s ViT-Base) as the vision encoder and OpenAI’s GPT-2 as the text decoder. The model is to be trained on the Flickr8k dataset. For your convenience, a download link for the Flickr8k dataset with train and validation splits is provided via a Google Drive link. You are given cap main.py and cap submission.py. Please do not make any changes to cap main.py as you will not be submitting this file. cap submission.py has some template code provided with hints to help you get started. You are free to modify the functions/classes and add your own code, but your submission must return and save a trained image captioning model locally. 1 2.1 Grading Please keep in mind that your code will not be debugged during grading. Again, there is no runtime penalty for this part. Unlike Part 1, there will be no partial marks for Part 2. Any submission that does not exceed the specified BLEU score threshold will receive no marks. Detailed marking criteria are as follows: • BLEU (5% out of 5%): Your best performing model will be evaluated over a hidden test set. Any submission with a BLEU score < 0.07% on the hidden test set will receive no marks for this part. Marks will not be scaled linearly. You should assess the performance of your model using the given validation set before submission, which should reflect the performance of your model on the hidden test set. 3 Additional Information 3.1 Submission Guidelines Submit a compressed zipfile as Assignment3-{Y ourCCID}.zip containing four files: a) your code implementation for Part 1; b) your code implementation for Part 2; c) your trained ViT model for Part 1; d) your trained image captioning model for Part 2. The zipfile structure should look like: Assignment3-{Y ourCCID}.zip vit submission.py vit-cifar10-{YourCCID}.pt cap submission.py cap-vlm-{YourCCID}.pt Additionally, given that the size of the trained models for this assignment are large. You will need to upload your zipfile onto a Google Drive, and submit the link to the eClass Assignment 3 submission page. Please ensure that you have modified the general access of your submission to ”University of Alberta”, so that the TAs can access and download your submission for grading. 3.2 Collaboration Policy This must be your own work. Do not share or look at the code of other students (whether they are inside or outside the class). You can talk to others in the class about solution ideas (but detailed enough that you are verbally sharing, hearing or seeing the code). You must cite online resources that were referred to and to whom you talked with, in the comments of your programs. The usage of ChatGPT is allowed, but not recommended. Additionally, if we have reason to believe that they do not understand the solution that they have submitted, we reserve the right to evaluate any student’s submission further through a viva.

$25.00 View

[SOLVED] Assignment 2 cmput 328

You are going to implement a Convolutional Neural Network (CNN) (class Net) to classify the CIFAR-10 dataset. The network architecture is not fixed. You will design the network architecture yourself. You can check out this tutorial to get started. However, there are some requirements that your network architecture must satisfy: 1. Your network architecture must have at least 4 layers (which is either a convolution or fully connected layer passed into an activation function like Relu, Tanh, etc). Max pooling or strided convolution layers used to downsample activation maps do not count. The number of layers in your network will be very close to the number of activation functions. 2. Must have at least 1 convolution layer. 3. Must have at least 1 max pooling. 4. Must have at least 1 fully connected layer at the end If your network architecture doesn’t satisfy any of the above requirements, marks will be deducted. For every requirement that is not satisfied, you lose 10 points. Similar to Assignment 1, observe the metrics on the validation set to check for overfitting.Implement a CNN model using a pretrained architecture (class PretrainedNet). Examples include AlexNet, ResNet, etc. This Pytorch documentation might help you out. Save the weights of the final fine-tuned model as best model.pth (CNN main.py does this for you). You will need to submit this! 3 Additional Information 3.1 Template Code You are given CNN main.py and CNN submission.py. Please do not make any changes to CNN main.py as you will not be submitting this file. CNN submission.py has some template code provided. You are free to make changes to the functions/classes and add your own, but make sure they return what CNN main.py is expecting. You are free to define your own training/validation splits and transforms in the function load dataset(pretrain). Some default template code has been provided, that you can modify if you wish to do so. If you need to define your own transformations for the test test, you can pass it to the main file by editing the variable test transform. You can use the variable pretrain if you want to define something different for part 2. 1 3.2 Running the Code If you have paramparse installed, you can use command line arguments. 1. Part 1: python3 CNN main.py 2. Part 2: python3 CNN main.py pretrained=1 or python3 CNN main.py pretrained=1 load model=1 if you want to load the saved checkpoint instead. The runtime displayed when load model=1 is the time taken for test set inference. (This is how we’ll run your submission for this part while grading!) 3.3 Grading Please keep in mind that there are no partial marks in this assignment. Your code will not be debugged while grading. Any submission that fails to run or does not fall above the Accuracy lower-bound will get no marks. Exceeding Runtimes will result in penalties. All runtimes are with respect to Colab GPU. Runtime penalty: If you exceed the runtime threshold by 10*k%, you will be penalized k%. For example, if you exceeded the runtime by 20%, the incurred penalty will be 2%. 3.3.1 Part 1 1. Accuracy: should be minimum 65% to get the maximum score. Score will scale linearly from 55-65% on the test set. Any submission with a test accuracy < 55% will get no marks. 2. Runtime: Should be less than 300 seconds. 3.3.2 Part 2 1. Accuracy: should be minimum 90% to get the maximum score. Score will scale linearly from 80-90% on the test set. Any submission with a test accuracy < 80% will get no marks. 2. Runtime (inference on test set only): Should be less than 150 seconds 3.4 Submission Guidelines Zip CNN submission.py and best model.pth into Assignment2.zip. If you unzip the file, your folder structure should look like: Assignment2 CNN submission.py best model.pth Do not submit CNN main.py . 3.5 Collaboration Policy This must be your own work. Do not share or look at the code of other students (whether they are inside or outside the class). You can talk to others in the class about solution ideas (but detailed enough that you are verbally sharing, hearing or seeing the code). You must cite online resources that were referred to and to whom you talked with, in the comments of your programs. Chatgpt is allowed. However, we reserve the right to evaluate any student’s submission further through a viva, if we have reason to believe that they do not understand the solution that they have submitted.

$25.00 View

[SOLVED] Cmput 328 assignment 1

Implement Logistic Regression in PyTorch (You can make use of the multiple linear regression notebook from lecture): a) Train and test on MNIST by defining your own data pipeline for training, validation and testing using PyTorch dataloader. ● Use the last 12,000 samples of the train set as validation set. ● Test the trained model on the validation set every few epochs to prevent overfitting. ● Do not use the test set for training. ● Use Stochastic Gradient Descent (SGD) as an optimizer. ● Use the CrossEntropy loss. b) Add a regularization term to improve your model (L1 or L2 regularization, whichever gives better accuracy) Expected Performance: A correctly implemented, and somewhat well-tuned version of this algorithm will have an accuracy of 92-94% on both test and validation sets of MNIST. You need to complete the function logistic_regression in A1_submission.py for this part. The return type of the function is a dictionary where you have to assign your trained logistic regression model to the variable model = None.Implement a Fully-connected Neural Network using the built-in functions of PyTorch. Train this network on the CIFAR10 dataset with CrossEntropy loss. The CIFAR10 dataset each image dimension is 32x32x3 as it is a color RGB image. Please refer to the Network Architecture section for the specifications. You need to complete the class FNN in A1_submission.py to implement the forward pass as well as the loss computation. ● __init__(self, loss type, num classes) initializes your network layers ● forward(self, x) takes a batch of images as a tensor of size N × (32*32*3) and returns the class probabilities as a tensor of size N × 10 where N is the batch size ● get_loss(self, output, target) takes the output of the forward pass and ground truth labels of the corresponding images and returns a tensor containing the loss computed according to the loss type argument of __init__ Network Architecture Yp = Softmax(Relu(Tanh(XW1 + b1 )W2 + b2 ))W3 + b3 ) You can use built-in torch functions for defining the layers (nn.Linear) and activations. Dimensions of the vectors and matrices are as follows: X contains the input images having a shape (N × (32*32*3)). N is the batch size. W1 is (32*32*3 × 64), b1 is (1 × 64), W2 is (64 × 32), b2 is (1 × 32), W3 is (32 × 10), b3 is (1 × 10). Output probabilities Yp has the shape (N × 10). Note that for each of N indices in the first dimension, the softmax function is applied along the second dimension of its input matrix.Find optimal hyperparameters using Adaptive Moment Estimation (Adam) as an optimizer on both part 1 (Logistic Regression) (1% of the part-3 weight) and part 2 (FNN) (1% of the part-3 weight). ● You should perform grid search or random search for finding the optimal hyper-parameters using accuracy on the validation set and select the best configuration. ● You can also use more advanced search strategies like evolutionary search, but you are not allowed to use any automatic parameter search methods like scorch. ● You cannot use the test set during this process. You need to complete the function tune_hyper_parameter in A1_submission.py for this part. Since you require the best parameters and best metric for each of the models, keep them as a list of dictionaries, where the first dictionary in the list contains best parameters and metric for part-1 and the second dictionary for part-2. It’s up to you how you want to keep the dictionary for each part as long as the parameters and metrics names used as keys in the dictionary are self explanatory. Template Code You are provided with template code in the form of three files: A1_main.py, FNN_main.py and A1_submission.py. You need to complete the two functions (i.e. logistic_regression for part 1, tune_hyper_parameter for part 3) and FNN class in A1_submission.py. You can add any other functions or classes you want to A1_submission.py but do not make any changes to FNN_main.py and A1_main.py. Running the code Your own machine Install python (version >= 3.6) if needed and install the required packages by running: python3 -m pip install numpy torch torchvision tqdm paramparse Run the code using: python3 A1_main.py python3 FNN_main.py It is recommended to use an IDE like pycharm or vscode to make debugging easier. Colab Run this from a code cell in notebooks: !python3 “” !python3 “” You can optionally install the paramparse package to enable command line arguments: !python3 -m pip install paramparse You can then use command line arguments as: part 1: !python3 “” mode=logistic part 2: !python3 “” mode=fnn part 3: !python3 “” mode=tune target_metric=accuracy Submission You need to submit only the completed A1_submission.py. Make sure to import any additional libraries you need so it can be used as a standalone Python module from FNN_main.py and A1_main.py. To reiterate, please do not submit FNN_main.py and A1_main.py or any other files generated by running the code. Marking Part 1: Marks will depend on correctness of the implementation along with the following metrics: ● Runtime: The total runtime of your submission (including training and testing) should not exceed 300 seconds for either dataset on Colab GPU. ● One trick to improve your run time is to grid search the hyperparameters first but only put in the best hyperparameters you found in your submission. ● Accuracy: Score scales linearly from 83 – 93% accuracy on the test set Part 2: Marks will depend on correctness of the implementation along with the following metrics: ● Runtime: The total runtime of your submission (including training and testing) should not exceed 300 seconds for either dataset on Colab GPU. ● Accuracy: Score scales linearly from 37-42% accuracy on the test set Part 3: Marks will depend on the correctness of your search implementation. ● Runtime: The runtime of your submission should not exceed 1500 seconds on Colab GPU. ● Accuracy: There are no specific accuracy requirements except there should be improvement in loss / accuracy compared to the baseline Runtime Penalty: If you exceed the runtime threshold by 10*k%, you will be penalized k%. For example if you exceed the runtime by 20% then the incurred penalty will be 2%.

$25.00 View

[SOLVED] Eece5644 assignment 4

Question 1 (50%) Train and test Support Vector Machine (SVM) and Multi-layer Perceptron (MLP) classifiers that aim for minimum probability of classification error (i.e. we are using 0-1 loss; all error instances are equally bad). You may use a trusted implementation of training, validation, and testing in your choice of programming language. The SVM should use a Gaussian (sometimes called radial-basis) kernel. The MLP should be a single-hidden layer model with your choice of activation functions for all perceptrons. Generate 1000 independent and identically distributed (iid) samples for training and 10000 iid samples for testing. All data for class l ∈ {−1,+1} should be generated as follows: x = rl  cos(θ) sin(θ)  +n (1) where θ ∼ Uni f orm[−π,π] and n ∼ N(0,σ 2 I). Use r−1 = 2,r+1 = 4,σ = 1. Note: The two class sample sets will be highly overlapping two concentric disks, and due to angular symmetry, we anticipate the best classification boundary to be a circle between the two disks. Your SVM and MLP models will try to approximate it. Since the optimal boundary is expected to be a quadratic curve, quadratic polynomial activation functions in the hidden layer of the MLP may be considered as to be an appropriate modeling choice. If you have time (optional, not needed for assignment), experiment with different activation function selections to see the effect of this choice. Use the training data with 10-fold cross-validation to determine the best hyperparameters (box constraints parameter and Gaussian kernel width for the SVM, number of perceptrons in the hidden layer for the MLP). Once these hyperparameters are set, train your final SVM and MLP classifier using the entire training data set. Apply your trained SVM and MLP classifiers to the test data set and estimate the probability of error from this data set. Report the following: (1) visual and numerical demonstrations of the K-fold cross-validation process indicating how the hyperparameters for SVM and MLP classifiers are set; (2) visual and numerical demonstrations of the performance of your SVM and MLP classifiers on the test data set. It is your responsibility to figure out how to present your results in a convincing fashion to indicate the quality of training procedure execution, and the test performance estimate. Hint: For hyperparameter selection, you may show the performance estimates for various choices and indicate where the best result is achieved. For test performance, you may show the data and classification boundary superimposed, along with an estimated probability of error from the samples. Modify and supplement these ideas as you see appropriate. Question 2 (50%) In this question, you will use GMM-based clustering to segment a color image. Pick your color image from this dataset: https://www2.eecs.berkeley.edu/Research/Projects/ CS/vision/grouping/segbench/BSDS300/html/dataset/images.html. 1 As preprocessing, for each pixel, generate a 5-dimensional feature vector as follows: (1) append row index, column index, red value, green value, blue value for each pixel into a raw feature vector; (2) normalize each feature entry individually to the interval [0,1], so that all of the feature vectors representing every pixel in an image fit into the 5-dimensional unit-hypercube. Fit a Gaussian Mixture Model to these normalized feature vectors representing the pixels of the image. To fit the GMM, use maximum likelihood parameter estimation and 10-fold crossvalidation (with maximum average validation-log-likelihood as the objective) for model order selection. Once you have identified the best GMM for your feature ectors, assign the most likely component label to each pixel by evaluating component label posterior probabilities for each feature vector according to your GMM, similar to MAP classification. Present the original image and your GMM-based segmentation labels assigned to each pixel side by side for easy visual assessment of your segmentation outcome. If using grayscale values as segment/component labels, please uniformly distribute them between min/max grayscale values to have good contrast in the label image. Hint: If the image has too many pixels for your available computational power, you may downsample the image to reduce overall computational needs).

$25.00 View

[SOLVED] Eece5644 assignment 3

Question 1 (60%) In this exercise, you will train many multilayer perceptrons (MLP) to approximate the class label posteriors, using maximum likelihood parameter estimation (equivalently, with minimum average cross-entropy loss) to train the MLP. Then, you will use the trained models to approximate a MAP classification rule in an attempt to achieve minimum probability of error (i.e. to minimize expected loss with 0-1 loss assignments to correct-incorrect decisions). Data Distribution: For C = 4 classes with uniform priors, specify Gaussian class-conditional pdfs for a 3-dimensional real-valued random vector x (pick your own mean vectors and covariance matrices for each class). Try to adjust the parameters of the data distribution so that the MAP classifier that uses the true data pdf achieves between 10%−20% probability of error. MLP Structure: Use a 2-layer MLP (one hidden layer of perceptrons) that has P perceptrons in the first (hidden) layer with smooth-ramp style activation functions (e.g., ISRU, Smooth-ReLU, ELU, etc). At the second/output layer use a softmax function to ensure all outputs are positive and add up to 1. The best number of perceptrons for your custom problem will be selected using cross-validation. Generate Data: Using your specified data distribution, generate multiple datasets: Training datasets with 100,500,1000,5000,10000 samples and a test dataset with 100000 samples. You will use the test dataset only for performance evaluation. Theoretically Optimal Classifier: Using the knowledge of your true data pdf, construct the minimum-probability-of-error classification rule, apply it on the test dataset, and empirically estimate the probability of error for this theoretically optimal classifier. This provides the aspirational performance level for the MLP classfier. Model Order Selection: For each of the training sets with different number of samples, perform 10-fold cross-validation, using minimum classification error probability as the objective function, to select the best number of perceptrons (that is justified by available training data). Model Training: For each training set, having identified the best number of perceptrons using cross-validation, using maximum likelihood parameter estimation (minimum cross-entropy loss) train an MLP using each training set with as many perceptrons as you have identified as optimal for that training set. These are your final trained MLP models for class posteriors (possibly each with different number of perceptrons and different weights). Make sure to mitigate the chances of getting stuck at a local optimum by randomly reinitializing each MLP training routine multiple times and getting the highest training-data log-likelihood solution you encounter. Performance Assessment: Using each trained MLP as a model for class posteriors, and using the MAP decision rule (aiming to minimize the probability of error) classify the samples in the test set and for each trained MLP empirically estimate the probability of error. Report Process and Results: Describe your process of developing the solution; numerically and visually report the test set empirical probability of error estimates for the theoretically opti1 mal and multiple trained MLP classifiers. For instance show a plot of the empirically estimated test P(error) for each trained MLP versus number of training samples used in optimizing it (with semilog-x axis), as well as a horizontal line that runs across the plot indicating the empirically estimated test P(error) for the theoretically optimal classifier. Note: You may use software packages for all aspects of your implementation. Make sure you use tools correctly. Explain in your report how you ensured the software tools do exactly what you need them to do. Question 2 (40%) Conduct the following model order selection exercise using 10-fold cross-validation procedure and report your procedure and results in a comprehensive, convincing, and rigorous fashion: 1. Select a Gaussian Mixture Model as the true probability density function for 2-dimensional real-valued data synthesis. This GMM will have 4 components with different mean vectors, different covariance matrices, and different probability for each Gaussian to be selected as the generator for each sample. Specify the true GMM that generates data in a way that has two of the Gaussian components overlap significantly (e.g. set the distance between mean vectors comparable to the sum of their average covariance matrix eigenvalues). 2. Generate multiple data sets with independent identically distributed samples using this true GMM; these datasets will have respectively 10, 100, 1000 samples. 3. For each data set, using maximum likelihood parameter estimation principle (e.g. with the EM algorithm), within the framework of K-fold (e.g., 10-fold) cross-validation, evaluate GMMs with different model orders; specifically evaluate candidate GMMs with 1,2,…,10 Gaussian components. Note that both model parameter estimation and validation performance measures to be used is log-likelihood of data. 4. Repeat the experiment multiple times (e.g., at least 100 times) and report your results, indicating the rate at which each of the the six GMM orders get selected for each of the datasets you produced. Develop a good way to describe and summarize your experiment results in the form of tables/figures.

$25.00 View