Assignment Chef icon Assignment Chef

Browse assignments

Assignment catalog

33,401 assignments available

[SOLVED] GSOE9740 Industrial Ecology and Sustainable Engineering Assignment 1

GSOE9740 Industrial Ecology and Sustainable Engineering Assignment 1 IOA-based TBL analysis of an economic sector ASSIGNMENT BRIEF Assessment value: 100 marks (30% of total course mark) Due date: Tuesday, 25 March 2025, 1:00 pm Groups: This is an individual assignment. No groups. Submission: Via the link 'Submission and marking of Assignment 1' under the section Assignment 1 on Moodle. Maximum length: 8 pages (including everything) Tasks The aim of this assignment is to produce a report in the style of a journal article that presents   and discusses the triple-bottom-line performance of one sector of the Australian economy and compares it to that of Australian households. This 'paper' will then be reviewed and marked by two fellow students, as well as an academic marker. 1.    You can choose one sector of the Australian economy for your assignment. Refer to the  first 120 rows or columns in file ‘AUS-ROW_2region_SIOT.xlsx’ . There are 120 Australian sectors in total, ranging from Aus-1 (wheat) to Aus-120 (other services) . Note: ‘n.e.c.’ stands for ‘not elsewhere classified’ . 2.    Conduct a literature review and provide three original references for your sector that contain information about the sustainability of the industry or products represented by the sector. This can be about any aspect of sustainability (environmental or social performance). Search for references inwww.sciencedirect.com,www.scopus.comor through a general search on the internet (https://ecosia.org). Articles from the scientific   literature are preferred, but reports from the grey literature (e.g. governments, NGOs or  industry associations) are allowed, as long as they are correctly cited (see below). One of  these reports may be the Balancing Act report (Foran et al., 2005). Another useful source of information are the Sector Profiles from the SCP Hotspot Analysis Tool (https://scp-hat.org/sector-profiles). 3.    Summarise the information from the literature in your Introduction section of your article, pointing out the highlights with respect to the un/sustainability of your sector. 4.  Quantitative analysis in this assignment is done by using an extended two-region input-output table which is provided as an Excel file on Moodle. The two regions are Australia and Rest of World (RoW), i.e. it is a table of the global economy. There are many extensions on direct environmental impacts from industries, as well as direct employment and direct wages & salaries (compensation of employees) . Create an IO model, either in Excel or with Matlab and calculate the total impact multipliers (TIMs) for all sectors (Hint: Use the full 2-region IO table together with the RoW rows and columns as your T matrix from which you calculate A and L. The total matrix has the dimensions 240x240. Because the DIMs are row vectors, TIMs will also be row vectors. These can be transposed into columns and placed next to the final and total demand columns. This makes it easier later to multiply TIMs with final or intermediate demand numbers, i.e. row by row). 5.  Calculate the carbon footprint (CO2), the employment footprint and the wages & salaries footprint for two entities: a) Australian households (use the column labelled (HousehoId finaI consumption,, Aus-FD1) and your sector (use the column of intermediate demand for your specific sector). b) Add direct impacts (Scope 1) to derive the total footprints for both and calculate the proportion from imports for the total footprints. In order to make the total footprints of households and your sector comparable, divide them, respectively, by either total Australian population (for households) or total number of workers employed by the sector (for the sector) to derive per-person numbers. c)  Present all these results in a summary table. Discuss the results as you see appropriate (e.g. discuss absolute and relative results and direct vs total, etc.) From here onwards, only do the calculations for the carbon footprint. 6.  Create graphs that show details of the total per-person carbon footprint of both, households and your sector. Explicitly show the direct and the indirect portions of your per-person carbon footprint and break down the indirect portion by using the broad consumption categories of economic sectors/activities provided in the Excel file (i.e. Food and Drink, Manufactured products, Housing, Energy, Transport, Health and education services, Other services and Other). 7.  In a separate graph, explicitly show the Scopes 1, 2 and 3 of your per-person carbon footprint of households and for your sector. The total per-capita carbon footprints of Tasks 6 and 7 must be the same. 8. Discuss all carbon footprint results and interpret their meaning in the wider context identified in the introduction section. Did you find out anything new or interesting? Which  contributions to the carbon footprint stand out? Also, discuss how difficult or easy it would be for households and your sector to reduce their carbon footprint. 9.  Redo the carbon footprint calculations for households and your sector under the assumption that all electricity in Australia comes from renewable (zero-emissions) energy! Do this by setting the direct CO2  emissions from electricity generation to zero. Compare the results to the previous results and discuss your findings. General guidelines •    Briefly describe the data and methods used in a separate section of your report. •    Present and discuss your results in a separate section of your report. An important part of your article is the discussion of your results, i.e. how the different footprints of households and your sector compare, what the main contributions to the carbon footprints are and why, and how these footprints can be reduced. •    Refer back to the context of what is described in the literature. What are the limitations of describing relative sustainability in terms of per-person numbers? •    Present results in graphs or tables. The use of meaningful graphs is strongly encouraged. •    Briefly summarise and contextualise your findings in a separate Conclusions section of your report. •    After submission, read and mark the reports from two fellow students (see below for details).

$25.00 View

[SOLVED] ELEC9715 Electricity Industry Operation and Control Assignment 1

ELEC9715 Electricity Industry Operation and Control ELEC9715 - assignment 1, t1 2025 Assignment 1 This assignment will be distributed to you Tuesday of week 4. It is due midnight Tuesday at the start of week 6. Your submission should be a pdf document. The assignment must be submitted individually on the course moodle via Turnitin, and must be your own work. The UNSW policy on student plagiarism can be found at www.unsw.edu.au and you should note that the university uses automated software to check assignments. Note that you must save a copy of your Excel workbook (or databases and code if you use another tool such as matlab or python). This will need to be uploaded into Moodle as well as the PDF report, but will only be checked if there are concerns about possible plagiarism. The assignment will be marked out of 20 (5 marks per question). One mark per question is for your explanation of how you answered the question, 2 marks are for your actual analysis, 1 mark is for the discussion and 1 mark is for the quality of the presentation – ie. does your report look professional. No explanation of how you undertook the analysis (it only needs to be brief) or discussion of your findings is lost marks. If you want the full 4 marks for presentation over the assignment you have to make it look like a professional consulting report. The two assignments over the course are worth 25% of your final assessment. Late submission without good reason, as explained in an email to the course lecturer prior to the due submission time, will see marks reduced as per the details in the Course Guide. Late submissions must be directly emailed to the lecturer as well as uploaded into Moodle. In keeping with the recommended hours per week of study for a six unit of credit course, (around 10 hours of self-directed work per week additional to the 4 contact hours), we expect that you will spend in the order of 15 to 20 hours of so in total on this assignment. The assignments are excellent preparation for the final exam and it is essential, and a UNSW requirement, that you do it yourself. Again, you should look to make your assignment like a consultancy report – ie. professional presentation with figures, tables and graphs. It is excellent practice for the technical report writing you have to do as an engineer in the electricity industry sector. You should briefly outline your methods for answering the questions in the report - engineers show their working. All tables and discussion must be pasted in as tables and text rather than pictures so that they are searchable via text (a requirement for Turnitin) - if you put tables or have discussion in your report that can’t be ‘text’ searched then it will not be marked. Finally, I am serious about the importance of engineering reports explaining how they undertook the analysis and discussing what the findings actually mean. Engineers shouldn’t just present numerical analysis but try to also help (often non-engineer) readers to understand how they did the calculations and what then answers mean. I’ll run a couple of assignment consultation sessions online and in-person at the end of week 4 and then week 6 if you want some assistance with what is a pretty long and, in some places, challenging assignment. Electricity industry operation and control is determined by the operational capabilities of all supply, network and end-use equipment. A key question is how the operational characteristics of existing and potential new generation technologies, as well as electricity demand, will shape future industry operation. Question 1: The Australian Energy Market Operator (AEMO) has recently updated its technical and cost estimates for all existing and a range of possible new utility generators for its planning studies. These studies are an input into its forthcoming 2026 Integrated System Plan (ISP). This requires AEMO to model operation of the Australian National Electricity Market (NEM) under a range of possible future generation and network scenarios. This, in turn, requires that they estimate key technical characteristics and capital and operating costs of all existing generation and potential new generation technologies. The latest (2024) data for this is available on the AEMO website as an Excel spreadsheet. It’s a very interesting read and you may well wish to look at it and see how AEMO undertakes its modelling. However, to simplify the assignment we also provide a cut-down workbook in the file on the course moodle and/or MS Teams. The cut down assignment AEMO modeling work book has a pre-prepared sheet with estimates (based on the AEMO data but with some additional assumptions) of the minimum and maximum operating levels operating costs and carbon emissions for all the coal and gas generating plants in NSW, as well as hydro and utility wind and solar plant and battery energy storage in the State – existing and committed (meaning definitely coming). Plot the generation supply curve (Incremental variable cost $/MWh versus MW system generation for economic dispatch) for the existing NSW thermal plant mix (all coal and gas-fired generators) for two possible carbon price scenarios - $0/tCO2 which is the current level since the removal of Australia’s carbon price in 2014)and $75/tCO2 which is the official Value of Emission Reductions (VER) for 2025 for rule making in the NEM. For the second carbon scenario, all the fossil fuelled plants are required to pay for each tCO2 they emit, adding to their operating costs from Variable O&M and fuel purchasing. In reality, the VER is what is called a ‘shadow’ price, and generators don’t have to pay it. Instead it is used for rule making and regulation settings on the basis that they really should pay it. One day it may actually return as a real carbon price. For simplicity ignore transmission losses and constraints. All the coal and gas units are committed - that is on-line and required to operate somewhere between their minimum and maximum output. You will first need to calculate the ‘sent out’ operating cost – short run marginal cost or SRMC - ($/MWh) for each generator for each carbon price. The spreadsheet is set up to assist in this. Note that you should still explain your working in the assignment so its clear you know how the calculation works. You’ll then need to sort them from lowest to highest incremental operating costs. You can of course bundle multiple plants if they are the same technology with the same costs (eg. PV, wind). i) Plot the two supply curves (one for each carbon price scenario) on a single graph. These curves represent the cost of the power system providing an additional MWh of demand - that is System Short Run Marginal Cost or SRMC as a function of demand for electrical energy over the entire range of economic dispatch. Think carefully about how minimum operating levels should be represented – we looked at this in the class on economic dispatch. Discuss the implications of a carbon price on economic dispatch of the NSW thermal plant, and particularly any impacts on the merit order (that is, the order of generating plant technologies from lowest to highest operating cost). You’ll find a useful template for plotting supply curves in the assignment workbook. We are now going to consider all current NSW generation including the coal and gas plants but also hydro, wind and utility PV, and even Battery Energy Storage Systems (BESS). ii) You now need to add existing hydro generation to the supply curve. Note that there are really three types of hydro generation to be modelled. Run of river plants effectively run whenever there is water flow - for some schemes these plants effectively look like constant output generators (more water than required at all times of the year) with only variable operating costs to cover. The problem as discussed in lectures, is that a lot of hydro plants are energy constrained - that is, their water actually has an opportunity cost/value. The third type is pumped hydro plants. Plot the NSW supply curve for a zero carbon price now including all the hydro units (except of course Snowy 2.0 which is pumped hydro and still some way from being finished) assuming that they are run of river and have zero operating cost. On the same graph also plot the hydro if we were to treat it as energy constrained plant where it bids into the market at its opportunity cost. You can assume this is $300/MWh (standard call option contract value, as you’ll learn when we cover peaking plant operation). Discuss the impacts of treating hydro differently in the economic dispatch supply curve. iii) Now add existing and committed wind and solar to the supply curve. Keep the hydro all offering at $300/MWh. The main challenge here is the high variability of wind and solar. Section ii) shows the supply curve if the wind isn’t blowing and the sun isn’t shining. Now plot the supply curve for a zero carbon price for three cases (all on the same graph) – 1) midday on a sunny day across NSW when the utility solar is all operating at rated capacity (it gets pretty close) but there is no wind, 2) on a windy winter evening in NSW when the utility wind power is operating in aggregate at 80% of installed capacity (never really see all the State’s wind generation all at rated output at the same time) but there is, of course, no solar power, and 3) when its both sunny and windy with all (100%) utility PV and 80% of wind generating Discuss the implications of NSW wind and solar on the generation supply curve and its implications for meeting State demand as it varies from a minimum of around 3000MW, at average demand of around 7500MW to its maximum of around 13800MW. In particular, do you envisage periods where coal and gas plants would ideally be turned off, or when there may be insufficient generation to meet demand? iv) Now add the existing and committed battery energy storage systems (BESS) and pumped hydro to the curves from iv) above. For reasons that will be explained later in the course, one way to model energy constrained and pumped hydro plants and BESS is to consider them as having an relatively high operating cost. For this assignment we will assume they have an operating (actually opportunity operating) cost of $300/MWh (hint, this is based on the standard call option pricing in the NEM). Briefly summarise the implications of all the above scenarios for economic dispatch in the NSW region as wind and solar deployment increases and coal plant continue to retire. Question 2: This question involves analysis of actual generating plant operation in the NEM. You have been given access to NEMSight - an extremely powerful commercial package for analysing NEM data. Details for accessing NEMSight are available on the course Moodle. You will want to use its ‘Time Machine’ function to analyse a number of NSW generators and characterize their operation over the calendar year 2024. Note that you can plot graphs by fuel type or participant (which gives you the individual units). Choose one plant in NSW for each of the following generation technologies: - Coal - OCGT (gas turbine) plant - Utility wind or solar farm - battery energy storage system (BESS) You will want to eyeball historical data for your chosen plant to make sure there aren’t any surprises - eg. not operating for most of the year (a particular issue with some of the renewable generators that have only recently been commissioned, or may not have even been connected yet). NEMSight offers very useful charting of data, and if you wish to analyse it further you can then right click on the chart and it will allow you to copy the data as a table which you can then paste into Excel. In the assignment excel workbook I have already provided 5 minute prices and scheduled demand for calendar year 2024 so you can actually place your chosen generator data into that sheet for your analysis. i) For each of your chosen plant, use 5 minute dispatch data to estimate as best able the following: a. Highest ramp rate seen over the year (up or down) in %RatedCapacity/min. Don’t consider starts and stops in this calculation – ramp rate is the change in output over 5 minutes when the plant stays operating. This can be a little tricky with very fast plant like OCGTs, pumped hydro and definitely BESS where they can go from zero to rated output pretty quickly. For coal plants on the other hand, they might go from zero to minimum operating level pretty quickly in the data, but the plant was actually started some time prior to this. b. achieved capacity factor over the year % (actual output divided by possible output if plant operated at its max output for every hour of the year) c. Number of starts in the year (ie. Going from zero output to generation) d. operating profit over the year, using the operating cost estimates from Question 1 above for the zero carbon price scenario, and the regional spot prices (available from NEMSight but also provided in the assignment workbook). Note that some plants may have been ‘down’ for extended periods over the past year – best to select another plant. A number of these plants, particularly thermal coal and gas plants and hydro, have multiple units that can cause some complexities for the analysis. You should analyse a single unit. Finally, note that we will be checking for assignments that analyse the same generators given there is a choice available– this assignment is meant to be done individually. My advice is to first eyeball the data of a range of plants to get a feel for the general operation of different plants. Then you can write simple data analytics, using a wide range of helpful Excel functions, to characterize their operational characteristics. Useful EXCEL functions for this include MAX and MIN and AVERAGE (eg. MAX(b:b) returns the largest number in column b). You can get ramp rates by adding a column which calculates the difference between adjacent cells containing 5 minute power outputs (MW). And the IF function is very useful for filling an added column with a counter if power output is zero). Be sure to put your results in a table. Please comment on your findings, and the operational flexibility of different generation technologies, and the potential implications for NSW’s electricity sector operation. ii) Using 5 minute NSW scheduled demand data for calendar year 2024 (available from NEMsight or in the assignment workbook, determine the following: a. Average demand (MW) over the year b. Highest 5 minute demand (and when it occurred – date and time). c. Lowest 5 minute demand (and when it occurred – date and time) d. Highest up ramp rate (MW/min) e. Highest down ramp rate (MW/min) f. Effective capacity factor of demand (%) with respect to highest 5 minute demand seen over the year 2024. Be sure to put your results in a table and discuss their implications, particularly with respect to the variability of NSW demand compared with its wind and utility PV. Question 3: Distributed energy resources (DER), increasingly now being called Consumer Energy Resources (CER) are becoming an increasingly important generation source – Australia has a lot more rooftop PV than utility PV (25GW versus around 10GW). Other DER technologies include household appliances which have energy storage so that you can move around the time that they run – electric storage hot water systems are a particular example. An Excel spreadsheet is available on the course Moodle and/or MS Teams that has 30 minute household data for approximately 100 houses in the Ausgrid network region of Sydney for a complete year. Each house has metered load (kWh over 30 minutes) for both what is termed General Consumption (GC) and Controlled Load (CL). GC measures all household electricity consumption other than controlled loads. The CLs are typically hot water systems and/or pool pumps - which are electronically controlled through ripple control as instructed by the distribution network service provider. CLs are separately metered because they can be flexibly dispatched by the network operator and therefore pay a lower tariff (c/kWh) rate. Somewhere around half of NSW households have CLs although this is falling as off-peak hot water systems are replaced. The dataset also includes Gross (total) Generation (kWh over 30 minutes) from the household PV system. While the Ausgrid data set has different capacity PV systems on each house we have standardized the PV system size to 6kW – the average PV system size across Australia these days. You will analyse the house number that matches the last two digits of your student number – eg. if your student number is s1234567 you will analyse house 67. Note that some houses have very questionable data suggesting metering errors or PV system failure – if that is the case for your house, please note this in your report, explaining the issue, and then use the next house number. Note that you must use the house data corresponding with your student number or explain why you didn’t – I wanted to copy my friend’s assignment is not an acceptable answer and you will get zero marks for the question. For your particular house, i) estimate as best able from the 30 minute data over the year: - highest GC demand (kW) and day (date day/month) and time it occurred (24 hour eg. 17:00 = 5pm) - average GC demand (kW) over the year - highest CL demand (kW) and date (day/month) and time at which this occurred (only relevant of course if your house has CL) - average CL demand (kW) over the year - proportion of total household load which is CL over year (%) -annual electricity bill for the house assuming no PV, GC tariff of 35c/kWh and CL tariff of 12c/kWh ii) For the PV system, estimate as best able from the 30 minute data over the year - average PV capacity factor (%) (with respect to provided 6kW PV system capacity) over year. - peak net export of PV generation (kW) if any (that is, greatest PV generation exports to grid after removing GC and CL demand) and the day (date day/month) and time at which this occurred. - annual electricity bill for the house given the consumption tariffs above, and an export tariff (when the PV generation exceeds total GC and CL load in a 30 minute period) of 3c/kWh. Note that self consumed PV generation saves the household the consumption tariffs. Again, I suggest you first graph the output for your house to ‘eye-ball’ its load and PV behavior. before then using some of the available Excel spreadsheet functions to identify the factors above. Always apply a sanity check to your answers, and be sure to use the units suggested above. In particular, note that 1kWh consumed in 30 minutes reflects a load consuming 2kW. You will need to change your meter data to get kW) Be sure to put your results in a table. Please comment on your findings, and their implications for power system operation to meet residential load in NSW. Also discuss the potential role of controllable hot water systems as a flexible storage resource, and the performance of household PV systems. Question 4: Consider a very simplified version of the NSW generation fleet and State demand as a competitive electricity market as outlined in table 1 below. For convenience, you can assume that no generators have minimum operating levels hence no fixed variable costs (big assumption as you’ll see, those coal plants have a real minimum operating demand challenge at present) and that their incremental variable costs apply across their entire operating range. Assume that there are no transmission constraints or losses, and ignore the existing transmission interconnections between NSW and Victoria, and NSW and Queensland. We assume that there are four major market participants in NSW as detailed in the table below. Each market participant can offer one quantity/price pair into the market for each of its generation technologies. Note that the PV and wind generation and Battery Energy Storage Systems (BESS) in the state are bundled into generic, multiple owner, participants for simplicity, and because they are likely to be market price takers rather than makers (although this is really changing and we are now starting to see wind and solar and BESS starting to exercise market power). The market operates at hourly intervals. The market operator AEMO bids its scheduled load forecast for each hour into the market at a Market Ceiling Price (MCP) of $17,500/MWh. Note that there is one active demand market participant – an aluminium smelter which generally runs at 600MW 24/7 but bids all its demand such that it completely turns off if the price goes above $2000/MWh. AEMO does not include this plant in its forecasts of scheduled demand. Assume for simplicity that the wind and solar are market participants who don’t earn income from PPAs but instead only the market price, and that the hydro and BESS is offered into the electricity market at the prices in table 1. There are big assumptions here, reflecting the opportunity cost of the water in different hydro schemes and energy arbitrage strategy for the BESS respectively (more on this in later weeks). Consider three possible hourly scenarios of renewable generation and scheduled demand: 1) Wind generation of 2000MW, solar of 4000MW and scheduled market demand of 4000MW (sunny and windy day spring day with rooftop PV reducing scheduled demand to be met by utility generation. 2) Wind farms at 300MW and utility PV at 0MW with 13000MW of scheduled demand (a relatively still cold winter evening with lots of electrical heating). 3) A spring night with 1200MW wind, no utility solar of course, and scheduled demand of 8000MW. Solve the following cases of market dispatch for each of the three renewables/demand scenarios: (i) None of the generation participants are engaging in strategic (gaming) bidding into the market. What is the market clearing price (MCP) ($/MWh), dispatch (MW) and surplus/profit ($'000/hr) for each generation participant (for each of their generation options and in total). Also calculate the profit of the BESS assuming that it has 100% round trip efficiency (no losses) and pays an average $15/MWh. Please use tables to present these answers. Don’t forget what the battery storage plants might be doing – will they be charging, doing nothing or charging for each scenario, and how might that impact on price. (ii) Participant AGL has now decided to attempt to exert its market power to improve profits. Assume that the other generators and the aluminium smelter will continue 'preference revealing' bidding. Assume also that AGL has excellent knowledge of the true maximum power outputs and incremental variable costs (and opportunity costs) of all their competitor's generating units, and the scheduled demand MW and price responsive behaviour of the smelter. How might AGL offer into the market (quantity, price) to maximise its profits under each of the different renewable energy and demand scenarios? What would then be the market clearing price, dispatch and profits for each generation participant. Again, think of what the BESS might be doing during the exercise of market power. And what about that price responsive demand? (iii) Instead of participant AGL attempting to exert market power, it is now Snowy which is attempting strategic bidding in order to increase its profits. Assume that all the other generation participants and the BESS use 'preference revealing' bidding into the market. How might Snowy offer into the market (quantity, price) to maximise its profits under the different renewable energy and load scenarios? What would then be the market clearing price, dispatch and profits for each generator? Be sure to put your results in tables as appropriate. Please comment on your findings, and their implications for market prices and the exercise of market power in the NSW region of the Australian NEM given growing penetrations of variable wind and solar generation, and growing BESS deployment. Also, what role might more price responsive demand play in the exercise of market power by generators. And can you see circumstances where wind and solar plants might try to exercise some limited market power themselves?

$25.00 View

[SOLVED] DSCI 551 - Project Guideline Spring 2025

DSCI 551 - Project Guideline Spring 2025 ChatDB - Taking to Database Management Systems using Natural Language In this project, you are asked to develop a natural language interface to one or more SQL/NoSQL database systems (depending on the number of people in your group). The interface should support the following functions for RDBMS (e.g., MySQL): ●    Explore schemas and data of database: It should allow users to ask questions (in natural language) to find out what tables there are in the database, what attributes a table has, and get sample data from a table. ●    Query: it should accept natural language queries from users, and convert them into database queries (SQL), execute the queries in the DBMS, and return query results to the users. It should support the common constructs in SQL, including select, from, where, group by, having, order by, limit, and offset. It should also allow queries that involve joining multiple tables. ●    Data modification: It should support insert, delete, and update requests in natural language. For example, add a new employee named John in the HR department; or update John’s age to 26. Similarly, the interface should support the following functions for NoSQL databases (e.g., MongoDB): ●    Explore schemas and data of database: It should allow users to ask questions to find out what collections there are in the database and get sample data from a table. ●    Query: it should accept natural language queries from users, and convert them into database queries, execute the queries in the DBMS, and return query results to the users. It should support the functions in MongoDB: find (with projection), aggregate (with $match, $group, $sort, $limit, $skip, $project). Note that $match can be before and after $group. It should also allow queries that involve joining of two collections (using $lookup). ●    Data modification: It should support insert, delete, and update requests in natural language. For example, add a new employee named John in the HR department; or update John’s age to 26. ChatDB should convert the requests into MongoDB functions such as insertOne, updateOne, deleteOne, insertMany, etc. Additional Requirements and Notes: ●    You can form. a group of up to 3 people for your project. o One-person group: You can develop a natural language interface (NLI) to either a RDBMS (except for sqlite) or a NoSQL database. o Two-person group: You should develop NLI to a RDBMS and a NoSQL database. o Three-person group: You should develop NLI to a RDBMS and a NoSQL database.  In addition, you should develop a Web browser-based UI for users to interact with ChatDB. ●    You can use OpenAI or a large language model API for the projects. See the appendix for possible options and some notes which you might find helpful in your project implementation. You are encouraged to share your experiences and further resources on LLM API on Piazza! ●    Use at least three databases to showcase the working of your ChatDB implementation. Note that you will need to have at least two tables/collections to demonstrate join. Project deliverables: ●    Proposal (due 2/7, Friday, 10 points): Detail your project plan, including type of database system, databases, and how you plan to implement the functions stated in the beginning of this handout. Also list group members and their roles. Note that your project is a collaborative effort, and all members should contribute to the project. We will grade your project as a team effort and every member receives the same grade. ●    Midterm progress report (due 3/7, Friday, 10 points): tell us your progress so far and the challenges you might have encountered. Note that any reformation of groups should be  made before midterm progress and reported in the midterm progress report (also notify TA). It will be the responsibility of all group members to make sure the project will be a    team effort after that. ●    Demo (in-class, 4/21 and 4/23, 10 points): Give a live demo of your project. All project members should be present during the demo, presenting his/her contribution. If you are absent, we will assume that you have not contributed to the implementation of the project. ●    Final report (due on 5/9, Friday, 10 points): the final report should be comprehensive, details your design and implementation, and your learning experiences. ●    Implementation (due on your demo time, 60 points): note your project should be fully implemented before the demo. You should include in your final report a link to Google drive where you will upload your project codebase and documentations. Make sure you give access to your project folder.    

$25.00 View

[SOLVED] ACF5956 Advanced Financial Accounting Semester 1 2025

ACF5956 Advanced Financial Accounting Semester 1, 2025 Task 1: Patchwork Text Individual Assignment Assessment Requirements: Task 1 comprises Parts A and B Due Date:  Part A due in Week 4 (Friday 28 March 2025 by 11.55pm) – 10% (marked out of 100) Part B due in Week 7 (Thursday 17 April 2025 by 11.55pm) – 15% (marked out of 100) Warning: AI & Generative AI tools MUST NOT BE USED within the assessment for the following reasons: This whole assessment requires students to demonstrate human knowledge and skill acquisition without the assistance of AI. THIS ASSIGNMENT IS TO BE COMPLETED AS AN INDIVIDUAL ASSESSMENT TASK.  Weighting: Total 25% - submission in two parts Word Limit: The combined word limit for Task 1 Parts A and B is 1,200 words, as follows: · 300 words for Part A which comprise the summary of the research article 1; and · 900 words for Part B which comprise i) 300 words for the summary of the research article 2 and ii) then you should be able to link the research article 2 with the research article 1 and write 600-word critique report on those research articles. You are required to support your critiques using other research articles. Personal opinion is not allowed. Citations/References:  You are required to provide citations with a minimum of 5 (five) references to support your critique report in Task 1 Part B. Presentation style.           The format or presentation style. of your assignment is up to you. Important information · A word count must be included for each part. 10% more than required word limit will incur a penalty of 5%. · A signed assessment cover sheet must accompany your assignment and it must be submitted SEPARATELY from your assignment electronically via the submission site on Moodle. · Late penalties are 5% per day. Assessments submitted after 7 calendar days will not be marked therefore it will be awarded zero mark.  · Marks will be released in Week 6 for Part A; and Week 10 for Part B. Learning objectives assessed: This assessment task is designed to test your achievement of learning objectives 1, 2, 3 and 4. Patchwork Text A patchwork text is where students write a number of small pieces of work (‘patches’), which they then have to later ‘stitch’ together in a reflective commentary in the form. of critique report. The patches and the tasks upon which they are based are discrete and complete entities in their own right, but they can help contribute to a holistic understanding of the module content (Centre for the Development of Teaching and Learning from the University of Reading). As stated above, the combined word limit for Task 1 Parts A and B is 1,200 words (300 words for Part A which comprise the summary of the research article 1; and 900 words for Part B which comprise i) 300 words for the summary of the research article 2 and ii) then you should be able to link the research article 2 with the research article 1 and write 600-word critique report on those research articles. You are required to support your critiques using other research articles. Personal opinion is not allowed. The selected topic should be related to a global issue or it has a global impact or phenomenon. The two articles of your choice need to be from a different topic area which are drawn from the following topics below (i.e.,): · Earnings quality/Earnings management; · Fair value measurement; · Intangible assets; · Equity compensation; · Political connections; · Agency theory: principal-agent conflict (Agency problem type 1) and/or principal-principal conflict (Agency problem type 2); · Corporate governance; · International Financial Reporting Standards (IFRS). Please do not choose topic related to “Corporate social responsibility” or “Environmental, social and governance (ESG)” or “Sustainability reporting” since this topic is covered and assessed in Task 2. Also, please see the following examples in relation to the restriction on the topic choice:  Example 1: You cannot choose two articles on the same theme or topic. For example, you cannot choose a research article 1 on earnings management and a research article 2 on earnings quality or accruals quality and corporate governance, given thatthe research article 2 is also related to earnings management. Example 2: You are not allowed to choose a research article which covers “equity compensation” and/or “earnings quality” as a research article 1 and then choose a research article 2 on “earnings management” and/or “equity compensation”. The two research articles must be from different topic areas. Requirement: For example, you choose a research article 1 on “equity compensation” and/or “earnings quality”, and then for another research article 2, you can choose on “issues related to agency theory” and/or “corporate governance” or “political connections” or “International Financial Reporting Standards (IFRS): or other topics which are not related to either “equity compensation” or “earnings quality” or “both of them”. Warning: Marks will be deducted if you chose two articles from the same topic area. Further, the choice of articles and references must be sourced from the following journals or from the following link ABDC Journal Quality List. · Abacus · Accounting, Auditing and Accountability Journal · Accounting and Business Research · Accounting and Finance · Accounting Horizons · Accounting Organisations and Society · British Accounting Review · Contemporary Accounting Research · Critical Perspectives on Accounting · Journal of Accounting and Economics · Journal of Accounting Research · Journal of Accounting and Public Policy · Journal of Accounting, Auditing and Finance · Journal of Business Ethics · Journal of Business, Finance & Accounting · Journal of Contemporary Accounting and Economics · Management Science · Meditari Accountancy Research · Review of Accounting Studies · The Accounting Review · European Accounting Review Part A. Total 300 words –10% (marked out of 100) due in Week 4 (Friday 28 March 2025 by 11.55pm). Provide a summary of the first article that you have chosen. Your summary should address the following questions: (1) What is the objective, motivation and contribution of the article? (2) How did they conduct the research? (3) What were the findings/results? (4) What were the limitations of the study? The summary is to be in your own words. You cannot simply copy statements from the actual article. Marks will be deducted for plagiarism.  Part B. Total 900 words –15% (marked out of 100) due in Week 7 (Thursday 17 April 2025 by 11.55pm). (i) Summary of article 2 – Total 300 words Provide a summary of the second article that you have chosen. Your summary should address the following questions: (1) What is the objective, motivation and contribution of the article? (2) How did they conduct the research? (3) What were the findings/results? (4) What were the limitations of the study? (ii) Reflection by providing critique report – Total 600 words A reflective piece is an analytical practice where you are required to critique what you have read. You need to mesh or ‘stitch’ the two research article themes/ideas/results together. This part of the report is not a summary of what you have already summarised. You must ensure that you identify your critiques and conclusion on the topics you have chosen and supported by other research articles. In other words, it requires you to critically think about the articles and support your critiques with other research articles. Personal opinion is not allowed. Your critical reflection can do one of the following: · Compare and contrast the two articles; · The strengths and weaknesses of the two articles; · Agree or disagree with the research outcomes of those two articles. Assessment Criteria: A matrix (rubric) outlining the assessment criteria and how your work will be assessed against these criteria will be provided on pages 6 to 9 of this document. This will assist you in completing the assessment task and to understand the allocation of marks. For more information on appropriate report writing, formatting and referencing, you should refer to Research and Learning Online (RLO) at the following site: https://www.monash.edu/rlo Turnitin Your summaries must be run through Turnitin software that will indicate the same or similar pieces of work. Your Turnitin report must accompany your summary. Please refer to the following for information on Turnitin at the following link: https://guides.lib.monash.edu/turnitin/using-turnitin Justification for Selection of this Assessment Task: This assignment is designed to assist you in demonstrating your knowledge of, and ability to critically assess, influences on a contemporary issue in financial reporting and disclosure. It also provides you with an opportunity to further enhance your research, judgement and written communication skills. In addition to the development of knowledge of a contemporary area impacting accounting, this task is also designed to develop the following competencies (Please go through the assignment marking rubrics of Task 1, Parts A and B on pages 6 to 9 of this document). Discipline knowledge and skills Critical thinking and problem-solving Research skills Communication skills Global perspectives The research assignment is designed to broaden your understanding and application of theoretical knowledge gained in topics in the unit. The above competencies, which involve the analytical skills and communication of research findings through a short report, are essential skills that our graduates are required to demonstrate to employers. This assignment is designed to further develop these valuable skills and attributes. The issue addresses contemporary issues in the business and accounting arena. This assignment also enables you to demonstrate your written communication ability – a skill that is deemed by your future employers to be essential for graduates. In the most recent Graduate Outlook survey accounting and finance employers rated good communication skills as their number one priority when hiring graduates (Graduate Careers Australia, 2011). All higher education providers of accounting degrees in Australia are required to provide evidence that their accounting graduates have achieved common national minimum threshold learning outcomes (TLOs) at the time of graduation. These TLOs were developed collaboratively with input from the professional accounting bodies, various business practitioners and accounting academics. Five TLOs were developed for the accounting discipline of which both the judgement and communication standards are relevant for this assignment. These standards require that an accounting graduate of a master’s degree must demonstrate: “Exercise judgement under supervision to solve routine accounting problems in diverse contexts using social, ethical, economic, regulatory and global perspectives.” “Justify and communicate accounting advice and ideas in diverse collaborative contexts involving both accountants and non-accountants.” Please keep this TLO in mind when preparing your assignment, as this is the basic benchmark against which your assignment submission will be assessed. These standards have been incorporated into the marking rubric.        

