Sunteți pe pagina 1din 2

In Scheduling we will have

Processors: These are workers. We designate them: P1, P2, P3, …


Tasks: Jobs needed to be done. We designate them: A, B, C, … We will assume that the processors can do all of the required tasks.
Processing Times: The time it takes to do a task. We write it in parenthesis after a task. Thus, A(5) means it takes 5 units of time to
complete task A.
Precedence Relations: To indicate that task A must be completed before task B can be started we write
A B.

If there is no precedence relation between two tasks we say they are independent.
Directed Graphs: Graphs in which the edges have directions that indicate priority relations.
Priority List: A listing of the tasks in the order we prefer to have them done.
1. The only time we do not follow the order of the priority list is when a precedence relation prohibits it.
2. Precedence relations override the priority list, but otherwise we assign tasks to processors according to the priority list.
How the priority list works:

1. All processors busy. We wait.


2. One processor free. Scanning the priority list from left to right, assign the first ready task to that processor.
3. More than one processor free. Assign first ready task to first free processor, the second ready task to the second ready
processor, and so on. If there are more free processors than ready tasks, some processors will be assigned idle time.
Algorithms for Creating Priority Lists
Decreasing-Time Algorithm
1. List the tasks in decreasing order of processing times, with longest first, second longest second, and so on. This will be our
priority list.
2. Schedule the project with the priority list obtained in step (1).
The Critical Path Algorithm
The critical path for a vertex X is the path from X to END that has the longest total sum of processing times.
The total time in the critical path for X is called the critical time for X.
The critical time for a project is the critical time for START.
The Backflow Algorithm for finding critical times:

1. List the vertices in decreasing order of critical times (with ties broken randomly). This list will be our priority list.
2. Use the priority list obtained in step (1) to schedule the project.

1. Find the critical times for the vertices that are immediately ahead of X.
2. Select the largest of the times obtained in step 1 and add it to the processing time of X. This will be the critical time of X.
FIBONACCI NUMBERS
1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144,…
MAIN POINT:

A) Increasing a number C by x% is equivalent to multiplying C by (1 + x/100).


B) Decreasing a number C by x% is equivalent to multiplying C by (1 - x/100).
TRUE FACT: In general, if we deposit P0 dollars in a savings account at an annual interest rate of i (expressed as a decimal), then
after N years our balance will be

PN = P0 x (1 + i)N dollars.
Example 5. Deposit $400 at an annual rate of 3%. The balance after 10 years will be
P10 = 400 x (1 + .03)10
= $542.35
TRUE FACT: In general, if we deposit P0 dollars in a savings account at an annual interest rate of i (expressed as a decimal),
compounded k times per year, then after
N years our balance will be
PN = P0 x (1 + i/k) kN dollars.
THE ANNUAL PERCENTAGE YIELD (APY) is the percentage of profit that an investment generates in a one-year period.
In general, if you start with S dollars at the beginning of the year and your investment grows to E dollars by the end of the year, then
the Annual Percentage Yield is
APY = (E – S)/S x 100%.
A GEOMETRIC SEQUENCE is a sequence where
each term in it is obtained from the preceding
one by multiplying by a constant r.
r is called the common ratio of the geometric
sequence.

If P0 is the first term of a geometric, then its


terms P1, P2, P3,… are given by the formula
PN = P0 x rN, where r is the common ratio.

When a sequence is geometric we say its


terms grow exponentially or according to
The exponential growth model.

S-ar putea să vă placă și