Assignment Chef icon Assignment Chef

Browse assignments

Assignment catalog

33,401 assignments available

[SOLVED] Statistics Assignment 2 Marketing Research

  Statistics Assignment #2 5 points Marketing Research INSTRUCTIONS: This assignment must be completed individually. This means that you may not ask any person other than the professor for help. You are permitted to use the internet to look up how to perform. certain operations in JASP or to look up certain statistical concepts. You can use generative AI (e.g., ChatGPT) to ask questions about what a certain term may mean or look up how to perform. a certain operation in JASP. You may not use AI to generate answers for any of these questions. If you have any question, please ask the professor directly. Instructions for this assignment assume that you are using JASP. You may use a different statistical software (e.g., SPSS, Stata, R) if you like, but it is your responsibility to make sure that the results, graphs, etc. from this software match the correct JASP output. Additionally, copy/pasting outputs directly from JASP into Word may cause some issues (e.g., table columns may not be properly aligned). As a result, I recommend that you screenshot the JASP output and then copy the screenshot into Word rather than just using the copy/paste function in JASP. You may not use Excel for this assignment. For early assignments, I will give you relatively detailed instructions about how to perform. certain functions and tests in JASP and notes to go with them. Please note that these instructions apply to a relatively recent version of JASP (version 0.18.3) for macOS. Other versions of JASP or JASP running on Windows or Linux may differ slightly. Once we have covered a certain function, the instructions will be less detailed. You should go back and look at old assignments and questions to see the more detailed notes on a certain function. Please use the “IBM Watson Customer Lifetime Value.csv” dataset posted on Canvas. This is a dataset that examines customer lifetime value for a car insurance company. Specifically, it contains detailed customer profile data, the service (policy) customers purchased, the vehicle information, the claim information, and whether customers responded to a recent promotion. Here is a list of the variables in the data: · Customer · State · Customer Lifetime Value · Response · Coverage · Education · Effective To Date · Employment Status · Gender · Income · Location Code · Marital Status · Monthly Premium Auto · Months Since Last Claim · Months Since Policy Inception · Number of Open Complaints · Number of Policies · Policy Type · Policy · Renew Offer Type · Sales Channel · Total Claim Amount · Vehicle Class · Vehicle Size For the first two questions in this assignment, imagine that the insurance company is evaluating whether the amount people claim differs based on gender and marital status. Specifically, the company wants to know: a. Do people of different gender groups (on average) claim different amounts? b. Do people of different marital status (on average) claim different amounts? Question 1 (1.75 points total) Load the data using the same method that you used in Assignment #1. For research question (a), the dataset divides gender into two groups (it is an old dataset). Because you are comparing claim amounts between two groups, the best way to do this is by using a t-test. T-tests are quick tests that tell you if the averages of some variable (in this case, claim amounts) are different across two groups (in this case, genders). To conduct a t-test in JASP, first click on the big “T-Tests” button at the top of the window. Click on “Independent Samples T-Test” under the “Classical” header. You choose “Independent Samples” because you are comparing different groups of people. You would choose “Paired Samples T-Test” if you were comparing datapoints from the same person at two different times. You would choose “One Sample T-Test” if you were just comparing the average of one group to a specific value (for instance, if the average claim was greater than $1,000). You should now see a new window that shows you the list of variables in the data on the left and a blank t-test “results table” on the right. On the left side, there is also two empty fields for “Dependent Variables” and “Grouping Variable.” Under the “Dependent Variables” field, you should put “Total Claim Amount.” You put this variable there because it is the variable you are comparing across the two groups. Under the “Grouping Variable” you should put “Gender.” You put this variable there because it contains the groups that you are comparing. A. Paste the screenshot of the T-Test result below (0.5 points): B. What is the p-value associated with the test? (0.25 points): C. Assume that you have a null hypothesis that men and women both submit the same size claims, on average. Before you run the test, you set a p-value cutoff (i.e., alpha value) of 0.05. Given the p-value from part (B), do you reject or fail to reject your null hypothesis? (0.25 points) D. Given your decision in part (C), do you believe men and women submit different average claim amounts? (0.25 points) E. Using information only from the test you just ran (i.e., using only what is in your answer from part A), can you conclude that men submit larger claims, on average, than women do? Why or why not? (0.5 points) Question 2 (1.25 points) For research question (b), the dataset divides marital status into 3 groups (Divorced, Married, and Single). Because T-Tests only allow you to compare averages across two groups, you need to use an ANOVA in this question to compare averages across more than two groups.  To conduct an ANOVA in JASP, first click on the big “ANOVA” button at the top of the window. Click on “ANOVA” under the “Classical” header. The process for conducting an ANOVA test in JASP is nearly identical to conducting a T-Test. The main difference is that the “Grouping Variable” field from the T-Test is called “Fixed Factors” for ANOVA. So, put “Total Claim Amount” in the “Dependent Variable” field and “Marital Status” in the “Fixed Factor” field. A. Paste the screenshot of the ANOVA result below. (0.5 points) B. What is the p-value associated with this test? (0.25 points) C. Unlike with t-tests, ANOVAs by themselves can only tell you if there are any differences between averages across the groups you are testing. That is, for example, it can only tell you if married people submit different claim amounts on average than single people OR if single people submit different amounts than divorced people OR if married people submit different claim amounts than divorced people. However, it cannot tell you which one of those it is. So, in this case, your null hypothesis is that “there are no differences in average claim amounts across groups.” Assuming a p-value cutoff (i.e., alpha value) of 0.05, do you reject or fail to reject this null hypothesis? (0.25 points) D. What do you conclude from this test? That is, do people with different marital statuses submit different average claim amounts or not? (0.25 points) Question 3 (1 point total) (EXAM) Imagine that you want to know whether income is positively correlated with house size. That is, do people who make more money own bigger houses? To do this, you write a survey that asks people how much money they make per year and how big their house is. You then run a correlation test to see if the correlation between income and house size is significantly different from zero. The test shows you that the correlation is 0.51 and the p-value is .01. a. Does this result suggest that there is likely to be a relationship between income and house size? (0.25 points) YES                          NO b. Does this result suggest that earning a higher income causes people to buy larger houses? (0.25 points) YES                          NO c. If the p-value of the test was .001 instead of .01, would this make you more confident or less confident that there is a reliable relationship between income and house size? (0.25 points) MORE CONFIDENT                LESS CONFIDENT d. Suppose that you wanted to become more confident that this relationship exists. Holding all else equal, which of these could you change to make the evidence of the relationship stronger? (0.25 points) INCREASE SAMPLE SIZE                INCREASE VARIANCE    INCREASE CORRELATION SIZE Question 4 (1 point total) (EXAM) Imagine that you want to know whether people are willing to drive at least 10 miles to shop at Trader Joe’s. To do this, you send potential Trader Joe’s shoppers a survey that asks them three different questions: 1. How far are you willing to drive to shop at Trader Joe’s? [Open Ended] 2. Are you willing to drive at least 10 miles to shop at Trader Joe’s? Yes or No 3. How willing are you to drive at least 10 miles to shop at Trader Joe’s? Definitely would not, Probably would not, I don’t know, Probably would, or Definitely would For Question 1, 8% of people gave a number larger than 10 miles. For Question 2, 10% of people answered “Yes.” For Question 3, 15% of people said either “Probably would” or “Definitely would.” We will assume that these people would drive 10 miles if they had to. a. Given these results, what is your best guess of the true proportion of people who would drive 10 miles to shop at Trader Joe’s? (0.5 points) b. Explain your answer to part a. (0.5 points)  

$25.00 View

[SOLVED] CSE 203B W25 Midterm

CSE 203B W25 Midterm 10AM 2/23/2025 - 10AM 2/25/2025 Submit your solution to Gradescope before the due time (no late submission). Policy of the Exam: 1.  This is an open-book take-home exam.  Internet search is permitted.  How- ever, you are required to work by yourself.  Consultation or discussion with any other parties is not allowed. 2. You are not required to typeset your solutions. We do expect your writing to be legible and your final answers clearly indicated. Also, please allow sufficient time to upload your solutions. 3.   You  are  allowed to  check your answers with programs in Matlab,  CVX, Mathematica, Maple, NumPy, SciPy etc.  Be aware that these programs may not produce the intermediate steps needed to receive credit. 4. If something is unclear, state the assumptions that seem most natural to you and proceed under those assumptions.  Out of fairness, we will not be answering questions about the technical content of the exam on Piazza or by email.  The solution will then be graded based on the reasonable assumptions made. Part I: True or False: Briefly explain your answer (30 pts, 3 pts each) I.1 Convex Set The set is convex. T/F: I.2 Matrix Solver Ifx(ˆ) is an approximate solution to Ax = b, then the relative residual is always larger than the relative error for any matrix A. T/F: I.3 Support Vector Machine Given a set of points {(xi , yi ) | i = 1,..., m}, where xi  ∈ Rn  and yi  ∈ {−1, 1}, we find ahyperplane with vector a ∈ Rn  and bias b ∈ R by solving the optimization problem: mina,b  ||a||2(2) , a ∈ Rn , b ∈ R  subject to yi (aT xi −b) ≥ 1, ∀i = 1, ...,m. To have a valid solution, the margin, defined as the distance from the hyper-plane to the closest point across both classes, is at least 1. T/F: I.4 Dual Cone K = {θ1 u1 + θ2 u2  | u1  = [3, −2]T , u2  = [1, 1]T ,θ 1  ≥ 0,θ2  ≥ 0}, its dual cone is K*  = {x1 u1  + x2 u2  | u1  = [2, 3]T , u2  = [−1, 1]T , x1  ≥ 0, x2  ≥ 0}. T/F: I.5 Convex Function If f1 (x) and f2 (x) are convex functions, their weighted sum f(x) = w1 f1 (x) + w2 f2 (x) is always convex, where w1 , w2  ∈ R. T/F: I.6 Conjugate Function Given function f(x) = x1(2) + 5x1 x2  − x2(2), where x ∈ R2 , then the conjugate of the conjugate function, f** (x), is equal to itself, i.e., f** (x) = f(x). T/F: I.7 Fenchel’s Inequality Fenchel’s inequality states that for any convex function f(x), its conjugate func- tion f* (y) satisfies: f(x) + f* (y) ≥ ⟨x, y⟩,    ∀x,y. Consider the following statement:  If f(x) is strictly convex and differentiable, then Fenchel’s inequality attains equality if and only if y = ∇f(x). T/F: I.8 Geometric Programming The geometric programming formulation can incorporate the posynomial equal- ity constraints, i.e. where K ≥ 1 and ck  > 0. T/F: I.9 Duality For any primal optimization problem, taking the dual of its dual problem and finding its optimal value always gives back the value equal to the optimal value of the original primal problem. T/F: I.10 Min Max Problem In the context of duality theory, if a minimax problem has a saddle point, the duality gap must be zero. That is, given Lagrangian L(x,λ), consider the min- imax objective: Assume that there exists a saddle point (x* ,λ* ) for the above objective, then the duality gap for the corresponding original optimization problem is zero. We assume that the saddle point satisfies the KKT conditions. T/F: Part II: Problem Solving:  Show your process Problem 1. Conjugate Function.  (20 pts) Find the conjugate function of the following functions. 1.1 f(x) = 2x2 − 5x + 9, where x ∈ R. 1.2 Consider the function where variable x ∈ Rn  and constant b ∈ R++ . Problem 2. Linear Programming.  (20 pts) and n = 7, perform steps A, B, and C for problems 2.1, 2.2, 2.3, and 2.4. A. Solve the following linear programming problems twice, once using the primal formulation and once using the dual formulation. B. Check the feasibility of the solution. If a solution is not found, explain why a solution is not available and suggest how to mitigate the issue if you are the project leader.  (For this exam, there is no need to solve the mitigated problem unless you feel the explanation is not convincing enough.) C. Compare the primal and dual solutions. If the primal and dual formulation solutions are different, explain the difference. 2.1. minimize f0 (x) = cTx subject to Ax ≤ b, x ∈ Rn. 2.2. minimize f0 (x) = cTx subject to Ax = b, x ∈ Rn. 2.3. minimize f0 (x) = cTx subject to Ax ≤ b, x ∈ R . 2.4. minimize f0 (x) = cTx subject to Ax = b, x ∈ R . Problem 3. KKT Conditions.  (30 pts) Imagine that you work for a bank handling its trading portfolio. Your task is to minimize the risk associated with the portfolio while generating decent returns. A variant of this problem can be formulated as a convex optimization problem. For the objective function, we have a covariance matrix Σ ∈ S+  associated with the risk and a vector x  ∈ Rn  associated with the investment portfolio. For inequality constraint, we have a minimum return threshold b ∈ R, and a vector α ∈ Rn , which represents the average rate of return of the stocks.  For the equality constraint. the total investment amount is fixed and normalized to one. Taking the above primal problem, you need to describe the following. a) Write the Lagrangian of the problem. b) Write the KKT conditions for the optimal x for the problem. c) Write the dual problem. d) Model this convex optimization problem in the convex solver of your choice. Describe the numerical value of the vector x and the minimum value of the problem. You are given the following: .