$25.00 View

[SOLVED] Hw assignment 4 (a4): text classification cs6120

HuggingFace is a popular platform that was primarily created to host open-source NLP models. It has expanded scope and capabilities to include computer vision and audio tasks. The site offers a wide range of resources, tools, and services, primarily focusing on transformer-based models. The “Models” tab hosts a vast collection of pre-trained transformer-based models for various NLP tasks, such as text classification, sentiment analysis, language generation, translation, and more. Users can explore and download these models for their specific applications or fine-tune them on custom datasets. In the “Datasets” tab, users can find diverse datasets curated for NLP tasks. These datasets cover various topics, languages, and domains, making them valuable resources for training and evaluating machine learning models. Users can explore, download, and contribute to these datasets.Hugging Face “Spaces”, the collaborative workspaces on the platform, are a testament to its commitment to fostering teamwork. These Spaces provide a conducive environment for users to create, share, and collaborate on NLP and machine learning projects. Equipped with tools for version control, collaboration, and deployment, they enable teams to work together efficiently on research or development projects. The ‘Community’ tab further enhances this collaborative spirit, serving as a hub for interaction and collaboration among Hugging Face users. It features discussion forums, Q&A sections, and community-contributed resources such as tutorials, code snippets, and project showcases. Users can engage with other community members, seek help, and share their knowledge and expertise, thereby enriching the platform’s collective learning experience. The site also hosts Blogs, Competitions and Courses in ML.The last assignment is an exploration of various capabilities of the portal, focusing on the classification tasks in NLP using both pipeline and AutoModel classes.You will use the “yelp_review_full,” dataset for this assignment. The dataset is a comprehensive collection of reviews sourced from the popular business review platform Yelp. This dataset contains many reviews accompanied by star ratings, providing a valuable resource for sentiment analysis and natural language processing tasks.The dataset covers various business categories and types, including restaurants, hotels, bars, salons, spas, retail stores, and more. Each review in the dataset contains textual content that provides insights into the reviewer’s experiences, opinions, and perceptions of the businesses they have visited. The reviews may vary in length and language style, reflecting the diverse nature of user-generated content on Yelp.   This assignment aims to test your familiarity with classification tasks for transformer-based models using the Yelp review dataset from Hugging Face. Explore the Yelp review dataset using Python and Hugging Face’s Datasets library. Understand the structure of the dataset, including the features and labels. Utilize the pipeline interface from the `transformers` library to perform sentiment analysis on Yelp reviews. Analyze the overall sentiment distribution and provide insights based on the results.Perform a tournament of 3 models of your choice and compare results.The comparison must include inference on your understanding of the types of mistakes each model made. It is not sufficient to simply report Accuracy or Confusion Matrix for each model.   Summarize each review in the dataset using transformer-based models for text summarization (e.g., BART, T5). Use a pretrained model to predict the star rating based on the summaries instead of the full review text. Evaluate the model’s performance. Utilize the zero-shot classification capability provided by Hugging Face’s transformers library to categorize Yelp reviews into one of the 20 provided classes. The classes can include categories such as restaurants, hotels, bars, salons, spas, fitness centers, automotive services, and others. Evaluate the predictions made by three different zero-shot classification models (e.g., BART, T5, GPT). Classes: Manual Categorization:Randomly select 100 reviews from the Yelp review dataset. Read each review and manually categorize it into one of the 20 provided classes. Maintain a record of the manual categorizations for comparison with the predictions made by the zero-shot classification models.Comparison and Accuracy Calculation:Compare the manual categorizations with the predictions made by the zero-shot classification models for the subset of 100 reviews. Calculate the accuracy of each model by determining the percentage of reviews for which the predicted class matches the manually assigned class.  Please submit a fully executed jupyter notebook identifying question number and steps. Make sure to add comments to your solution.

