11.07.2015 Views

Data Structures and Algorithm Analysis - Computer Science at ...

Data Structures and Algorithm Analysis - Computer Science at ...

Data Structures and Algorithm Analysis - Computer Science at ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2M<strong>at</strong>hem<strong>at</strong>ical PreliminariesThis chapter presents m<strong>at</strong>hem<strong>at</strong>ical not<strong>at</strong>ion, background, <strong>and</strong> techniques usedthroughout the book. This m<strong>at</strong>erial is provided primarily for review <strong>and</strong> reference.You might wish to return to the relevant sections when you encounter unfamiliarnot<strong>at</strong>ion or m<strong>at</strong>hem<strong>at</strong>ical techniques in l<strong>at</strong>er chapters.Section 2.7 on estim<strong>at</strong>ion might be unfamiliar to many readers. Estim<strong>at</strong>ion isnot a m<strong>at</strong>hem<strong>at</strong>ical technique, but r<strong>at</strong>her a general engineering skill. It is enormouslyuseful to computer scientists doing design work, because any proposedsolution whose estim<strong>at</strong>ed resource requirements fall well outside the problem’s resourceconstraints can be discarded immedi<strong>at</strong>ely, allowing time for gre<strong>at</strong>er analysisof more promising solutions.2.1 Sets <strong>and</strong> Rel<strong>at</strong>ionsThe concept of a set in the m<strong>at</strong>hem<strong>at</strong>ical sense has wide applic<strong>at</strong>ion in computerscience. The not<strong>at</strong>ions <strong>and</strong> techniques of set theory are commonly used when describing<strong>and</strong> implementing algorithms because the abstractions associ<strong>at</strong>ed with setsoften help to clarify <strong>and</strong> simplify algorithm design.A set is a collection of distinguishable members or elements. The membersare typically drawn from some larger popul<strong>at</strong>ion known as the base type. Eachmember of a set is either a primitive element of the base type or is a set itself.There is no concept of duplic<strong>at</strong>ion in a set. Each value from the base type is eitherin the set or not in the set. For example, a set named P might consist of the threeintegers 7, 11, <strong>and</strong> 42. In this case, P’s members are 7, 11, <strong>and</strong> 42, <strong>and</strong> the basetype is integer.Figure 2.1 shows the symbols commonly used to express sets <strong>and</strong> their rel<strong>at</strong>ionships.Here are some examples of this not<strong>at</strong>ion in use. First define two sets, P<strong>and</strong> Q.P = {2, 3, 5}, Q = {5, 10}.23

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!