$25.00 View

[SOLVED] ECON1401 Economic Perspectives - 2025

ECON1401 Economic Perspectives - 2025 General Course Information Course Code :  ECON1401 Year :  2025 Term :  Term 1 Teaching Period :  T1 Course Details & Outcomes Course Description This course will engage you with the founding ideas of economics and their relevance to the social usefulness of modern economic science.  You will participate in active refection and debate about the discipline’s objectives and approaches as they have developed through history and as they relate to other social science and business disciplines. You will learn how modern-day problems are addressed in different subfelds of modern economics, how these endeavours relate to the historical development of economics, and where the frontiers of economics as a discipline presently lie. Course Aims The aims of the course are: 1. To prepare students to undertake advanced undergraduate study in economics grounded in a broad understanding of the place of the discipline in history and society. 2. To develop students’ awareness of the breadth, universality, and frontiers of the concerns addressed by economists. 3. To develop students’ expressive abilities in both spoken and written form. Relationship to Other Courses ECON1401 is required to betaken by all students in the Bachelor of Economics program, usually late in their frst year (ideally) or in the early part of their second year. Students are strongly discouraged from waiting until their fnal year to take ECON1401. ECON1401 is not a pre-requisite for other courses, but the School of Economics strongly recommends that ECON1401 betaken by students early in their program of study because its content informs the selection of higher-level courses and builds conceptual frameworks into which content from later courses can be placed. In addition to assuming basic competence in English and mathematics taken from highschool,  ECON1401 builds on material contained in ECON1101 Microeconomics 1. This pre-requisite will beenforced. Course Learning Outcomes Course Learning Outcomes Program learning outcomes CLO1 : Describe the historical development of economics as a science • PLO1 : Business Knowledge • PLO3 : Business Communication • PLO4 : Teamwork • PLO6 : Global and Cultural Competence CLO2 : Articulate the relevance of historical conceptions of economics to current socioeconomic problems and subfelds of economic research • PLO1 : Business Knowledge • PLO2 : Problem Solving • PLO3 : Business Communication • PLO4 : Teamwork • PLO6 : Global and Cultural Competence CLO3 : Compare a range of different disciplinary paradigms (e.g., economic, psychological, and legal) and their relative usefulness when analysing different social problems • PLO1 : Business Knowledge • PLO2 : Problem Solving • PLO3 : Business Communication • PLO4 : Teamwork • PLO5 : Responsible Business Practice • PLO6 : Global and Cultural Competence CLO4 : Chart the present subfelds of economic research and the main frontiers of economic understanding • PLO1 : Business Knowledge • PLO2 : Problem Solving • PLO3 : Business Communication • PLO4 : Teamwork • PLO5 : Responsible Business Practice • PLO6 : Global and Cultural Competence • PLO7 : Leadership Development Course Learning Outcomes Assessment Item CLO1 : Describe the historical development of economics as a science • Written assignment • Course Journal • Composite performance / participation (partly peer-assessed) CLO2 : Articulate the relevance of historical conceptions of economics to current socioeconomic problems and subfelds of economic research • Written assignment • Course Journal • Composite performance / participation (partly peer-assessed) CLO3 : Compare a range of different disciplinary paradigms (e.g., economic, psychological, and legal) and their relative usefulness when analysing different social problems • Oral Presentations 1 (partly peer-assessed) & 2 • Written assignment • Course Journal • Composite performance / participation (partly peer-assessed) CLO4 : Chart the present subfelds of economic research and the main frontiers of economic understanding • Oral Presentations 1 (partly peer-assessed) & 2 • Written assignment • Course Journal • Composite performance / participation (partly peer-assessed) Learning and Teaching Technologies Moodle - Learning Management System | Echo 360 Learning and Teaching in this course Lectures Lectures in Weeks 1 - 4 will focus on concepts pertaining to microeconomics, while those in Weeks 5, 7, 8, and 9 will focus on concepts pertaining to macroeconomics. Material in both sections is organised around big ideas in economics, the times and thinkers giving rise to them, and how they are used today in understanding and approaching socioeconomic problems and disciplinary frontiers. Lectures in both sections will provide guidance in how to think, evaluate arguments and evidence, and produce work in line with the standards of modern economic science. Lectures will contain a mix of lecture material delivery and Q&A time within the lecture. Tutorials Tutorials are an integral part of this course and will beheld for 1.5 hours each week, except in week 6. Please note that unlike many other courses, tutorials for this course start in Week 1. All tutorial streams will beheld face-to-face on campus. Tutorial discussions and activities will be extremely hands-on, structured on a “fipping the classroom” model and building on material that students have prepared. You should attend tutorials having done the week's readings. There is free and easy access to electronic or hardcopy versions of both textbooks and all assigned readings and associated materials for each week. Tutorials in some weeks will include pre-announced debates about economic policy, for which preparation will be required before class.

$25.00 View

[SOLVED] ECON3121 Industrial Organisation - 2025 Statistics

ECON3121 Industrial Organisation - 2025 General Course Information Course Code :  ECON3121 Year :  2025 Term :  Term 1 Teaching Period :  T1 Course Details & Outcomes Course Description Industrial Organization is a comprehensive course that studies the behaviour offrms and industries in the modern economic landscape. Through an exploration of market structures (including perfect competition, monopoly, and oligopoly), dynamic strategic interaction, price discrimination, product differentiation, advertising, entry and predation, this course aims to connect theoretical concepts with real-world relevance. By focusing on the behaviour offrms, competition outcomes, and market dynamics, you will develop a deep understanding of the economic forces at play in real-world markets. Course Aims This course is offered as part of the economics stream in the BCom and BEc degrees. A prerequisite for this course is ECON2101 Microeconomics 2. It aims to build upon the basic theories learned in Micro 1 (and Micro 2) using the mathematical tools learned in ECON1202 and ECON1203. It is useful but not compulsory to have taken ECON2112 Game Theory and Business Strategy before this course. The course complements ECON3123 Organisational Economics, and acts as a springboard for more advanced courses in industrial organisation and organisational economics. Course Learning Outcomes Course Learning Outcomes Program learning outcomes CLO1 : Identify economic problems faced by managers to assess trade-offs in decision-   making. • PLO1 : Business Knowledge • PLO2 : Problem Solving CLO2 : Solve relevant theoretical models and techniques to address economic problems. • PLO1 : Business Knowledge • PLO2 : Problem Solving CLO3 : Apply solved models to real-world issues using relevant studies from the literature to justify proposed solutions. • PLO1 : Business Knowledge • PLO2 : Problem Solving CLO4 : Critically analyse the underlying   assumptions of formal models and their relevance to real-world scenarios. • PLO2 : Problem Solving CLO5 : Communicate ideas, intuition, technical explanations, and areas of difculty in a succinct and logical manner both in teams and to external audiences. • PLO3 : Business Communication • PLO4 : Teamwork CLO6 : Identify and assess the social consequences of managerial decisions to produce suggestions to policymakers. • PLO1 : Business Knowledge • PLO5 : Responsible Business Practice • PLO6 : Global and Cultural Competence • PLO7 : Leadership Development Course Learning Outcomes Assessment Item CLO1 : Identify economic problems faced by managers to assess trade-offs in decision-   making. • Homework Assignments (0%, not marked) • In-session Test • Final Exam CLO2 : Solve relevant theoretical models and techniques to address economic problems. • Homework Assignments (0%, not marked) • In-session Test • Final Exam CLO3 : Apply solved models to real-world issues using relevant studies from the literature to justify proposed solutions. • Group Project • Homework Assignments (0%, not marked) • In-session Test • Final Exam CLO4 : Critically analyse the underlying   assumptions of formal models and their relevance to real-world scenarios. • Group Project • Homework Assignments (0%, not marked) • In-session Test • Final Exam CLO5 : Communicate ideas, intuition, technical explanations, and areas of difculty in a succinct and logical manner both in teams and to external audiences. • Group Project • Homework Assignments (0%, not marked) • In-session Test • Final Exam CLO6 : Identify and assess the social consequences of managerial decisions to produce suggestions to policymakers. • Group Project • Homework Assignments (0%, not marked) • In-session Test Learning and Teaching Technologies Moodle - Learning Management System | Echo 360 | Zoom Learning and Teaching in this course Learning Activities and Teaching Strategies The examinable content of the course is defned by the references given in the lecture schedule, the content of lectures, and the content of the tutorial program. Lectures The purpose of lectures is to provide a logical structure for the topics that make up the course; to emphasise the important concepts and methods of each topic, and to provide relevant examples to which the concepts and methods are applied. The lectures will be delivered in person (please refer to your myUNSW timetable for class time and location), and recordings will be available for  streaming and downloading. Tutorials Tutorials are an integral part of the subject. Tutorial discussion questions and problems will build on the material discussed in lectures. The tutorials may have two modes -- delivered over Zoom or by face-to-face depending on the mode of the session. The tutorials over Zoom will be recorded and the recordings will be available for streaming and downloading. Out-of-Class Study While students may have preferred individual learning strategies, it is important to note that most learning will be achieved outside of class time. Lectures can only provide a structure to assist your study, and tutorial time is limited. An “ideal” strategy (on which the provision of the course materials is based) might include: ·  Reading of the relevant chapter(s) of the textbook before the lecture. This will give you a general idea of the topic area. ·  Attendance at lectures. Here the context of the topic in the course and the important elements of the topic are identifed. The relevance of the topic will be explained.  ·  Attending tutorials and attempting the tutorial questions. Assessments Assessment Structure Assessment Item Weight Relevant Dates Program learning outcomes Homework Assignments (0%, not marked) Assessment Format: Individual 0% Start Date: Not Applicable Due Date: Not Applicable   Group Project Assessment Format: Group 30% Start Date: 25/02/2025 09:00 AM Due Date: 01/05/2025 05:00 PM • PLO1 : Business Knowledge • PLO2 : Problem Solving • PLO3 : Business Communication • PLO4 : Teamwork • PLO5 : Responsible Business Practice • PLO7 : Leadership Development In-session Test Assessment Format: Individual 25% Start Date: Online assessment. Access window: 3 PM - 5 PM on Saturday, March 22. Due Date: Online assessment. Access window: 3 PM - 5 PM on Saturday, March 22. • PLO1 : Business Knowledge • PLO2 : Problem Solving Final Exam   Assessment Format: Individual 45% Start Date: Online assessment in University Examination Period. Due Date: Online assessment in University Examination Period. • PLO1 : Business Knowledge • PLO2 : Problem Solving • PLO3 : Business Communication • PLO6 : Global and Cultural Competence

