DATABASE SYSTEM CONCEPTS (LOOSELEAF)
DATABASE SYSTEM CONCEPTS (LOOSELEAF)
7th Edition
ISBN: 9781260515046
Author: SILBERSCHATZ
Publisher: MCG
Expert Solution & Answer
Book Icon
Chapter 18, Problem 1PE

Explanation of Solution

Proof:

Consider the set of attributes be α .

F is considered to be the set of functional dependencies (FDs).

The set of attributes is considered to be functionally determined by α under F and is defined to be close of α under F(α+).

Using the Figure 7.19 and Figure 7.8:

The algorithm provided in the figure 7.19 will correctly compute the (α+) as shown below:

  • Computing what will happen after adding A to result.
  • Proving αA
  • Since αα is trivially which means α is considered to be a part of the result.
  • Now, after adding Aα to the resultant there should be existence of functional dependency that is βγ where Aγ and where βresult.
  • Or else the value of the “fdcount” will not become zero, then the related of condition of the algorithm will not change to be the value “false”.
  • When Aα+, then it will added to the result for sure.
  • Proving this by induction by utilizing the Armstrong’s axiom on the length of proof on αA are shown below:
  • The add- in procedure gets called with the argument say “c”, then all the attribute present in the “C” gets added to the result.
  • Similarly in addition to it when the functional dependency “fdcount” value is zero, then all the attributes of its tail is surely added to the resultant too.
  • Utilizing the induction to the base case that is when Aα then Aα+ is considered to be true because the very first call that is made to the add-in procedure is made with the argument α.
  • Assume that αA and it can be proved in “n” steps or lesser than “n” steps and then it is also Aresult.
  • Now proving αA in n+1 steps;
  • The last step of proof can be obtained by applying one of the Armstrong axioms.
    • The below are three Armstrong’s axiom and they are
      • Reflexivity
        • A is considered to be set of attributes
        • BC and BA then AB
      • Augmentation
        • A is considered to be set of attributes
        • BC, then ABAC will also hold
      • Transitivity
        •  AB and BA, then AC can also be hold.
  • This indicates that the A was already present in the result and also in the nth step itself.
  • Or else by induction we can obtain that cresult

Comparison:

The algorithm present in the figure 7.19 is comparatively more efficient when compared with that of the figure 7.8 as shown below:

  • Each and every functional dependency gets scanned only one in the main program.
  • The resultant array size that appears is proportional to the size of the functional dependencies.
  • The recursive call that is made to the procedure add-in is also considered to be linear to the size that it appears.
  • Therefore, the time taken for the overall algorithm is linear to the size of the functional dependencies.
  • The algorithm presented in the figure 7.8 requires quadratic time because
    • The loop gets performed based the times of functional dependencies(FD’s)
    • Also for each loop the FD gets scanned again and again.

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
Design a dynamic programming algorithm for the Longest Alternating Subsequence problem described below: Input: A sequence of n integers Output: The length of the longest subsequence where the numbers alternate between being larger and smaller than their predecessor The algorithm must take O(n²) time. You must also write and explain the recurrence. Example 1: Input: [3, 5, 4, 1, 3, 6, 5, 7, 3, 4] Output: 8 ([3, 5, 4, 6, 5, 7, 3, 4]) Example 2: Input: [4,7,2,5,8, 3, 8, 0, 4, 7, 8] Output: 8 ([4, 7, 2, 5, 3, 8, 0,4]) (Take your time with this for the subproblem for this one)
Design a dynamic programming algorithm for the Coin-change problem described below: Input: An amount of money C and a set of n possible coin values with an unlimited supply of each kind of coin. Output: The smallest number of coins that add up to C exactly, or output that no such set exists. The algorithm must take O(n C) time. You must also write and explain the recurrence. Example 1: Input: C24, Coin values = = [1, 5, 10, 25, 50] Output: 6 (since 24 = 10+ 10+1+1 +1 + 1) Example 2: Input: C = 86, Coin values = [1, 5, 6, 23, 35, 46, 50] Output: 2 (since 86 = 46+35+5)
Design a dynamic programming algorithm for the Longest Common Subsequence problem de- scribed below Input: Two strings x = x1x2 xm and y = Y1Y2... Yn Output: The length of the longest subsequence that is common to both x and y. . The algorithm must take O(m n) time. You must also write and explain the recurrence. (I want the largest k such that there are 1 ≤ i₁ < ... < ik ≤ m and 1 ≤ j₁ < ... < jk ≤ n such that Xi₁ Xi2 Xik = Yj1Yj2 ··· Yjk) Example 1: Input: x = 'abcdefghijklmnopqrst' and y = 'ygrhnodsh ftw' Output: 6 ('ghnost' is the longest common subsequence to both strings) Example 2: Input: x = 'ahshku' and y = ‘asu' Output: 3 ('asu' is the longest common subsequence to both strings)
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education