Discreat Presentation Data Auto Saved)

Published on December 2016 | Categories: Documents | Downloads: 42 | Comments: 0 | Views: 263
of 30
Download PDF   Embed   Report

Comments

Content

There are several types of cardinality defining relationships between occurrences of entities on two sides of the line of relationships.

The Link Cardinality is a 0:0 relationship and defined as one side does not need the other to exists. For example, in a person and parking space relationship, it denotes that I do not need to have a person to have a parking space and I don¶t need a parking space to have a person either. It also denotes that a person can only occupy one parking space. This relation need to have one entity nominated to become the dominant table and use programs or triggers to limit the number of related records stored inside the other table in the relation.

The Sub-type Cardinality is a 1:0 relationship and defined as having one optional side only. An example would be a person and programmer relation. This is a 1:0 relation meaning that a person can be a programmer but a programmer must always be a person. The mandatory side of the relation, in the case the programmer side, is dominant in the relationship. Triggers and programs are again used in the controlling the database.

The Physical Segment Cardinality is 1:1 relationship and it is demonstrated that both sides of the relationship are mandatory. Example may be a person and DNA patters. This relationship show that a person must only have one set of DNA patterns while the DNA patters as dictated by nature can only be applied on one person.

The Possession Cardinality is a 0:M relation (zero to many) relationship on both sides. For example, a person may own no phone or maybe plenty of phones but a phone may have no owner but has a potential to be owned by a person. In database implementation, a nullable foreign key column in the phone table is used to reference the person in its table.

The Child Cardinality is a 1:M mandatory relationship and is one of the most common relationships used most databases. An example would be a person table and membership table relationship. This relationship denotes that a person can be a member or not but a person can also be a member of many organizations. The foreign key in the membership table has to be mandatory and not null.

The Characteristic Cardinality is a 0:M relationship which is mandatory on both sides. An example would be a person and name table relationship. This denotes that a person should have at least one name but may also many names. The database implantation for this cardinality involves a nullable foreign key in the name table to the person table.

The Paradox Cardinality is 1:M relationship which is mandatory to one side. An example would be a person table and citizenship table relationship. The Paradox is similar to the Physical Cardinality. A person must have a citizenship and citizenship must have a person. But in this case, a person may have multiple citizenships.

The Association Cardinaltiy is a M:M (many to many) relationship which may be optional on both sides. An example would be a person table and employer table relationship where a person may work for several employers or no employer at all. On the other hand, an employer may have no employee too but can have a several employees as well. A database implementation for this is to create a third associate entity.
Definition: In set theory, cardinality refers to the number of members in the set. When specifically applied to database theory, the cardinality of a table refers to the number of rows (or tuples) contained in a table.

Cardinality Notations
Cardinality specifies how many instances of an entity relate to one instance of another entity. Ordinality is also closely linked to cardinality. While cardinality specifies the occurances of a relationship, ordinality describes the relationship as either mandatory or optional. In other words, cardinality specifies the maximum number of relationships and ordinality specifies the absolute minimum number of relationships. When the minimum number is zero, the relationship is usually called optional and when the minimum number is one or more, the relationship is usually called mandatory. There are many notation styles that express cardinality and they are all supported by SmartDraw.

Information Engineering

Chen

Bachman

Martin

n the implementation of a structure query language (SQL), the term data cardinality is used to mean the uniqueness of the data values which are contained in a particular column, known as attribute, of a database table.

There are actually three types of data cardinality each dealing with columnar value sets. These types are high-cardinality, normal-cardinality, and low-cardinality.

High data cardinality refers to the instance where the values of a data column are very
uncommon. For example, a data column referring to values for social security numbers should always be unique for each person. This is an example of very high cardinality. Same goes with email address and user names. Automatically generated numbers are of very high data cardinality. For instance, in a data table column, a column named USER-ID would contain values starting with an automatically increments every time a new user is added.

Normal data cardinality refers to the instance where values of a data column
are somewhat uncommon but never unique. For example, a CLIENT table having a data column containing LAST_NAME values can be said to be of normal data cardinality as there may be several entries of the same last name like Jones and may other varied names in one column. At close inspection of the LAST_NAME column, one can see that there could be clumps of last names side by side with unique last names.

Low data cardinality refers to the instance where values of a data column are
not very unusual. Some table columns take very limited values. For instance, Boolean values can only take 0 or 1, yes or no, true or false. Another table columns with low cardinality are status flags. Yet another example of low data cardinality is the gender attribute which can take only two values ± male or female.

Determining data cardinality is a substantial aspect used in data modeling. This is used to determine the relationships

Several types of cardinality defining relationships between occurrences of entities on two sides of the line of relationships exist.

The Link Cardinality is a 0:0 relationship and defined as one side does not need the other to exists

The Sub-type Cardinality is a 1:0 relationship and defined as having one optional side only.

The Physical Segment Cardinality is 1:1 relationship and it is demonstrated that both sides of the relationship are mandatory.

The Possession Cardinality is a 0:M relation (zero to many) relationship on both sides.

The Child Cardinality is a 1:M mandatory relationship and is one of the most common relationships used most databases

The Characteristic Cardinality is a 0:M relationship which is mandatory on both sides.

The Paradox Cardinality is 1:M relationship which is mandatory to one side. An example would be a person table and citizenship table relationship.
ciation Cardinaltiy is a M:M (many to many) relationship which may be optional on both sides.

