Consider the algorithm in figure to compute ?+. Show that this algorithm is more efficient than the
Question:
Consider the algorithm in figure to compute ?+. Show that this algorithm is more efficient than the one presented in Figure (Section 7.3.3) and that it computes ?+ correctly.
Transcribed Image Text:
result := 0; /* fdcount is an array whose ith element contains the numb of attributes on the left side of the ith FD that are not yet known to be in at */ for i := 1 to |F| do begin let 3 fdcount [i] = 13; - y denote the ith FD; end /* appears is an array with one entry for each attribute. The entry for attribute A is a list of integers. Each integer i on the list indicates that A appears on the left side of the ith FD*/ for each attribute A do begin appears (A] := NIL; for i := 1 to |F| do begin let 3 - y denote the ith FD; if A € B then add i to appears (A]; end end addin (a); return (result); procedure addin (a); for each attribute A in a do begin if A ¢ result then begin result := result U {A}; for each element i of appears[A] do begin fdcount [i] := fdcount [i] - 1; if fdcount [i] = 0 then begin let 3 - y denote the ith FD; addin (y); end end end end
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 44% (9 reviews)
The algorithm is correct because If A is added to result then there is a proof that A To see this observe that trivially so is correctly part of resul...View the full answer
Answered By
Ali Khawaja
my expertise are as follows: financial accounting : - journal entries - financial statements including balance sheet, profit & loss account, cash flow statement & statement of changes in equity -consolidated statement of financial position. -ratio analysis -depreciation methods -accounting concepts -understanding and application of all international financial reporting standards (ifrs) -international accounting standards (ias) -etc business analysis : -business strategy -strategic choices -business processes -e-business -e-marketing -project management -finance -hrm financial management : -project appraisal -capital budgeting -net present value (npv) -internal rate of return (irr) -net present value(npv) -payback period -strategic position -strategic choices -information technology -project management -finance -human resource management auditing: -internal audit -external audit -substantive procedures -analytic procedures -designing and assessment of internal controls -developing the flow charts & data flow diagrams -audit reports -engagement letter -materiality economics: -micro -macro -game theory -econometric -mathematical application in economics -empirical macroeconomics -international trade -international political economy -monetary theory and policy -public economics ,business law, and all regarding commerce
4.00+
1+ Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer Sciences questions
-
Suppose loser pays all is more efficient than each pays his own. In a jurisdiction that follows each pays his own, the Coase Theorem would predict that the two parties would sign a contract requiring...
-
Show that this database is arranged in the form of a frame. In particular, how would you use it to gain access to population information for a particular employee?
-
Secret-key cryptography is more efficient than public-key cryptography, but requires the sender and receiver to agree on a key in advance. Suppose that the sender and receiver have never met, but...
-
Calculate the oscillating frequency of a FET Hartley oscillator with C = 250pF, L1 = L2 = 1.5 mH, and mutual inductance between L1 and L2 is 0.5 mH.
-
Popped is a specialty popcorn store. It offers two varieties of popcorn: plain and flavored. The flavors range from Caramel Popcorn to Dark Chocolate Drizzled Popcorn to White Cheddar Popcorn. The...
-
A Gallup Poll of U.S. adults indicated that Kentucky is the state with the highest percentage of smokers (Gallup.com, December 2015). Consider the following example data from the Tri-State region, an...
-
Calculate the median for each of the following sets of data: a. 2, 2, 3, 4, 6, 9,9 b. 7, 7, 8, 12, 13, 14, 17, 21, 23 c. 11, 6, 3, 14, 12, 15, 8, 10, 7 d. 9, 6, 7, 5, 8, 7, 8, 9, 10, 8, 7 e. 10, 13,...
-
Consider the sales data for Computer Success given in Problem 7. a. Use a 3-month weighted moving average to forecast the sales for the months April through December. Use weights of (4/8), (3/8), and...
-
You are designing an open box. It will be made from a piece of cardboard that is 16 inches by 20 inches. You will form the box by cutting and folding the four square corners, then folding up sides,...
-
Two safety inspectors inspect a new building and assign it a "safety score" of 1, 2, 3, or 4. Suppose that the random variable X is the score assigned by the first inspector and the random variable Y...
-
Using the functional dependencies of Exercise 7.11, compute the canonical cover Fc.
-
Given the database schema R (a, b, c), and a relation r on the schema R, write an SQL query to test whether the functional dependency b c holds on relation r. Alsowrite an SQL assertion that...
-
A share price is currently $45. At the end of each of the next two months, it will change by going up $2 or going down $2. Calculate the value of a two month European call option with exercise price...
-
Full Costing The Fontys Plastic Surgery Lab has overhead marketing costs of 15,000 per month, as well as rent 19.000, utilities 2.000, 9.000 operating- machines leasing, 9.000 admin costs, and legal...
-
A major advantage of using the FIFO process-costing method is that in contrast with the weighted-average method, FIFO is considered GAAP FIFO makes the unit cost calculations simpler FIFO provides...
-
Sarah just started a new job. Her employer has a 401k match of 75% up to 6% of her gross salary. Sara's gross income is $55,000. She contributes $2,500 of her gross income to the 401k every year. How...
-
Is it possible to restore a deleted worksheet? Select an answer: no , because deleting a worksheet cannot be undone yes, by undoing the deletion yes, but only if the worksheet did not have data in it...
-
Both of the following for clauses would generate the same number of loop iterations: for num in range(4): for num in range(1,5): Your answer: Yes No Clear answer
-
Explain how communication skills fuel career success, and understand why writing skills are vital in a digital, mobile, and social-mediadriven workplace.
-
Discrete sample spaces: suppose there are N cable cars in San Francisco, numbered sequentially from 1 to N. You see a cable car at random; it is numbered 203. You wish to estimate N. (See Goodman,...
-
Convert 1.76 yards to centimeters. GIVEN: 1.76 yd FIND: cm CONCEPTUAL PLAN yd 1 m 1.094 yd m 1 cm 102 m RELATIONSHIPS USED 1.094 yd = 1 m 1 cm = 10-m cm (These conversion factors are from Tables 1.2...
-
The SQL-like operator is case sensitive, but the lower function on strings can be used to perform case-insensitive matching. To show how, write a query that finds departments whose names contain the...
-
Write the following queries in SQL, using the university schema. a. Find the ID and name of each student who has taken at least one Comp. Sci. course; make sure there are no duplicate names in the...
-
Consider the bank database of Figure 3.18, where the primary keys are underlined. Construct the following SQL queries for this relational database. a. Find each customer who has an account at every...
-
State the dividend irrelevance proposition. What are the assumptions behind this proposition? Explain why this proposition does not hold in the real world. (20 marks)
-
How many monthly withdrawals of $1,400 will an investment of $75,000 sustain if the first withdrawal is made 12 months from now and the money earns 8.4% compounded monthly
-
1. You buy a bond with 3 years left to maturity and a yield to maturity of 6% for $920. After 1 year you receive a coupon payment of $30 and sell the bond for $940. What was your rate of return on...
Study smarter with the SolutionInn App