$25.00 View

[SOLVED] Hw assignment 3 (a3): sentiment analysis cs6120

Sentiment analysis or opinion mining focuses on identifying and categorizing opinions expressed in text toward a particular topic, product, or service is positive, negative, or neutral. This technology is widely used in monitoring and analyzing customer feedback, market research, and social media monitoring to understand consumer sentiment.Amazon reviews are a rich data source for sentiment analysis because they consist of a textual review and a star rating, typically on a scale from 1 to 5 stars, which clearly indicates the customer’s sentiment towards the product. These reviews are written by customers who have purchased and used the products, offering their opinions, experiences, and satisfaction levels. Sentiment analysis on Amazon reviews involves processing and analyzing these texts to extract insights about general sentiment, specific features of the product that customers liked or disliked, and overall customer satisfaction. Such analysis helps businesses improve products, address customer concerns, and make strategic decisions.Use Amazon reviews for one or more categories of products found here:https://cseweb.ucsd.edu/~jmcauley/datasets/amazon/links.htmlClean and preprocess the data including removing irrelevant information, stop words, lower casing and standardizing the text format for analysis. dataset. Apply sentiment analysis techniques to the preprocessed review texts as discussed in the class and starter program. Finally, analyze the results to identify patterns and insights.           Please submit a fully executed jupyter notebook identifying question number and steps. Make sure to add comments to your solution.

