100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten
logo-home
Summary CS114 - 1.6 Case Study Random Web Surfer $2.81
In winkelwagen

Samenvatting

Summary CS114 - 1.6 Case Study Random Web Surfer

 0 keer verkocht
  • Vak
  • Instelling
  • Boek

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 ...

[Meer zien]

Voorbeeld 1 van de 3  pagina's

  • Nee
  • Chapter 1.6 (case study random web surfer)
  • 23 juni 2021
  • 3
  • 2021/2022
  • Samenvatting
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

Dit zijn jouw voordelen als je samenvattingen koopt bij Stuvia:

Bewezen kwaliteit door reviews

Bewezen kwaliteit door reviews

Studenten hebben al meer dan 850.000 samenvattingen beoordeeld. Zo weet jij zeker dat je de beste keuze maakt!

In een paar klikken geregeld

In een paar klikken geregeld

Geen gedoe — betaal gewoon eenmalig met iDeal, Bancontact of creditcard en je bent klaar. Geen abonnement nodig.

Focus op de essentie

Focus op de essentie

Studenten maken samenvattingen voor studenten. Dat betekent: actuele inhoud waar jij écht wat aan hebt. Geen overbodige details!

Veelgestelde vragen

Wat krijg ik als ik dit document koop?

Je krijgt een PDF, die direct beschikbaar is na je aankoop. Het gekochte document is altijd, overal en oneindig toegankelijk via je profiel.

Tevredenheidsgarantie: hoe werkt dat?

Onze tevredenheidsgarantie zorgt ervoor dat je altijd een studiedocument vindt dat goed bij je past. Je vult een formulier in en onze klantenservice regelt de rest.

Van wie koop ik deze samenvatting?

Stuvia is een marktplaats, je koop dit document dus niet van ons, maar van verkoper notesfromaCSmajor. Stuvia faciliteert de betaling aan de verkoper.

Zit ik meteen vast aan een abonnement?

Nee, je koopt alleen deze samenvatting voor $2.81. Je zit daarna nergens aan vast.

Is Stuvia te vertrouwen?

4,6 sterren op Google & Trustpilot (+1000 reviews)

Afgelopen 30 dagen zijn er 65539 samenvattingen verkocht

Opgericht in 2010, al 15 jaar dé plek om samenvattingen te kopen

Start met verkopen

Laatst bekeken door jou


$2.81
  • (0)
In winkelwagen
Toegevoegd