Is There Something to CS Theory?

Preview:

DESCRIPTION

Is There Something to CS Theory?. Alan Kaylor Cline July 10, 2009. Can one do computer science without doing programming?. Can one do computer science without doing programming?. No and Yes. Problem: How many games are required to determine the winner of - PowerPoint PPT Presentation

Citation preview

Is There Something to CS Theory?

Alan Kaylor ClineJuly 10, 2009

Can one do computer science without doing programming?

Can one do computer science without doing programming?

No and Yes

Problem:

How many games are required to determine the winner of

a single elimination tournament with 18 teams?

Single Elimination Tournament: a tournament in which each game involves exactly two teams and after which exactly one is the winner of the game

and one is the loser. The tournament proceeds until all but one team has lost.

The Pigeonhole Principle

The Pigeonhole PrincipleStatement

Children’s Version: “If k > n, you can’t stuff k pigeons in n holes

without having at least two pigeons in the same hole.”

The Pigeonhole PrincipleStatement

Children’s Version: “If k > n, you can’t stuff k pigeons in n holes

without having at least two pigeons in the same hole.”

Smartypants Version: “No injective function exists mapping a set of higher cardinality into a set of

lower cardinality.”

The Pigeonhole PrincipleExample

Twelve people are on an elevator and they exit on ten different

floors. At least two got of on the same floor.

The ceiling function:

For a real number x, the ceiling(x) equals the smallest integer greater than or equal to x

Examples:

ceiling(3.7) = 4

ceiling(3.0) = 3

ceiling(0.0) = 0

If you are familiar with the truncation function, notice that

the ceiling function goes in the opposite direction –

up not down.If you owe a store 12.7 cents and they make you pay 13 cents,they have used the ceiling function.

The Extended (i.e. coolguy)Pigeonhole Principle

Statement

Children’s Version: “If you try to stuff k pigeons in n holes there must be at least ceiling (n/k)

pigeons in some hole.”

The Extended (i.e. coolguy)Pigeonhole Principle

Statement

Children’s Version: “If you try to stuff k pigeons in n holes there must be at least ceiling (n/k)

pigeons in some hole.”Smartypants Version: “If sets A and B are

finite and f:A B, then there is some element b of B so that cardinality(f -1(b))