$25.00 View

[SOLVED] Hw assignment 2 (a2): deep learning cs6120

HuffPost (known as The Huffington Post until 2017) is a prominent website that provides a mix of news, commentary, and various forms of original content, including blogs and articles covering a wide range of topics from politics and business to entertainment and lifestyle.The website initially featured contributions from unpaid bloggers from diverse fields such as politics, entertainment, and academia, amassing around 100,000 contributors by 2018. Over the years, the site has seen involvement from notable figures, including celebrities, politicians, and academics, who have contributed content, enhancing its reputation and reach. HuffPost has undergone significant transformations since its inception, expanding its content to include more news-focused articles and reducing reliance on its unpaid blogger program. It now features commissioned opinion pieces and personal essays. The website operates on a revenue model derived from advertising and maintains its content as free to access for users. Some fascinating history on mergers and acquisitions: The Huffington Post was acquired by AOL in March 2011 for $315 million, which expanded HuffPost’s reach and resources. In 2015, Verizon Communications acquired AOL, and HuffPost became part of Verizon Media. HuffPost rebranded in April 2017, including updates to its website design, logo, and content approach. In February 2021, BuzzFeed acquired HuffPost from Verizon Media in a stock deal, marking another significant shift in the platform’s ownership and business strategy.You are assigned a classification task through a large dataset from HuffPost. Classification tasks lay the foundation for many applications that involve understanding, interpreting, and generating human language. Some prominent examples of classification techniques include:You are given more than 200k news items from HuffPost. The dataset is taken from a Kaggle competition:The news articles in the dataset are each tagged with one of several categories (such as Politics, Technology, Entertainment, etc.). Each entry in the dataset typically includes the headline and a short description of the article, along with its assigned category/ The primary objective is to develop and compare various machine learning models to categorize news articles into predefined categories based on their headlines and short descriptions. This assignment will help you understand text classification nuances using traditional machine learning and deep learning approaches.   OptionallyLong Short-Term Memory (LSTM): Use LSTM to model dependencies in text sequences.   Please submit a fully executed jupyter notebook identifying question number and steps. Make sure to add comments to your solution.

$25.00 View

[SOLVED] Hw assignment 1 (a1): bag of words cs6120

 Integrating clustering techniques with dimension reduction in unsupervised learning presents a fascinating study area. Dimension reduction, a process that streamlines complex, high-dimensional datasets into a more manageable form, is essential for efficient data analysis and visualization. Techniques like Principal Component Analysis (PCA), t-distributed Stochastic Neighbor Embedding (t-SNE), and Uniform Manifold Approximation Projection (UMAP) are instrumental in this context. Applying clustering methods such as k-means, c-means, hierarchical clustering, DBSCAN, HDBSCAN, and Expectation-Maximization (EM) to dimensionally reduced datasets offer a comprehensive understanding of how these algorithms can identify patterns and groupings effectively. This approach facilitates a practical application of these algorithms and deepens the knowledge of their collective impact in enhancing data analysis, particularly within unsupervised learning.In this assignment, you are provided with 40,000 physician notes authored by test-takers of the USMLE. These notes, written for ten standardized patients, offer a unique dataset for analysis. The notes contain a natural ten clusters as the patients are the same for all note writers. The task is a good example of unsupervised learning where the ground truth can be used for post-hoc analysis. Your tasks are as follows:    Please submit a fully executed jupyter notebook identifying question number and steps. Make sure to add comments to your solution.

$25.00 View

[SOLVED] Hw assignment 0 (a0): regular expressions cs6120

A regular expression (RE) is a sequence of characters that forms a search pattern. RE can be used for string searching and manipulation tasks, such as finding, replacing, or validating text. Regular expressions are powerful tool in many languages for handling text data. They are useful in data cleaning, parsing, and text preprocessing.This assignment has two parts to it: Part A): You are given a small csv file with five short stories listed in rows. The file also contains empty columns with header labels. Use RE to extract information for the empty columns.  Please submit a fully executed Jupyter notebook clearly identifying question number and steps. Make sure to add proper commentary to your solution.   

