Greedy Algorithm Problem - An operating system needs to schedule jobs in the mos
ID: 3778434 • Letter: G
Question
Greedy Algorithm Problem - An operating system needs to schedule jobs in the most efficient fashion. Consider n processes with known time slices t1....tn running on a single processor machine. The processes can be executed in any order, one process at a time. Your task is to find a schedule that minimizes the total time spent by all the processes in the system. The time spent by one process is the sum spent waiting on queue plus processing time.
(a) Design a greedy algorithm for this problem. (20 points)
(b) Does your greedy algorithm always yield an optimal solution? Explain your answer (5 points)
character probability 0.4 0.1 0.2 0.15 0.15Explanation / Answer
In on-line database theory, a useful dependency may be a constraint between 2 sets of attributes during a relation from a information. In different words, useful dependency may be a constraint that describes the link between attributes during a relation.
Given a relation R, a group of attributes X in R is claimed to functionally confirm another set of attributes Y, also in R, (written X Y) if, and on condition that, every X worth in R is related to exactly one Y worth in R; R is then aforementioned to satisfy the useful dependency X Y. Equivalently, the projection R} pi _}R may be a operate, i.e. Y may be a operate of X.[1][2] In straightforward words, if the values for the X attributes area unit acknowledged (say they're x), then the values for the Y attributes such as x is determined by wanting them up in any tuple of R containing x. typically X is termed the determinant set and Y the dependent set. A useful dependency FD: X Y is termed trivial if Y may be a set of X.
In different words, a dependency FD: X Y means the values of Y area unit determined by the values of X. 2 tuples sharing a similar values of X can essentially have a similar values of Y.
The determination of useful dependencies is a very important a part of coming up with databases within the relative model, and in information standardisation and denormalization. an easy application of useful dependencies is Heath’s theorem; it says that a relation R over associate degree attribute set U and satisfying a useful dependency X Y is safely split in 2 relations having the lossless-join decomposition property, particularly into (R)owtie pi _(R)=R} pi _}(R)owtie pi _{}(R)=R wherever Z = U XY area unit the remainder of the attributes. (Unions of attribute sets area unit typically denoted by mere juxtapositions in information theory.) a very important notion during this context may be a candidate key, outlined as a tokenish set of attributes that functionally confirm all of the attributes during a relation. The useful dependencies, in conjunction with the attribute domains, area unit elect thus on generate constraints that might exclude the maximum amount knowledge inappropriate to the user domain from the system as doable.
A notion of conditional relation is outlined for useful dependencies within the following way: a group of useful dependencies Sigma logically implies another set of dependencies Gamma , if any relation R satisfying all dependencies from Sigma additionally satisfies all dependencies from Gamma ; this can be sometimes written Sigma models Gamma . The notion of conditional relation for useful dependencies admits a sound and complete finite axiomatization, called Armstrong's axioms.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.