CS2040S Data Structures and Algorithms:Graph Structure

$20 Bonus + 25% OFF

Securing Higher Grades Costing Your Pocket?
Book Your Assignment at The Lowest Price
Now!

Students Who Viewed This Also Studied

CS2040S Data Structures and Algorithms

Question:

Data Algorithms

Background

In this assignment, your task is to implement a simple search engine using a simplified version of  the well-known Weighted PageRank algorithm. You should start by reading the Wikipedia article on PageRank (read up to the section Damping Factor). Later I will release a video lecture introducing  this assignment and discuss the required topics. The main focus of this assignment is to build a graph structure from a set of web pages, calculate  Weighted PageRanks and rank pages. To make things easier for you, you don’t need to spend time  crawling, collecting and parsing web pages for this assignment. Instead, you will be provided with  a collection of mock web pages in the form of plain text files. Each web page has two sections:

• Section 1 contains URLs representing outgoing links. The URLs are separated by whitespace, and  may be spread across multiple lines.
• Section 2 contains the actual content of the web page, and consists of one or more words. Words are separated by whitespace, and may be spread across multiple lines.

Mans has long been the subject of human interest. Eanly telescopic observations revealed color changes on the surface that were attributed to seasonal vegetation and apparent  linear features were ascribed to intelligent design.

Each test directory contains the following files:

Co11ect1on . txt  a file that contains a list of relevant URLs (for Part 1) pagerankL1st . exp a file that contains the expected result of Part 1 for this collection of URLs 1nvertedlndex. txt a file containing the inverted index for this collection of URLs (for Part 2) 
1og. txt  a file that contains information that may be useful for debugging Part 1.

*First, compile the original version of the files using the make command. You’ll see that it  produces three executables: pagerank, searchPagerank and scaledFootrule. It also copies these  executables to the ex1, ex2 and ex3 directories, because when you test your program, you will need  to change into one of these directories first. Note that in this assignment, you are permitted to create as many supporting files as you like. This allows you to compartmentalise your solution into different files. For example, you could  implement a Graph ADT in Graph . c and Graph . h. To ensure that these files are actually included 
in the compilation, you will need to edit the Makefile to include these supporting files; the  provided Makefile contains instructions on how to do this. To get the name of the file that contains the page associated with some URL, simply append . txt to  the URL.

For example, the page associated with the URL url24 is contained in url24. txt. For each URL in the collection file, you need to read its corresponding page and build a graph structure using a graph representation of your choice. Then, you must use the algorithm below to calculate the Weighted PageRank for each  page. Your program in pagerank. c must take three command-line arguments: d (damping factor), diffPR (sum  of PageRank differences), maxlterations (maximum number of iterations), and using the algorithm 
described in this section, calculate the Weighted PageRank for every web page in the collection. Each of the expected output files in the provided files were generated using the above command.

Your program should output a list of URLs, one per line, to a file named pagerankL1st . txt, along with some information about each URL. Each line should begin with a URL, followed by its outdegree  and Weighted PageRank (using the format string “%.71-F-“). The values should be comma-separated, with a space after each comma. Lines should be sorted in descending order of Weighted PageRank.  URLs with the same Weighted PageRank should be ordered alphabetically (ascending) by the URL. Here is an example pagerankL1st . txt. Note that this was not generated from any of the provided test files, this is just an example to demonstrate the output format.

CS2040S Data Structures and Algorithms

Answer in Detail


Solved by qualified expert

Get Access to This Answer

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

19 More Pages to Come in This Document. Get access to the complete answer.

More CS2040S CS2040S Data Structures and Algorithms: Questions & Answers

ict 167 Principles of computer science