$25.00 View

[SOLVED] Cs5800 – algorithms problem set #8 problem #1 – 20 points the longest subsequence problem is a well-studied problem in computer science, where given a sequence

CS5800 – Algorithms Problem Set #8 Problem #1 – 20 points The Longest Subsequence Problem is a well-studied problem in Computer Science, where given a sequence of distinct positive integers, the goal is to output the longest subsequence whose elements appear from smallest to largest, or from largest to smallest. For example, consider the sequence S = [9, 7, 4, 10, 6, 8, 2, 1, 3, 5]. The longest increasing subsequence of S has length three ([4, 6, 8] or [2, 3, 5]), and the longest decreasing subsequence of S has length five ([9, 7, 4, 2, 1] or [9, 7, 6, 2, 1]). And if we have the sequence S = [531, 339, 298, 247, 246, 195, 104, 73, 52, 31], then the length of the longest increasing subsequence is 1 and the length of the longest decreasing subsequence is 10. (a) Find a sequence with nine distinct integers for which the length of the longest increasing subsequence is 3, and the length of the longest decreasing subsequence is 3. Briefly explain how you constructed your sequence. (b) Let S be a sequence with ten distinct integers. Prove that there must exist an increasing subsequence of length 4 (or more) or a decreasing subsequence of length 4 (or more). Hint: for each integer k in the sequence you found in part (a), define the ordered pair (x(k), y(k)), where x(k) is the length of the longest increasing subsequence beginning with k, and y(k) is the length of the longest decreasing subsequence beginning with k. You should notice that each of your ordered pairs is different. Explain why this is not a coincidence, i.e., why it is impossible for two different numbers in your sequence to be represented by the same ordered pair (x(k), y(k)). (c) In class, we unpacked the Longest Common Subsequence (LCS) problem, where we showed that if our two sequences have size n, then our Dynamic Programming algorithm runs in O(n 2 ) time. Let S be your 9-integer sequence from part (a), and let S ∗ be the same sequence where the 9 numbers are sorted from smallest to largest. Using the LCS algorithm from class, determine the length of the longest common subsequence of S and S ∗ . (Your answer will be 3. Do you see why?) Now prove the general case. Specifically, if S is a sequence of n distinct integers, prove that the length of the longest increasing subsequence of S must equal the length of the longest common subsequence of S and S ∗ , where S ∗ is the sorted sequence of S. (d) The results of part (c) immediately gives us an O(n 2 ) time algorithm to determine the length of the longest increasing subsequence of an input sequence S with n distinct integers. But this is (unsurprisingly) not the optimal algorithm. Your goal is to improve this result. Given an input sequence S with n distinct integers, design a linearithmic algorithm (i.e., running in O(n log n) time) to output the length of the longest increasing subsequence of S. Clearly explain how your algorithm works, why it produces the correct output, and prove that the running time of your algorithm is O(n log n). If you are unable to come up with an O(n log n) algorithm, you will receive partial credit for designing an O(n 2 ) algorithm that is different from the one described in part (c).Problem #2 – 20 points For those of you who follow professional sports, you will know that there are many team sports that are clock-based, i.e., the game lasts a fixed amount of time and the winner is the team that scores the most points or goals during that fixed time. In all of these sports (e.g. basketball, football, soccer, hockey), you will notice that near the end of the game, the team that is behind plays very aggressively (in order to catch up), while the team that is ahead plays very conservatively (a practice known as “stalling”, “stonewalling”, and “killing the clock”). In this problem we will explain why this strategy makes sense, through a simplified game that can be solved using Dynamic Programming. This game lasts n rounds, and you start with 0 points. You have two fair coins, which we will call X and Y . The number n is known to you before the game starts. In each round, you select one of the two coins, and flip it. If you flip coin X, you gain 1 point if it comes up Heads, and lose 1 point if it comes up Tails. If you flip coin Y , you gain 3 points if it comes up Heads, and lose 3 points if it comes up Tails. After n rounds, if your final score is positive (i.e., at least 1 point), then you win the game. Otherwise, you lose the game. All you care about is winning the game, and there is no extra credit for finishing with a super-high score. In other words, if you finish with 1 point that is no different from finishing with 3n points. Similarly, every loss counts the same, whether you end up with 0 points, -1 point, -2 points, or -3n points. Because you are a Computer Scientist who understands the design and analysis of optimal algorithms, you have figured out the best way to play this game to maximize your probability of winning. Using this optimal strategy, let pr(s) be the probability that you win the game, provided there are r rounds left to play, and your current score is s. By definition, p0(s) = 1 if s ≥ 1 and p0(s) = 0 if s ≤ 0. (a) Clearly explain why p1(s) = 0 for s ≤ −3, p1(s) = 1 2 for −2 ≤ s ≤ 1, and p1(s) = 1 for s ≥ 2. Explain why you must select X if s is 2 or 3, and you must select Y if s is -2 or -1. (b) For each possible value of s, determine p2(s). Clearly explain how you determined your probabilities, and why your answers are correct. (Hint: each probability will be one of 0 4 , 1 4 , 2 4 , 3 4 , or 4 4 .) (c) Find a recurrence relation for pr(s), which will be of the form pr(s) = max( ??+?? 2 , ??+?? 2 ). Clearly justify why this recurrence relation holds. From your recurrence relation, explain why the optimal strategy is to pick X when you have certain positive scores (be conservative) and pick Y when you have certain negative scores (be aggressive). (d) Compute the probability p100(0), which is the probability that you win this game if the game lasts n = 100 rounds. Use Dynamic Programming to efficiently compute this probability. For a bonus mark, determine the limit of pn(0) as n → ∞, and clearly prove why your answer is correct. (Shockingly, or perhaps not shockingly, the answer is way more than 50%.)Problem #3 – 20 points There are over 200 LeetCode problems on Dynamic programming. In this question, you will create a mini-portfolio consisting of Three (3) LeetCode problems on Dynamic Programming Algorithms, chosen from the following website. https://leetcode.com/tag/dynamic-programming/ As always, you may code your algorithms in the programming language of your choice. Here is how your mini-portfolio will be graded. (i) There will be a total of 15 points for all the problems that your are including in the mini-portfolio: For each of these, • Provide the problem number, problem title, difficulty level, and the screenshot of you getting your solution accepted by LeetCode • Source code used – this can be uploaded in Canvas • Provide a written analysis of the problem investigating the time complexity of your algorithm Note: Leetcode has three different problem variations: Easy, Medium, Hard For this problem, the following different problem combinations will get the total points: • 5 Easy problems • 4 Medium problems • 3 Hard problems • 3 Easy and 1 Hard problem • 4 Easy and 1 Medium problem • 3 medium and 1 Hard problem • 2 medium and 2 Hard problem • 2 Easy and 1 medium and 1 Hard problemYou will get full credit for any correct solution accepted by LeetCode, regardless of how well your runtime and memory usage compares with other LeetCode participants. (ii) (5 marks – INDIVIDUAL WORK) For one of the problems you are including in your miniportfolio, explain the various ways you tried to solve this problem, telling us what worked and what did not work. Describe what insights you had as you eventually found a correct solution. Reflect on what you learned from struggling on this problem, and describe how the struggle itself was valuable for you. The choice of problems is yours, though you may only include problems that took you a minimum of 30 minutes to solve.

$25.00 View

[SOLVED] Cs5800 – algorithms problem set #7 problem #1 (15 points) in this question you will explore dijkstra’s single source shortest path algorithm

CS5800 – Algorithms Problem Set #7 Problem #1 (15 points) In this question you will explore Dijkstra’s Single Source Shortest Path algorithm (a) Consider the following weighted undirected graph with 7 vertices and 11 edges. Apply Dijkstra’s Algorithm on the graph above, to determine the shortest distance from vertex G to each of the other six vertices (A, B, C, D, E, F). Clearly show all of your steps. (b) Now suppose we change the weight of edge EF from +8 to −8. What happens? Using this example, explain why Dijkstra’s Algorithm can produce incorrect outputs when one or more edges is negative. (c) Determine a precise Loop Invariant for the Dijkstra’s Algorithm, clearly stating your Initialization, Maintenance, and Termination statements. Prove that your loop invariant holds, clearly and carefully justifying each step in your proof.Problem #2 (20 points) In this question you will explore algorithms that generate Minimum-Weight Spanning Trees. (a) Let G be a graph with V vertices and E edges. One can implement Kruskal’s Algorithm to run in O(E log V ) time, and Prim’s Algorithm to run in O(E + V log V ) time. If G is a dense graph with an extremely large number of vertices, determine which algorithm would output the minimum-weight spanning tree more quickly. Clearly justify your answer. (b) Consider eight points on the Cartesian two-dimensional x-y plane. For each pair of vertices u and v, the weight of edge uv is the Euclidean (Pythagorean) distance between those two points. For example, dist(a, h) = √ 4 2 + 12 = √ 17 and dist(a, b) = √ 2 2 + 02 = 2. Using the algorithm of your choice, determine one possible minimum-weight spanning tree and compute its total distance, rounding your answer to one decimal place. Clearly show your steps. (c) Because many pairs of points have identical distances (e.g. dist(h, c) = dist(h, b) = dist(h, f) = √ 5), the above diagram has more than one minimum-weight spanning tree. Determine the total number of minimum-weight spanning trees that exist in the above diagram. Clearly justify your answer. (d) Suppose the n points are situated so that each of the n 2 ! = n(n − 1) 2 distances are distinct positive numbers. Prove that graph G has only one minimum-weight spanning tree. Clearly explain each step in your proof.Problem #3 (15 points) There are over 200 LeetCode problems on Greedy Algorithms. In this question, you will create a mini-portfolio consisting of LeetCode problems on Greedy Algorithms, chosen from the following website. https://leetcode.com/list/50f6p33i/ As always, you may code your algorithms in the programming language of your choice. Here is how your mini-portfolio will be graded. (i) There will be a total of 10 points for any of the combination of problems in your mini-portfolio: For each of these, provide the problem number, problem title, difficulty level, and the screenshot of you getting your solution accepted by LeetCode (10 points). Note that you are allowed to work with Teammates on this part of the problem. Make sure you write all names of the collaborators. To get the total points for this question, you could submit any of the following options: • 4 Easy problems • 2 Easy problems and 1 either hard or medium • 2 either hard or medium problems or 1 hard and 1 Medium You will get full credit for any correct solution accepted by LeetCode, regardless of how well your runtime and memory usage compares with other LeetCode participants. (ii) (5 points) For one of the problems you are including in your mini-portfolio, explain the various ways you tried to solve this problem, telling us what worked and what did not work. Describe what insights you had as you eventually found a correct solution. Reflect on what you learned from struggling on this problem, and describe how the struggle itself was valuable for you. The choice of problems is yours, though you may only include problems that took you a minimum of 30 minutes to solve. I ask you to only include new problems that you will solve in the next seven days. However, I will make an exception if you previously solved a problem in an inefficient way (but still got the solution accepted by LeetCode) and then found a new way to solve the same problem using the methods uncovered in this module on Greedy Algorithms.