$25.00 View

[SOLVED] CSE 8B Introduction to Programming II Programming Assignment 5

CSE 8B: Introduction to Programming II Programming Assignment 5 Objects and Classes Due: Monday, February 24, 11:59 PM Learning goals: ●    Implement a simplified Reddit program using Java classes ●    Use the Java ArrayList class ●   Write unit tests for your classes This assignment must be completed INDIVIDUALLY. Coding Style [10 points] For this programming assignment, we will be enforcing the CSE 8B and 11 Coding Style Guidelines. These guidelines can also be found on Canvas and the class website. Please ensure to have complete file headers, class headers and method headers. Avoid using magic numbers, use consistent indentation and keep your lines short. Getting the Starter Code 1.  You can download the starter code from Piazza → Resources → Homework → PA5.zip 2.  After compiling Post.java and User.java, you should see the following in your terminal $ javac Post.java Post.java:65: error: cannot find symbol P1.upvoteCount = 5; ^ symbol:   variable upvoteCount location: variable P1 of type Post ... $ javac User.java User.java:55: error: cannot find symbol U1.karma = 10; ^ symbol:   variable karma location: variable U1 of type User ... These compiler errors are expected, as the method unitTests is trying to reference things that have not yet been implemented in the starter code! Things should compile cleanly once you've added in the instance variables for each class. You MUST NOT include any package statements in your code. Overview Reddit is a popular social news aggregation, content rating, and discussion website. Users submit content to the site such as links, text posts, images, and videos, which are then voted up or down by other members. In this programming assignment, we will create a simplified version  of Reddit, where users can create, upvote, and downvote posts. To do so, you will be completing the implementation of two classes: Post.java and User.java Part 1: Implementation [80 points] Post.java On Reddit, a post can exist as a stand-alone post in some community (subreddit) or as a comment on someone else's stand-alone post. In this write-up, we shall refer to the first type of post as an "original post" and the second type of post as a "comment". Both types of posts will be represented by the Post class (we'll use Post's instance variables to help us indicate whether a particular Post object is representing an original post or a comment) In this part of the assignment, you will implement the Post class which represents the properties of a reddit post. The UML diagram for the Post class is: To summarize, the Post class contains the following fields: private String title ●   The title of this Post. If this Post represents a comment, then title must be null. If this Post represents an original post, then title should be non-null. private String content ●   The content of this reddit Post. private Post replyTo ●   The Post object that this Post is replying to. If this Post is an original post, replyTo must be null. If this Post is a comment, then replyTo must be non-null. private User author ●   The author (represented as a User object) of this Post. private int upvoteCount ●   The number of upvotes that this Post has. private int downvoteCount ●   The number of downvotes that this Post has. and the following methods: public Post(String title, String content, User author) ●   The constructor for initializing an original post. ●   This constructor must set the title, content, and author fields of this Post object with the values from the parameters (e.g., the title field must be assigned the contents of the title parameter). ●   Set upvoteCount and downvoteCount to 0. ●    Set replyTo to null. public Post(String content, Post replyTo, User author) ●   The constructor for initializing a comment. ●   This constructor must set the content, replyTo, and author fields of this Post object with the values from the parameters (e.g., the content field must be assigned the contents of the content parameter). ●   Set upvoteCount and downvoteCount to 0. ●    Set title to null. public String getTitle() ●    Return the title of this Post. public Post get ReplyTo() ●    Return the Post object that this Post is replying to. public User getAuthor() ●    Return the author of this Post. public int getUpvoteCount() ●    Return the number of upvotes that this Post has. public int getDownvoteCount() ●    Return the number of downvotes that this Post has. public void updateUpvoteCount(boolean is Increment) ●    Increment the upvoteCount of this Post by 1 if is Increment is true. Otherwise, decrement upvoteCount by 1. ●   You may assume that we will not call updateUpvoteCount in such a way that would result in a negative upvoteCount value in any of our tests. public void updateDownvoteCount(boolean is Increment) ●    Increment the downvoteCount of this Post by 1 if is Increment is true. Otherwise, decrement downvoteCount by 1. ●   You may assume that we will not call updateDownvoteCount in such a way that would result in a negative downvoteCount value in any of our tests. public ArrayList getThread() ●    Return an ArrayList of Posts in the current thread, starting with the original post and ending with this Post. ●   The original post should be the first item in the ArrayList, followed by one of its comments, followed by another one of its comments, and so on until this Post is reached. ●    For example, suppose that P1 is an original post, P2 is a comment on P1, and P3 is a comment on P2. Then P3.getThread() must return [P1, P2, P3]. In other words, the "current thread" is the collection of posts that originate from this Post and "climbs up"  through the replyTo fields to reach the original post. ○    If P1 were to have more than one comment, P3.getThread() must still return [P1, P2, P3]. ●   You may implement this method iteratively or recursively. public String toString() ●    Return a String representation of this Post. ●    If this Post is an original post, its String representation must follow the format [|]t t ●    Original Post Example [1 |0]    Title of Original Post Content of original post ●    If this Post is a comment, the String representation must follow the format [|]t ●   Comment Example [2 |0]    Content of comment ●    Implementation Notes ○    t is a tab character. ○   You should not include angle brackets (i.e., ) in the String you return. ○    In the above String formats,  should be populated with the corresponding field value of this Post (without the angle brackets). We strongly recommend that you use the provided format string templates (along with  the String.format() method) in your implementation of this method. User.java In this part of the assignment, you will implement the User class which represents the properties of a reddit user. The UML diagram for the User class is To summarize, the User class contains the following fields: private String username ●   The username of this User. private int karma ●   The karma score of this User. private ArrayList posts ●   A list of Posts this User has authored, including original posts and comments. private ArrayList upvoted ●   A list of other User's Posts that this User has upvoted. private ArrayList downvoted ●   A list of other User's Posts that this User has downvoted. and the following methods: public User(String username) ●   The constructor for initializing a User. ●   This constructor must set the username field of this Post object with the contents of the username parameter. ●    Set karma to 0. ●    Initialize posts, upvoted, and downvoted to empty ArrayLists using the no-argument ArrayList constructor. public void addPost(Post post) ●   Add post to the end of this User's lists of authored posts. ●    If post is null, you must not add it to posts. ●    Update this User's karma by calling updateKarma(). You must do this regardless of the value of post. If post is non-null, you must call updateKarma() after adding post to posts. ●   You may assume that we will only call addPost on the User that has authored post. public void updateKarma() ●    Update this User's karma score by going through this User's authored posts and summing upvoteCount–downvoteCount for each post. In other words, after calling updateKarma() this User's karma must be equal to   where N is the number of posts this user has authored. public int get Karma() ●    Return this User's karma score. public void upvote(Post post) ●    If post is null, this method must do nothing and immediately return. ●    If post has already been upvoted by this User OR if the author of post is this User, this method must do nothing and immediately return. ●    If post already exists in this User's list of downvoted posts (downvoted), remove it from downvoted and update the downvoteCount of post accordingly. ●   Add post to the end of this User's list of upvoted posts (upvoted) and update post's upvoteCount accordingly. ●    Update the karma score of post's author by calling updateKarma() accordingly. You must do this if this method does not immediately return. public void downvote(Post post) ●    If post is null, this method must do nothing and immediately return. ●    If post has already been downvoted by this User OR if the author of post is this User, this method must do nothing and immediately return. ●    If post already exists in this User's list of upvoted posts (upvoted), remove it from upvoted and update the upvoteCount of post accordingly. ●   Add post to the end of this User's list of downvoted posts (downvoted) and update post's downvoteCount accordingly. ●    Update the karma score of post's author by calling updateKarma() accordingly. You must do this if this method does not immediately return. public Post getTopOriginal Post() ●    Return this User's top original post. That is, the original post authored by this User with the greatest upvoteCount–downvoteCount value. ●    If this User does not have any original posts, return null. ●    If the greatest upvoteCount–downvoteCount value is shared by multiple original posts, return the first original post in posts with this value. public Post getTopComment() ●    Return this User's top comment. This is, the comment authored by this User with the greatest upvoteCount–downvoteCount value. ●    If this User does not have any comments, return null. ●    If the greatest upvoteCount–downvoteCount value is shared by multiple comments, return the first comment in posts with this value. public ArrayList get Posts() ●    Return the list of posts authored by this User. public String toString() ●    Return the String representation of this User. The String representation of this User must follow the format u/ Karma:  ●    Example u/Widogast Karma: 9 ●    Implementation Notes ○   You should not include angle brackets (i.e., ) in the String you return. ○    In the above String formats,  should be populated with the corresponding field value of this User (without the angle brackets). We strongly recommend that you use the provided format string templates (along with the String.format() method) in your implementation of this method. Part 2: Unit Testing [10 points] In this part of the assignment, you will need to implement your own test cases in the method unitTests in both Post.java and User.java. Each file has its own unitTests method that you must fill out. To get full credit for this section, you must follow the instructions below For the Post class, you must: ●    Implement one test for getUpvoteCount() ●    Implement one test for updateUpvoteCount() ●    Implement one test for updateDownvoteCount() For the User class, you must: ●    Implement one test for get Karma() ●    Implement one test for addPost(Post post) One simple test for each of the above methods is provided for you. Thus, you must have a total of two unit tests for each of the above methods. You may use the provided tests as inspiration for implementing your own test cases. As always, you are welcome (and encouraged) to add more test cases but, as long as you follow the above instructions, you will receive full credit for this part of the assignment. Submission VERY IMPORTANT: Please follow the instructions below carefully and make the exact submission format. 1.   Go to Gradescope via Canvas and click on PA5. 2.   Click the DRAG & DROP section and directly select the required files Post.java and User.java. Please make sure you DO NOT submit a zip, just the two files in one Gradescope submission. Make sure the names of the files are correct. 3.   Following the previous step, our submission should look like the screenshot below. Click upload to submit your file. 4.  You can resubmit an unlimited number of times before the due date. Your score will depend on your final submission, even if your former submissions have a higher score. 5.   The autograder is for grading your uploaded files automatically. Make sure your code can compile on Gradescope. If your code fails to compile on gradescope you will receive zero points on ALL autograded components of your submission. NOTE: The Gradescope Autograder you see is a minimal autograder. For this particular assignment, it will only show compilation results and the results of basic tests (from the write-up). After the assignment deadline, a thorough Autograder will be used to determine the final grade of the assignment. Thus, to ensure that you would receive full points from the thorough Autograder, it is your job to extensively test your code for correctness (make use of  unitTests!)

$25.00 View

[SOLVED] GEOG5025 Topographic Modelling Landscape Monitoring

