0 Up votes0 Down votes

4 views3 pagesMar 06, 2017

© © All Rights Reserved

DOC, PDF, TXT or read online from Scribd

© All Rights Reserved

4 views

© All Rights Reserved

- Neuromancer
- The E-Myth Revisited: Why Most Small Businesses Don't Work and
- How Not to Be Wrong: The Power of Mathematical Thinking
- Drive: The Surprising Truth About What Motivates Us
- Chaos: Making a New Science
- The Joy of x: A Guided Tour of Math, from One to Infinity
- How to Read a Person Like a Book
- Moonwalking with Einstein: The Art and Science of Remembering Everything
- The Wright Brothers
- The Other Einstein: A Novel
- The 6th Extinction
- The Housekeeper and the Professor: A Novel
- The Power of Discipline: 7 Ways it Can Change Your Life
- The 10X Rule: The Only Difference Between Success and Failure
- A Short History of Nearly Everything
- The Kiss Quotient: A Novel
- The End of Average: How We Succeed in a World That Values Sameness
- Made to Stick: Why Some Ideas Survive and Others Die
- Algorithms to Live By: The Computer Science of Human Decisions
- The Universe in a Nutshell

You are on page 1of 3

function f from the set of nonnegative integers to the set of integers. If f is well defined,

find a formula for f(n) when n is a nonnegative integer and prove that your formula is

valid.

a) f(0)=1, f(n)=2f(n-2), for n 1, n is even

f(n) = 2f(n-2)= 22f((n-2)-2)= 23f(n-32) =24f(n-42) =..2kf(n-k2)=

= 2(n-2)/2f(2)= 22(n-2)/2

n-k2 = 2; n = 2 + 2k; n-2 = 2k, k =(n-2)/2

b) f(0)=1, f(n) = f(n-1) 1, for n 1

f(n)= f(n-1) 1= f(n-2)-2= f(n-k) k = = f(n-n) n = 1 - n

n-k = 0, k=n

c) f(0)=2, f(1)=3, f(n)=f(n-1) 1, for n 2

f(n) = f(n-1) 1= f(n-2)-2= f(n-k) k = = f(n-(n-1)) (n-1)= f(1) n+1=4-n

n-k=1 , k = n-1

d) f(0)=1, f(1)=2, f(n)= 2f(n-2), for n 2

f(n) = 2f(n-2) = . =24f(n-42) = 2kf(n-k2) = 2n/2

n-k2 = 0 ..

e) f(0)=1, f(n)= 3f(n-1) if n is odd and n 1 and f(n)= 9f(n-2) if n is even and n 2

Problem 2.

Give a recursive definition of the sequence {a n}, n=1,2,3 if

a) an = 6n

a0=0 ; an+1 = 6(n+1)=6n + 6 = an + 6

b) an = 2n +1

a0 = 1; an+1 = 2(n+1) + 1 = (2n +1) + 2 = an + 2

c) an = 10n

a0 = 1 ; an+1 = 10n+1 = 10n10 = 10an

d) an = 5

Problem 3.

Assuming that fn is the nth Fibonacci number [f0=f1=1; fn+1= fn+ fn-1],

prove that f02 + f12 + + fn2 = fnfn+1

when n is a positive integer.

Inductive step: assumption - f02 + f12 + + fn2 = fnfn+1

We have to prove: f02 + f12 + + fn2 + fn+12 = fn+1fn+2

fnfn+1+ fn+12 = fn+1fn+2 = fn+1(fn+1+ fn)

Problem 4.

Give a recursive definition of

a) the set S of odd positive integers

1 S, k S k+2 S

b) the set S of positive integer powers of 3

S = {31, 32, }

3 S , k S 3k S

c) the set S of polynomials with integer coefficients

S = {a0 + a1x + a2x2 +. akxk : (i k)[ai N]}

a N, k N {0} axk S

s1 , s2 S s1 + s2 S

Problem 5.

Give a recursive definition of each of these sets of ordered pairs of positive integers.

Use structural induction to prove that the recursive definition you found is correct.

[Hint: To find a recursive definition, plot the points in the set in the plane and look for

paterns]

a) S={(a,b): aZ+, bZ+, and a+b is even}

(1,1) S, (2,2) S,

(p,q) S (p, q+2) S, (p+2,q) S

b) S={(a,b): aZ+, bZ+, and a or b is odd}

(1,1) S, (1,2) S, (2,1) S

(p,q) S (p, q+2) S, (p+2,q) S

c) S={(a,b): aZ+, bZ+, a+b is odd, 3 b}

(2,3) S , (1,6) S

(p,q) S (p,q+6) S, (p+2,q) S

Problem 6.

Give a recursive algorithm for finding the sum of the first n positive integers

if n=1 then S(n):=1

else S(n):= S(n-1) + n

Problem 7.

Give a recursive algorithm for finding the minimum of a finite set of integers, making use

of the fact that the minimum of n integers is the smaller of the last integer in the list and

the minimum of the first n-1 integers in the list.

if n=1 then S(a1,a2,,an):=a1

else S(a1,a2,,an):= min(S(a1,a2,,an-1), an)

Problem 8.

Device a recursive algorithm for computing n 2 where n is a nonnegative integer using

the fact that (n+1)2 = n2 + 2n + 1.

if n=0 then S(n):= 0

else S(n):= S(n-1) + 2(n-1) + 1

Problem 9.

Device a recursive algorithm to find the nth term of the sequence defined by a0=1, a1=2,

an = an-1an-2, for n=2,3,4,.

if n=0 then S(n):= 1

else if n=1 then S(n):= 2

else S(n):= S(n-1) S(n-2)

- CSC263 Spring 2011 Assignment 3Uploaded byyellowmoog
- Cosine SeriesUploaded byBarasat HelpDesk
- discrete mathematics 6e.pdfUploaded byKarunakar Nalam
- Data Mining Lab ReportUploaded byRedowan Mahmud Ratul
- song2018 7.pdfUploaded byvainateyagoldar
- 2017 Usacm Statement AI AlgorithmsUploaded bydhavalnmodi
- Definition of an AlgorithmUploaded byRajendranbehappy
- Rag i NationUploaded byHanif Payandeh
- Quiz3Aug2017Uploaded byFariz Lukman
- Towards the Improvement of RasterizationUploaded byRodrigo Ferreyra
- Gen Math MidtermUploaded byjohn christian de leon
- Gossip Algorithms for Distributed Signal Processing First GradeUploaded byDeborah
- Short Summery ReportUploaded byshaviraj786
- CSUploaded byAnique Tahir
- 1153_algorithms and FlowchartsUploaded byNanda Kasika
- algorithmsandflowcharts-130417151609-phpapp01Uploaded byAschalew Girma
- C Programming - Lecture VUploaded bySalih Çabuk
- C1 Modeling in Frequency DomainUploaded byloveyamky
- algorithm_flowchart.pdfUploaded bypooja shegokar
- Book on C++Uploaded byVaishnavi Subramanian
- 20170919130927Introduction.pptxUploaded bynasilalap
- algo lecture1Uploaded byAlice Liu
- ex7_solnsUploaded byfolusho
- Algorithm Utilization as Provided in O Fusion Profile ManagementUploaded byDebye101
- YPCpaper 19thSept2018 ConvertedUploaded byCarles David Cristian Alvarez
- Deconstruct Compiler sUploaded byMatthew Matyus
- PCI PlanningUploaded byAshish Shukla
- Discrete Maths 2002 Lecture 25 3 Slides PpUploaded byapi-26021617
- EQ-502 Curve Fitting - SinusoidUploaded byadpanfeq
- jurnal_achmadL.pdfUploaded byAchmad Lukman

- Linear Algerbra.pdfUploaded byBob
- Alain Bruguieres and Alexis Virelizier- Quantum Double of Hopf Monads and Categorical CentersUploaded byJoaokaa
- Multiplication of Integers Final TgUploaded byNiño Paulo Crispe
- J.N. Ridley Engineering Mathematics 2, Guide to Solving Problems -Unofficial Soln ManualUploaded bymoveee2
- Linear Algebra ExamUploaded byKarina Sanders
- GMAT Club Math Book v3 - Jan-2-2013Uploaded byenvoy2210
- JR_W01_DPP01_03Uploaded byAbhishek
- Math Review for Alg and PrecalUploaded byAnthony Maida
- CBSE Class 12 Maths Notes _ Indefinite Integrals _ AglaSem SchoolsUploaded byKunalSingh
- sadasdasdUploaded byLa Lee
- Functions 2Uploaded byAmber Habib
- Complex Numbers Part 1 Exam QuestionsUploaded bySWAPNIL NEGI
- LAnotesUploaded byslurm101
- McbUploaded byRajat Kalia
- Tin-Yau Tam Multilinear Algebra [Lecture Notes]Uploaded byjhoan gaviria
- CRC Press Math CatalogueUploaded bybappabatliboi
- StewartCalcET7e_11_10.pptUploaded byAnonymous R277Kp
- fe35-065-093Uploaded byferdinand zdrava
- Complex Vector Spaces.pdfUploaded bymechmaster4u
- Principal Component Analysis PrimerUploaded byAri David Paul
- INTEGERS HandoutsUploaded byGelyn Lanuza
- coleman.pdfUploaded byjj
- Mat223 UTM Midterm UofTUploaded byRevownSada
- Bab2(2.1~2.4)Uploaded byIndra Kharisma Izecson
- Algebraic Geometry - A Concise Dictionary (gnv64).pdfUploaded bygarrisonian96
- mth314-slides05-NumberTheory.unlocked.pdfUploaded byhaseabamin
- PoissonUploaded byvivishek
- Vector Calculus.pptUploaded byIzni Mustafar
- math 8aUploaded byproodoot
- Linear AlgebraUploaded byNarvine Emperado Santiaguel

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.