$25.00 View

[SOLVED] Cs5800 – discrete structures problem set #6 problem #1 define kn to the graph on n vertices, where each pair of vertices is connected by an edge.

CS5800 – Discrete Structures Problem Set #6 Problem #1 Define Kn to the graph on n vertices, where each pair of vertices is connected by an edge. Kn is known as the complete graph on n vertices. To illustrate, here are the complete graphs Kn, for n = 2, 3, 4, 5, 6, 7. (a) Draw the complete graph K10, and determine the total number of edges in this graph. Briefly explain how you calculated this total. (b) The complete graph Kn has exactly 120 edges. Determine the value of n. Clearly justify your answer. (c) Sometime in 2021 (or 2022), a group of CS5800 students meet at the Northeastern campus for the first time, to have a post-Covid celebration party. Each pair of students shakes hands. Unfortunately, Paul walks in late. As a result, Paul is only able to shake hands with some of the other students at the celebration party. If there are exactly 42 handshakes in total, determine the number of hands that Paul shook. Clearly and carefully justify your answer.Problem #2 Consider this binary tree, where each vertex is labelled with a positive integer. The root vertex is 1. For all positive integers k ≥ 1, vertex k has two children: 2k (Left) and 2k + 1 (Right). (a) In your own words, describe how Breadth-First Search (BFS) and Depth-First Search (DFS) work. Does one search algorithm always reach the destination faster than the other? Explain. (b) Suppose we want to determine a path from vertex 1 (start vertex) to vertex 10 (end vertex). Using BFS, determine the order in which the vertices will be visited. Using DFS, determine the order in which the vertices will be visited. Briefly explain your answers. (c) Suppose that we extend this binary tree to infinitely many levels, so that each vertex k has two children: 2k (Left) and 2k + 1 (Right). The path from vertex 1 to vertex 10 can be described by a sequence of Left and Right moves, namely Left, Right, Left. Consider the path from vertex 1 to vertex 2021. Determine the sequence of Left and Right moves for this path. Clearly justify your answer.Problem #3 In this question, you will create a mini-portfolio consisting of any two LeetCode problems on Graphs, chosen from the four problems below: https://leetcode.com/problems/clone-graph/ https://leetcode.com/problems/is-graph-bipartite/ https://leetcode.com/problems/find-the-town-judge/ https://leetcode.com/problems/find-if-path-exists-in-graph/ As always, you may code your algorithms in the programming language of your choice. Here is how your mini-portfolio will be graded. There will be a total of 10 points for any of the combination of problems in your mini-portfolio: For each of these, provide the problem number, problem title, difficulty level, and the screenshot of you getting your solution accepted by LeetCode (10 points). Note that you are allowed to work with Teammates on this part of the problem. Make sure you write all names of the collaborators.

$25.00 View

[SOLVED] Cs5800 – algorithms problem set #5 problem #1 a complete binary tree of height h has “no holes”: i.e reading from top-bottom and left-to-right

CS5800 – Algorithms Problem Set #5 Problem #1 A complete binary tree of height h has “no holes”: i.e reading from top-bottom and left-to-right, every node exists. An almost complete binary tree has every node until the last row, which is allowed to stop early. Figure 1: complete (perfect) binary tree (left) and almost complete binary tree (right) (a) Prove by mathematical induction that a complete binary tree with height, h, contains precisely 2 h+1 − 1 nodes (b) How many leaves does an almost complete binary tree of height, h, have? Give the smallest and largest possible values, and explain. Note, by definition every complete binary tree is almost complete tree. (c) The diameter of a tree or a graph is the maximum distance (length of the longest path) between nodes. Whats the diameter of an almost complete binary tree of height, h. Give the smallest and largest possible values and explain (d) Suppose that we “reroot” a complete binary tree of height, h, by designating one of the erstwhile leaves as the root. What is the height of the rerooted tree? (e) What is the diameter of a complete binary tree rerooted at one of its leaves?Problem #2 A binary heap is called a max heap if it has the property that for every node i other than the root, the value of the node is at most the value of its parent. Below is an example of a max heap with 10 nodes (i.e., 10 elements), presented both as a binary tree and as an array. Figure 2: Max Heap with 10 nodes (a) The height of a heap is defined to the number of edges on the longest downward path from the root node to a leaf node. Thus, in the example above, the height of the heap is h = 3. If a (binary) heap has height h = 6, determine the minimum number and maximum number of elements that can be in this heap. Clearly justify your answer. (b) Consider an unsorted array of n elements. Recall that the Heapsort Algorithm consists of two parts: first we run BUILD-MAX-HEAP to convert our input array into a max heap, and then we run MAX-HEAPIFY n times to generate the n elements of our sorted array. Demonstrate the Heapsort Algorithm on the input array [5, 2, 1, 7, 6, 3, 4]. Clearly show your steps. (c) In part (b) above, you should have noticed that after the i = 2 iteration of MAX-HEAPIFY, your heap was [5, 3, 4, 2, 1, 6, 7]. Notice how the first n − i elements form a max heap, and the last i elements are sorted and are the i largest elements of the array. Show that this property holds for any max heap with n elements. Specifically, prove that for all 1 ≤ i ≤ n, after the i th iteration of MAX-HEAPIFY, the first n − i elements form a max heap, and the last i elements are sorted and are the i largest elements of the array. (d) Let P be a permutation of the first 7 positive integers. Sometimes this permutation is a max heap; examples include [7, 6, 5, 4, 3, 2, 1], [7, 6, 4, 2, 5, 1, 3], [7, 5, 6, 2, 4, 3, 1], and [7, 3, 6, 2, 1, 4, 5]. If P is a randomly-chosen permutation of [1, 2, 3, 4, 5, 6, 7], determine the probability that it is a max heap. Clearly and carefully justify your answer.

$25.00 View

[SOLVED] Cs5800 – algorithms problem set #4 problem #1 quicksort is a powerful divide-and-conquer sorting algorithm that can be described in just four lines of pseudocode.

CS5800 – Algorithms Problem Set #4 Problem #1 Quicksort is a powerful divide-and-conquer sorting algorithm that can be described in just four lines of pseudocode. The key to Quicksort is the PARTITION(A, p, r) procedure, which inputs elements p to r of array A, and chooses the final element x = A[r] as the pivot element. The output is an array where all elements to the left of x are less than x, and all elements to the right of x are greater than x. In class, we saw that there are very many techniques to partition the array. One nice technique covered in the book was invented by Nico Lomuto (See page 171 of the class textbook). You can also watch a quick youtube video here: https://www.youtube.com/watch?v=86WSheyr8cM. In this question, we will use the Lomuto Partition Method. Please assume that the pivot is always the last (right-most) element of the input array. For example, if A = [2, 8, 7, 1, 3, 5, 6, 4], then the pivot element is x = A[8] = 4, and PARTITION(A, 1, 8) returns the array [2, 1, 3, 4, 7, 5, 6, 8]. We then run PARTITION on the sub-arrays [2, 1, 3] and [7, 5, 6, 8]. (a) Demonstrate the Quicksort algorithm on the input array A = [3, 1, 5, 7, 6, 2, 4], showing how eventually the algorithm outputs the sorted array [1, 2, 3, 4, 5, 6, 7]. Clearly show all of your steps. (b) When PARTITION is called on an array with n elements, we require n − 1 comparisons, since we must compare the pivot element to each of the other n − 1 elements. If the input array is A = [1, 2, 3, 4, 5, 6, 7], show that Quicksort requires a total of 21 comparisons. (c) Determine an input array with 7 elements for which Quicksort requires the minimum number of total comparisons. Clearly demonstrate why your input array achieves the minimum number of comparisons, and explain why there cannot exist a 7-element array requiring fewer comparisons than your array. (d) Let A be an array with n = 2k − 1 elements, where k is some positive integer. Determine a formula (in terms of n) for the minimum possible number of total comparisons required by Quicksort, as well as a formula for the maximum possible number of total comparisons required by Quicksort. Use your formulas to show that the running time of Quicksort is O(n log n) in the best case and O(n 2 ) in the worst case.Problem #2 There are are about 44 LeetCode problems on Divide and Conquer techniques. In this question, you will create a mini-portfolio consisting of two (two) LeetCode problems on Divide and Conquer, chosen from the following website. Note that you can work with a partner to code up the problem but each person MUST do their own analysis of the problem https://leetcode.com/tag/divide-and-conquer/ As always, you may code your algorithms in the programming language of your choice. Here is how your mini-portfolio will be graded. (i) (5 points ) For each of the problems you are including in your mini-portfolio, provide the problem number, problem title, difficulty level, and the screenshot of you getting your solution accepted by LeetCode.Note that the total points is 5 points for each problem and those points is dependent on the difficult level – for each easy problem will be awarded 3 points, each medium problem will be awarded 4 points, and each hard problem will be awarded 5 points. You may submit as many problems as you wish but you will receive a maximum of 5 points for each problem and a total of 10 for the two problems. You will get full credit for any correct solution accepted by LeetCode, regardless of how well your runtime and memory usage compares with other LeetCode participants. (ii) (5 points) For one of the problems you are including in your mini-portfolio, provide an analysis of the run time of your algorithm. Be careful to only analyse what you created (i.e. your own code) and not a general solution. (ii) (5 points) For one of the problems you are including in your mini-portfolio, explain the various ways you tried to solve this problem, telling us what worked and what did not work. Describe what insights you had as you eventually found a correct solution. Reflect on what you learned from struggling on this problem, and describe how the struggle itself was valuable for you. The choice of problems is yours, though you may only include problems that took you a minimum of 30 minutes to solve.

$25.00 View

[SOLVED] Cs5800 – algorithms problem set #3 problem #1 (10 points) play one or more games of “towers of hanoi”, which you can do so on this website:

CS5800 – Algorithms Problem Set #3 Problem #1 (10 points) Play one or more games of “Towers of Hanoi”, which you can do so on this website: https://www.mathsisfun.com/games/towerofhanoi.html There are three towers, and n disks. Your goal is to move all n disks from Tower 1 to Tower 3, but you may never place a larger disk on top of a smaller disk. For example, when n = 3, the game can be solved in 7 moves, which is the optimal result. (a) Attach a screenshot of you winning the n = 4 game in exactly 15 moves. (No proof or explanation is necessary – all you need to do is insert a .jpg image, just as I did above.) (b) Let T(n) be the minimum possible number of moves required to solve the game when there are n disks. For example, T(2) = 3 and T(3) = 7. Clearly explain why T(4) = 15, showing it is possible to solve this game in exactly 15 moves and proving why it is impossible to solve this game in 14 (or fewer) moves. (c) Find a recurrence relation for T(n) and clearly and carefully explain why that recurrence relation holds. Then solve the recurrence relation using any method of your choice to determine a formula for T(n) that is true for all integers n ≥ 1. (d) Substitute n = log(m) into your recurrence relation for T(n) above, and use the Master Theorem to prove that T(n) = Θ(2n ). Briefly explain how and why your formula in part (c) is indeed Θ(2n ).Problem #2 (20 points) In this question, you will prove the Master Theorem in the special (and most important) situation when f(n) = n z for some real number z. This result enables us to determine tight asymptotic bounds for various recurrence relations, which will help us tremendously in algorithm design and algorithm analysis. If you can reproduce the proof of this result, then you will understand how the Master Theorem works in all situations – e.g. when f(n) = 4n 3 + 2n 2 log n + 5n + 100 log n + 777. But for the purposes of this problem, we will assume f(n) = n z . Let x, y, z be real numbers for which T(1) = 1 and T(n) = xT(n/y) + n z . (a) If z < logy(x), prove that T(n) = Θ(n logy(x) ). (b) If z = logy(x), prove that T(n) = Θ(n logy(x) logy n). (c) If z > logy(x), prove that T(n) = Θ(n z ). (d) Some of you have taken a course in Linear Algebra, a core course in an undergraduate mathematics curriculum. In this course, students learn how to multiply two n by n matrices, and one can easily design an algorithm to perform matrix multiplication, running in Θ(n 3 ) time. In 1969, Volker Strassen developed a recursive method to perform matrix multiplication, where the running time T(n) can be given by the recurrence relation T(n) = 7T(n/2) + n 2 . Using any of the results in (a), (b), or (c), determine the running time of Strassen’s Algorithm and show that it is faster than the standard algorithm that runs in Θ(n 3 ) time. Note: if you are unable to prove (a), (b), (c) in its general form, you are welcome to instead solve the following simplified version of the problem, where you let y = 2 and x = 16, and prove the result for z = 3 in part (a), z = 4 in part (b), and z = 5 in part (c). If your proof is correct, you will be given 10 points (i.e. instead of the 15 points for the original a,b,c) for solving the simplified version of the problem.

$25.00 View

[SOLVED] Cs5800 – algorithms problem set #1 problem #1 let f(n) and g(n) be two functions, defined for each positive integer n.

CS5800 – Algorithms Problem Set #1 Problem #1 Let f(n) and g(n) be two functions, defined for each positive integer n. By definition, f(n) = O(g(n)) if there exist positive constants c and n0 for which 0 ≤ f(n) ≤ cg(n) for all integers n ≥ n0. To prove that f(n) 6= O(g(n)) one must prove that no such constants c and n0 exist. (a) Let f(n) = n 2 + 2n + 3. Prove that f(n) = O(n 2 ) and f(n) 6= O(n). (b) Let f(n) = n log n + 100n. Prove that f(n) = O(n log n) and f(n) 6= O(n). NOTE: in this course, we will assume log n = log2 n = lg n. (c) Let f(n) = 2n 2 + 4 and g(n) = 4n 2 + 2. Prove that f(n) = O(g(n)) and g(n) = O(f(n)). (d) Let f(n) and g(n) be any two functions for which f(n) and g(n) are positive numbers, for each integer n ≥ 1. Prove or disprove: at least one of these two statements must be true: f(n) = O(g(n)), g(n) = O(f(n)). Clearly and carefully justify your answer.Problem #2 Let f(n) and g(n) be two functions, defined for each positive integer n. To prove that f(n) 6= O(g(n)) one must prove that no such constants c and n0 exist. For each of these questions, show your step by step work (a) Prove that 2n+1 = O(2n ). (b) Prove or disprove: 22n = O(2n )?. (c) Let f(n) = lg(lgkn) and g(n) = lgk (lgn). Prove which one is asymptotically larger. (c) Let f(n) = lg3n and g(n) = lg9n. Prove the relationship between f(n) and g(n) in terms of upper bound (big O), lower bound (Ω) and tight bound (Θ)Problem #3 Consider an array, A, whose contents is integer values. Given a particular threshold value t, an event E between indices i < j is a critical event if ai > t ∗ aj . In this problem, write a full program that outputs the number of critical events for an arbitrary array of integers and any arbitrary threshold value t. (a) Submit the code of your working program (You can use any programming language). Note, you need to upload your source file (TA’s will download and run the code- the code can be upload in Canvas) (b) Submit a screen capture showing that your program outputs correct values. You only need to repeat over 2 different arrays running with 2 different threshold. (c) Perform an analysis of your algorithm and report its time complexity.Problem #4 Let {a1, a2, . . . , an} be an unsorted list of n numbers. Bubble Sort is a well-known sorting algorithm that works as follows. Iteration #1: Compare the first two numbers. If the first number is bigger than the second, then swap the two numbers. Compare the second and third numbers, and swap them if necessary. Keep doing this until we have compared the final two numbers. (After this iteration, can you see why the largest number is guaranteed to be at the end?) Iteration #2: Start from the beginning, comparing the first two numbers, and repeating the same process as above. But this time we only look at the first n − 1 numbers, since we know the final number is already in the right position. (After this iteration, the two largest numbers are guaranteed to be at the end.) We keep proceeding until the entire list has been sorted. Here is the pseudocode of Bubblesort. for i = n down to 1 for j = 1 to i-1 if a[j]>a[j+1] swap(a[j],a[j+1]) This sorting algorithm is known as Bubble Sort, because after each complete iteration the largest unsorted number “bubbles” to the end of the list. For example, if the initial list is {1, 7, 4, 5, 2}, we have {1, 4, 5, 2, 7} after the first iteration, {1, 4, 2, 5, 7} after the second iteration, {1, 2, 4, 5, 7} after the third iteration, and {1, 2, 4, 5, 7} after the fourth and final iteration. We now know that the list is sorted. (a) Demonstrate the Bubble Sort algorithm on the input list {4, 3, 2, 1, 5}. Clearly show your steps. (b) Let C(n) and S(n) be the total number of comparisons and swaps required by Bubble Sort when the input list has n numbers. For example, in the list {1, 7, 4, 5, 2} above, Bubble Sort requires 10 comparisons and 5 swaps. Suppose the input list is {n, n − 1, n − 2, . . . , 3, 2, 1}, where the numbers appear in reverse order. In this worst-case scenario, determine the exact formulas for C(n) and S(n). Clearly show all of the steps in your proof. (c) Determine a precise “loop invariant” for Bubble Sort, clearly stating your Initialization, Maintenance, and Termination statements. Prove that your loop invariant holds, clearly and carefully justifying each step in your proof. (d) Consider a random permutation of {1, 2, 3, . . . , n}. Determine an exact formula for the average expected number of swaps required by Bubble Sort. Clearly and carefully justify your answer.

$25.00 View

[SOLVED] Cs5800 mini-homework greedy/dynamic & graph

Hello again! I’m the Networking Adventure, a special opportunity in your journey through the world of computer science and technology. You can earn 6 marks just by stepping out of your comfort zone and into the exciting realm of tech events! In our fast-paced digital world, it’s easy to forget the value of face-to-face interactions and real-world experiences. But remember our discussion about the importance of networking and engaging with the tech community? Well, here’s your chance to put that into practice! Invitation: We invite you to attend any tech event of your choice. It could be a local meetup, a tech conference, a workshop, or even a virtual event. The goal is to expose yourself to new ideas, meet fellow enthusiasts and professionals, and broaden your horizons. Task: 1. Find a tech event that interests you happening either in Oct or Nov 2024. • Hint: To begin with you can just look at our campus calendar to see what’s happening on our campus. Also you don’t have to pay for this, many events are free, especially for students!) 2. Register for the event. 3. Attend the event (or at least part of it if it’s a multi-day conference), network and build at least 3 connections. Submission: To claim your 6 marks, simply submit the screenshot of your event registration or attendance proof. That’s it! Remember, in the world of technology, sometimes the most valuable algorithms are the ones that connect us with others in our field. Your career is not just about what you know, but also who you know and the experiences you gather along the way. So go forth, explore, connect, and most importantly, enjoy the adventure of being part of the tech community!Context: In computer science and mathematics, we often encounter problems where we need to assign values or group items while satisfying certain conditions. This question explores a specific type of constraint satisfaction problem that can be represented using graph theory. You are given a set of n variables ��, ��, ��, . .. , ��. These variables could represent anything from people in a social network to nodes in a computer network. Your task is to determine if it’s possible to assign values to these variables while satisfying two types of constraints: • Equality constraints ( �� of them): These are of the form �� = ��, meaning variables xᵢ and xⱼ must be assigned the same value or be in the same group. • Inequality constraints ( �� of them): These are of the form �� ≠ ��, meaning variables xᵢ and xⱼ must be assigned different values or be in different groups. You are given a set of n variables ��, ��, ��, . .. , �� and a set of �� equality constraints of the form �� = �� and a set of �� inequality constraints of the form �� ≠ ��. Is it possible to satisfy all of them? For example, it is impossible to satisfy the constraints: ��, = ��, ��, = ��, ��, ≠ ��. Q2 [6 points]: a) [4 points] Design an algorithm (via pseudocode and 1 paragraph description (few sentences only)) that takes as input the �� + �� constraints and decides whether the constraints can be satisfied. b) [2 points] Provide a brief analysis of the running time.Clarification: • You don’t need to find the actual values or groupings; you just need to determine if it’s possible to do so. • The variables don’t have a specific range of values. You can think of them as being able to take on any value or belong to any group, as long as the constraints are satisfied. • A constraint system is considered satisfiable if there exists at least one way to assign values or group the variables that doesn’t violate any constraint. Additional Examples: • Satisfiable example: o Variables: x₁, x₂, x₃, x₄ o Constraints: x₁ = x₂, x₃ = x₄, x₁ ≠ x₃ o This is satisfiable because we can group x₁ and x₂ together, and x₃ and x₄ together, satisfying all constraints. • Unsatisfiable example: o Variables: x₁, x₂, x₃, x₄ o Constraints: x₁ = x₂, x₂ = x₃, x₃ = x₄, x₁ ≠ x₄ o This is unsatisfiable because the equality constraints force all variables to be equal, contradicting the last constraint.You work for a small manufacturing company and have recently been placed in charge of shipping items from the factory, where they are produced, to the warehouse, where they are stored. Every day the factory produces � items which we number from � �� � in the order that they arrive at the loading dock to be shipped out. As the items arrive at the loading dock over the course of the day they must be packaged up into boxes and shipped out. Items are boxed up in contiguous groups according to their arrival order; for example, items � . . � might be placed in the first box, items � . . �� in the second, and �� . . �� in the third. Items have two attributes, value and weight, and you know in advance the values �� . . �� and weights �� . . �� of the � items. There are two types of shipping options available to you: Value-Restricted Boxes: One of your shipping companies offers insurance on boxes and hence requires that any box shipped through them must contain no more than � units of value. Therefore, if you pack items into such a “value-restricted” box, you can place as much weight in the box as you like, as long as the total value in the box is at most �. Weight-Restricted Boxes: Another of your shipping companies lacks the machinery to lift heavy boxes, and hence requires that any box shipped through them must contain no more than � units of weight. Therefore, if you pack items into such a “weight-restricted” box, you can place as much value in the box as you like, as long as the total weight inside the box is at most �. Please assume that every individual item has a value at most � and a weight at most �. You may choose different shipping options for different boxes. Your job is to determine the optimal way to partition the sequence of items into boxes with specified shipping options, so that shipping costs are minimized. Q2.1 [6 points]: Suppose limited-value and limited-weight boxes each cost $1 to ship. a) [2 points]: Briefly describe a Greedy Algorithm that can determine a minimum-cost set of boxes to use for shipping the items b) [4 points] Write a pseudocode for your algorithm and explain the time complexity of your solution (don’t just say O(…), justify that briefly). Note: Your algorithm should produce an optimal solution, but you do NOT need to prove that! For Practice ONLY [No Need to submit]: Suppose limited-value boxes cost $�’ and limitedweight boxes cost $�(. Assume you want to design �(�)) Dynamic Programing algorithm that can determine the minimum cost required to ship the � items. – Give the formula for the optimal substructure of this problem. Here is an example of such formula for LCS. – Write a pseudocode for your algorithm.In this homework, you will pick your own choice of only ONE LeetCode problem from the following site (click on ”Breadth First Search” or ”Depth First Search” or ”Minimum Spanning Tree” to filter the results): • https://leetcode.com/problem-list/breadth-first-search/ • https://leetcode.com/problem-list/depth-first-search/ • https://leetcode.com/problem-list/shortest-path/ • https://leetcode.com/problem-list/minimum-spanning-tree/ [Read Carefully] This HW offers a lot of flexibility but there are four important rules: I. If the problem took you less than 30 − 40 minutes to solve, you may not include it in your portfolio.(Since then the question was an exercise for you, rather than a problem or a challenge.) II. You may only include problems you have solved after Oct 16, 2024. III. (III If you click on the LeetCode “Solution” or “Discuss” button before you solve the problem or look at any online resources for hints to solve a LeetCode problem, especially sites such as Chegg, GitHub, Stack Overflow, and Quora, you cannot include it in your portfolio. (You may look at these sites after you solve the problem.) IV. Under no circumstance may you use Co-Pilot, LLMs or any other AI-assisted programming tools.(a) [2 points]: For the selected problem provide the problem number, problem title, difficulty level, and the screenshot (showing all the details, submission time, etc) of you getting your solution accepted by LeetCode. You will receive up to 4 marks for each problem you submit. Here is an example from a sample portfolio: Longest Palindromic Substring (medium) You will get full credit for any correct solution accepted by LeetCode, regardless of the difficulty of the problem, and regardless of how well your runtime and memory usage compares with other LeetCode participants.(b) [4 points]: Explain the various ways you tried to solve this problem, telling us what worked and what did not work. Describe what insights you had as you eventually found a correct solution. Reflect on what you learned from struggling on this problem, and describe how the struggle itself was valuable for you. Reflect on what might be causing the obstacle (e.g. lack of familiarity with a particular data structure, lack of knowledge about a fast and efficient algorithm, etc.) Note: For your reflections, write a minimum of 250 words.