GEOG5025 – Topographic Modelling & Landscape Monitoring Suggested title: “Accuracy assessment of Structure from Motion photogrammetry /LiDAR to model topography and quantify topographic change.” You may adapt this title if you wish, depending upon the findings of your investigation, the data sets used and the focus of your report. Write a report that: (i) assesses the accuracy of producing an orthophoto and Digital Elevation Model (DEM) using Structure from Motion photogrammetry and/or LiDAR and (ii) quantifies topographic change during multiple years of surveying. Include a selection of maps, graphs and/or tables. Make sure your figures and fonts are of a reasonable size to allow them to be assessed – probably full-page width. You should structure your report using a standard scientific format: •    Introduction:  explain  the  background  to  the  project  (drawing  on  relevant  academic material), the project’s context, its aim and objectives, and prepare the reader for the structure of the report; •    Methods: outline the field data collection procedure and data processing methodology used; •    Results: report the findings of your investigation; •    Discussion: describe the main patterns or trends you have noticed and outline any wider implications; and, •    Conclusion: summarise the main outcomes of your investigation and relate these to the motivation identified in the introduction. Maximum length of report: 1800 words and no more than 10 A4 pages (including reference list, tables, figures, excluding cover page). Formatting of report: see guidance in your MSc handbook on text and referencing style. Tips: •    You can start finding literature from the reading list (Reading lists @ Glasgow). •    Ensure your maps are effectively designed and include scale, orientation and legend. •    Tables and Figures and all their components such as axis labels must be legible. •    Read appropriate literature (see the reading list) and make appropriate references in your report; high grades will be awarded to those reports that demonstrate an understanding of fundamental  SfM  photogrammetry  and/or  LiDAR  as  well  as  Geomorphic  Change Detection concepts.  In your report, particularly for the methodology, you won’t be able to present the full detail on every step of analysis so use suitable references to refer the reader to further detail. •    Think about what data you need to include for your analysis, and how you will present your results.

$25.00 View

[SOLVED] CDEV2000 Creating Your Career Employability for the Future - 2025

CDEV2000 Creating Your Career: Employability for the Future - 2025 General Course Information Course Code :  CDEV2000 Year :  2025 Term :  Term 1 Teaching Period :  T1 Course Details & Outcomes Course Description CDEV2000 Creating Your Career: Employability for the Future enables students to critically refect on their current employability trajectory, identifying where they may need to develop or enhance  their employability in alignment with their prospective employers, and developing career artefacts in preparation for job applications. In doing so, CDEV2000 covers four key topics: · Understanding the changing nature of the 21st century workforce and your place within it; · Understanding yourself to enhance the development of your employability; · Using career development competencies to create effective career-seeking artefacts; and · Identifying and communicating your professional point of difference. To further support these learning expectations, every student in CDEV2000 will be supported by a team of careers coaches from UNSW Careers, with whom they will meet  throughout the term to provide direction and support where needed. Excluded programs: · 3964 - Information Systems (Co-op) (Honours) (Undergraduate) · 3587 - Actuarial Studies (Coop) (Undergraduate) · 3971 - BIS (Co-op) (Undergraduate) · 3554 - Commerce (Co-op) (Undergraduate) · 3565 - Commerce (Co-op) (Honours) (Undergraduate) The previous code for this course was CDEV1112. Course Aims Creating Your Career: Employability for the Future aims to empower students with the knowledge, skills and capabilities to plan, engage in and critically refect on career opportunities and their career more broadly. It prepares students for the world of work by developing a deeper understanding of recruitment practices, expectations of professionals across a range of industries and the opportunities that exist now and into the future. Students learn about employability skills and their own values and refect on how they can incorporate and articulate these in relation to their own future career vision. Course Learning Outcomes Course Learning Outcomes CLO1 : Utilise self-assessment tools to understand and clarify values, interests, strengths and capabilities of employability and refect upon areas for development CLO2 : Develop career artefacts that enable you to articulate and pitch strengths, capabilities and ideas in professional language appropriate to the audience, using multiple channels of communication CLO3 : Investigate and analyse career opportunities that align with values, interests, strengths and capabilities and refect on the implications for decision making and goal setting CLO4 : Apply career competencies by way of formulating future plans centered on personal refections and self assessment for continuous career learning and development CLO5 : Identify and build a professional network and employ effective techniques for successfully expanding professional connections Course Learning Outcomes Assessment Item CLO1 : Utilise self-assessment tools to understand and clarify values, interests, strengths and capabilities of employability and refect upon areas for development • Professional Skill Development • Tailored Job Application • Interview Video • Information Interview and Action Plan CLO2 : Develop career artefacts that enable you to articulate and pitch strengths, capabilities and ideas in professional language appropriate to the audience, using multiple channels of communication • Professional Skill Development • Tailored Job Application • Interview Video • Information Interview and Action Plan CLO3 : Investigate and analyse career opportunities that align with values, interests, strengths and capabilities and refect on the implications for decision making and goal setting • Professional Skill Development • Tailored Job Application • Interview Video • Information Interview and Action Plan CLO4 : Apply career competencies by way of formulating future plans centered on personal refections and self assessment for continuous career learning and development • Professional Skill Development • Tailored Job Application • Interview Video • Information Interview and Action Plan CLO5 : Identify and build a professional network and employ effective techniques for successfully expanding professional connections • Professional Skill Development • Information Interview and Action Plan Learning and Teaching Technologies Moodle - Learning Management System Learning and Teaching in this course The overall pedagogical philosophy of this course is based on the belief that learning is an active process requiring engagement and immersion. Accordingly, this course is activity- based requiring students to interact with other students and their course facilitators during both asynchronously and synchronous learning activities. The course assumes the ability and willingness of students to actively engage in class and to take on an engaged and interactive approach to their learning.

$25.00 View

[SOLVED] Math 132A Assignment 1

Math 132A Assignment 1 1.  Consider the following table indicating the nutritional value of diferent food types. You need to decide how many servings of each food to buy each day so that you minimize the total cost of buying your food while satisfying the following daily nutritional requirements: • caolories must be at least 2000, • fat must be at least 50g, • protein must be at least 100g, • carbohydrates must be at least 250g. Write an LP that will decide how many servings of each of the aforementioned foods we need to meet all nutritional requirements, while minimizing the total cost of the food.  (you may buy fractional numbers of servings).  Use an LP solver to actually find an optimal point and optimal value. 2.  The director of a startup needs to decide what salaries to ofer to its employees for the fiscal year 2024. In order to keep the employees satisfied, she needs to make sure of the following. • Tom wants at least $20, 000 or he will quit. • Peter, Nina and Samir want each to be paid at least $5000 more than Tom. • Gary wants his salary to be at least as high as the combined salaries of Tom and Peter. • Linda wants to make $200 more than Gary. • The combined salaries of Nina and Samir should be at least twice the combined salary of Tom and Peter. • Bob’s salary is at least as high as that of Peter’s and at least as high as Samir’s. • The combined salaries of Bob and Peter should be at least $60, 000. • Linda should make less money than the combined salaries of Bob and Tom. (a)  Write  an  LP  that  will  determine  the  salaries  for  the  employees  such  that  the  above constraints are satisfied but the total salary of everyone is minimized. (b)  Write  an  LP  that  will  determine  the  salaries  for  the  employees  such  that  the  above constraints are satisfied but the salary of the highest paid employee is minimized.  Hint: Define  a new variable. 3.  The CRUD chemical plant produces, as part of its production process, the noxious compound chemical X. Chemical X is highly toxic and needs to be disposed of properly.  Fortunately, CRUD is linked by a pipe system to the FRESHAIR recycling plant that can safely reprocess chemical X. On any given day, the CRUD plant produces the following amount of chemical X. Because of environmental regulations, at no point in time is the CRUD plant allowed to keep more than 1000ℓ of chemical X on site, and no amount of chemical X can be kept overnight. At the top of every hour, an arbitrary amount of chemical X can be sent to FRESHAIR. The cost of recycling chemical X varies throughout the day according the following table. Write an LP that will decide how much of chemical X to send from CRUD to FRESHAIR at  the  top  of each  hour  so  that  you  minimize  the  total  cost  but  meet  all  environmental constraints. 4.  (A Transportation Problem).  A company makes a product at factories  1, 2, . . . , p and sells it to stores 1, 2 . . . , q.  Factory i produces si  units per month and store j orders tj  units per month.  Assume that every unit made is shipped to a store, and every store receives exactly the number of units ordered.  The cost of shipping one unit of the product from factory i to store j is cij  dollars. (a)  Model the problem of finding the cheapest way to ship the product from the factories to the stores as an LP. To start, set xij  be the number of units shipped from factory i to store j. (b)  Prove that the feasible region is nonempty if and only if (Hint:  For one  direction,  set x11  = min(s1 , t1 ) .   Can  you find  a  transportation problem with fewer factories  and/or  stores  such  that  feasible  solutions  of  the  smaller  program extend to feasible solutions  of the  original? ) 5.  Let t be a real number and consider the following LP (a)  Let T be the values of t for which the problem has a feasible solution.  Use geometry to guess T. (b)  Give an algebraic proof that the LP is feasible if and only if t ∈ T. (c)  Let S be the set of values oft for which the LP is unbounded.  Use geometry to guess S. (d)  Give an algebraic proof that the LP is unbounded if and only if t ∈ S.

$25.00 View

[SOLVED] MGT 105 Midterm 1 Winter 2024SPSS

MGT 105 Midterm 1 Winter 2024 Question 1 (15 points) During its fiscal year ending on December 31, 2024, Alpha Corporation acquired property for a factory. The plant site had an existing building on it which Alpha razed shortly after acquisition. Expenditures and receipts related to the property are as follows: 1. Purchase price (closing statement detailed 20% land and 80% building) $800,000 2. Payment of property taxes not paid by the seller          5,000 3. Payment of unpaid mortgage            18,000 4. Real estate commissions paid           25,000 5. Costs related to demolition of existing building        70,000 6. Building permits              3,000 7. Salvage value related to demolition of the existing building                             10,000 8. Costs of surveying and grading the property         20,000 9. Architectural fees            32,000 10. Payments made to contractor for factory construction                                     400,000 11. Repair of vandalism damage to factory         11,000 12. Construction of parking lots           60,000 13. Insurance proceeds received for partial reimbursement of vandalism repair      9,000 14. Purchase of 12-month insurance policy covering construction period    21,000 15. Fencing            15,000 Required Prepare a detailed calculation of the following account balances at December 31, 2024: a. Buildings  b. Land c. Land Improvements  d. Prepaid Expenses e. Miscellaneous Expenses  NOTE: You must show every number comprising the total separately or you will receive a zero. Question 2 (15 points) Early in 2025, End Corporation engaged Line, Inc. to design and construct a complete modernization of End's manufacturing facility. Construction began on June 1, 2025 and was completed on December 31, 2025. End made the following payments to Line, Inc. during 2025:   Date               Payment  June 1, 2025 $2,000,000 August 31, 2025 3,000,000 December 31, 2025 2,500,000 To help finance the construction, End issued the following during 2025: 1. $1,700,000 of 10-year, 9% bonds payable, issued at par on May 31, 2025, with interest payable annually on May 31. 2. 300,000 shares of no-par common stock, issued at $10 per share on October 1, 2025. In addition to the 9% bonds payable, the only debt outstanding during 2025 was a $425,000, 12% note payable dated January 1, 2024, due January 1, 2026, with interest payable annually on 1/1. Required a. Prepare a detailed computation of the weighted-average accumulated expenditures qualifying for capitalization of interest cost. b. Prepare a detailed computation of the avoidable interest incurred during 2025. c. Prepare a detailed computation of the actual interest accrued during 2025. d. Prepared a detailed computation of the total amount of 2025 interest cost to be capitalized. Question 3 (15 points) Presented below is information for equipment owned by Quart Company at December 31, 2025:  Cost $5,800,000  Residual Value      200,000  Expected future net cash flows   2,000,000  Fair value   1,700,000 The equipment was acquired on September 30, 2022. On the purchase date, Quart estimated the equipment had a useful life of 8 years. Assume that Quart will continue to use this asset for the full 8 years. Depreciation is recorded at the end of its fiscal year, December 31st, using the double declining balance method. Required a. Prepare the journal entry to record depreciation expense on 12/31/2025. Round calculations to nearest whole amount. Journal entry explanations/descriptions are not required. b. Perform, and document clearly, the recoverability test at 12/31/2025. c. Prepare the journal entry (if any) to record the impairment of the asset at 12/31/2025. Journal entry explanation/description is not required. d. On January 1, 2026, Quart decided to depreciate all of its equipment using the straight-line method. In addition, on January 1, 2026, Quart determined the equipment acquired on September 30, 2022 to have a remaining useful life of three years. The fair value of the equipment at December 31, 2026 is $1,900,000. Prepare the necessary journal entry/entries on 12/31/2026. Journal entry explanations/descriptions not required. Question 4 (10 points) On May 31, 2026, Book Company paid $3,500,000 to acquire all the common stock of Library Corporation, which became a division of Book. Library reported the following balance sheet at the time of the acquisition:  Current assets $   900,000 Current liabilities $   600,000  PP&E, net 2,200,000 Long-term liabilities 500,000  Patents     500,000 Stockholders’ equity   2,500,000     Total liabilities and  Total assets $3,600,000  stockholders’ equity $3,600,000  The recorded amounts for Library Corporation all approximate current values except property, plant, and equipment (fair value of  $2,900,000) and patents (fair value of $400,000). At December 31, 2026, Library reports the following balance sheet items:  Current assets $   800,000  Noncurrent assets (including goodwill recognized in purchase) 2,400,000  Current liabilities (700,000)  Long-term liabilities     (500,000)   Net assets $2,000,000 It is determined that the fair value of the Library division is $2,200,000. Required a. Compute the amount of goodwill recognized, if any, on May 31, 2026. b. Determine the impairment loss, if any, to be recorded on December 31, 2026. c. Assume that the fair value of the Library division is $1,950,000 instead of $2,200,000. Prepare the journal entry to record the impairment loss, if any, on December 31, 2026. Journal entry explanation/description is not required. Question 5 (20 points) Information regarding Park’s payroll for its mid-month October payroll is as follows: · Hourly payroll $1,500,000 · Salaried payroll $2,000,000 · Social Security withholdings $200,000 (FICA tax rate 6.2%; Medicare tax rate 1.45%) · Federal income tax withholdings $250,000 · FUTA $10,000 · SUTA $12,000 · Union dues $20,000 · Withholdings for 401(k) contributions $300,000 Required a. Identify which items are required deductions and which amounts are optional. b. Prepare the journal entry to record the payment of the mid-month October payroll. Journal entry explanation/description is not required. c. Prepare a calculation of payroll tax expense related to mid-month October payroll. d. When preparing the end of October payroll, Park’s Controller noted an executive’s salary increased to $10,000 per month. The executive’s aggregate compensation through the mid-month October payroll was $141,000. FICA Tax is levied on a maximum of $142,800 of yearly earnings. Prepare a detailed calculation of the Social Security tax to be withheld applicable to this executive’s end of October payroll. Round amounts to two decimal places.  

