{"id":23248323,"url":"https://github.com/hawmex/aut_algorithm_design_foundations_final_exam","last_synced_at":"2025-04-06T01:15:52.722Z","repository":{"id":186157320,"uuid":"649818763","full_name":"Hawmex/aut_algorithm_design_foundations_final_exam","owner":"Hawmex","description":"This repository contains my answers for the final exam of the \"Algorithm Design Foundations\" course at AUT (Tehran Polytechnic).","archived":false,"fork":false,"pushed_at":"2024-03-28T10:55:00.000Z","size":1064,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T07:22:28.130Z","etag":null,"topics":["algorithms","linear-regression","python"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hawmex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-05T17:51:56.000Z","updated_at":"2024-03-28T10:54:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"9049d4a4-cb90-48c4-aeab-46091d624a79","html_url":"https://github.com/Hawmex/aut_algorithm_design_foundations_final_exam","commit_stats":null,"previous_names":["hawmex/aut_principles_of_algorithm_design_final_exam"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hawmex%2Faut_algorithm_design_foundations_final_exam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hawmex%2Faut_algorithm_design_foundations_final_exam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hawmex%2Faut_algorithm_design_foundations_final_exam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hawmex%2Faut_algorithm_design_foundations_final_exam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hawmex","download_url":"https://codeload.github.com/Hawmex/aut_algorithm_design_foundations_final_exam/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419863,"owners_count":20936014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","linear-regression","python"],"created_at":"2024-12-19T08:13:25.765Z","updated_at":"2025-04-06T01:15:52.699Z","avatar_url":"https://github.com/Hawmex.png","language":"Jupyter Notebook","readme":"# AUT Algorithm Design Foundations Final Exam\n\nThis repository contains my answers for the final exam of the \"Algorithm Design\nFoundations\" course at Amirkabir University of Technology (Tehran Polytechnic).\n\n## Question 1\n\nIn this question, we implement the k-means clustering algorithm from scratch.\n\n### Input\n\n- The number of points\n- The `x` and `y` coordinates of the points\n- The desired number of clusters (`k`)\n\n### Output\n\n- The minimum inter-cluster distance\n\n### Example\n\n#### Input\n\n```\n9\n3 2\n2 2\n2 3\n7 8\n8 8\n8 7\n22 9\n21 8\n23 10\n3\n```\n\n#### Output\n\n```\n7.0710678\n```\n\n## Question 2\n\n### Input\n\n- The number of vertices and edges\n- Each edge's head, tail, and length\n- The number of tours\n- The number of vertices that must be visited in each tour, followed by their\n  names\n\n### Output\n\n- The length of the shortest path for each tour\n\n### Example\n\n#### Input\n\n```\n4 5\n1 2 1\n2 3 1\n3 4 1\n4 1 1\n2 1 1\n3\n2 1 2\n2 1 3\n4 1 2 3 4\n```\n\n#### Output\n\n```\nReady\n2\n4\n4\n```\n\n## Question 3\n\nIn this question, we had to implement a program that finds the largest common\nsubstring between two strings separated by a space.\n\n### Input\n\n- Two strings separated by a space\n\n### Output\n\n- The index of the LCS in the first string\n- The index of the LCS in the second string\n- The length of the LCS itself\n\n### Example\n\n#### Input\n\n```\ncool toolbox\n```\n\n#### Output\n\n```\n1 1 3\n```\n\n## Question 6\n\nIn this question, we had to implement a linear regression model from scratch and\napply it to a dataset containing information on ~20k houses.\n\nThe linear regressor was implemented utilizing the closed-form solution. For\nmore information, visit [`q6_answer.ipynb`](./q6_answer.ipynb).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhawmex%2Faut_algorithm_design_foundations_final_exam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhawmex%2Faut_algorithm_design_foundations_final_exam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhawmex%2Faut_algorithm_design_foundations_final_exam/lists"}