$25.00 View

[SOLVED] Cs5800 – algorithms homework #3

Difficulty: ■■■■□ The Longest Subsequence Problem is a well-studied problem in Computer Science, where given a sequence of distinct positive integers, the goal is to output the longest subsequence whose elements appear from smallest to largest, or from largest to smallest. For example, consider the sequence S = [9, 7, 4, 10, 6, 8, 2, 1, 3, 5]. The longest increasing subsequence of S has length three ([4, 6, 8] or [2, 3, 5]), and the longest decreasing subsequence of S has length five ([9, 7, 4, 2, 1] or [9, 7, 6, 2, 1]). And if we have the sequence S = [531, 339, 298, 247, 246, 195, 104, 73, 52, 31], then the length of the longest increasing subsequence is 1 and the length of the longest decreasing subsequence is 10. (a) (2 marks) Find a sequence with nine distinct integers for which the length of the longest increasing subsequence is 3, and the length of the longest decreasing subsequence is 3. Briefly explain how you constructed your sequence. (b) (3 marks) Let S be a sequence with ten distinct integers. Prove that there must exist an increasing subsequence of length 4 (or more) or a decreasing subsequence of length 4 (or more). Hint: For each k in your sequence, define (x(k), y(k)), where x(k) and y(k) are lengths of longest increasing and decreasing subsequences starting with k, respectively. Note that each pair is unique. Explain why different numbers in your sequence cannot have identical (x(k), y(k)) pairs. (c) (3 marks) In class, we unpacked the Longest Common Subsequence (LCS) problem, where we showed that if our two sequences have size n, then our Dynamic Programming algorithm runs in O(n 2 ) time. Let S be your 9-integer sequence from part (a), and let S ∗ be the same sequence where the 9 numbers are sorted from smallest to largest. Using the LCS algorithm from class, determine the length of the longest common subsequence of S and S ∗ . (Your answer will be 3. Do you see why?) Let’s look into the general case. Specifically, if S is a sequence of n distinct integers, show that the length of the longest increasing subsequence of S must equal the length of the longest common subsequence of S and S ∗ , where S ∗ is the sorted sequence of S. BONUS (1 mark – 3%) [You Can SKIP this]: The results of part (c) immediately give us an O(n 2 ) time algorithm to determine the length of the longest increasing subsequence of an input sequence S with n distinct integers. But this is (unsurprisingly) not the optimal algorithm. Your goal is to improve this result. Given an input sequence S with n distinct integers, design a linearithmic algorithm (i.e., running in O(n log n) time) to output the length of the longest increasing subsequence of S. Clearly explain how your algorithm works, why it produces the correct output, and prove that the running time of your algorithm is O(n log n).Difficulty: ■■□□□ The knapsack problem is a classic optimization problem in computer science and mathematics. While we have explored the 0-1 knapsack problem using dynamic programming and brute force approaches, in this question, we will focus on the fractional knapsack problem and its relation to greedy algorithms. Recall that in the fractional knapsack problem, items can be broken into smaller pieces, allowing you to take fractions of items to maximize the total value while staying within the weight limit. (a) (3 marks) Provide a clear pseudocode of a greedy algorithm for the fractional knapsack problem. Your implementation should: • Take as input: – A list of items, where each item is represented by its weight and value – The maximum weight capacity of the knapsack • Return: – The maximum value that can be achieved – The list of items (and fractions thereof) selected to achieve this maximum value (b) (2 marks) Analyze the time and space complexity of your algorithm. Briefly Justify your answer. (c) (3 marks) Compare and contrast the fractional knapsack problem with the 0-1 knapsack problem. Provide a brief proof of why a greedy approach works for the fractional knapsack but not for the 0-1 knapsack. Your explanation should include: • A brief discussion of the key differences between the two problems • A counterexample showing why the greedy approach doesn’t work for the 0-1 knapsack • A brief proof on why greedy approach is optimal for the fractional knapsack problemDifficulty: ■■□□□ For an m × n matrix, each cell could be either empty, or placed with a lovely cat. While some cats are awake, others are still in dreams. Every minute the sleeping cats next to an awake cat will be woken up (by next to it means the up/down/left/right positions). In the following example, there’re 1 awake cat and 2 sleeping cats. After the first minute, the sleeping cat on the bottom left corner will be woken up. Then after the second minute, the sleeping cat on the bottom right corner will be woken up too. Now all cats are awake for a total of 2 minutes. (a) (3 marks) For such a matrix and a sleeping cat in one cell, how long does it take for it to get woken up? Assume the matrix is m × n and the cell is located at (x, y), cell values are either 0 (for empty), 1 (for awake cats) or −1 (for sleeping cats). Briefly describe your algorithm and write a clear pseudocode. (b) (3 marks) How long does it take for all cats to be awake? Briefly describe your algorithm and write a clear pseudocode and provide a brief analysis of its running time. (c) (2 marks) Continue with the case in part a, can you track down how the sleeping cat gets woken up from the beginning? There could be multiple ways, but you only need to figure out one of them. In the above example, the path would be [(0, 0),(1, 0),(1, 1)]. Can you provide a solution for this? Briefly describe your algorithm and write a clear pseudocode.Difficulty: □□□□□ (flexible) LeetCode (www.leetcode.com) is a popular website for Northeastern MSCS students, especially when preparing for job interviews. https://leetcode.com/problemset/algorithms/ There are over a thousand “coding challenges” from which students can practice and improve their skills in Algorithm Analysis and Design, and the website supports numerous programming languages, including C, Java, and Python. In this Programming Project, you will create a portfolio consisting of TWO LeetCode problems on Greedy Programming you will solve over the next two weeks. You can choose ANY set of TWO problems from the following site (click on ”Greedy Programming” to filter the results), but see the following note first. Important Note: You can pick anything excluding the Greedy/DP problems we will discuss in class during Week 5 − 6: • Fibonacci or Climbing Stairs – Leetcode 70. Climbing Stairs – Leetcode 509. Fibonacci Number • Rod Cutting – Leetcode 1547. Minimum Cost to Cut a Stick (similar problem) • Longest Common (or Increasing) Sub-sequence – Leetcode 1143. Longest Common Subsequence – Leetcode 300. Longest Increasing Subsequence • Activity-Selection – Leetcode 435. Non-overlapping Intervals (closest equivalent) • Knapsack or Coin Change – Leetcode 322. Coin Change – Leetcode 416. Partition Equal Subset Sum (0/1 Knapsack variant) • House Robber – Leetcode 198. House Robber NOTE: To maximize your learning and problem-solving skills, we encourage you to explore these concepts through fresh challenges. The idea is for you to get more exposure to problem-solving, so for your own benefit, please stay away from these problems![Read Carefully] This HW offers a lot of flexibility but there are four important rules: (I) If the problem took you less than 30−40 minutes to solve, you may not include it in your portfolio. (Since then the question was an exercise for you, rather than a problem or a challenge.) (II) You may only include problems you have solved after Friday, Oct 04, 2024. (III If you click on the LeetCode “Solution” or “Discuss” button before you solve the problem or look at any online resources for hints to solve a LeetCode problem, especially sites such as Chegg, GitHub, Stack Overflow, and Quora, you cannot include it in your portfolio. (You may look at these sites after you solve the problem.) (IV) Under no circumstance may you use Co-Pilot, LLMs or any other AI-assisted programming tools.Here is how your portfolio will be assessed. (a) (8 marks) For each of the problems you are including in your portfolio (two problems), provide the problem number, problem title, difficulty level, and the screenshot (showing all the details, submission time, etc) of you getting your solution accepted by LeetCode. You will receive up to 4 marks for each problem you submit. Here is an example from a sample portfolio: Longest Palindromic Substring (medium) You will get full credit for any correct solution accepted by LeetCode, regardless of the difficulty of the problem, and regardless of how well your runtime and memory usage compares with other LeetCode participants. (b) (2 marks) For one of the two problems you solved, explain the various ways you tried to solve this problem, telling us what worked and what did not work. Describe what insights you had as you eventually found a correct solution. Reflect on what you learned from struggling on this problem, and describe how the struggle itself was valuable for you. Reflect on what might be causing the obstacle (e.g. lack of familiarity with a particular data structure, lack of knowledge about a fast and efficient algorithm, etc.) Note: For your reflections, write a minimum of 250 words.

$25.00 View