$25.00 View

[SOLVED] Math 132A Assignment 2

Math 132A Assignment 2 1.  (This question is to give you more practice in converting a problem into an LP.) You wish to build a house and you have divided the process into a number of tasks, namely: B:  excavation and building the foundation, F:  raising the wooden frame, E:  electrical wiring, P:  indoor plumbing, D:  dry walls and flooring, L:  landscaping. You estimate the duration of each task (in weeks) as: Some of the tasks can only be started when other tasks are completed. For instance, we can only build the frame once the foundation has been completed. Here are the constraints. • F can only start after B is completed. • L can only start after B is completed. • E can only start after F is completed. •  P can only start after F is completed. •  D can only start after E is completed. •  D can only start after P is completed. Unless otherwise noted above, the tasks can performed in parallel.  For example, here is a feasible schedule with a completion time of 10 weeks.  (times are in weeks after start). The  goal  is  to  schedule  the  tasks  such  that  the  entire  time  to  completion  is  minimized. Formulate this problem as an LP and find the solution using an LP solver.  Hint:  Let y be the completion time  of the  last task.  Let  the  other variables  denote  the  start  time  of the  tasks. 2.  Consider a public swimming pool that is open from 1pm to 9pm.  There are seven people who can be hired as life guards.  The following table lists each person’s availability and salary for that time. The problem is find a selection of lifeguards so that at all times,  at least one lifeguard is working, and to do so as cheaply as possible. Formulate an integer program that will determine the solution to this problem. 3.  For the following LP, write down the dual and using the complementary slackness conditions, determine if the given points are optimal. maximize 3x1 + x2 + 4x3 + x4 subject to        x1 + 2x2 + 2x3 + x4  ≤ 4                        x1 - x2 + x3 - x4  ≤ -2                       x1 , x2 , x3 , x4  ≥ 0. (a)  x*  = [0, 1, 0, 2]T (b)  x* = [1, 0, 0, 3]T 4.  For the following LP (P), write down the dual (D) and complementary slackness conditions. Using these and the fact that y* = [1, 2, 0, 3]T  is optimal for (D), find an optimal solution to (P). maximize    x1 + 5x2 + 3x3 + 6x4 + 6x5 subject to          x1 + x3 + 3x4  ≤ 3 x2 + x3 + x4  ≤ 2 2x1 − x3 − x4 + 3x5  ≤ 7 2x2 + x4 + 2x5  ≤ 4 x1 , x2 , x3 , x4 , x5  ≥ 0.

$25.00 View

[SOLVED] Practice Lab Movie Tracker

Practice Lab: Movie Tracker Task 1: The MovieRecord Class Create a class MovieRecord to store movie data:     ● Fields: String title, String genre, int rating (1-10 scale).     ● Methods:         ○ Constructor to initialize all fields.         ○ Getters and setters.         ○ toCSV(): returns a CSV string (title,genre,rating). Task 2: Summing Ratings Write a static method sumRatings that:     ● Accepts an ArrayList and a genre.     ● Returns the sum of ratings for movies in the given genre. Task 3: Client-Server Communication 1. Client: Write a static method sendMoviesToServer:         ○ Connects to a server on localhost port 9000.         ○ Sends toCSV strings of movies from an ArrayList to the server.         ○ Ends with "Done" and receives the count of movies sent as a string. 2. Server: Write a static method receiveMoviesFromClient:         ○ Listens on port 9000.         ○ Accepts connections and reads CSV movie data until "Done".         ○ Returns an ArrayList and sends back the number of movies received. Task 4: Mapping and Prioritizing Movies 1. Write a method genreMap:         ○ Takes an ArrayList and returns a Map where:             ■ Key = genre.             ■ Value = total ratings of all movies in that genre. 2. Create a PriorityQueue:         ○ Prioritize movies by rating (higher ratings first).         ○ Populate the queue with movies from an ArrayList. Task 5: Multi-Threaded Movie Rating Aggregation 1. Create a class GenreRatingAggregator:         ○ Fields: ArrayList movieList, String genre, int totalRating.         ○ Implements Runnable and calculates the sum of ratings for its genre in run().         ○ Provides a getter for totalRating. 2. In main:         ○ Create two GenreRatingAggregator objects for two genres.         ○ Use threads to execute them concurrently.         ○ Wait for threads to finish and print the ratings for both genres.

$25.00 View

[SOLVED] Homework 1 Citation Support System v0

Homework 1: Citation Support System v.0 Due: Monday, October 3rd, 11:59 pm You will write a first version of the Citation Support System, a program that manages citations (also known as tickets or violations) for a police department. It will model information about each citation – for example, the type of citation, the  person who issued it, and notes - demographic data about the person being cited, and the routing information for the citations. This is just a simulation, leaving out many details of how this would work in practice – for example, managing privacy using access rights and encryption (among other things). Design: The core class is Citation, which keeps track of basic information about a ticket. Each Citation has a related Person, which contains the demographic information about the person to whom the ticket was issued. CitationList keeps track of 0 or more Citation objects. The driver of the app is hw1Main. The classes below should have a default constructor and an overloaded constructor (that sets all the fields in the order given); a full set of getters and setters; a toString( ) method used for display; and a toCSV( ) method, which returns a CSV String used for writing to a file. Class Citation: Models one ticket Data: String typeOfOffense: for now, only "Parking", "Speeding", "Jaywalking", and "Inebriated" are the only offenses. String description: free-form details of the offense int number: unique key, set to the citationCounter if this is a newly-created citation. String date: the date of the citation Person person: the perpetrator of the crime Class Person: Models the person receiving a Citation Data: String firstName, lastName, address, phoneNumber Class CitationList: This class encapsulates the list of Citations. Note: its overloaded constructor only sets authority and title; listOfCitations should be new'd up to an empty list. Similarly, only getters and setters for authority and title are required. Data: ArrayList listOfCitations: all the Citations in the system String title, authority: the official in charge of all Citations. Set these to "Chief" and "Barrett". Methods: readCitationFile(String filename) – reads a Citation CSV file. writeCitationFile(String filename) – writes a Citation CSV file. toString( ) – use a StringBuilder to construct this String, since there could be a large number of Citation objects. displayCitationType(String typeOfOffense) – display any Citations with that typeOfOffense dispayCitation(int number) – display the Citation with that id number displayCitation(String lastName) – display any Citations whose Person object has that last name newCitation( ) – prompt the user for the information for one new Citation, add it to listOfCitations Class Menu: Models the user menu choices String[] menuChoice: the menu choices (described below). static int displayMenu( ): displays the menu, prompts for the user's choice and return it. Return 0 if there's an error. Class hw1Main: The main program. public static Scanner – for the keyboard; used in both main( ) and in CitationList. CitationList citationList – the list of Citation objects. When the program starts, the main function creates a CitationList object called citationList and reads a CSV file of Citation-Person data (see below for the file format). The user interface has these menu options: 0. Quit. 1. Display all the Citation data using CitationList.toString() 2. Display all Citations by chosen typeOfOffense. 3. Search for a Citation by number. 4. Search for a Citation by Person last name. 5. Add a new Citation. Options 1 and 2 only display the base Citation data, not the related Person. Options 3 and 4 display all information about the given Citation, if found, including the associated Person. Option 5 also creates a Person for the new Citation. See below for sample output. At the end of the program, write the CSV file (even if it is unchanged). The CSV file has the format: number,typeOfOffense,description,date,first name, last name,address,phone number as in: 1,Speeding,50mph,23-Aug-2023,Mary,Smith,123 Main Street,412-555-5555 Here's a sample of Option 1 for a small test file; make your toString( ) methods produce this. Citation List Chief Barrett Citation #1 Type Of Offense: Speeding Description: 50mph Date: 23-Aug-2023 Person: Mary Smith 123 Main Street 412-555-5555 Citation #2 Type Of Offense: Jaywalking Description: Forbes Avenue Date: 10-Sept-2020 Person: John Doe 456 Elm Street 412-001-0010 Deliverables: Zip up *only* your .java files; name it _hw1.zip. Upload it to Canvas. Hints: Don't try to code the whole assignment at once. The ordering of the methods above may not be the order you want  to code them   in, either. If something is unclear, or ifyou’re just wondering about how to do something, ask! Grading Rubric: 1. 80% on console output and test cases (these will be posted later). 2. 5% documentation: document each class and each method. Document your code only where needed – where the person grading it might have trouble understanding. 3. 5% Code quality: variable names, optimal loops, etc. 4. 5% Robustness: your code should not crash while processing reasonable data. 5. 5% Following submission instructions. NO LATE SUBMISSION, PLEASE!

$25.00 View

[SOLVED] AD699 Data Mining for Business Analytics Spring 2019 Quiz 2