A data table's cardinality with respect to another data table is one of the most critical aspects in database design. For instance, a database hospital may have separate data tables used to keep track patients and doctors so a many to one relationship should be considered by the database designer. If the data cardinality and relationships are not designed well, the performance of a database will greatly suffer.

M
In mathematics, the cardinality of a set is a measure of the "number of elements of the set". For example, the set A = {2, 4, 6} contains 3 elements, and therefore A has a cardinality of 3. There are two approaches to cardinality ± one which compares sets directly using bijectionsand injections, and another which uses cardinal numbers.
[1]

The cardinality of a set A is usually denoted | A |, with a vertical bar on each side; this is the same notation as absolute value and the meaning depends on context. Alternately, the cardinality of a set A may be denoted by or # A.

Comparing sets
[edit]Case 1: | A | = | B | Two sets A and B have the same cardinality if there exists a bijection, that is, an injective and surjective function, from A to B. For example, the set E = {0, 2, 4, 6, ...} of non-negative even numbers has the same cardinality as the set N = {0, 1, 2, 3, ...} of natural numbers, since the function f(n) = 2n is a bijection from N to E. [edit]Case 2: | A | • | B | A has cardinality greater than or equal to the cardinality of B if there exists an injective function from B into A. [edit]Case 3: | A | > | B | A has cardinality strictly greater than the cardinality of B if there is an injective function, but no bijective function, from B to A. For example, the set R of all real numbers has cardinality strictly greater than the cardinality of the set N of all natural numbers, because the inclusion map i : N injective, but it can be shown that there does not exist a bijective function from N to R (see Cantor's diagonal argument). R is

Cardinal numbers
Main article: Cardinal number Above, "cardinality" was defined functionally. That is, the "cardinality" of a set was not defined as a specific object itself. However, such an object can be defined as follows. The relation of having the same cardinality is called equinumerosity, and this is an equivalence relation on the class of all sets. Theequivalence class of a set A under this relation then consists of all those sets which have the same cardinality as A. There are two ways to define the "cardinality of a set": 1. The cardinality of a set A is defined as its equivalence class under equinumerosity. 2. A representative set is designated for each equivalence class. The most common choice is the initial ordinal in that class. This is usually taken as the definition of cardinal number in axiomatic set theory.

The cardinalities of the infinite sets are denoted

For each ordinal ,

+1

is the least cardinal number greater than

.

The cardinality of the natural numbers is denoted aleph-null ( 0), while the cardinality of the real numbers is denoted by c, and is also referred to as the cardinality of the continuum. We can show that c = 2 0; this also being the cardinality of the set of all subsets of the natural numbers. The continuum hypothesis says that cardinal number bigger than
0, 1

= 2 0, i.e. 2 0 is the smallest

i.e. there is no set whose cardinality is strictly between that
[2]

of the integers and that of the real numbers. The continuum hypothesis still remains unresolved in an "absolute" sense . See below for more details on the cardinality of the continuum.

Finite, countable and uncountable sets
If the axiom of choice holds, the law of trichotomy holds for cardinality. Thus we can make the following definitions:  Any set X with cardinality less than that of the natural numbers, or | X | < | N |, is said to be a finite set.  Any set X that has the same cardinality as the set of the natural numbers, or | X | = | N | = is said to be a countably infinite set.  Any set X with cardinality greater than that of the natural numbers, or | X | > | N |, for example | R | = c > | N |, is said to be uncountable. [
0,

edit]Infinite sets

Our intuition gained from finite sets breaks down when dealing with infinite sets. In the late nineteenth century Georg Cantor, Gottlob Frege,Richard Dedekind and others rejected the view of Galileo (which derived from Euclid) that the whole cannot be the same size as the part. One example of this is Hilbert's paradox of the Grand Hotel. The reason for this is that the various characterizations of what it means for set A to be larger than set B, or to be the same size as set B, which are all equivalent for finite sets, are no longer equivalent for infinite sets. Different characterizations can yield different results. For example, in the popular characterization of size chosen by Cantor, sometimes an infinite set A is larger (in that sense) than an infinite set B; while other characterizations[ A is always the same size as an infinite set B.
which?]

may yield that an infinite set

For finite sets, counting is just forming a bijection (i.e., a one-to-one correspondence) between the set being counted and an initial segment of the positive integers. Thus there is no notion equivalent to counting for infinite sets. While counting gives a unique result when applied to a finite set, an infinite set may be placed into a one-to-one correspondence with many different ordinal numbers depending on how one chooses to "count" (order) it. Additionally, different characterizations of size, when extended to infinite sets, will break different "rules" which held for finite sets. Which rules are broken varies from characterization to characterization. For example, Cantor's characterization, while preserving the rule that sometimes one set is larger than another, breaks the rule that deleting an element makes the set smaller. Another characterization may preserve the rule that deleting an element makes the set smaller, but break another rule.
[citation

needed]

Furthermore, some characterization may not

