and one extra: relational composition which generalizes composition of functions a (RoS) c ::= 3b e B. (a S b) ^ (b R c). In other words, a is related to c in Ro S if starting at a you can follow an S arrow to the start of an R arrow and then follow the R arrow to get to c. Here is one worked example to get you started: - Search description: The set of pages containing the word "logic" - Solution expression: M'("logic") Find similar solutions for each of the following searches: (a) The set of pages containing the word “set" and the word “theory" (b) The set of pages containing the words “set" and "theory" that have been recommended by “Wiggins"

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

help with discrete math hw

•.. and one extra: relational composition which generalizes composition of functions
a (RoS) c ::= 3b E B. (a S b) ^ (b R c).
In other words, a is related to c in RoS if starting at a you can follow an S arrow to the start
of an R arrow and then follow the R arrow to get to c.
Here is one worked example to get you started:
- Search description: The set of pages containing the word "logic"
- Solution expression: M'("logic")
Find similar solutions for each of the following searches:
(a) The set of pages containing the word “set" and the word “theory"
(b) The set of pages containing the words “set" and "theory" that have been recommended
by "Wiggins"
(c) The set of endorsers who have recommended pages containing the words “discrete" and
"mathematics"
(d) The relation that relates endorser e and word w iff e has recommended a page containing
(e) The set of pages that have at least one incoming or outgoing link
(f) The relation that relates word w and page p iff w appears on a page that links to p
(g) The relation that relates word w and endorser e iff w appears on a page that links to a
page that e recommends
(h) The relation that relates pages pį and p2 iff p2 can be reached from pį by following a
sequence of exactly 4 links
Transcribed Image Text:•.. and one extra: relational composition which generalizes composition of functions a (RoS) c ::= 3b E B. (a S b) ^ (b R c). In other words, a is related to c in RoS if starting at a you can follow an S arrow to the start of an R arrow and then follow the R arrow to get to c. Here is one worked example to get you started: - Search description: The set of pages containing the word "logic" - Solution expression: M'("logic") Find similar solutions for each of the following searches: (a) The set of pages containing the word “set" and the word “theory" (b) The set of pages containing the words “set" and "theory" that have been recommended by "Wiggins" (c) The set of endorsers who have recommended pages containing the words “discrete" and "mathematics" (d) The relation that relates endorser e and word w iff e has recommended a page containing (e) The set of pages that have at least one incoming or outgoing link (f) The relation that relates word w and page p iff w appears on a page that links to p (g) The relation that relates word w and endorser e iff w appears on a page that links to a page that e recommends (h) The relation that relates pages pį and p2 iff p2 can be reached from pį by following a sequence of exactly 4 links
The language of sets and relations may seem remote from the practical world of programming,
but in fact there is a close connection to relational databases, a very popular software application
building block implemented by such software packages as MYSQL. This problem explores the
connection by considering how to manipulate and analyze a large data set using operators over
sets and relations. Systems like MySQL are able to execute very similar high-level instructions
efficiently on standard computer hardware, which helps programmers focus on high-level design.
Consider a basic Web search engine, which stores information on Web pages and processes queries
to find pages satisfying conditions provided by users. At a high level, we can formalize the key
information as:
• A set P of pages that the search engine knows about
A binary relation L (for link) over pages, defined such that pı L p2 iff page pi links to p2
• A set E of endorsers, people who have recorded their opinions about which pages are
high-quality
• A binary relation R (for recommends) between endorsers and pages, such that e R p iff person
e has recommended page p
A set W of words that may appear on pages
• A binary relation M (for mentions) between pages and words, where p M w iff word w appears
on page p
Each part of this problem describes an intuitive, informal query over the data, and your job is to
produce a single expression using the standard set and relation operators, such that the expression
can be interpreted as answering the query correctly, for any data set. Your answers should use only
the set and relation symbols given above, in addition to terms standing for constant elements of E
or W , plus the following operators introduced in the text:
set union U.
• set intersection n.
set difference –.
• relation image-for example, R(A) for some set A, or R(a) for some specific element a.
• relation inverse '.
Transcribed Image Text:The language of sets and relations may seem remote from the practical world of programming, but in fact there is a close connection to relational databases, a very popular software application building block implemented by such software packages as MYSQL. This problem explores the connection by considering how to manipulate and analyze a large data set using operators over sets and relations. Systems like MySQL are able to execute very similar high-level instructions efficiently on standard computer hardware, which helps programmers focus on high-level design. Consider a basic Web search engine, which stores information on Web pages and processes queries to find pages satisfying conditions provided by users. At a high level, we can formalize the key information as: • A set P of pages that the search engine knows about A binary relation L (for link) over pages, defined such that pı L p2 iff page pi links to p2 • A set E of endorsers, people who have recorded their opinions about which pages are high-quality • A binary relation R (for recommends) between endorsers and pages, such that e R p iff person e has recommended page p A set W of words that may appear on pages • A binary relation M (for mentions) between pages and words, where p M w iff word w appears on page p Each part of this problem describes an intuitive, informal query over the data, and your job is to produce a single expression using the standard set and relation operators, such that the expression can be interpreted as answering the query correctly, for any data set. Your answers should use only the set and relation symbols given above, in addition to terms standing for constant elements of E or W , plus the following operators introduced in the text: set union U. • set intersection n. set difference –. • relation image-for example, R(A) for some set A, or R(a) for some specific element a. • relation inverse '.
Expert Solution
Step 1

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Potential Method of Analysis
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education