is at least ceiling (cardinality(B)/ cardinality(A).”

The Extended (i.e. coolguy)Pigeonhole Principle

Example

Twelve people are on an elevator and they exit on five different

floors. At least three got off on the same floor.

(since the ceiling(12/5) = 3)

The Extended (i.e. coolguy)Pigeonhole Principle

Example

Twelve people are on an elevator and they exit on five different

floors. At least three got off on the same floor.

(since the ceiling(12/5) = 3)Example of even cooler

“continuous version”

If you travel 12 miles in 5 hours, you must have traveled at least 2.4

miles/hour at some moment.

Application 1: Among any group of six acquaintances

there is either a subgroup of three mutual friends or three mutual enemies.

Application 1: Among any group of six acquaintances

there is either a subgroup of three mutual friends or three mutual enemies.

Application 1: Among any group of six acquaintances

there is either a subgroup of three mutual friends or three mutual enemies.

FF

F

Application 1: Among any group of six acquaintances

there is either a subgroup of three mutual friends or three mutual enemies.

E

E

E

Application 1: Among any group of six acquaintances

there is either a subgroup of three mutual friends or three mutual enemies.

Application 1: Among any group of six acquaintances

there is either a subgroup of three mutual friends or three mutual enemies.

How would you solve this?

You could write down every possibleacquaintanceship relation.

Application 1: Among any group of six acquaintances

there is either a subgroup of three mutual friends or three mutual enemies.

How would you solve this?

You could write down every possibleacquaintanceship relation.

There are 15 pairs of individuals.

Each pair has two possibilities: friends or enemies.

That’s 215 different relations.

Application 1: Among any group of six acquaintances

there is either a subgroup of three mutual friends or three mutual enemies.

How would you solve this?

You could write down every possibleacquaintanceship relation.

There are 15 pairs of individuals.

Each pair has two possibilities: friends or enemies.

That’s 215 different relations.

By analyzing one per minute, you could prove this in 546 hours.

Application 1: Among any group of six acquaintances

there is either a subgroup of three mutual friends or three mutual enemies.

Could the pigeonhole principle be applied to this?

Application 1: Among any group of six acquaintances

there is either a subgroup of three mutual friends or three mutual enemies.

Could the pigeonhole principle be applied to this?

I am glad you asked.Yes.

Begin by choosing one person:

*

*

Begin by choosing one person:

*

Five acquaintances remain

These five must fall into two classes:friends and enemies

*

Begin by choosing one person:

*

Five acquaintances remain

These five must fall into two classes:friends and enemies

The extended pigeonhole principle

says that at least three must be in the same class -

that is: three friends or three enemies

*

*

?

??

Suppose the three are friends of :*

??

Either at least two of the three are friends of each other…

*

Suppose the three are friends of :*

??

Either at least two of the three are friends of each other…

In which case we have three mutual friends.

*

Suppose the three are friends of :*

Suppose the three are friends of :

*

Either at least two of the three are friends of each other…or none of the three are friends

*

Suppose the three are friends of :

*

Either at least two of the three are friends of each other…or none of the three are friends

In which case we have three mutual enemies.

*

Similar argument if we suppose the three are enemies of .

?

??

*

*

Application 2: Given twelve coins – exactly eleven of which have equal weight

determine which coin is different and whether it is heavy or light in a minimal number of weighings using a

three position balance.

H

OUR SOLUTION

1 1

1

1 1

1

5

5

5 5

5

5 22

2

2 2

6

6

6

6

6

63

3 3

3 3

7

7 7

7

7

7

4

4 4

4 4

8

8

8

8

8

8

99

9

9

9

1212

12

11

1111

10

10

1010

10

H HH HHH HH HH H HL LL L L LL L LLL L

1

1

2

2

3

3

4

Application 3: In any sequence of n2+1 distinct integers, there is

a subsequence of length n+1 that is either strictly increasing or strictly decreasing

n=2: 3,5,1,2,4 2,3,5,4,1

n=3: 2,5,4,6,10,7,9,1,8,3 10,1,6,3,8,9,2,4,5,7

n=4: 7,9,13,3,22,6,4,8,25,1,2,16,19,26,10,12,15,20,23,5,24,11,14,21,18,17

Application 3: In any sequence of n2+1 distinct integers, there is

a subsequence of length n+1 that is either strictly increasing or strictly decreasing

n=2: 3,5,1,2,4 2,4,5,3,1

n=3: 2,5,4,6,10,7,9,1,8,3 10,1,6,3,8,9,2,4,5,7

n=4: 7,9,13,3,22,6,4,8,25,1,2,16,19,26,10,12,15,20,23,5,24,11,14,21,18,17

Application 3: In any sequence of n2+1 distinct integers, there is

a subsequence of length n+1 that is either strictly increasing or strictly decreasing

Idea: Could we solve this by considering cases?

For sequences of length 2: 2 cases

For sequences of length 5: 120 cases For sequences of length 10: 3,628,800 cases

For sequences of length 17: 3.6 1014 cases

For sequences of length 26: 4.0 10 26 cases

For sequences of length 37: 1.4 10 43 cases

10 m-15

The Limits of Computation

Speed: speed of light = 3 10 8 m/s

Distance: proton width = 10 –15 m

With one operation being performed inthe time light crosses a proton

there would be 3 1023 operations per second.

Compare this with current serial processor speeds of 6 1011 operations per second

The Limits of Computation

With one operation being performed inthe time light crosses a proton

there would be 3 1023 operations per second.

Big Bang: 14 Billion years ago… that’s 4.4 1017 seconds ago

So we could have done 1.3 1041

operations since the Big Bang.

So we could not have proved this (using enumeration)even for the case of subsequences of length 7 from

sequences of length 37.

But with the pigeon hole principle we can prove it in two minutes.

We can apply the pigeon hole principle to a sorting

problem

We can apply the pigeon hole principle to a sorting

problem

How many comparisons are required to sort n distinct

elements?

Think of a sorting algorithm as determining in which permutation that an array is presented

Think of a sorting algorithm as determining in which permutation that an array is presented

The array: 2, -5, 6, 0, 12

is presented as the permutation:3, 1, 4, 2, 5

Think of a sorting algorithm as determining in which permutation that an array is presented

The array: 2, -5, 6, 0, 12

is presented as the permutation:3, 1, 4, 2, 5

Thus the problem of sorting is equivalent to

determining in which of the n! permutations an array is presented

In terms of functions, the sorting algorithm is a function with n! possible different inputs that must act differently on each

In terms of functions, the sorting algorithm is a function with n! possible different inputs that must act differently on each

Think of the various permutations as leaves at the bottomof a binary tree with comparisons at the internal nodes of the tree.

A tree of height k (i.e. with at most k comparisons to reach any leaf)

has at most 2k leaves.

In terms of functions, the sorting algorithm is a function with n! possible different inputs that must act differently on each

Think of the various permutations as leaves at the bottomof a binary tree with comparisons at the internal nodes of the tree.

A tree of height k (i.e. with at most k comparisons to reach any leaf)

has at most 2k leaves.

Thus, we must have2 !k n

In terms of functions, the sorting algorithm is a function with n! possible different inputs that must act differently on each

Think of the various permutations as leaves at the bottomof a binary tree with comparisons at the internal nodes of the tree.

A tree of height k (i.e. with at most k comparisons to reach any leaf)

has at most 2k leaves.

Thus, we must have2 !k n or

equivalently

2log ( !)k n

We have shown that the minimum number of comparisons for a comparison based sorting algorithm is

2log ( !)n

We have shown that the minimum number of comparisons for a comparison based sorting algorithm is

2log ( !)n

Have you seen this presented as

2log ( )?n n

We have shown that the minimum number of comparisons for a comparison based sorting algorithm is

2log ( !)n

Have you seen this presented as

2log ( )?n n

For large values of n these are close, but they are certainly not identical

2log ( !)n vs. 2log ( )?n n vs. mergesort

Problem: What is the volume of the largest

sphere that can be fit between a unit radius cylinder

adjoining a floor and a wall?

Radius is

2 1

2 1so the volume is

34 2 13 2 1

Problem: What is the volume of the largest

sphere that can be fit between a unit radius cylinder

adjoining a floor and a wall?

How should we calculate

32 1

2 1

if we use 2 1.41?

How should we calculate

32 1

2 1Some alternatives:

expression computed as relative error

double precision error multiple

0.00491 2.51% 103.

0.00475 5.95% 137.

0.00583 15.47% 339.

0.30000 5839.85% 71,791.

0.00510 1.05% 35.

0.00493 0.44% 18.

0.00505 0.15% 1.

32 1

2 1

6

2 1

3

3 2 2

99 70 2

6

1

2 1

3

1

3 2 2

1

99 70 2

if we use 2 1.41?

How should we calculate

32 1

2 1?

Some alternatives:expression computed as relative

errordouble precision error multiple

0.00491 2.51% 103.

0.00475 5.95% 137.

0.00583 15.47% 339.

0.30000 5839.85% 71,791.

0.00510 1.05% 35.

0.00493 0.44% 18.

0.00505 0.15% 1.

32 1

2 1

6

2 1

3

3 2 2

99 70 2

6

1

2 1

3

1

3 2 2

1

99 70 2

How should we calculate

32 1

2 1?

Some alternatives:expression computed as relative

errordouble precision error multiple

0.00491 2.51% 103.

0.00475 5.95% 137.

0.00583 15.47% 339.

0.30000 5839.85% 71,791.

0.00510 1.05% 35.

0.00493 0.44% 18.

0.00505 0.15% 1.

32 1

2 1

6

2 1

3

3 2 2

99 70 2

6

1

2 1

3

1

3 2 2

1

99 70 2

How should we calculate

32 1

2 1?

Some alternatives:expression computed as relative

errordouble precision error

multiple

0.00491 2.51% 103.

0.00475 5.95% 137.

0.00583 15.47% 339.

0.30000 5839.85% 71,791.

0.00510 1.05% 35.

0.00493 0.44% 18.

0.00505 0.15% 1.

32 1

2 1

6

2 1

3

3 2 2

99 70 2

6

1

2 1

3

1

3 2 2

1

99 70 2

An easy way to approximate pi is to construct a sequence of inscribed

regular polygons of 2n sides

We have:

2 2 2p

and for n = 2, 3, … :

21 2 2(1 1 ( / 2 ) )n n

n np p

2 2 2.2.828427124746190828427124746190

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

14 14 3.14159263.14159263346324833463248

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

14 14 3.14159263.14159263346324833463248

15 15 3.141592653.1415926548075894807589

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

14 14 3.14159263.14159263346324833463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

14 14 3.14159263.14159263346324833463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

14 14 3.14159263.14159263346324833463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

14 14 3.14159263.14159263346324833463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

14 14 3.14159263.14159263346324833463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

20 20 3.141593.1415965537048206553704820

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

14 14 3.14159263.14159263346324833463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

20 20 3.141593.1415965537048206553704820

21 21 3.141593.1415965537048206553704820

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

14 14 3.14159263.14159263346324833463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

20 20 3.141593.1415965537048206553704820

21 21 3.141593.1415965537048206553704820

22 22 3.1413.141674265021758674265021758

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

14 14 3.14159263.14159263346324833463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

20 20 3.141593.1415965537048206553704820

21 21 3.141593.1415965537048206553704820

22 22 3.1413.141674265021758674265021758

23 23 3.1413.141829681889202829681889202

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

14 14 3.14159263.14159263346324833463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

20 20 3.141593.1415965537048206553704820

21 21 3.141593.1415965537048206553704820

22 22 3.1413.141674265021758674265021758

23 23 3.1413.141829681889202829681889202

24 24 3.143.1424512724941342451272494134

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

14 14 3.14159263.14159263346324833463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

20 20 3.141593.1415965537048206553704820

21 21 3.141593.1415965537048206553704820

22 22 3.1413.141674265021758674265021758

23 23 3.1413.141829681889202829681889202

24 24 3.143.1424512724941342451272494134

25 25 3.143.1424512724941342451272494134

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

14 14 3.14159263.14159263346324833463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

20 20 3.141593.1415965537048206553704820

21 21 3.141593.1415965537048206553704820

22 22 3.1413.141674265021758674265021758

23 23 3.1413.141829681889202829681889202

24 24 3.143.1424512724941342451272494134

25 25 3.143.1424512724941342451272494134

26 26 3.13.16227766016838062277660168380

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

14 14 3.14159263.14159263346324833463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

20 20 3.141593.1415965537048206553704820

21 21 3.141593.1415965537048206553704820

22 22 3.1413.141674265021758674265021758

23 23 3.1413.141829681889202829681889202

24 24 3.143.1424512724941342451272494134

25 25 3.143.1424512724941342451272494134

26 26 3.13.16227766016838062277660168380

27 27 3.13.16227766016838062277660168380

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

14 14 3.14159263.14159263346324833463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

20 20 3.141593.1415965537048206553704820

21 21 3.141593.1415965537048206553704820

22 22 3.1413.141674265021758674265021758

23 23 3.1413.141829681889202829681889202

24 24 3.143.1424512724941342451272494134

25 25 3.143.1424512724941342451272494134

26 26 3.13.16227766016838062277660168380

27 27 3.13.16227766016838062277660168380

28 28 3.3.464101615137754464101615137754

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

14 14 3.14159263.14159263346324833463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

20 20 3.141593.1415965537048206553704820

21 21 3.141593.1415965537048206553704820

22 22 3.1413.141674265021758674265021758

23 23 3.1413.141829681889202829681889202

24 24 3.143.1424512724941342451272494134

25 25 3.143.1424512724941342451272494134

26 26 3.13.16227766016838062277660168380

27 27 3.13.16227766016838062277660168380

28 28 3.3.464101615137754464101615137754

29 29 4.0000000000000004.000000000000000

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

14 14 3.14159263.14159263346324833463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

20 20 3.141593.1415965537048206553704820

21 21 3.141593.1415965537048206553704820

22 22 3.1413.141674265021758674265021758

23 23 3.1413.141829681889202829681889202

24 24 3.143.1424512724941342451272494134

25 25 3.143.1424512724941342451272494134

26 26 3.13.16227766016838062277660168380

27 27 3.13.16227766016838062277660168380

28 28 3.3.464101615137754464101615137754

29 29 4.0000000000000004.000000000000000

30 30 0.0000000000000000.000000000000000

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

14 14 3.14159263.14159263346324833463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

20 20 3.141593.1415965537048206553704820

21 21 3.141593.1415965537048206553704820

22 22 3.1413.141674265021758674265021758

23 23 3.1413.141829681889202829681889202

24 24 3.143.1424512724941342451272494134

25 25 3.143.1424512724941342451272494134

26 26 3.13.16227766016838062277660168380

27 27 3.13.16227766016838062277660168380

28 28 3.3.464101615137754464101615137754

29 29 4.0000000000000004.000000000000000

30 30 0.0000000000000000.000000000000000

31 31 0.0000000000000000.000000000000000

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

14 14 3.14159263.14159263346324833463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

20 20 3.141593.1415965537048206553704820

21 21 3.141593.1415965537048206553704820

22 22 3.1413.141674265021758674265021758

23 23 3.1413.141829681889202829681889202

24 24 3.143.1424512724941342451272494134

25 25 3.143.1424512724941342451272494134

26 26 3.13.16227766016838062277660168380

27 27 3.13.16227766016838062277660168380

28 28 3.3.464101615137754464101615137754

29 29 4.0000000000000004.000000000000000

30 30 0.0000000000000000.000000000000000

31 31 0.0000000000000000.000000000000000

32 32 0.0000000000000000.000000000000000

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459416548490545941

6 6 3.143.1403311569547390331156954739

7 7 3.1413.141277250932757277250932757

8 8 3.14153.14151380114414513801144145

9 9 3.14153.14157294036788372940367883

10 10 3.141583.1415877252799617725279961

11 11 3.141593.1415914215046351421504635

12 12 3.1415923.141592345611077345611077

13 13 3.14159253.14159257654500476545004

14 14 3.14159263.14159263346324833463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

20 20 3.141593.1415965537048206553704820

21 21 3.141593.1415965537048206553704820

22 22 3.1413.141674265021758674265021758

23 23 3.1413.141829681889202829681889202

24 24 3.143.1424512724941342451272494134

25 25 3.143.1424512724941342451272494134

26 26 3.13.16227766016838062277660168380

27 27 3.13.16227766016838062277660168380

28 28 3.3.464101615137754464101615137754

29 29 4.0000000000000004.000000000000000

30 30 0.0000000000000000.000000000000000

31 31 0.0000000000000000.000000000000000

32 32 0.0000000000000000.000000000000000

0?

Let’s use this

algebraically equivalentversion of the formula for :

2 2 2p

and for n = 2, 3, … :

1np

21 2/ (1 1 ( / 2 ) )n

n n np p p

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459465484905459411

6 6 3.143.1403311569547033115695473939

7 7 3.1413.141277250932727725093275757

8 8 3.14153.14151380114413801144145145

9 9 3.14153.14157294036772940367883883

10 10 3.141583.1415877252777252799619961

11 11 3.141593.1415914215142150463504635

12 12 3.1415923.141592345634561107711077

13 13 3.14159253.14159257657654500445004

14 14 3.14159263.14159263334632483463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

20 20 3.141593.1415965537048206553704820

21 21 3.141593.1415965537048206553704820

22 22 3.1413.141674265021758674265021758

23 23 3.1413.141829681889202829681889202

24 24 3.143.1424512724941342451272494134

25 25 3.143.1424512724941342451272494134

26 26 3.13.16227766016838062277660168380

27 27 3.13.16227766016838062277660168380

28 28 3.3.464101615137754464101615137754

29 29 4.0000000000000004.000000000000000

30 30 0.0000000000000000.000000000000000

31 31 0.0000000000000000.000000000000000

32 32 0.0000000000000000.000000000000000

2.2.828427124746190828427124746190

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459465484905459411

6 6 3.143.1403311569547033115695473939

7 7 3.1413.141277250932727725093275757

8 8 3.14153.14151380114413801144145145

9 9 3.14153.14157294036772940367883883

10 10 3.141583.1415877252777252799619961

11 11 3.141593.1415914215142150463504635

12 12 3.1415923.141592345634561107711077

13 13 3.14159253.14159257657654500445004

14 14 3.14159263.14159263334632483463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

20 20 3.141593.1415965537048206553704820

21 21 3.141593.1415965537048206553704820

22 22 3.1413.141674265021758674265021758

23 23 3.1413.141829681889202829681889202

24 24 3.143.1424512724941342451272494134

25 25 3.143.1424512724941342451272494134

26 26 3.13.16227766016838062277660168380

27 27 3.13.16227766016838062277660168380

28 28 3.3.464101615137754464101615137754

29 29 4.0000000000000004.000000000000000

30 30 0.0000000000000000.000000000000000

31 31 0.0000000000000000.000000000000000

32 32 0.0000000000000000.000000000000000

2.2.828427124746190828427124746190

3.03.06146745892071961467458920719

..

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459465484905459411

6 6 3.143.1403311569547033115695473939

7 7 3.1413.141277250932727725093275757

8 8 3.14153.14151380114413801144145145

9 9 3.14153.14157294036772940367883883

10 10 3.141583.1415877252777252799619961

11 11 3.141593.1415914215142150463504635

12 12 3.1415923.141592345634561107711077

13 13 3.14159253.14159257657654500445004

14 14 3.14159263.14159263334632483463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

20 20 3.141593.1415965537048206553704820

21 21 3.141593.1415965537048206553704820

22 22 3.1413.141674265021758674265021758

23 23 3.1413.141829681889202829681889202

24 24 3.143.1424512724941342451272494134

25 25 3.143.1424512724941342451272494134

26 26 3.13.16227766016838062277660168380

27 27 3.13.16227766016838062277660168380

28 28 3.3.464101615137754464101615137754

29 29 4.0000000000000004.000000000000000

30 30 0.0000000000000000.000000000000000

31 31 0.0000000000000000.000000000000000

32 32 0.0000000000000000.000000000000000

2.2.828427124746190828427124746190

3.03.06146745892071961467458920719

3.13.12144515225805321445152258053

..

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459465484905459411

6 6 3.143.1403311569547033115695473939

7 7 3.1413.141277250932727725093275757

8 8 3.14153.14151380114413801144145145

9 9 3.14153.14157294036772940367883883

10 10 3.141583.1415877252777252799619961

11 11 3.141593.1415914215142150463504635

12 12 3.1415923.141592345634561107711077

13 13 3.14159253.14159257657654500445004

14 14 3.14159263.14159263334632483463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

20 20 3.141593.1415965537048206553704820

21 21 3.141593.1415965537048206553704820

22 22 3.1413.141674265021758674265021758

23 23 3.1413.141829681889202829681889202

24 24 3.143.1424512724941342451272494134

25 25 3.143.1424512724941342451272494134

26 26 3.13.16227766016838062277660168380

27 27 3.13.16227766016838062277660168380

28 28 3.3.464101615137754464101615137754

29 29 4.0000000000000004.000000000000000

30 30 0.0000000000000000.000000000000000

31 31 0.0000000000000000.000000000000000

32 32 0.0000000000000000.000000000000000

2.2.828427124746190828427124746190

3.03.06146745892071961467458920719

3.13.12144515225805321445152258053

3.133.1365484905459406548490545940

3.143.1403311569547530331156954753

3.1413.141277250932773277250932773

3.14153.14151380114430113801144301

3.14153.14157294036709172940367091

3.141583.1415877252771607725277160

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459465484905459411

6 6 3.143.1403311569547033115695473939

7 7 3.1413.141277250932727725093275757

8 8 3.14153.14151380114413801144145145

9 9 3.14153.14157294036772940367883883

10 10 3.141583.1415877252777252799619961

11 11 3.141593.1415914215142150463504635

12 12 3.1415923.141592345634561107711077

13 13 3.14159253.14159257657654500445004

14 14 3.14159263.14159263334632483463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

20 20 3.141593.1415965537048206553704820

21 21 3.141593.1415965537048206553704820

22 22 3.1413.141674265021758674265021758

23 23 3.1413.141829681889202829681889202

24 24 3.143.1424512724941342451272494134

25 25 3.143.1424512724941342451272494134

26 26 3.13.16227766016838062277660168380

27 27 3.13.16227766016838062277660168380

28 28 3.3.464101615137754464101615137754

29 29 4.0000000000000004.000000000000000

30 30 0.0000000000000000.000000000000000

31 31 0.0000000000000000.000000000000000

32 32 0.0000000000000000.000000000000000

2.2.828427124746190828427124746190

3.03.06146745892071961467458920719

3.13.12144515225805321445152258053

3.133.1365484905459406548490545940

3.143.1403311569547530331156954753

3.1413.141277250932773277250932773

3.14153.14151380114430113801144301

3.14153.14157294036709172940367091

3.141583.1415877252771607725277160

3.141593.1415914215112001421511200

3.1415923.141592345570118345570118

3.14159253.14159257658487276584872

3.14159263.14159263433856334338563

3.141592643.1415926487769858776985

3.141592653.1415926523865912386591

2 2 2.2.828427124746190828427124746190

3 3 3.03.06146745892071961467458920719

4 4 3.13.12144515225805321445152258053

5 5 3.133.1365484905459465484905459411

6 6 3.143.1403311569547033115695473939

7 7 3.1413.141277250932727725093275757

8 8 3.14153.14151380114413801144145145

9 9 3.14153.14157294036772940367883883

10 10 3.141583.1415877252777252799619961

11 11 3.141593.1415914215142150463504635

12 12 3.1415923.141592345634561107711077

13 13 3.14159253.14159257657654500445004

14 14 3.14159263.14159263334632483463248

15 15 3.141592653.1415926548075894807589

16 16 3.141592643.1415926453212155321215

17 17 3.14159263.14159260737572007375720

18 18 3.1415923.141592910939673910939673

19 19 3.141593.1415941251951914125195191

20 20 3.141593.1415965537048206553704820

21 21 3.141593.1415965537048206553704820

22 22 3.1413.141674265021758674265021758

23 23 3.1413.141829681889202829681889202

24 24 3.143.1424512724941342451272494134

25 25 3.143.1424512724941342451272494134

26 26 3.13.16227766016838062277660168380

27 27 3.13.16227766016838062277660168380

28 28 3.3.464101615137754464101615137754

29 29 4.0000000000000004.000000000000000

30 30 0.0000000000000000.000000000000000

31 31 0.0000000000000000.000000000000000

32 32 0.0000000000000000.000000000000000

2.2.828427124746190828427124746190

3.03.06146745892071961467458920719

3.13.12144515225805321445152258053

3.133.1365484905459406548490545940

3.143.1403311569547530331156954753

3.1413.141277250932773277250932773

3.14153.14151380114430113801144301

3.14153.14157294036709172940367091

3.141583.1415877252771607725277160

3.141593.1415914215112001421511200

3.1415923.141592345570118345570118

3.14159253.14159257658487276584872

3.14159263.14159263433856334338563

3.141592643.1415926487769858776985

3.141592653.1415926523865912386591

3.1415926533.141592653288992288992

3.14159265353.14159265351459314593

3.14159265353.14159265357099370993

3.141592653583.1415926535850935093

3.1415926535883.141592653588618618

3.1415926535893.141592653589499499

3.14159265358973.14159265358971919

3.14159265358973.14159265358977474

3.141592653589783.1415926535897888

3.141592653589793.1415926535897922

3.1415926535897933.141592653589793

3.1415926535897933.141592653589793

3.1415926535897933.141592653589793

3.1415926535897933.141592653589793

3.1415926535897933.141592653589793

3.1415926535897933.141592653589793

The steps of scientific computation

1.Observation of nature

2.Construction of a mathematical model

3.Selection of a computational method to solve the mathematical

formulation

4.Program the method

5.Execute the program and display the results

6.Interpret the results and compare to observations

7.(Possibly) Refine