"directly" break a rule, but it may not "directly" uphold it either, in the sense that whichever is the case depends upon a controversial axiom such as the axiom of choice or the continuum hypothesis. Thus there are three possibilities. Each characterization will break some rules, uphold some others, and may be indecisive about some others. If one extends to multisets, further rules are broken (assuming Cantor's approach), which hold for finite multisets. If we have two multisets A and B, A not being larger than B and B not being larger than A does not necessarily imply A has the same size as B.
[citation

needed]

This rule holds

for multisets that are finite. Needless to say, the law of trichotomy is explicitly broken in this case, as opposed to the situation with sets, where it is equivalent to the axiom of choice. Dedekind simply defined an infinite set as one having the same size (in Cantor's sense) as at least one of its proper parts; this notion of infinity is called Dedekind infinite. This definition only works in the presence of some form of the axiom of choice, however, so will not be considered to work by some mathematicians. Cantor introduced the above-mentioned cardinal numbers, and showed that (in Cantor's sense) some infinite sets are greater than others. The smallest infinite cardinality is that of the natural numbers ( 0). [edit]Cardinality

of the continuum

Main article: Cardinality of the continuum One of Cantor's most important results was that the cardinality of the continuum (c) is greater than that of the natural numbers ( 0); that is, there are more real numbers R than whole numbers N. Namely, Cantor showed that

(see Cantor's diagonal argument). The continuum hypothesis states that there is no cardinal number between the cardinality of the reals and the cardinality of the natural numbers, that is,

(see Beth one). However, this hypothesis can neither be proved nor disproved within the widely accepted ZFC axiomatic set theory, if ZFC is consistent. Cardinal arithmetic can be used to show not only that the number of points in a real number line is equal to the number of points in anysegment of that line, but that this is equal to the number of points on a plane and, indeed, in any finite-dimensional space. These results are highly counterintuitive, because they imply that there exist proper

subsets and proper supersets of an infinite set S that have the same
size as S, although S contains elements that do not belong to its subsets, and the supersets of S contain elements that are not included in it. The first of these results is apparent by considering, for instance, the tangent function, which provides a one-to-one

correspondence between the interval (í½ , ½ ) and R (see also Hilbert's paradox of the Grand Hotel).
The second result was first demonstrated by Cantor in 1878, but it became more apparent in 1890, when Giuseppe Peano introduced thespace-

filling curves, curved lines that twist and turn enough to fill the whole of any square, or cube, or hypercube, or finite-dimensional space. These
curves are not a direct proof that a line has the same number of points as a finite-dimensional space, but they can be easily used to obtain such a

proof.
Cantor also showed that sets with cardinality strictly greater than exist

(see his generalized diagonal argument and theorem). They include, for instance:   the set of all subsets of R, i.e., the power set of R, written P(R) or 2R the set R of all functions from R to R
R

Both have cardinality

(see Beth two). The cardinal equalities demonstrated using cardinal arithmetic: and can be

[edit]Examples

and properties



If X = {a, b, c} and Y = {apples, oranges, peaches}, then | X | = | Y | because {(a, apples), (b, oranges), (c, peaches)} is a bijection between the sets X and Y. The cardinality of each of X and Y is 3.



If | X | < | Y |, then there exists Z such that | X | = | Z | and Z Y.

 

Sets with cardinality c

In SQL (Structured Query Language), the term cardinality refers to the uniqueness of data values contained in a particular column (attribute) of a database table. The lower the cardinality, the more duplicated elements in a column. Thus, a column with the lowest possible cardinality would have the same value for every row. SQL databases use cardinality to help determine the optimal query plan for a given query.

 

[edit]Values

of Cardinality

When dealing with columnar value sets, there are 3 types of cardinality: high-cardinality, normal-cardinality, and low-cardinality.



High-cardinality refers to columns with values that are very uncommon or unique. Highcardinality column values are typically identification numbers, email addresses, or user names. An example of a data table column with high-cardinality would be a USERS table with a column named USER_ID. This column would contain unique values of 1-n. Each time a new user is created in the USERS table, a new number would be created in the USER_ID column to identify them uniquely. Since the values held in the USER_ID column are unique, this column's cardinality type would be referred to as high-cardinality.



Normal-cardinality refers to columns with values that are somewhat uncommon. Normal-cardinality column values are typically names, street addresses, or vehicle types. An example of a data table column with normal-cardinality would be a CUSTOMER table with a column named LAST_NAME, containing the last names of customers. While some people have common last names, such as Smith, others have uncommon last names. Therefore, an examination of all of the values held in the LAST_NAME column would show "clumps" of names in some places (e.g.: a lot of Smith's ) surrounded on both sides by a long series of unique values. Since there is a variety of possible values held in this column, its cardinality type would be referred to as normal-cardinality.



Low-cardinality refers to columns with few unique values. Low-cardinality column values are typically status flags, boolean values, or major classifications such as gender. An example of a data table column with low-cardinality would be a CUSTOMER table with a column named NEW_CUSTOMER. This column would contain only 2 distinct values: Y or N, denoting whether the customer was new or not. Since there are only 2 possible values held in this column, its cardinality type would be referred to as low-cardinality.



   

Some sets have a finite number of elements, while other sets, such as the collection of positive integers, have an infinite number. Tangible sets we encounter in everyday life invariably are finite, although the number of elements might be very large. The set of grains of sand on Bellows Beach has an enormous number of elements, although it is still a finite set. To find an infinite set you generally have to look at sets conjured up in the minds of humans, such as sets of numbers or of points on a line, or of other mathematical entities. The cardinality of a finite set is defined as simply the number of elements in the set. We will say that the cardinality of an infinite set is infinity (written as ’). However, as the study of infinite sets is more complicated, in discussing cardinality we restrict our attention to finite sets. We use the notation |A| to refer to the cardinality of a set A; that is,


|A| = number of elements in A .



Since the empty set has no elements, we have |ˆ| = 0. For A = {a , b , c} we have |A| = 3. If a set has not too many elements and they are all listed, then of course it is a simple matter to count the elements and determine the set's cardinality. However, if the elements are numerous and not listed but only described, then it might be quite difficult if not impossible to count them. There is a whole branch of mathematics, called combinatorics, devoted to methods of counting elements in various sets. Later in this book we will discuss some of these methods, but right now we keep things simple and look at only a few problems concerning the number of elements in the unions of sets. First suppose that two sets A and B are disjoint. Since A Š B is constructed by combining the elements of A and B into one set, and because A and B have no

elements in common, the number of elements in A Š B is just the sum of the number of elements in A and the number of elements in B; thus
      

|A Š B| = |A| + |B| , if A and B are disjoint.

However, if A and B are not disjoint then the situation is not as simple, as illustrated in the next example.
EXAMPLE 1

The art club at Waipahu High School has 10 members, the music club has 12 members, and 5 students belong to both of these clubs. How many students will be invited to the joint art club - music club Christmas party? If the art and music clubs were disjoint, then the answer would be 10 + 12 = 22. However, the 5 students who are members of both clubs are counted twice in this addition; thus we must subtract 5 from the total, to arrive at 10 + 12 í 5 = 17 as the number of students in the union of the art and music clubs.

    

The preceding example demonstrates the general formula for the cardinality of the union of two sets A and B (when A and B might intersect),


|A Š B| = |A| + |B| í |A

B|.

 

In adding the number of elements in A to the number in B, we count those elements common to A and B twice; these are the elements in the intersection A B. To correct for this double-counting we must subtract from our sum the number of elements in A B.
EXAMPLE 2

 

Kings :

Queens :

Jacks :

    

In an ordinary deck of playing cards, how many cards are (a) either red cards or face cards? (b) either spades or queens? For the benefit of those not familiar with playing cards, at the right is Numerdisplayed a standard deck of 52 cards. ical There are four suits of 13 cards each, Cards : called spades ( ), hearts ( ), diamon ds (j), and clubs ( ). The spades and clubs are black, and the hearts and diamonds red. Each suit has ten numerical cards, labeled ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, as well as Spds. Hts. Diams. Clubs three face cards, called jack, queen, and king. (The ³one´ card is called an ³ace´; in some games it is considered the highest card in the suit, and in other games the lowest.) Altogether there are 26 black cards, 26 red cards, 12 face cards, and 40 numerical cards. (a) Let R denote the set of red cards, and F the set of face cards. Then  |R| = 26 , |F| = 12 . We are interested in the number of cards in the union R Š F. It is tempting to add 26 and 12 and conclude that there are 38 cards that are either red or face cards. However, the sets R and F are not disjoint; in fact the intersection R F contains 6 cards which are both red cards and face cards, and these have been counted twice. Therefore, the number of cards that are either red or face cards is  |R Š F| = |R| + |F| í |R F| = 26 + 12 í 6 = 32 . (b) Let S denote the spades and Q the queens. Then |S| = 13, |Q| = 4, |S Q| = 1, and  |S Š Q| = |S| + |Q| í |S Q| = 13 + 4 í 1 = 16 . (The queen of spades gets counted twice in adding the spades and the queens.)

 



    

Any set S is disjoint from its complement ~S, while the union of S and ~S is the universal set U. Consequently, if we add the number of elements in S to the number not in S, we get the total number of elements in U - that is,




|S| + |~S| = |U| .

   

We illustrate this basic formula with a simple example.
EXAMPLE 3

In Susan's refrigerator there are 9 eggs, of which 3 are rotten. How many of the eggs are good? The universe U, consisting of all the eggs, has 9 members, while the subset R of rotten eggs has 3 members. The good eggs make up the complement, ~R. Therefore, |R| + |~R| = |U| , |~R| = |U| í |R| = 9 í 3 = 6 . There are 6 good eggs.
   

One can solve counting problems involving unions and intersections of sets also with the help of Venn diagrams. This method is perhaps even preferred, because no formulas are needed and usually in the end we wind up with more information than was initially sought. The next several examples demonstrate the Venn diagram method.
EXAMPLE 4

Among the voters at a neighborhood board meeting there are 10 females, 23 Democrats, and 7 female Democrats. How many voters are either female or Democrat?  First we work the problem with our formula. Let F be the set of females at the meeting and D the set of Democrats. We are given that |F| = 10, |D| = 23, and |F D| = 7. The number of voters who are female or Democrat then is  |F Š D| = |F| + |D| í |F D| = 10 + 23 í 7 = 26 .  Next we use a Venn diagram to solve the problem. The universe U consists of all voters at the meeting. We draw circles representing the sets F and D of females and Democrats. We imagine that all the females are standing in the circle labeled F, and all the Democrats in the circle labeled D. Then the female Democrats will be in the intersection of the circles F and D; we place the number 7 in this region to indicate the number of members standing there. Now, since there are 10 women in all, we must place 3 in the remaining region of the F circle. Likewise, since there are 23 Democrats, we must place 16 in the remaining region of the D circle. The picture now tells us everything we need to know. To find the number of members who are female or Democrat, we add the three numbers in the union F Š D, getting 3 + 7 + 16 = 26.

  

Note that the number 3 represents the number of females who are not Democrats, while 16 is the number of male Democrats.
   

EXAMPLE 5

A caterer prepared 60 beef tacos for a birthday party. Among these tacos, he made 45 with tomatoes, 30 with both tomatoes and onions, and 5 with neither tomatoes nor onions. How many tacos did he make with (a) tomatoes or unions? (b) onions? (c) onions but not tomatoes? We construct a Venn diagram, where the universe U consists of all the tacos, the set T has the tacos with tomatoes, and set O the tacos with onions. First we fill in the intersection T O with 30, the number of tacos with both tomatoes and onions. Since there are 45 tacos with tomatoes, we place 15 in the other part of the tomato circle. We place 5 in the region outside both circles, where we have tacos with neither tomatoes nor onions. Now we have filled in three of the four regions. Since all numbers must add up to 60, the total number of tacos, in the last region of the onion circle we need the number 60 í (30 + 15 + 5) = 10. Now we may answer all the questions. The number of tacos with tomatoes or onions is 15 + 30 + 10 = 55. The number with onions is 30 + 10 = 40, and the number with onions but not tomatoes is 10.

     

Venn diagrams can be used also in problems involving unions of three sets.
EXAMPLE 6

A dormitory of college freshmen has 110 students. Among these students, 75 are taking English, 52 are taking history, 50 are taking math, 33 are taking English and history, 30 are taking English and math, 22 are taking history and math, 13 are taking English, history, and math.

Student taking English, history, and math   

We will determine how many students are taking (b) neither English, history, nor math, (d) English, but not history, (f) exactly two of the three subjects.

(a) English and history, but not math, (c) math, but neither English nor history, (e) only one of the three subjects,
 

At first glance the problem appears formidable, but a Venn diagram makes it easy. We draw circles E, H, and M, representing students taking English, history, and math, respectively, inside a rectangle representing the universe of all students in the dormitory. Then we fill numbers in the eight regions of the diagram, beginning from the inside and working our way out. The steps are as follows: 1) 2) 3) 4) Write 13 in the red region, for students taking all 3 courses. Write 9 in the pink region, since 22 take history and math. Write 17 in the gray region, since 30 take English and math. Write 20 in the brown region, since 33 take English and history.

    

              