AD699: Data Mining for Business Analytics Spring 2019 02APR Quiz #2 Version:  FOXTROT You have one hour to complete this quiz.  You may use a calculator, along with your book and/or notes, but may not use a smartphone or anything else with Internet connectivity. For any multiple choice question, you are not being asked to choose the “best” from among four  possibilities;  instead,  there  are  three  wrong answers, and one right answer. Any multiple choice question must be answered with one completely clear answer choice. For  any  free  response  questions, show your work.   Rounding  is  completely okay (and showing your work helps me to see what you did). Free  response  questions  that ask for multiple pieces of info will be scored in a binary fashion (1 or 0 points). There are three versions of this quiz, but all contain the same content. 1.  On your first day of work at your summer internship, your boss comes into your office and shows you the summary of the linear regression model shown below.  She instructs you to “select the three input variables here that are MOST statistically significant.  Which ones will you keep?                                          ,                                       , and                                            2.     Suppose someone is planning to build a data mining model.  To build this model, the person will use the dataset ships, whose variables are shown below.   The person is not allowed to perform any manipulation or data pre-processing -- in other words, he must run the function on the variables shown below, exactly as they appear (incidents is the outcome, and the other variables are the predictors).   Which of the following algorithms can this person use to accomplish this task? a.   Classification Tree b.   Naive Bayes c.   Multiple Linear Regression d.   K-nearest neighbors 3. Suppose we are planning to build a k-nearest neighbors model with three predictors: income (measured in thousands of dollars), age (measured in years), and education level (1 represents  high  school  education,  2  represents  college  education,  and  3  represents graduate    education).       If   we    build   this    model without    performing any data normalization/standardization, what could we expect to happen? a.   Among the three input values, income will dominate in terms of its influence on the model outcome. b.   Among the three input values, education level will dominate in terms of its influence on the model outcome. c.   All three inputs will have an equal influence on the model outcome; however, if normalization is performed, the relative impact of each predictor will change. d.  Age and education level will have a strong weighting on the outcome, but  income will have a small impact, since it is measured in a unit of currency. 4. A  survey  was recently conducted in which 653 BU students were asked about their preferred sources of TV news.   Of all the students asked, 150 said that they never watch CNN.   112 students said that they sometimes watch CNN, and also sometimes watch Fox. 106 students said that they never watch CNN or Fox.   Given that a person in the survey never watches CNN, what is the probability that he sometimes watches Fox? 5.        An  analyst  recently  collected  data  about  investment  habits.     Data  about  1275 individual investors was used in this analysis.  Of those 1275 investors, 750 never buy bonds. 525 of the people surveyed indicated that they buy stocks, but never buy bonds.  400 of the people surveyed indicated that they sometimes buy bonds and also sometimes buy stocks. Given that an investor in this survey does not buy stocks, what is the probability that he also does not buy bonds? 6.   On your first day on the job at your summer internship, your boss comes in on the first day  with  an  instruction.     “I  need  you  to  create  a  k-nearest  neighbors  model  for classification,” she says.   “And I need you to use a k-value of 5.”    What does she mean by this? a.   This  model  will classify a new record by first determining the five records   that   are   most   similar   to   the   one   being   tested,   then determining the majority class among those five, and assigning it as the predicted outcome for the new record. b.   This model will take the numerical mean (average) of the outcome variable  for  the  five  nearest  records.   It will then predict that the record being tested will have the same outcome value as this average. c.   This model will run the knn() function with a default setting of five iterations; in other words, it will loop through the function five times in order to determine the optimal parameters. d.   This model will generate at least five outcome classes.   The person building the model will then need to exercise judgement, including statistical analysis and his/her own subject matter expertise, in order to  identify  the  outcome  classes  that  are  most  relevant  from  this original group of five. 7. After class one day, you get on the T in Kenmore Square.  You hear someone begin to yell at someone else so you take your headphones off and start to listen in.  Here’s what you hear: Person A:  “Are you SERIOUS, man?!?!  Did I really just watch you code a naiveBayes() function without specifying a smoothing constant?” Person B:  “Yes, I am serious.  And did you just look over my shoulder at my laptop, read what I was working on, and then comment on it? You need to learn some manners, Brother.” Person A:  “First of all, you’re not my brother, so don’t call me that.  Second of all, I’m honestly trying to help, so you’re being ungrateful right now.” The two people look like they’re about to begin fighting, but then Person A steps off the train at BU East, and things calm down. Why did Person A want to see Person B use a smoothing constant? a.   If  Person  B  had  partitioned  his data in an imbalanced way (such as 60% training,  40%  validation),  then  a  smoothing  constant  would  have  been needed in order to “rebalance” the data.   Person A  most likely wanted to ensure that Person B had considered this (otherwise, the results could have been unreliable). b.   If Person B tried to run a naiveBayes() function, and one of the predictors in the record being classified had never appeared in the training set, the naive Bayes function would have assigned a value of “0” to the probability if no smoothing constant had been specified. c.   Person A was most likely afraid that “Bayesian poisoning” could have taken place without the presence of a smoothing constant.   Person A was most likely  trying  to  ensure  that  Person  B’s  model  was  not  vulnerable  to  the Bayesian poisoning risk. d.   Most likely, Person A was worried about the risk of overfitting the model.  By employing a smoothing constant (such as Laplace=0), Person B could have guaranteed  that  no  overfitting  had  occurred  in  the  construction  of the model. 8.  Why is pruning an important step in the process of building a classification tree? a.   Pruning occurs when a person uses different samples of data in order to compare the error that each sample produces when used to build the model; this way, an analyst can be more confident that a tree model will be accurate when used with new data. b.   Pruning reduces the size of the tree; although this makes the model less accurate for classifying the data from which it was built, this will make the model more reliable in the future when it attempts to classify records that it has not seen before. c.   The term “pruning” describes the process by which the model splits records according to the various predictors and their values; the pruning process is  designed to create terminal nodes that are as homogeneous as possible. d.   If pruning does not occur, the tree cannot be grown to the point at which the terminal nodes generate completely homogenous groupings; therefore, pruning is always recommended when building a tree model. 9. What is the primary overall goal of recursive partitioning? a.   To ensure that multiple data samples from the training data have been checked against the model results to ensure the greatest possible degree of accuracy. b.   To identify and create splits among the predictors that can be used to make the resulting groups of records as homogenous as possible. c.   To help reduce the importance of categorical inputs in a classification tree, thereby ensuring that numerical inputs are assigned the highest level of importance. d.   To prepare the tree for the use in a random forest model (because all trees that have been built with the recursive partitioning process will then become used in a random forest in order to determine the best possible model). 10.  What general relationship can an analyst expect to see between the complexity parameter (CP) used in a tree model, and the number of splits in the resulting tree? a.   Higher complexity parameters tend to result in smaller trees. b.   Higher complexity parameters tend to result in larger trees. c.   Higher complexity parameters tend to result in trees that do not use recursive partitioning, but do use pruning. d.   Higher complexity parameters eliminate the impact of outliers and missing values from the training data, which is why most tree models start with a very low value, such as cp = 0.0001. 11.  A person who lives in New Haven, Connecticut (a city with an almost-even number of    Red Sox fans and Yankees fans) is building a classification tree in order to place people into the correct classification (Yankees or Red Sox).  She finds that if she splits the variable “AGE” at 42 years old, the resulting node will contain 75 records, with 45 Yankees fans and 30 Red Sox fans.  However, if she splits the variable “AGE” at 55 years old, it will contain 75 records, with 55 Yankees fans and 20 Red Sox fans. Answer all three parts of the question below: Gini impurity level for the node created with an AGE of 42 split: Gini impurity level for the node created with an AGE of 55 split: Which split will the model create? 12.   You are preparing to build a multiple linear regression model, and you’re looking at your potential input variables to better understand the data in front of you.   One of the things that you’re hoping to avoid is multicollinearity.  Which two variables shown below, if used together as inputs in the same model, would present the greatest multicollinearity risk?  (Write the name of one variable in each of the blanks shown below) AND . 13.   Using a k=1 approach, and using Euclidean distance, classify whether Tim will join the Horror Movie Club. There are three relevant predictors in this model -- ratings from 1 to 5 (1 being worst, 5 being best) for three movies: Jigsaw, Friday the 13th, and Nightmare on Elm St. NAME JIGSAW FRIDAY the 13th NIGHTMARE ON ELM ST. MEMBER OF HORROR MOVIE CLUB? Arnold 5 4 5 YES Brendan 3 2 2 NO Carol 4 3 4 YES Tim 5 5 3 ? What is Tim’s Euclidean distance to his nearest neighbor? Will Tim join the Horror Movie Club? 14.  Is it possible to build a k-nn model when your data has more than two outcome classes? a.   Yes, a k-nn model can be built in such a situation, but an important data preparation step must take place first -- the data must be first separated into a single “class of interest” with the rest of the classes grouped together as “other.” b.   Yes, a k-nn model can be applied in such a situation, and a new record can be classified based on the most common class among its k neighbors. c.   No -- since a k-nn model can only be applied in a situation where there are just two class outcomes, this dataset will not be suitable for a k-nn model. d.   No -- because an outcome with two groups of results will lead to a multicollinearity problem, this cannot be performed with a k-nn classification model. 15.  Using the information shown below, and using a naive bayes methodology, calculate the probability that a flight will be delayed if it departs on Day 2, at a time of 10:00 a.m., leaving from Dulles Airport (IAD).

$25.00 View

[SOLVED] MGT 105 Winter 2024 Midterm 2

