Candy bars Beeblebrox has a candy bar with n squares. The candy bar is in the shape of an n × 1 rectangle, with n – 1 grooves betwcen the squares. Beeblebrox wants to break the candy bar into n squares, by breaking a piece along one of its grooves. Each break takes a picce of k squares and breaks it into two picces, one picce consisting of a squares and a second picce consisting of the remaining k – a squares, for some 0 < a < k. Beeblebrox uses exactly n – 1 breaks in total. This is though a game, and Beeblebrox carns points cach time he breaks a picce, and Beeblebrox wants to carn as many points as possible. If Beeblebrox breaks a picce of k squares into two picces of a and k – a squares, then Beeblebrox carns max{a, k – a} points. (max{r,y} = x if x > y, and otherwise max{r, y} = y.) 1. Suppose that Beeblebrox applies the following strategy T: (1) Repeatedly, n – 1 times, he takes the remaining candy bar and break off exactly one piece. Let T(n) denote the total number of points that Beeblebrox carns, if he starts with a candy bar with n squares. Then we can formulate a recurrence that measures the total number of points Beeblebrox carns: T(n) = (n – 1) +T(n – 1) for n > 1, and T(1) = 0. Give a closed form for this recurrence, and briefly justify your answer. (No proof is required.)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Beeblebrox question help required

Candy bars
Beeblebrox has a candy bar with n squares. The candy bar is in the shape of an n × 1 rectangle, with n – 1
grooves between the squares. Beeblebrox wants to break the candy bar into n squares, by breaking a picce
along one of its grooves. Each break takes a piece of k squares and breaks it into two picces, one piece consisting
of a squares and a second piece consisting of the remaining k – a squarcs, for some 0 < a < k. Beeblebrox
uses exactly n – 1 breaks in total.
This is though a game, and Beeblebrox earns points cach time he brcaks a piece, and Beeblebrox wants to carn
as many points as possible. If Beeblebrox breaks a picce of k squares into two pieces of a and k – a squares,
then Beeblebrox earns max{a, k – a} points. (max{x,y} = x if x > y, and otherwise max{x,y} = y.)
1. Suppose that Beeblebrox applies the following strategy T: (1) Repeatedly, n – 1 times, he takes the
remaining candy bar and break off exactly one piece. Let T(n) denote the total number of points that
Beeblebrox earns, if he starts with a candy bar with n squares. Then we can formulate a recurrence
that measures the total number of points Beeblebrox carns: T(n) = (n – 1) + T(n – 1) for n > 1, and
T(1) = 0. Give a closed form for this recurrence, and bricfly justify your answer. (No proof is required.)
Transcribed Image Text:Candy bars Beeblebrox has a candy bar with n squares. The candy bar is in the shape of an n × 1 rectangle, with n – 1 grooves between the squares. Beeblebrox wants to break the candy bar into n squares, by breaking a picce along one of its grooves. Each break takes a piece of k squares and breaks it into two picces, one piece consisting of a squares and a second piece consisting of the remaining k – a squarcs, for some 0 < a < k. Beeblebrox uses exactly n – 1 breaks in total. This is though a game, and Beeblebrox earns points cach time he brcaks a piece, and Beeblebrox wants to carn as many points as possible. If Beeblebrox breaks a picce of k squares into two pieces of a and k – a squares, then Beeblebrox earns max{a, k – a} points. (max{x,y} = x if x > y, and otherwise max{x,y} = y.) 1. Suppose that Beeblebrox applies the following strategy T: (1) Repeatedly, n – 1 times, he takes the remaining candy bar and break off exactly one piece. Let T(n) denote the total number of points that Beeblebrox earns, if he starts with a candy bar with n squares. Then we can formulate a recurrence that measures the total number of points Beeblebrox carns: T(n) = (n – 1) + T(n – 1) for n > 1, and T(1) = 0. Give a closed form for this recurrence, and bricfly justify your answer. (No proof is required.)
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Adjacency Matrix
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education