Mathematical Sequences: Euclid, Fibonacci, and Collatz, Slides of Computer Science

Explanations and challenges related to three different mathematical sequences: euclid, fibonacci, and collatz. Each sequence is defined by specific rules for generating the next pair or number in the sequence. The challenges encourage readers to explore patterns and relationships within these sequences.

Typology: Slides

2012/2013

Uploaded on 04/30/2013

naji
naji 🇮🇳

4.3

(6)

87 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Easy: Euclid Sequences
Form a sequence of number pairs (integers) as follows:
Begin with any two positive numbers as the first pair
In each step, the next number pair consists of
(1) the smaller of the current pair of values, and (2) their difference
Stop when the two numbers in the pair become equal
Challenge: Repeat this process for a few more starting number pairs
and see if you can discover something about how the final number pair
is related to the starting values
(10, 15) (10, 5) (5, 5)
(9, 23) (9, 14) (9, 5) (5, 4) (4, 1) (1, 3) (1, 2) (1, 1)
(22, 6) (6, 16) (6, 10) (6, 4) (4, 2) (2, 2)
Why is the process outlined above guaranteed to end?
Docsity.com
pf3
pf4

Partial preview of the text

Download Mathematical Sequences: Euclid, Fibonacci, and Collatz and more Slides Computer Science in PDF only on Docsity!

Easy: Euclid Sequences

Form a sequence of number pairs (integers) as follows: Begin with any two positive numbers as the first pair In each step, the next number pair consists of (1) the smaller of the current pair of values, and (2) their difference Stop when the two numbers in the pair become equal

Challenge: Repeat this process for a few more starting number pairs and see if you can discover something about how the final number pair is related to the starting values

Why is the process outlined above guaranteed to end?

Not So Easy: Fibonacci Sequences

Form a sequence of numbers (integers) as follows: Begin with any two numbers as the first two elements In each step, the next number is the sum of the last two numbers already in the sequence Stop when you have generated the j th number ( j is given)

Challenge: See if you can find a formula that yields the j th number directly (i.e., without following the sequence) when we begin with 1 1

j = 4

j = 9

j = 12

Two Other Easy-Looking Hard Problems

The subset sum problem: Given a set of n numbers, determine whether there is a subset whose sum is a given value x

S = {3, –4, 32, –25, 6, 10, –9, 50} x = 22

Can’t do fundamentally better than simply trying all 2 n^ subsets (exponential time, intractable for even moderately large n )

The traveling salesperson problem: Given a set of n cities with known travel cost c (^) ij between cities i and j , find a path of least cost that would take a salesperson through all cities, returning to the starting city

A

C

D

E

F B

5 2

1

2

1

3

4

(^5 )

3 4 3

In the worst case, must examine nearly all the ( n – 1)! cycles, which would require exponential time