100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Summary CS114 - 1.6 Case Study Random Web Surfer $2.84   Add to cart

Summary

Summary CS114 - 1.6 Case Study Random Web Surfer

 90 views  0 purchase
  • Course
  • Institution
  • Book

Summaries from the "Introduction to Programming in Java" textbook to assist in quick studying and revision for tests and exams. Be sure to look at the bundles to buy several chapters at a much lower price. Please note these notes only include summaries for Chapter 1.6 and further summaries will be ...

[Show more]

Preview 1 out of 3  pages

  • No
  • Chapter 1.6 (case study random web surfer)
  • June 23, 2021
  • 3
  • 2021/2022
  • Summary
avatar-seller
Input format
• Needed to structure the info in input files
• Assume there are n web pages numbered from 0 to n-1 90-10 rule
• Assume 90% of the time the
o Represent links with ordered pairs of these numbers random surfer clicks a random
1. Page containing the link link on the current page (each
2. Page to which it refers with = probability)
• Input format = input stream of integer (n) + sequence of pairs of integers • 10% of the time the random
surfer goes directly to a
• StdIn → treats all sequences of whitespace characters as a single delimiter
random page (all pages on web
o Can put one link per line or several links in one line have = probability)




Transition matrix
• 2D matrix to specify behaviour of random
surfer
o n web pages
o n-by-n matrix
▪ Value in row i & column j =
probability that random surfer
moves to page j when on page i
• Write code that can create this matrix for any
given input
o Read n & create arrays counts[][] and
outDegrees[]
o Read links & build counts so counts[i][j]
counts the links from I to j &
outDegrees[i] counts the links from i to
anywhere
o Use 90-10 rule to compute the
probabilities
• Program 1.6.1: filter that reads a graph from
standard input & prints associated transition
matrix to standard output
• Significant because each row represents a
discrete probability distribution (elements fully
specify behaviour of surfing to each page)
• Output defines file format for matrices
(numbers of rows & cols + values of matrix
elements in row-major order)




1

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller notesfromaCSmajor. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $2.84. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

67474 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$2.84
  • (0)
  Add to cart