MGT 105 Winter 2024 Midterm 2 Question 1 (25 points) On September 1, 2024, Boston Corporation issued 6-year bonds with a face value of $80,000,000 and a stated interest rate (coupon rate) of 8%, payable on November 30th, February 28th, May 31st, and August 31st. The bonds were sold to yield 12% (market rate). The bonds are to be accounted for under the effective interest method. Table values are: Present value of 1 for 6 periods at 8%   .63017 Present value of 1 for 6 periods at 12%   .50663 Present value of 1 for 24 periods at 2%   .62172 Present value of 1 for 24 periods at 3%   .49193 Present value of an ordinary annuity of 1 for 6 periods at 8%   4.62288 Present value of an ordinary annuity of 1 for 6 periods at 12%   4.11141 Present value of an ordinary annuity of 1 for 24 periods at 2%  18.91393 Present value of an ordinary annuity of 1 for 24 periods at 3%  16.93554 Present value of annuity due of 1 for 6 periods at 8%   4.99271 Present value of annuity due of 1 for 6 periods at 12%   4.60478 Present value of annuity due of 1 for 24 periods at 2%   19.29220 Present value of annuity due of 1 for 24 periods at 3%   17.44361 Required a. Prepare a detailed calculation of the present value of the bonds on September 1, 2024. You MUST include the relevant table factors in your calculation or you will receive zero points. b. Calculate the index price of the bonds on September 1, 2024. Round to nearest dollar. c. Prepare the journal entry to record the issuance of the bonds on September 1, 2024. Journal entry explanation/description is not required. d. Construct a bond amortization table that continues through the first three interest payments. Make sure all columns and rows are properly labeled. Round to the nearest dollar. e. Prepare the adjusting journal entry to be made on December 31, 2024, Boston’s fiscal year end. Round to the nearest dollar. Journal entry explanation/description is not required. Question 2 (18 points) The records for Tungsten Company show the following data for its fiscal year ending 12/31/2024: · Gross profit on installment sales recorded on the books was $480,000. Gross profit from collections of installment receivables was $320,000. · Life insurance premiums for policies covering company officers were $3,800. · Machinery was acquired in January for $300,000. Straight-line depreciation over a ten-year life (no salvage value) is used. For tax purposes, MACRS depreciation is used, and Tungsten deducts 14% of cost for 2024. · Interest received on tax-exempt Wisconsin State bonds was $9,000. · The estimated warranty liability related to 2024 sales was $21,600. Repair costs under warranties during 2024 were $13,600. The remainder of repair costs will be incurred in 2025. · In 2024, pretax financial income is $700,000 and the tax rate is 15%. The tax rate published for 2025 and beyond is 20%. Required a. Prepare a schedule starting with pretax financial income in 2024 and ending with taxable income in 2024. You must separate and label the permanent and temporary differences. b. Prepare the journal entry on December 31, 2024 to record income taxes payable, income tax expense, and deferred income taxes. Journal entry explanation/description is not required. c. Prepare the income tax expense section of the income statement for 2024, beginning with “Income before income taxes.” Question 3 (7 points) Nora Corporation reported the following pretax income (loss) and related tax rates during the years 2024-2027: Pretax Income (Loss) Tax Rate 2024            $  40,000       20% 2025             (160,000)       25% 2026              210,000       30% 2027   190,000       35% Pretax financial income (loss) and taxable income (loss) were the same for all years since Nora began business. The tax rates from 2024-2027 were enacted in 2024. Nora’s fiscal year end is the calendar year end. Required (Journal Entry Explanation/Description not required) Prepare the journal entries for 2025, 2026, and 2027 to record income taxes payable (refundable), income tax expense (benefit), and the tax effects of any loss carryforward. Assume that Nora expects to realize the benefits of any loss carryforward in the year that immediately follows the loss year. Question 4 (25 points) House Corporation manufactures metal presses. On January 1, 2024, House leased a press to Lake Company under a six-year noncancelable lease agreement. The following information about the lease and the press is provided: o The press has an alternative use for House. o Equal annual payments of $120,175 that are due on January 1 each year provide House with an 8% return on net investment. The first payment is due at lease inception. o Title does not automatically transfer to Lake at the end of the lease. o The fair value of the press at lease inception is $600,000. The cost of the press to House is $540,000. The press has an expected useful life of nine years with no residual value. o At the end of the lease, Lake may purchase the equipment at a fair market price. o Collectability of the lease payments is probable. Lake pays any executory costs. o The present value factor for an annuity due for 6 periods at 8% is 4.99272. Required a. Perform. and adequately document ALL 5 of the lease tests necessary to determine if House should account for the lease as a finance lease or an operating lease. Based on your work, conclude as to which lease type House’s lease represents. b. Prepare a lease amortization schedule for House for the first three years (2024 – 2026). c. Prepare ALL the necessary journal entries for the lessor for 2024 (assume the use of a perpetual inventory method). Journal entry descriptions are not required. d. Prepare the journal entry for the lessor on 1/1/2025. Journal entry description not required.

$25.00 View

[SOLVED] Project 1 Properties of an Elemental Transition Metal

Project 1: Properties of an Elemental Transition Metal Transition metals are of great technological relevance for the chemical industry due to their unique properties and versatility in a wide range of applications, including catalysts, magnetic materials, and electronics. In this project, you will explore the properties of an elemental transition metal, for now, in the absence of temperature or pressure. A technical objective of this project is to become familiar with the LAMMPS software and its  input/output file formats. Scientific objectives are to find the ground-state energy, lattice parameter, vacancy formation energy, and one surface energy of face-centered cubic (FCC) gold. As you work through the project, you will also learn about the importance of convergence parameters and the limitations of interatomic potentials used in atomic-scale simulations. Geometry optimizations (relaxations) In nature, a crystal in equilibrium is automatically in the lowest energy (ground-state) configuration. The ground-state lattice parameters and atomic positions define the ground-state lattice geometry that minimizes the lattice energy. The ground-state lattice parameters are generally not known a priori. Given a reasonable guess, we can perform. a geometry optimization or relaxation that finds  the lowest energy configuration by adjusting the atomic positions and lattice parameter(s) until an  energy minimum is found. Vacancy formation energy The vacancy formation energy Ev is defined as the energetic cost to remove an atom from a lattice site and reinsert it into the bulk of the material: where Ebulk  and EN-1  are the energies of the perfect bulk supercell with N atoms and of the defect cell with one atom less, respectively. Ebulk   is proportional to the number of atoms in the supercell, so we can scale it with factor (n - 1)/n in order to compare the energy of a defective cell with n  -  1 atoms to that of a perfect cell with n -  1 atoms. Surface energy The surface energy is the energy that is required to truncate an infinitely extended crystal along a  specific  lattice  plane.  Calculating  surface  energies  follows  a  similar  overall  approach  to calculating  vacancy  formation  energies,  but  different  convergence  parameters  must  be considered. Surface relaxations and pair potentials The Lennard-Jones potential is given by the following equation Pair potentials, such as the Lennard-Jones potential, show outward surface relaxations, which is in disagreement with experimental observation. 1.   Lattice constant of Au a.   Calculate the lattice constant (in Å) and total energy (in eV) for FCC Au using the supplied LJ potential. First, use LAMMPS’ built-in minimizer (input file lmp-in.1a-relax), then find the lattice constant by manually adjusting the lattice parameter (input file lmp-in.1a-single). Start with a lattice parameter close to the relaxed lattice parameter. Plot the energy as a function of the lattice parameter from above to below the optimized value (Figure 1), and identify the equilibrium lattice constant. Hint: See the project guide for an explanation of the LAMMPS input format. b.   Repeat the calculations, both automated and manual (Figure 2), for the supplied embedded- atom model (EAM) potential (input file: lmp-in.1b-single). Hint: Don’t forget to upload the EAM potential file to nanoHUB. c.   Discuss your findings. The experimental lattice constant of Au is 4.08 Å . How do the calculated lattice constants compare to the experimental value? Is this expected? Is it significant that the absolute values of the lattice energies for the LJ and EAM potential are different? Hint: Consider how the different potentials were constructed (see table below). 2. Vacancy formation energy of Au a.   Compute the vacancy formation energy (in eV) with the provided LJ potential as a function of the supercell size. Do not relax the atomic positions after taking out an atom. Perform a convergence test and plot the energy against the convergence parameter (Figure 3). What is the ratio of the vacancy formation energy to the cohesive energy? Explain your result. Explain how you calculated the cohesive energy. Hints: The (conventional) FCC unit cell contains 4 atoms. Use the optimized LJ lattice parameter from problem 1. b.   Repeat your calculation, but this time relax the atomic positions after creating the vacancy. Perform another convergence test and add  results to Figure 3.  How  does the vacancy formation energy change compared to the unrelaxed calculations? What is the reason for this behavior? Hint: Adjust your LAMMPS input file for relaxations (see problem 1). c.   Now  compute  the vacancy formation energy  using the provided  EAM potential.  Do it as accurately as you can. Report your convergence test (Figure 4). Use what you learned in parts a. and b. Hint: Use the optimized EAM lattice parameter from problem 1 as initial value. d.   The experimental vacancy formation energy is ~0.9 eV. How do your final results compare? Discuss your result in light of your findings from problem 1. 3.   Surface energy of the Au(100) facet a.   Compute  the  surface  energy  of  the  Au(100)  surface  using  the  LJ  potential.  Report  all equations. What are the two convergence parameters? Perform and plot your convergence tests (Figure 5). Report your result in meV/Ǻ2 . Be computationally efficient. b.   Repeat with the EAM potential, including convergence tests (Figure 6). Please skip relaxations for problem 3. 4.   Short answers a.   For what class of compounds are Lennard-Jones potentials most suitable (name 1 example)? b.   For what class of compounds/materials are EAM potentials most suitable (name 1 example)? c.   Name 2 examples of materials/interactions for which neither LJ nor EAM are appropriate. 5.   Conceptual understanding a.   Calculate the distance r+  where the LJ potential reaches its minimum. Express r+   in terms of ε and σ , and evaluate using the values from your calculations (e.g., lmp-in.1a-single). b.   Determine the nearest-neighbor distance dNN   in the optimized structure of problem 1. Why is dNN  different from r+ ? c.   Based on your results, explain why computer simulations are required even for simple energy models such as the LJ potential. Assignment 1.  Address the above questions in a two-page report. a.   Introduce subsections to distinguish between the different problems. 2.   Include Figures 1–6 in the appendix. Make sure to refer to the figures from your report. 3.   Include all derivations (problem 5) in the appendix. Pictures of hand-written notes are fine. 4.   Include examples of input files for problems 1–3 in the appendix. Provided Files File Description Comment lmp-in.1a-single LAMMPS input file for a single point calculation of FCC Au using a Lennard-Jones potential lmp-in.1a-relax LAMMPS input file for geometry optimizations (relaxations) using a Lennard-Jones potential lmp-in.1b-single LAMMPS input file for a single point calculation of FCC Au using an EAM potential EAM potential file required lmp-in.1b-relax LAMMPS input file for geometry optimizations (relaxations) using an EAM potential EAM potential file required Au-Grochola- JCP05.eam.alloy EAM potential for Au. This potential was published in J. Chem. Phys. 123, 204719 (2005) and can be obtained from http://www.ctcms.nist.gov/potentials The Lennard-Jones potential was constructed as a loose fit to the lattice constant and the vacancy formation energy. Parameters: ε = 0.114 eV; σ = 2.645 Å The EAM potential was fitted to high-temperature lattice constants of several crystal structures and to liquid densities. Problems 2 and 3: We do not provide separate files for problem 2 and 3. Use the files provided for problem 1 and start from there. See the project guide for hints regarding the creation of vacancies and surface slab models.

$25.00 View

[SOLVED] Homework 2 Citation Support System v1

