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
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
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.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F49dd7732-82a2-431e-bcf9-9f3bf6d9c821%2F547a3cf3-5c49-4a3b-b99a-292c4d2346c2%2Fyhwis9_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)