0% found this document useful (0 votes)
52 views1 page

8.3 Divide-and-Conquer Algorithms and Recurrence Relations

This document contains mathematics problems and questions related to divide-and-conquer algorithms and recurrence relations from a discrete mathematics course. It includes problems about finding values of a recursive function f(n), estimating time complexities of recursive functions using Big-O notation, and devising a divide-and-conquer algorithm to determine if a candidate received a majority of votes in an election.

Uploaded by

Gaurav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views1 page

8.3 Divide-and-Conquer Algorithms and Recurrence Relations

This document contains mathematics problems and questions related to divide-and-conquer algorithms and recurrence relations from a discrete mathematics course. It includes problems about finding values of a recursive function f(n), estimating time complexities of recursive functions using Big-O notation, and devising a divide-and-conquer algorithm to determine if a candidate received a majority of votes in an election.

Uploaded by

Gaurav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

ICS 241: Discrete Mathematics II (Spring 2015)

8.3 Divide-and-Conquer Algorithms and Recurrence Relations


8.3 pg. 535 # 9

Suppose that f (n) = f (n/5) + 3n2 when n is a positive integer divisible by 5, and f (1) = 4. Find

a f (5).

b f (125).

c f (3125).

8.3 pg. 535 # 11

Give a big-O estimate for the function f (n) = f (n/2)+1 if f is an increasing function and n = 2k .

8.3 pg. 535 # 13

Give a big-O estimate for the function f (n) = 2f (n/3) + 4 if f is an increasing function and
n = 3k .

8.3 pg. 535 # 17

Suppose that the votes of n people for different candidates (where there can be more than two
candidates) for a particular office are the elements of a sequence. A person wins the election if this
person receives a majority of the votes.

a Devise a divide-and-conquer algorithm that determines whether a candidate received a ma-


jority and, if so, determine who this candidate is. [Hint: Assume that n is even and split the
sequence of votes into two sequences, each with n/2 elements. Note that a candidate could
not received a majority of votes without receiving a majority of votes in at least one of the
two halves.]

b Use the master theorem to give a big-O estimate for the number of comparisons needed by
the algorithm you devised in part (a).

You might also like