Homework 2: Citation Support System v.1 Due: Sunday, October 29, 11:59 pm You will write the second version of the Citation Support System, building on your Homework 1 solution. Make sure you fix any problems noted in the grading of Homework 1. The user interface and the design have changed. You’ll be able to  reuse some code from Homework 1 – but note below where specifications have changed. For example, packages are now  used to partition the program code. The CitationList class had several methods that did keyboard input and screen output   in Homework 1; it does neither in this version – all input and output is done in main( ) and its helper methods. Changes to Homework 1 Classes Package CitationPackage Class Citation: adds new member data, userID, so several methods change to account for it. implements Comparable: CHANGED: compareTo( ) by Citation number. This is for option 7, sort by number. int userID: NEW: a new data member to store the id of the person in charge of this citation. Create a getter and setter. Citation constructor: CHANGED: add userID to the end of the list of parameters. toString( ), toCSV( ) – CHANGED: add userID to each. Class CitationList: adds new functionality as shown in the revised menu, plus a few other changes. readCitationFile(String filename) – reads a Citation CSV file. CHANGED: read a new field at the end, userID. writeCitationFile(String filename) – writes a Citation CSV file. CHANGED: write a new field at the end, userID. String displayCitationType(String typeOfOffense) – CHANGED: return one String containing any Citations with that typeOfOffense; return “None found” if no Citations match this typeOfOffense. String dispayCitation(int number) – CHANGED: return one String containing the Citation with that id number; return “None found” if no Citation matches this number. String displayCitation(String lastName) – CHANGED: return one String containing any Citations whose Person object has that last name; return “None found” if no Citations match this lastName. newCitation( ) – DELETED; now in hw2Main String delete(int number) – NEW: delete this Citation from listOfCitations. Return “Deleted” if it was deleted, “None found” if not. Menu option 6. void sortByNumber( ) – NEW: sort the list by citation number using Citation.compareTo(). Menu option 7. void sortByName() – NEW: sort the list by last name, first name using an anonymous inner class. Menu option 8. void sortByType( ) – NEW: sort the list by typeOfOffense using TypeSorter. Menu option 9. String findByUser(int userID) – NEW: return one String containing any Citations associated with this userID, if any; return “None found” if none. Menu option 10. Class TypeSorter: NEW public int compare(Citation, Citation) – NEW: used for sorting by typeOfOffense. Package src: New menu items, many changes to main( ) Class Menu: String[] menuChoice: CHANGED: value check is between 0 and 10. static int displayMenu( ): CHANGED; new menu options 6-10 added (described below). Class hw2Main: Contains the main program and some data. private static HashMap configData – NEW: a map of  pairs read by readConfigFile(); use the HashMap methods put(key, value) and value = get(key). private static CitationList citationList – MOVED: now outside of main; the list of Citation objects. private static UserList userList – NEW: a list of the users public static void newCitation( ) – CHANGED: in a new place; prompt the user for the information for one new Citation, including the userID, and add it to CitationList private static HashMap readConfigFile( ) – NEW: read the configuration file; hard-code the file name “configuration.csv”; return the hash map main( ) – CHANGED: 1. Read the file “configuration.csv” at the start using readConfigFile() into configData. It contains {key, value} pairs with keys input file, output file, and user file; use the associated values for the file names. 2. Read the citation input file to create CitationList’s data; use the file name stored in configData. 3. Read the user input file to create UserList’s data. 4. For all display options, String data will be returned here and displayed (instead of being displayed in CitationList or elsewhere). 5. Write the citation output file; use the file name stored in configData. New packages and classes Package UserPackage: For the User hierarchy, each class should have an overloaded constructor, getters, setters, and a toString( ) Class User: Models one user; abstract id: the user’s id number String userName: the user’s screen name Class Administrator: child of User String department: where this person works Class Officer: child of User String rank: one of: Regular, Sargent, Captain, Inspector Class CourtOfficial: child of User String title: what this person’s role in the court system is. Class UserFactory: contains the Factory Method public static User createUser(int id, String userType, String name, String other) – factory method pattern to create one of the child classes of User using the userType in {Administrator Officer, CourtOfficial}; parameter other’s use depends on the type of User. Class UserList: models the list of users ArrayList listOfUsers: user data readUserFile(String filename): read the user data into listOfUsers toString( ): return one String with all the user data ArrayList getListOfUsers( ): return listOfUsers (for testing only) New user interface menu options 6. Delete an existing Citation by number. 7. Sort Citations by number and display them (using toString) 8. Sort Citations by Person last name, first name and display them (using toString) 9. Sort Citations by type and display them (using toString) 10. Display Citations by User – display the userList, prompt the user for a user id, display all citations associated with that user id. New data requirements CHANGED: The Citation input file has the format: number,typeOfOffense,description,date,first name,last name,address,phone number,user id as in: 1,Speeding,50mph,23-Aug-2023,Mary,Smith,123 Main Street,412-555-5555,2 The last value, userID, is a link to the User data. NEW: The User input file has the format (“other” depends on the user type): user id number,user type,name,other as in: 1,Administrator,Jones,Cyber NEW: The configuration file has the format: key,value as in: input file,citations.csv Deliverables: Zip up *only* your .java files; name it _hw2.zip; do *NOT* include test files. Upload it to Canvas. Hints: Don't try to code the whole assignment at once. The ordering of the methods above may not be the order you want to code them in, either. If something is unclear, or if you’re just wondering about how to do something, ask! Grading Rubric: 1. 80% on console output and test cases (these will be posted later). 2. 5% documentation: document each class and each method. Document your code only where needed – where the person grading it might have trouble understanding. 3. 5% Code quality: variable names, optimal loops, etc. 4. 5% Robustness: your code should not crash while processing reasonable data. 5. 5% Following submission instructions. NO LATE SUBMISSION, PLEASE!

$25.00 View

[SOLVED] AD699 Data Mining for Business Analytics Spring 2019

AD699: Data Mining for Business Analytics Spring 2019 02APR Quiz #2 Version:  GOLF You have one hour to complete this quiz.  You may use a calculator, along with your book and/or notes, but may not use a smartphone or anything else with Internet connectivity. For any multiple choice question, you are not being asked to choose the “best” from among four  possibilities;  instead,  there  are  three  wrong answers, and one right answer. Any multiple choice question must be answered with one completely clear answer choice. For  any  free  response  questions, show your work.   Rounding  is  completely okay (and showing your work helps me to see what you did). Free  response  questions  that ask for multiple pieces of info will be scored in a binary fashion (1 or 0 points). There are three versions of this quiz, but all contain the same content. 1.   In  a  recent  survey, 855 BU students were asked about their preferred choice of beverage in the morning.   345 of the students stated that they never drink coffee. 250 of the students said that they never drink orange juice.  145 said that they never drink  coffee  or  orange juice.   What  is  the  probability that a  randomly-selected student from the survey drinks orange juice, but never drinks coffee? 2.   A social media marketer recently concluded a study of the social media habits of 680 BU students.  500 of the students indicated that they use Instagram.  320 of the students indicated that they use Facebook.  Among the students who use Facebook, 60 indicated that they never use Instagram.   Given  that a student in the survey indicated  that  she does not use Facebook, what is the probability that she uses Instagram? 3.   Is it possible to create a classification tree when your outcome variable has more than two classes? a.   Yes, a classification tree maybe built for a situation in which there are more than two outcome classes. b.   Yes, but only if the outcome classes are first separated in two groups -- there can be one “important class” and the others must be lumped together as “other.” c.   No  --  the  limitation  to  just  two  outcome  classes  is  one  of  the drawbacks of classification trees. d.   No, but if the person building the tree model uses a random forest, then it will be possibly to create meaningful tree models with more than two outcome classes. 4.   You are building a linear regression model, and you are engaged in the important task of variable selection.   One of your potential input variables is not correlated with any other input variables, but is highly correlated with your outcome variable.   What likely impact would you expect to see if you remove this input variable? a.   The removal of this particular input variable is likely to increase the average error of your predictions. b.   The removal of this particular input variable is likely to eliminate your risk of multicollinearity. c.   By removing this particular variable, you are likely to increase your risk of overfitting the model to your training data. d.   If this variable is removed, your overall r-squared can be expected to increase, due to the correlation between this input and the outcome. 5.   You are about to build a multiple linear regression model.  There are nine possible input variables that you might use to build the model.   For each of the nine potential inputs, you must decide to either keep it (use it in the model) or discard it (throw it out). How many total models are possible in this situation? 6.   Of all the variables  shown below in this correlation matrix, which pair of unique variables have the smallest correlation distance?   (Place two different variables in the blanks below -- the order does not matter). AND 7.    If a tree model is 100% accurate in classifying the training data from which it was built, what can be concluded about the model? a.   Its performance will be equally strong when the accuracy is checked against the inputs from the validation set. b.   Its terminal nodes are completely pure (i.e. completely homogenous). c.   It  is  robust  against  most  forms  of  cross-validation,  but  could  be unstable. d.   Its number of terminal nodes will be less than the square root of its number of decision nodes. 8.  A person who lives in New Haven, Connecticut (a city with an almost-even number of Red Sox fans and Yankees fans) is building a classification tree in order to place people into the correct classification (Yankees or Red Sox).  She finds that if she splits the variable “AGE” at 42 years old, two nodes will be created: (1)  The node for “GREATER THAN 42” will contain 105 records, with 55 Yankees fans and 50 Red Sox fans. (2) The node for “LESS THAN OR EQUAL TO 42” will contain 85 records, with 60 Yankees fans and 25 Red Sox fans. Answer both parts of the question below: Gini impurity level for the node created with AGE > 42:   _____________ Gini impurity level for the node created with AGE

$25.00 View

[SOLVED] AMATH 301 Winter 2025 Homework 5 Coding portionR

Homework 5:  Coding portion AMATH 301, Winter 2025 1. Approximate the area under the curve etan(x)  on −1 ≤ x ≤ 1 using: (a)  (2 points) Midpoint rule with N = 100 subdivisions.  Call this value integral mid. (b)  (2 points) Trapezoid rule  (for-loop or np.trapz) with N  =  100  subdivisions.   Call this value integral trapz. (c)  (2 points) Simpson’s rule with N = 100 subdivisions.  Call this value integral   simp. 2.  The cost of one Bitcoin at close of trading for each month of 2024 was: Month             Cost 1/2024            $42, 582.61 2/2024            $61, 198.38 3/2024            $71, 333.65 4/2024            $60, 636.86 5/2024             $67, 491.41 6/2024             $62, 678.29 7/2024             $64, 619.25 8/2024             $58, 969.90 9/2024             $63, 329.50 10/2024           $70, 215.19 11/2024           $96, 449.05 12/2024           $93, 429.20 Let the cost of one Bitcoin be c(t), where t is months after  12/2023.   Assume that each month is close enough to being the same length that we will consider each month as ∆t (in other words, do not account for the difference in number of days per month).  Also, do not look up the data for any dates outside this range– just use the data provided. If you don’t want to type out the numbers, you can load bitcoin.npy from Canvas which contains the 12 cost values above. (a)  (2  points)  Use finite-difference formulas to approximate  c′ (t), the change in Bitcoin price per month.  Create a vector as a np.array object called  cpvec that contains these values.  Use the lowest-order possible: the second-order, centered formula for the interior points and the first-order, forward or backward formulas for the endpoints. (b)  (1 point) Repeat part (a) to find c′′ (t) and call the respective vector cp2vec. (c)  Include these lines at the end of your code to visualize these functions.   Don’t  forget  import matplotlib.pyplot  as  plt at the top of your code.  (Part (c) will not be checked by the auto- grader.) plt.plot(tvec,cpvec,’-ro’,label=’c’(t)  [$/month]’) plt.plot(tvec,cp2vec,’-bo’,label=’c’’(t)  [$/month^2]’) plt.legend() plt.xlabel(’month  of  2024’) 3.  (5 points) Approximate the volume of the 3-dimensional region below the paraboloid z = 1 — x2 — y2 , above the plane z = 0, and outside the cylinder (x — 1)2 + (y — 1)2  = 1.  Do this by creating a function f(x,y) which returns 1 — x2  — y2   for any (x,y) that lies within the shape (consider a top-down view onto the z = 0 plane), and zero otherwise.  Then use scipy .integrate .dblquad to integrate f(x,y) over a rectangular domain in x and y that is large enough to encompass the entire shape. Don’t forget import  scipy .integrate at the top of your code.  Store the result in a variable named volume. Interactive visualization of #3 4.  The second-order, centered finite-difference formula for the derivative is:   while the fourth-order, centered finite-difference formula for the derivative is:   Let f(t) = e1/t. (a)  (0.5 points) Find f′ (2) by hand. Store this value as a variable named derivtrue. (b)  (0.5 points) Next, let dtvec be a 1D np.array object containing the values 2/1, 4/1, ..., 2-10 (note: decreasing order). (c)  (2.5 points) Approximate f′ (2) using the second-order, centered finite-difference formula for each value of ∆t in dtvec.  Calculate the natural logarithm of the relative error of each result, and save those in a 1D np.array object named logrelerr2o.   (d)  (2.5 points) Repeat part  (c) but using the fourth-order formula.  Save those in a 1D np.array object named logrelerr4o. (e)  Include these lines at the end of your code to see how quickly the relative error decreases as the step size ∆t decreases for both formulas on a log-log plot.  Don’t forget import  matplotlib.pyplot as  plt at the top of your code.  (Part (e) will not be checked by the autograder.) plt.plot(np.log(dtvec),logrelerr2o,’-bo’,label=’2nd  order  FD’) plt.plot(np.log(dtvec),logrelerr4o,’-go’,label=’4th  order  FD’) plt.legend() plt.xlabel(’log(dt)’) plt.ylabel(’log(relative  error)’)

$25.00 View