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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started