讲解:R、R、R、R、R、R

COMP2017 / COMP9017 Assignment 2Due: June 08th, 2pm AEST (Week 13 Friday)This assignment is worth 10% of your final assessmentTask DescriptionThe given data has been collected from a social media platform. supergraph2048. You are tasked withwriting program using the C programming language that will handle different queries and computethe correct result.Some queries may require simple partitioning of data for each thread to operate on, while others mayrequire strategy of dynamically partitioning data, checking the distribution of the data and synchroni-sation in order to efficiently process and eliminate redundant operations.You can ask questions on Ed using the assignments category. Please ensure that your work is yourown 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 alsotake advantage of the online code editor on Ed. You will need to navigate to the assessments orworkspaces page where you will be able to run, edit and submit your code from within your browser.However we recommend you write this code using your own computer or the lab machines.It is important that you continually back up your assignment files onto your own machine, flash drives,external hard drives and cloud storage providers. You are encouraged to submit your assignmentwhile you are in the process of completing it to receive feedback and to check for correctness of yoursolution.1COMP2017 / COMP9017Program 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.struct user {uint64_t user_id; //User id, is uniquesize_t* followers_idxs; //User indices within user* users graphsize_t n_followers; //Number of followerssize_t* following_idxs; //User indices within user* users graphsize_t n_following; //Number of users the user is followingsize_t* posts_idxs; //Post indices within post* posts graphsize_t n_posts; // Number of posts a user has made.};typedef struct user user;All user_id values within the users array will be unique. The lists: followers, following and postsare arranged by ascending order. In order of insertion.struct post {uint64_t pst_id; //Post id, is uniquesize_t* reposted_idxs; //Reposted indices within the graphsize_t n_reposted; // Number of reposted posts.};typedef struct post post;All pst_id values within the posts array will be unique. The posts array will not contain any cyclesas 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 allelements retrieved from the query as a heap allocated contiguous block of pointers and the number ofelements. It will be used to determine if your result is correct.struct result {void** elements;size_t n_elements;};typedef struct result resu oc_threshold• Account reputation, You will need to acknowledge the user reputation, caluclating it basedon: n_followers(n_followers+n_following) bot_net_thresholdPage 7 of 10COMP2017 / COMP9017AlgorithmsBreadth First SearchBreadth first search will check its neighbours before moving onto its neighbour’s neighbours and soon.BFS(G, v)Queue q;for all vertices u in Gu.seen = falseq.enqueue(v)while(!q.empty())u = q.dequeue()if u.seen is falseu.seen = 代做R实验作业、R编程代写、代写留学生R课程设计、R程序代做、调试R作业、R实验作业代做truefor all neighbours w of uq.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 thedata set provided is NULL or the number of elements (count) is 0, your query must return an emptyresult set ( n_elements is 0, elements is NULL).Page 8 of 10COMP2017 / COMP9017Submission DetailsYou will be provided with benchmarking code for this assessment called supergraph2048_benchand 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 the command:clang -O0 -std=gnu11 -march=native -lm -lpthreadYou are to submit your assessment using Ed which will check for correctness of your queries. In theevent that your program does not produce the correct output, your program will not be checked forperformance.• 4 Marks for the correctness of your program. This requires implementing all queries specifiedin the assignment and ensuring that they will return the correct result. If it does not compile, itwill receive zero.• 4 marks are assigned based on the performance of your code related to the benchmark. Thisis tested on a separate machine. Submissions that are faster or equal to the benchmark set, willreceive full marks. Submissions faster than a basic implementation will receive a minimum of2 marks.• 2 marks are assigned for a manual marking component in your tutorial. This will be based onyour submission prior to the 4thofJune20188:00amAEST. This manual marking componentwill assess your current progress of your assessment, styling (indentation and function layout)and also explaining your code to your tutor.Warning: Any attempts to deceive or disrupt the marking system will result in an immediate zero forthe entire assignment. Negative marks can be assigned if you do not follow the assignment specifica-tion or if your code is unnecessarily or deliberately obfuscated.Page 9 of 10COMP2017 / COMP9017Academic declarationBy submitting this assignment you declare the following:I declare that I have read and understood the University of Sydney Student Plagiarism: Coursework Policy andProcedure, and except where specifically acknowledged, the work contained in this assignment/project is myown work, and has not been copied from other sources or been previously submitted for award or assessment.I understand that failure to comply with the Student Plagiarism: Coursework Policy and Procedure can leadto severe penalties as outlined under Chapter 8 of the University of Sydney By-Law 1999 (as amended). Thesepenalties may be imposed in cases where any significant portion of my submitted work has been copied withoutproper acknowledgment from other sources, including published works, the Internet, existing programs, thework of other students, or work previously submitted for other awards or assessments.I realise that I may be asked to identify those portions of the work contributed by me and required to demonstratemy 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 assessment mark.I acknowledge that the School of Information Technologies, in assessing this assignment, may reproduce itentirely, may provide a copy to another member of faculty, and/or communicate a copy of this assignmentto a plagiarism checking service or in-house computer program, and that a copy of the assignment may bemaintained by the service or the School of IT for the purpose of future plagiarism checking.Page 10 of 10& 转自:http://ass.3daixie.com/2018052758777120.html

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 218,546评论 6 507
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 93,224评论 3 395
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 164,911评论 0 354
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,737评论 1 294
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,753评论 6 392
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,598评论 1 305
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,338评论 3 418
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 39,249评论 0 276
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,696评论 1 314
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,888评论 3 336
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 40,013评论 1 348
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,731评论 5 346
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,348评论 3 330
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,929评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 33,048评论 1 270
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 48,203评论 3 370
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,960评论 2 355

推荐阅读更多精彩内容

  • By clicking to agree to this Schedule 2, which is hereby ...
    qaz0622阅读 1,457评论 0 2
  • 喜、怒、哀、乐是一种情绪的表现,只是表达的方式方法不一样。周一学习会喜悦要直率的表露出来,感受颇深。本周...
    尘埃wyzh阅读 457评论 0 1
  • 现在主流的应用商店有百度手机助手,360手机助手,应用宝等,这三家排名不分先后,各有各的优缺点,今天聊的是如何玩转...
    梦大游阅读 1,174评论 0 2
  • 链接
    yangqi916阅读 128评论 0 0
  • 《悲伤逆流成河》有感。 这部电影为我们描述了一个女生被校园欺凌的全过程。 易遥。 这两个字真的很沉重。 因为她不仅...
    六便士sama阅读 211评论 0 0