5) Write 11 in the blue region, since 50 take math. 6) Write 10 in the green region, since 52 take history. 7) Write 25 in the yellow region, since 75 take English. 8) Add all seven numbers in the circles to get 105; since there are 110 students in all, write 5 in the region outside the three circles. After the eight regions have numbers, we merely read from the Venn diagram the answers to the posed questions: (a) Students taking English and history, but not math, are in the brown region; there are 20 of these. (b) Students taking none of the three courses are outside the three circles; there are 5 of these. (c) Students taking math, but neither English nor history, are in the blue region; there are 11 of these. (d) Students taking English, but not history, are in the yellow and gray regions; there are 25 + 17 = 42 of these. (e) Students taking only one of the three subjects are in the yellow, green, and blue regions; there are 25 + 10 + 11 = 46 of these. (f) Students taking two of the three subjects are in the pink, gray, and brown regions; there are 9 + 17 + 20 = 46 of these.
General Description In mathematics, the cardinality of a set is a measure of the "number of elements of the set". For example, the set A 2, 4, 6 contains 3 elements, and therefore A has a cardinality of 3. There are two approaches to cardinality one which compares sets directly using bijections and injections, and another which uses cardinal numbers. The cardinality of a set A is usually denoted A , with a vertical bar on each side this is the same notation as absolute value and the meaning depends on context. Alternately, the cardinality of a set A may be denoted by or A. Above, "cardinality" was defined functionally. That is, the "cardinality" of a set was not defined as a specific object itself. However, such an object can be defined as follows. The relation of having the same cardinality is called equinumerosity, and this is an equivalence relation on the class of all sets. The equivalence class of a set A under this relation then consists of all those sets which have the same cardinality as A. There are two ways to define the "cardinality of a set"







