A web page can have links to other web pages. Suppose we have a collection of we
ID: 1768720 • Letter: A
Question
A web page can have links to other web pages. Suppose we have a collection of web pages and we are interested in representing the relationships between web pages, in terms of which web pages can let you access other web pages.
(a) Show how the collection of web pages can be represented using a graph. For this graph, what do the vertices and edges represent? You should assume that there is a special web page called the home web page. From the home web page it should be possible to get to any of the other web pages in the collection.
(b) The following is a simple algorithm for constructing a graph that represents a collection of web pages. The graph itself is represented by one or more lists.
Start with an empty list and an empty graph.
Put the home page onto the list
While there are web pages on the list
Take a web page off the list, visit and process that web page.
// Once we get here there are no longer any web pages on the list, so we should be finished.
In this algorithm, there is an instruction that says to
Take a web page off the list, visit and process that web page.
Write an algorithm for carrying out this instruction. Your algorithm should try to visit any particular web page no more than once. As pages are visited, the information about that web page is added to the graph.
(c) The algorithm in (b) could be executed by one person. Consider how you could instruct 6 people to use that algorithm to construct a graph of the web page collection. Take the algorithm in (b) and the algorithm you wrote that tells people how to do part of the algorithm in (b) in more detail and express both algorithms in such a way that a group of 6 people could execute the algorithms. In particular, discuss the question of whether it is possible for 6 people to execute these algorithms and finish the task of producing the graph in roughly one sixth of the time it would take one person.
Can someone please give the algorithm in concise step by step english sentences, without code Pleeaase....? Thank youu.
Explanation / Answer
(a)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.