EssayGhost Assignment代写,Essay代写,网课代修,Quiz代考

EssayGhost-Essay代写,作业代写,网课代修代上,cs代写代考

一站式网课代修,论文代写

高质量的Assignment代写、Paper代写、Report代写服务

EG1hao
网课代修代上,cs代写代考
C/C++代写
您的位置: 主页 > 编程案例 > C/C++代写 >
代写C++/C:CS代写之C语言Data writing program using the C programming language - C++代写
发布时间:2021-07-25 22:28:34浏览次数:
Due: June 08th, 2pm AEST (Week 13Friday)This assignment is worth 10% of your final assessmentTask DescriptionThegivendatahasbeencollectedfromasocialmediaplatformsupergraph2048.Youaretaskedwith writing program using the C programming language that will handle different queries and compute the correctresult.Somequeriesmayrequiresimplepartitioningofdataforeachthreadtooperateon,whileothersmay requirestrategyofdynamicallypartitioningdata,checkingthedistributionofthedataandsynchroni- sation in order to efficiently process and eliminate redundantoperations.You can ask questions on Ed using the assignments category. Please ensure that your work is your own and you do not share any code or solutions with other students.Working on your assignmentYou can work on this assignment using your own computers or the lab machines. Students can also take advantage of the online code editor on Ed. You will need to navigate to the assessments or workspacespagewhereyouwillbeabletorun,editandsubmityourcodefromwithinyourbrowser. However we recommend you write this code using your own computer or the labmachines.Itisimportantthatyoucontinuallybackupyourassignmentfilesontoyourownmachine,flashdrives, external hard drives and cloud storage providers. You are encouraged to submit your assignment whileyouareintheprocessofcompletingittoreceivefeedbackandtocheckforcorrectnessofyour solution. Program structureThe social media platform is composed of two types of entities:•Users•PostsEach user in the social network have a list of followers, other users they are following and posts. These collections are represented as an array of indices that relate to a user*or post*array.structuser{uint64_tuser_id;//Userid,isuniquesize_t*followers_idxs;//Userindiceswithinuser*usersgraphsize_tn_followers;//Numberoffollowerssize_t*following_idxs;//Userindiceswithinuser*usersgraphsize_tn_following;//Numberofuserstheuserisfollowingsize_t*posts_idxs;//Postindiceswithinpost*postsgraphsize_tn_posts;//Numberofpostsauserhasmade.typedefstructuseruser;All user_idvalues within the users array will be unique. The lists: followers, following and posts are arranged by ascending order. In order of insertion.structpost{uint64_tpst_id;//Postid,isuniquesize_t*reposted_idxs;//Repostedindiceswithinthegraphsize_tn_reposted;//Numberofrepostedposts.typedefstructpostpost;All pst_idvalues within the posts array will be unique. The posts array will not contain any cycles as for any reposts to exist depends on the existance of an original post.For all queries you will need to return a heap allocated result structure: This structure stores all elementsretrievedfromthequeryasaheapallocatedcontiguousblockofpointersandthenumberof elements. It will be used to determine if your result iscorrect.structresult{void**elements;size_tn_elements;typedefstructresultresult;The entire social network structure is an array of users and an array of posts. Both elements contain links to each other as well as tothemselves. SetupYourprogramwillhaveopportunitytosetupthreadsorprocessestobeutilisedwithinyourprogram. We will take into account the setup time required as a separate benchmark. Your program will need to be prepared to handle consecutive queries during itsexecution.Given the following struct declaration:structquery_helper{intdummy_field;//YOUROWNFIELDStypedefstructquery_helperquery_helper;Your candeclareanypointersordatathatyoumayuseinyourqueryhelperstructforyourqueries.If you do not wish to use this structure and instead create threads/processes during the query itself,you will need to leave the dummy_fieldin there.query_helper* engine_setup(size_t n_processors)You are given an empty definition of this function with your scaffold. You may modify this function for your own purposes. Once you have returned a query_helperobject, it will be used in the rest of the queries.After the program has finished executing queries, your helper will need to be cleaned up with the following function. You will need to dispose of any memory that you have allocated to this helper.void engine_cleanup(query_helper* helper)Example:query_helper*helper=engine_setup(N_PROCESSORS);find_all_reposts(posts,n_posts,post_id_1,helper);find_all_reposts(posts,n_posts,post_id_2,helper);engine_cleanup(helper)If your engine_setupfunction takes too long. Your program will be stopped by the automarking system. Find all reposts (Query)Given a post id, find all reposts of the given post (this can also be reposts of a repost and so on).The query should return an array of all reposts and originating post, within the result structure and n_elements is set appropriately. If no reposts have been made, then the query should return the post which the post id correspondsto.Ifthepostiddoesnotexistintheset,yourresultstructureelementsshouldbeNULLandn_elements is0.result*find_all_reposts(post*posts,size_tcount,uint64_tpst_id,query_helper*helper)For example:find_all_reposts(posts,18,76,helper)Find original post (Query)Given a post id, your query will need to initially determine if the post is an original or a repost. If it is an original, your query will return the post. Otherwise, your query will search until it finds the original post. The query should only return one element which is the originalpost.Ifthepostiddoesnotexistintheset,yourresultstructureelementsshouldbeNULLandn_elements is0.result* find_original(post* posts, size_t count, uint64_t pst_id, query_helper* helper)Starting from post id 85 Find the shortest path between two users (Query)Given two users within the social network. Your query will need to find the shortest path between two users based on who they are following. We define outgoing edges as all users referred in the following_idxspropertyintheuserstruct.Incomingedgesaredefinedasallusersreferredin thefollowers_idxspropertyintheuserstruct.The shortest path is defined as the minimum number of edges to between a source and destination. Your query will need to consider that there may exist a shortest path between either:•userA and userB, based on outgoing edges starting fromuserA•userB and userA, based on outgoing edges starting fromuserBIn the event that your algorithm finds two or more shortest paths, Your query requires returning just one of them. Your query must return a result including all users (including of userA and userB) that compose the shortest path.Your query must return NULL if the users specified in the query (userA and userB) are the same, or either userA or userB does not exist.result* shortest_user_link(user* users, size_t count, uint64_t userA, uint64_t userB, query_helper* helper)Each outgoing edge corresponds to an element in following for a userShortest Path from B to AShortest path is between B and A Find all the robot accounts (Query)A common problem in social networks is the proliferation of robots. These robots unfortunately can create a large amount of sway in the political climate. You are tasked with utilising heuristic data to classify and return all robots.structcriteria{floatoc_threshold;floatacc_rep_threshold;floatbot_net_threshold;typedefstructcriteriacriteria;Thecriteriastructdefinesthreefloatingpointnumberswhichwillbewithintherangeof[0,1].Ifany of the fields of the struct contains a value outside of an acceptable range, your query must return an emptyresultstruct(n_elementsis0,elementsisNULL).result*find_bots(user*users,post*posts,size_tuser_count,size_tpost_count,criteria*crit,query_helper*helper)A robot account will:•Reposts more than posts, Bots typically do not generate their own content and instead repost otherposts.Giventhethresholdspecifiedinthecriteria,yourqueryneedstodetermineifauser is abot. reposts n_posts oc_threshold •Account reputation, You will need to acknowledge the user reputation, caluclating it based on: n_followers(n_followers+n_following) acc_rep_threshold If a user is considered to be a bot that reposts more than posts or has an odd account reputa- tion, you are to include this user in your result.After initially discovering bots within the network using the previous criteria, you can use this data to find discrete bots.•Finding discrete bots within a network, Political bots like to give certain posts legitimacy through popularity. Unfortunately this may mean that certain bots may not adhere to any of the previous characteristics. This is because they are designed to create content other bots will propergate through thenetwork.We can classify a discrete bot by checkingbots_f ollowing n_f ollowers bot_net_threshold AlgorithmsBreadth First SearchBreadth first search will check its neighbours before moving onto its neighbour’s neighbours and so on.BFS(G,v)Queueq;forallverticesuinGu.seen=falseq.enqueue(v)while(!q.empty())u=q.dequeue()ifu.seenisfalseu.seen=trueforallneighbourswofuq.enqueue(w)You may apply a Breadth First Search or any other algorithms based on what you think is appropriate.Error handlingFor all four queries, you will need to ensure that your query returns heap allocated memory. If the datasetprovidedisNULLorthenumberofelements(count)is0,yourquerymustreturnanempty resultset(n_elementsis0,elementsisNULL). Submission DetailsYouwillbeprovidedwithbenchmarkingcodeforthisassessmentcalledsupergraph2048_bench and its source. It will time your query as well as load any expected results you have stored. Your pro- gram must produce no errors on Ed and will be compiled with thecommand:clang-O0-stdgnu11-marchnative-lm-lpthreadYou are to submit your assessment using Ed which will check for correctness of your queries. In the event that your program does not produce the correct output, your program will not be checked for performance.•4 Marks for the correctness of your program. This requires implementing all queriesspecified in the assignment and ensuring that they will return the correct result. If it does not compile, it will receivezero.•4 marks are assigned based on the performance of your code related to the benchmark. This is tested on a separate machine. Submissions that are faster or equal to the benchmark set, will receive full marks. Submissions faster than a basic implementation will receive a minimum of 2marks.•2 marks are assigned for a manual marking component in your tutorial. This will be based on yoursubmissionpriortothe4thofJune20188:00amAEST.Thismanualmarkingcomponent will assess your current progress of your assessment, styling (indentation and function layout) and also explaining your code to yourtutor.Warning:Anyattemptstodeceiveordisruptthemarkingsystemwillresultinanimmediatezerofor theentireassignment.Negativemarkscanbeassignedifyoudonotfollowtheassignmentspecifica- tion or if your code is unnecessarily or deliberatelyobfuscated. Academic declarationBy submitting this assignment you declare the following:IdeclarethatIhavereadandunderstoodtheUniversityofSydneyStudentPlagiarism:CourseworkPolicyand Procedure, and except where specifically acknowledged, the work contained in this assignment/project is my ownwork,andhasnotbeencopiedfromothersourcesorbeenpreviouslysubmittedforawardorassessment.I understand that failure to comply with the Student Plagiarism: Coursework Policy and Procedure can lead toseverepenaltiesasoutlinedunderChapter8oftheUniversityofSydneyBy-Law1999(asamended).These penaltiesmaybeimposedincaseswhereanysignificantportionofmysubmittedworkhasbeencopiedwithout proper acknowledgment from other sources, including published works, the Internet, existing programs, the work of other students, or work previously submitted for other awards orassessments.IrealisethatImaybeaskedtoidentifythoseportionsoftheworkcontributedbymeandrequiredtodemonstrate my knowledge of the relevant material by answering oral questions or by undertaking supplementary work, either written or in the laboratory, in order to arrive at the final assessmentmark.I acknowledge that the School of Information Technologies, in assessing this assignment, may reproduce it entirely, may provide a copy to another member of faculty, and/or communicate a copy of this assignment to a plagiarism checking service or in-house computer program, and that a copy of the assignment may be maintainedbytheserviceortheSchoolofITforthepurposeoffutureplagiarismchecking.代写CS Finance|建模|代码|系统|报告|考试编程类:C++,JAVA ,数据库,WEB,Linux,Nodejs,JSP,Html,Prolog,Python,Haskell,hadoop算法,系统 机器学习金融类:统计,计量,风险投资,金融工程,R语言,Python语言,Matlab,建立模型,数据分析,数据处理服务类:Lab/Assignment/Project/Course/Qzui/Midterm/Final/Exam/Test帮助代写代考辅导天才写手,代写CS,代写finance,代写statistics,考试助攻E-mail:[email protected]微信:BadGeniuscs 工作时间:无休息工作日-早上8点到凌晨3点如果您用的手机请先保存二维码到手机里面,识别图中二维码。如果用电脑,直接掏出手机果断扫描。

所有的编程代写范围:essayghost为美国、加拿大、英国、澳洲的留学生提供C语言代写、代写C语言、C语言代做、代做C语言、数据库代写、代写数据库、数据库代做、代做数据库、Web作业代写、代写Web作业、Web作业代做、代做Web作业、Java代写、代写Java、Java代做、代做Java、Python代写、代写Python、Python代做、代做Python、C/C++代写、代写C/C++、C/C++代做、代做C/C++、数据结构代写、代写数据结构、数据结构代做、代做数据结构等留学生编程作业代写服务。