Countable
Proof I. In their 2000 paper ³Recounting the Rationals´ Neil Calkin and Herbert Wilf gave a new and extremely elegant proof that the positive rational numbers are countable. First, construct a binary tree with 1/1 at the top. Under 1/1 put 1/2 and 2/1. Continue down the tree as follows. Below each rational number and , place the two rational numbers . Part of the tree is shown below.

Here are some remarkable facts about this tree. 1. Every positive rational number appears somewhere in this tree. 2. No rational number appears twice in this tree. 3. All the entries are in reduced form. Now create a list of the rational numbers by proceeding through the tree breadth first. That is, list the first row, then the second row, then the third row, etc. The first 15 terms are: 1/1, 1/2, 2/1, 1/3, 3/2, 2/3, 3/1, 1/4, 4/3, 5/2, 2/5, 3/4, 4/1,« This shows that the positive rational numbers are countable.

Incidentally, although the sequence of rationals may appear unordered, it has some interesting properties. 1. The denominator of one fraction is the numberator of the next one. 2. The th denominator is the number of ways to write as powers of two in which each power of we have a denominator of 3 .)

two is allowed at most twice. (For example, when because

The proofs of all of these facts are not too difficult. For more information see Calkin and Wilf¶s original paper or this nice 5-part blog post at The Math Less Traveled. Proof II. The next two proofs use the fact that union of countably many finite sets is countable. This is easy to see. If the sets elements of Let , Moreover countable. , , followed by the elements of are finite, then we can list , , by listing the

, and so on (removing duplicates, if any). . For example, , etc. Clearly each such set is finite.

is precisely the set of rational numbers. Thus the set of rational numbers is

(I¶m currently teaching real analysis, and this is the proof found in our textbook, Stephen Abbott¶s Understanding Analysis.) Proof III. The third proof is actually much more versatile than the others. It is found in Rob Kantrowitz¶s paper ³A Principle of Countability´ (Mathematics Magazine, Vol. 73, No. 1 (Feb., 2000), pp. 40-42). He proves that the set of all possible words that can be written with a finite alphabet is countable. The justification is easy. Let letters in the alphabet, then be the set of words of length has . Each is finite (if there are is countable.

words). Reasoning as before,

Of course, we may not be interested in all words (all possible concatenations of letters), but only some words (ones that make sense in the context). Clearly a subset of a countable set is also countable.

Here¶s our one sentence proof that the rational numbers are countable (as a corollary of the theorem above). Every rational number is a word written with letters in the following finite alphabet numbers . . For example, we have rational

We can use the theorem to prove that many other sets are countable too.

The set of all surds is countable. By surds we mean any number that can be obtained from the integers using addition, subtraction, multiplication, division, powers, and roots. Any such value can be written using the following alphabet . For

example,

can be written as

.

This final shocking example is not in Kantrowitz¶s paper, but can be proved using his method: the set of describable numbers is countable. That is, the collection of all numbers that could possibly be described by anyone in any fashion, using any symbols in any language, must be countable. Examples of describable numbers are 5, function , , .´ , and ³the smallest positive root of the

Why is this set countable? The describable numbers can only be described using some finite alphabet. This alphabet could be large²our 26 letters (capital and lower case), the greek alphabet (capital and lower case), binary operations, a (space), the integral symbol, punctuation, etc., etc.

As we will see in the next posting, the real numbers are uncountable. This means that the vast majority of the real numbers (uncountably many) are not describable!

I find this technique in Kantrowitz¶s paper to be extremely satisfying. It is seems very intuitive and easy to apply in other contexts.

Proof IV. Here is yet another proof of the countability of the positive rational numbers. It can be found in Yoram Sagher¶s 2-paragraph note, ³Counting the Rationals´ (The American Mathematical Monthly, Vol. 96, No. 9 (Nov., 1989), p. 823). Each positive rational number can be written as Suppose they have prime factorizations since the fraction is reduced, for all and . where and and are relatively prime. . Note that

Create a 1-1 correspondence with the positive integers as follows. integer

is paired up with the

.

For example

is paired with the value

.

Likewise, we can go backward²each positive integer is paired with one rational number. For example, the number 360 has prime factorization exponents and odd exponents ( denominator is and . Break this up into factors with even and the

). This implies that the numerator is is .

. So the rational number associated to

I am planning to write a follow-up post that showcases less well-known proofs that the real numbers are uncountable.

Posted in Math | Tags: Cantor, cardinality, countable, rational, real analysis, real numbers, uncountable

Countable set
From Wikipedia, the free encyclopedia

"Countable" redirects here. For the linguistic concept, see Count noun. In mathematics, a countable set is a set with the same cardinality (number of elements) as some subset of the set of natural numbers. A set that is not countable is called uncountable. The term was originated by Georg Cantor. The elements of a countable set can be counted one at a time ² although the counting may never finish, every element of the set will eventually be associated with a natural number.

Some authors use countable set to mean a set with the same cardinality as the set of natural numbers.[1] The difference between the two definitions is that under the former, finite sets are also considered to be countable, while under the latter definition, they are not considered to be countable. To resolve this ambiguity, the term at most countable is sometimes used for the former notion, and countably infinite for the latter. The term denumerable is also used to mean countably infinite.[2]
Contents
[hide]

1 Definition 2 Very gentle introduction 3 More formal introduction 4 Basic properties 5 Minimal model of set theory is countable 6 Total orders 7 See also 8 References 9 Notes

[edit]Definition
A set S is called countable if there exists an injective function

from S to the natural numbers

[3]

If f is also surjective, thus making f bijective, then S is called countably infinite. As noted above, this terminology is not universal: some authors define countable not to include finite sets, i.e. they define countable to mean what is here called "countably infinite". There are alternative (equivalent) formulations of the definition in terms of a bijective function or a surjective function as the following theorem shows. A proof of this result can be found in Lang's text.[2] Theorem: Let S be a set. The following statements are equivalent: 1. S is countable, i.e. there exists an injective function . 2. Either S is empty or there exists a surjective function

. 3. Either S is finite or there exists a bijection .

[edit]Very

gentle introduction

A set is a collection of elements, and may be described in many ways. One way is simply to list all of its elements; for example, the set consisting of the integers 3, 4, and 5 may be denoted {3,4,5}. This is only effective for small sets, however; for larger sets, this would be time-consuming and error-prone. Instead of listing every single element, sometimes an ellipsis ('«') is used, if the writer believes that the reader can easily guess what is missing; for example, presumably denotes the set of integers from 1 to 100. Even

in this case, however, it is still possible to list all the elements, because the set is finite; it has a specific number of elements. Some sets are infinite; these sets have more than n elements for any integer n. For example, the set of natural numbers, denotable by , has infinitely many elements,

and we can't use any normal number to give its size. Nonetheless, it turns out that infinite sets do have a well-defined notion of size (or more properly, of cardinality, which is the technical term for the number of elements in a set), and not all infinite sets have the same cardinality. To understand what this means, we must first examine what it does not mean. For example, there are infinitely many odd integers, infinitely many even integers, and (hence) infinitely many integers overall. However, it turns out that the number of odd integers, which is the same as the number of even integers, is also the same as the number of integers overall. This is because we arrange things such that for every integer, there is a distinct odd integer: « í2 0 1, 1 3, 2 5, «; or, more generally, n í3, í1 í1,

2n + 1. What we have done here is arranged

the integers and the odd integers into a one-to-one correspondence (or bijection), which is a function that maps between two sets such that each element of each set corresponds to a single element in the other set. However, not all infinite sets have the same cardinality. For example, Georg Cantor (who introduced this branch of mathematics) demonstrated that the real numbers cannot be put into one-to-one correspondence with the natural numbers (non-negative integers), and therefore that the set of real numbers has a greater cardinality than the set of natural numbers. A set is countable if: (1) it is finite, or (2) it has the same cardinality (size) as the set of natural numbers. Equivalently, a set is countable if it has the same cardinality as some subset of the set of natural numbers. Otherwise, it is uncountable.

[edit]More

formal introduction

It might seem natural to divide the sets into different classes: put all the sets containing one element together; all the sets containing two elements together; ...; finally, put together all infinite sets and consider them as having the same size. This view is not tenable, however, under the natural definition of size. To elaborate this we need the concept of a bijection. Although a "bijection" seems a more advanced concept than a number, the usual development of mathematics in terms of set theory defines functions before numbers, as they are based on much simpler sets. This is where the concept of a bijection comes in: define the correspondence a 1, b 2, c 3

Since every element of { a, b, c } is paired with precisely one element of { 1, 2, 3 }, and vice versa, this defines a bijection. We now generalize this situation and define two sets to be of the same size if (and only if) there is a bijection between them. For all finite sets this gives us the usual definition of "the same size". What does it tell us about the size of infinite sets? Consider the sets A = { 1, 2, 3, ... }, the set of positive integers and B = { 2, 4, 6, ... }, the set of even positive integers. We claim that, under our definition, these sets have the same size, and that therefore B is countably infinite. Recall that to prove this we need to exhibit a bijection between them. But this is easy, using n 1 2, 2 4, 3 6, 4 8, .... 2n, so that

As in the earlier example, every element of A has been paired off with precisely one element of B, and vice versa. Hence they have the same size. This gives an example of a set which is of the same size as one of its proper subsets, a situation which is impossible for finite sets. Likewise, the set of all ordered pairs of natural numbers is countably infinite, as can be seen by following a path like the one in the picture:

The Cantor pairing function assigns one natural number to each pair of natural numbers

The resulting mapping is like this: 0 (0,0), 1 (1,0), 2 (0,1), 3 (2,0), 4 (1,1), 5 (0,2), 6 (3,0) «.

It is evident that this mapping will cover all such ordered pairs. Interestingly: if you treat each pair as being the numerator and denominator of avulgar fraction, then for every positive fraction, we can come up with a distinct number corresponding to it. This representation includes also the natural numbers, since every natural number is also a fraction N/1. So we can conclude that there are exactly as many positive rational numbers as there are positive integers. This is true also for all rational numbers, as can be seen below (a more complex presentation is needed to deal with negative numbers). Theorem: The Cartesian product of finitely many countable sets is countable. This form of triangular mapping recursively generalizes to vectors of finitely many natural numbers by repeatedly mapping the first two elements to a natural number. For example, (0,2,3) maps to (5,3) which maps to 39. Sometimes more than one mapping is useful. This is where you map the set which you want to show countably infinite, onto another set; and then map this other set to the natural numbers. For example, the positive rational

numbers can easily be mapped to (a subset of) the pairs of natural numbers because p/q maps to (p, q). What about infinite subsets of countably infinite sets? Do these have fewer elements than N? Theorem: Every subset of a countable set is countable. In particular, every infinite subset of a countably infinite set is countably infinite. For example, the set of prime numbers is countable, by mapping the n-th prime number to n: 2 maps to 1 3 maps to 2 5 maps to 3 7 maps to 4 11 maps to 5 13 maps to 6 17 maps to 7 19 maps to 8 23 maps to 9 etc.

         

What about sets being "larger than" N? An obvious place to look would be Q, the set of all rational numbers, which intuitively may seem much bigger than N. But looks can be deceiving, for we assert: Theorem: Q (the set of all rational numbers) is countable. Q can be defined as the set of all fractions a/b where a and b are integers and b > 0. This can be mapped onto the subset of ordered triples of natural numbers (a, b, c) such that a • 0, b > 0, a and b are coprime, and c such that c = 0 if a/b • 0 and c = 1 otherwise. 0 maps to (0,1,0) 1 maps to (1,1,0) í1 maps to (1,1,1) 1/2 maps to (1,2,0) í1/2 maps to (1,2,1) {0, 1}

    

              

2 maps to (2,1,0) í2 maps to (2,1,1) 1/3 maps to (1,3,0) í1/3 maps to (1,3,1) 3 maps to (3,1,0) í3 maps to (3,1,1) 1/4 maps to (1,4,0) í1/4 maps to (1,4,1) 2/3 maps to (2,3,0) í2/3 maps to (2,3,1) 3/2 maps to (3,2,0) í3/2 maps to (3,2,1) 4 maps to (4,1,0) í4 maps to (4,1,1) ...

By a similar development, the set of algebraic numbers is countable, and so is the set of definable numbers. Theorem: (Assuming the axiom of countable choice) The union of countably many countable sets is countable. For example, given countable sets a, b, c ... Using a variant of the triangular enumeration we saw above: a0 maps to 0 a1 maps to 1 b0 maps to 2 a2 maps to 3 b1 maps to 4 c0 maps to 5 a3 maps to 6 b2 maps to 7

       

   

c1 maps to 8 d0 maps to 9 a4 maps to 10 ...

Note that this only works if the sets a, b, c,... are disjoint. If not, then the union is even smaller and is therefore also countable by a previous theorem. Theorem: The set of all finite-length sequences of natural numbers is countable. This set is the union of the length-1 sequences, the length-2 sequences, the length-3 sequences, each of which is a countable set (finite Cartesian product). So we are talking about a countable union of countable sets, which is countable by the previous theorem. Theorem: The set of all finite subsets of the natural numbers is countable. If you have a finite subset, you can order the elements into a finite sequence. There are only countably many finite sequences, so also there are only countably many finite subsets.

[edit]Basic

properties

This section presents terse but rigorous proofs of some of the basic facts about countable sets. By definition a set S is countable if there exists an injective function

from S to the natural numbers The following theorem gives equivalent formulations in terms of a bijective function or a surjective function. A proof of this result can be found in Lang's text.[2] Basic Theorem: Let S be a set. The following statements are equivalent: 1. . 2. Either S is empty or there exists a surjective function S is countable, i.e. there exists an injective function

. 3. . Several standard properties follow easily from this theorem. We present them here tersely. For a gentler presentation see the sections above. Observe that in the theorem can be replaced with any countably Either S is finite or there exists a bijection

infinite set. In particular we have the following Corollary. Corollary: Let S and T be sets. 1. If the function

is injective and T is countable then S is countable. 2. If the function

is surjective and S is countable then T is countable. Proof: For (1) observe that if T is countable there is an injective function composition Then if is injective the is injective, so S is countable.

For (2) observe that if S is countable there is a surjective function composition Then if is surjective the is surjective, so T is countable.

Proposition: Any subset of a countable set is countable. Proof: The restriction of an injective function to a subset of its domain is still injective. Proposition: The Cartesian product of two countable sets A and B is countable. Proof: Note that is countable as a consequence of the given byf(m,n)

definition because the function

=

2 3

m n

is injective. It then follows from the Basic Theorem and the Corollary

that the Cartesian product of any two countable sets is countable. This follows because if A and B are countable there are surjections and . So

is a surjection from the countable set and the Corollary implies

to the set

is countable. This result

generalizes to the Cartesian product of any finite collection of countable sets and the proof follows by induction on the number of sets in the collection. Proposition: The integers numbers are countable. are countable because the given by f(n) are countable and the rational

Proof: The integers function and f(n) numbers function

= 2n if n is non-negative

= 3 | n | if n is negative is an injective function. The rational
are countable because the given byg(m,n)

= m / (n + 1) is a
.

surjection from the countable set

to the rationals

Proposition: If An is a countable set for each

then

is countable.

Proof: This is a consequence of the fact that for each n there is a surjective function and hence the function

given by G(n,m)

= gn(m) is a surjection. Since

is

countable the Corollary implies

is countable. We

are using the axiom of countable choice in this proof in order to pick for each a surjection gn from the non-empty to An. is

collection of surjections from

Cantor's Theorem asserts that if A is a set and

its power set, i.e. the set of all subsets of A, then there is no surjective function from A to . A proof is given in the

article Cantor's Theorem. As an immediate consequence of this and the Basic Theorem above we have: Proposition: The set is uncountable. is not countable; i.e. it

For an elaboration of this result see Cantor's diagonal argument. The set of real numbers is uncountable (see Cantor's first uncountability proof), and so is the set of all infinite sequences of natural numbers. A topological proof for the uncountability of the real numbers is described at finite intersection property.

[edit]Minimal

model of set theory is

countable
If there is a set which is a standard model (see inner model) of ZFC set theory, then there is a minimal standard model (see Constructible universe). The Löwenheim-Skolem theorem can be used to show that this minimal model is countable. The fact that the notion of "uncountability" makes sense even in this model, and in particular that this model M contains elements which are subsets of M, hence countable, but uncountable from the point of view of M,

 

was seen as paradoxical in the early days of set theory, see Skolem's paradox. The minimal standard model includes all the algebraic numbers and all effectively computable transcendental numbers, as well as many other kinds of numbers.

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close