Question: 1. Use the algorithm NONREDUNDANT to compute a nonredundant cover F for the following set G of functional dependencies: G = {A --> C, AB

1. Use the algorithm NONREDUNDANT to compute a nonredundant cover F for the following set G of functional dependencies:

G = {A --> C, AB --> C, C --> DI, CD --> I, EC --> AB, EI --> C}.

For simplicity of marking, please process the FDs in the same order

as they appear in G.

nonredundant algorithm:-

F=G;

for each FD X->Y in G

if F-{X->Y} |= X->Y then

F=F-{X->Y};

return(F)

2. Consider the following set G of functional dependencies:

G = {AE --> BC, BE --> C, ABE --> D}.

Produce an output set F of FDs by removing all extraneous

attributes from G.

3.Either prove this inference axiom or construct a counter-example to violate it:

XZ --> Y |= X --> Y.

4.Use the algorithm LINCLOSURE given below

to compute the closure of attributes AE, namely AE^+, under the

following set F of functional dependencies:

F = {A --> D, AB --> E, BI --> E, CD --> I, E --> C}.

We now present the algorithm LINCLOSURE which can test

membership in F^+ in linear time. We use an arrary COUNT of integers

containing the counts for each FD in F, and an array LIST of lists

of FDs for each attribute appearing in F.

Algorithm LINCLOSURE(X,F)

% 1. Initialization

for each FD W rightarrow Z in F

COUNT[W rightarrow Z] = | W |;

for each attribute A in W

add W rightarrow Z to LIST[A];

NEWDEP = X;

UPDATE = X;

% 2. Computation

while UPDATE neq emptyset

choose an A in UPDATE;

UPDATE = UPDATE - A;

for each FD W rightarrow Z in LIST[A]

COUNT[W rightarrow Z] = COUNT[W rightarrow Z] - 1;

if COUNT[W rightarrow Z] = 0 then

ADD = Z - NEWDEP;

NEWDEP = NEWDEP union ADD;

UPDATE = UPDATE union ADD;

% 3. X^+ is NEWDEP

return(NEWDEP)

Please provide answers according to question numbers and also give detailed explanation for the answers thank you

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!