Add (to the arraylist) all information about a courseworkor researchstudent (except the overall mark and the grade) by reading it from another text fileand determine the student’s overall mark and grade.3.Output from the arraylistthe details (all information including the overall mark and the …

View Answer

CO3311-Neural networks

Question 1
Great progress has been made over the last 10 years in the success of artificial neural networks (ANN). A seminal paper describing some of these was co-authored by Hinton:
“Deep Learning”, Yann LeCun, Yoshua Bengio and Geoffrey Hinton
This paper has been presented in many f …

View Answer

CMP73010 Managing Software Development

Part 1  Testing
There are two components to this part of the assignment. You are required to produce an acceptance test description and a detailed black-box test description. These two test types are unrelated so you should consider them separately.
The Acceptance test
B1. Google Research fa …

View Answer

COMP 10062 Java Programming

.What is the main difference between a static variable and an instance variable?2.What is the difference between overriding and overloading a method? Give a Java example of overriding.  3.Write a single Java statement to declare and create an array of 5 integers without specifying values for th …

View Answer

Content Removal Request

If you are the original writer of this content and no longer wish to have your work published on Myassignmenthelp.com then please raise the
content removal request.

Choose Our Best Expert to Help You

Colin Forsyth

M.Phil in Pharmacy with Specialization in Health Services and Patient Safety

628 – Completed Orders

Hire Me

Still in Two Minds? The Proof is in Numbers!

33845 Genuine Reviews With a Rating of 4.9/5.

Management

Assignment: 3 Pages, Deadline:
6 days

Very good piece of work, exactly what I needed. Everything was done very smooth from order to the end.

User ID: 5***28 London, Great Britain

Organizational Behavior

Assignment: 10 Pages, Deadline:
9 days

Thank you for your help, I manage to submit my assignment on time and I got a good grade!

User ID: 5***28 London, Great Britain

Marketing

Assignment: 6 Pages, Deadline:
12 days

Fantastic work, I received my order on time and it was very well done. I got exellent mark for my assingment!

User ID: 5***28 London, Great Britain

Project Management

Assignment: 6 Pages, Deadline:
11 days

I have very complicated project to do and your experts helped me with an exellent work. Thank you so much!

User ID: 5***28 London, Great Britain

Statistics

Programming: 1 Page, Deadline:
26 days

A good solution has been provided and I am satisfied with the solution provided.

User ID: 7***32 Zimbabwe

Finance

Home Work: 8 Pages, Deadline:
19 days

Got the assignment ahead of time and it is very good with attention to detail with all the calculations as asked earlier.

User ID: 8***20 India

It Write Up

Assignment: 20 Pages, Deadline:
3 days

Excellent Job, got excellent grades and passed in the assignment highly recommend. Best solution out there

User ID: 6***94 Mauritius

It Write Up

Essay: 0.8 Pages, Deadline:
1 day

I am one of the regular customer and I am happy with experts which helps me to clear my study. I am satisfied with solutions and thank you for helping …

User ID: 2***87 Bexley, Australia

Accounting

Home Work: 1 Page, Deadline:
8 days

thank you you guys, even though i dont have high marks, but im happy with your effort on that. really appreciate for that

User ID: 6***24 Australia

Management

Assignment: 2.4 Pages, Deadline:
4 days

thank you expert and your team. u guys really helpful for my assignment . really appreciate your effort

User ID: 6***24 Australia

Management

Assignment: 3 Pages, Deadline:
6 days

Very good piece of work, exactly what I needed. Everything was done very smooth from order to the end.

User ID: 5***28 London, Great Britain

Organizational Behavior

Assignment: 10 Pages, Deadline:
9 days

Thank you for your help, I manage to submit my assignment on time and I got a good grade!

User ID: 5***28 London, Great Britain

Marketing

Assignment: 6 Pages, Deadline:
12 days

Fantastic work, I received my order on time and it was very well done. I got exellent mark for my assingment!

User ID: 5***28 London, Great Britain

Project Management

Assignment: 6 Pages, Deadline:
11 days

I have very complicated project to do and your experts helped me with an exellent work. Thank you so much!

User ID: 5***28 London, Great Britain

Statistics

Programming: 1 Page, Deadline:
26 days

A good solution has been provided and I am satisfied with the solution provided.

User ID: 7***32 Zimbabwe

Finance

Home Work: 8 Pages, Deadline:
19 days

Got the assignment ahead of time and it is very good with attention to detail with all the calculations as asked earlier.

User ID: 8***20 India

It Write Up

Assignment: 20 Pages, Deadline:
3 days

Excellent Job, got excellent grades and passed in the assignment highly recommend. Best solution out there

User ID: 6***94 Mauritius

It Write Up

Essay: 0.8 Pages, Deadline:
1 day

I am one of the regular customer and I am happy with experts which helps me to clear my study. I am satisfied with solutions and thank you for helping …

User ID: 2***87 Bexley, Australia

Accounting

Home Work: 1 Page, Deadline:
8 days

thank you you guys, even though i dont have high marks, but im happy with your effort on that. really appreciate for that

User ID: 6***24 Australia

Management

Assignment: 2.4 Pages, Deadline:
4 days

thank you expert and your team. u guys really helpful for my assignment . really appreciate your effort

User ID: 6***24 Australia

Have any Query?
Reference no: EM132069492

WhatsApp
Hello! Need help with your assignments? We are here

GRAB 25% OFF YOUR ORDERS TODAY

X