ve as little as possible. When an arrow reaches the top of the screen, if one of your feet is already on the correct arrow, you are awarded one point for not having to move. If neither foot is on the correct arrow, you must move exactly one foot from its current location to the correct arrow on the platform (you do not receive a point here because you moved). If you ever step on the wrong arrow or fail to step on the correct arrow or move more than one foot at a time or move either foot when you are already standing on the correct arrow, you instantly lose your life. How should you move your feet to maximize the total number of points? Assume that you always start with your left foot on   and your right foot on !. (a) Show that, if you do not know the sequence of arrow

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

You are playing a game variant of Dance Dance Revolution where the goal is to play

perfectly but move as little as possible. When an arrow reaches the top of the screen, if one of your feet

is already on the correct arrow, you are awarded one point for not having to move. If neither foot is

on the correct arrow, you must move exactly one foot from its current location to the correct arrow on

the platform (you do not receive a point here because you moved). If you ever step on the wrong

arrow or fail to step on the correct arrow or move more than one foot at a time or move either

foot when you are already standing on the correct arrow, you instantly lose your life.

How should you move your feet to maximize the total number of points? Assume that you always start

with your left foot on   and your right foot on !.

(a) Show that, if you do not know the sequence of arrows for the song ahead of time and you can

only react to arrows one at a time, then there is no algorithm that scores any positive amount of

points.

(b) Okay. So, to prepare for the game, you have memorized the entire sequence of arrows beforehand

for the song. Show that for any song (a sequence of n arrows), it is possible to earn at least

n/4 - 1 points.

(c) Describe an e cient algorithm to  nd the maximum number of points you can earn during a given

song. The input is an array A[1 : : : n] which contains the sequence of arrows.

Dance Dance Revolution is a dance video game, first introduced in Japan by Konami in 1998. Players
stand on a platform marked with four arrows, pointing forward, back, left, and right, arranged in a cross
pattern. During gameplay, a song is played and a sequence of n arrows move from the bottom to the
top of the screen. As each arrow reach the top of the screen, the player must step on the corresponding
arrow on the dance platform.
You are playing a variant of this game called "Vogue Vogue Revolution", where the goal is to play
perfectly but move as little as possible. When an arrow reaches the top of the screen, if one of your feet
is already on the correct arrow, you are awarded one point for not having to move. If neither foot is
on the correct arrow, you must move exactly one foot from its current location to the correct arrow on
the platform (you do not receive a point here because you moved). If you ever step on the wrong
arrow or fail to step on the correct arrow or move more than one foot at a time or move either
foot when you are already standing on the correct arrow, you instantly lose your life.
How should you move your feet to maximize the total number of points? Assume that you always start
with your left foot on + and your right foot on →.
(a) Show that, if you do not know the sequence of arrows for the song ahead of time and you can
only react to arrows one at a time, then there is no algorithm that scores any positive amount of
points.
(b) Okay. So, to prepare for the game, you have memorized the entire sequence of arrows beforehand
for the song. Show that for any song (a sequence of n arrows), it is possible to earn at least
n/4 – 1 points.
(c) Describe an efficient algorithm to find the maximum number of points you can earn during a given
song. The input is an array A[1...n] which contains the sequence of arrows.
Transcribed Image Text:Dance Dance Revolution is a dance video game, first introduced in Japan by Konami in 1998. Players stand on a platform marked with four arrows, pointing forward, back, left, and right, arranged in a cross pattern. During gameplay, a song is played and a sequence of n arrows move from the bottom to the top of the screen. As each arrow reach the top of the screen, the player must step on the corresponding arrow on the dance platform. You are playing a variant of this game called "Vogue Vogue Revolution", where the goal is to play perfectly but move as little as possible. When an arrow reaches the top of the screen, if one of your feet is already on the correct arrow, you are awarded one point for not having to move. If neither foot is on the correct arrow, you must move exactly one foot from its current location to the correct arrow on the platform (you do not receive a point here because you moved). If you ever step on the wrong arrow or fail to step on the correct arrow or move more than one foot at a time or move either foot when you are already standing on the correct arrow, you instantly lose your life. How should you move your feet to maximize the total number of points? Assume that you always start with your left foot on + and your right foot on →. (a) Show that, if you do not know the sequence of arrows for the song ahead of time and you can only react to arrows one at a time, then there is no algorithm that scores any positive amount of points. (b) Okay. So, to prepare for the game, you have memorized the entire sequence of arrows beforehand for the song. Show that for any song (a sequence of n arrows), it is possible to earn at least n/4 – 1 points. (c) Describe an efficient algorithm to find the maximum number of points you can earn during a given song. The input is an array A[1...n] which contains the sequence of arrows.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY