Question
In the videogame Dance Dance Revolution, the players stand up on a platform with 4 arrows up, right, down and left, during the game, the
In the videogame Dance Dance Revolution, the players stand up on a platform with 4 arrows up, right, down and left, during the game, the game shows a sequence of arrows and the player have to step on the correct arrow, but in the version of the game Vouge Vouge Revolution the goal is to not move as possible as you can, so if your foot is on the correct arrow you win a style point for keeping your feet where it was, if none of your foot is on the correct arrow, then you have to move one foot to the correct arrow. If in any occasion you stant on an incorrect arrow you can't stand over the correct arrow.You move more than one foot in a movement or you move your feet when the correct arrow passed all your style pints disappearand you lose the game.
How should you move your feet to maximize the total number of style points that you can get?
Suppose your left feet starts on the left arrow and your right foot starts on the right arrow, besides you have memorized the entire sequence of arrows of the game. For example, if the sequence of arrows is up, up, down, down, left, right, left, right, you can get 5style points.
a) show that for any sequence of n arrows is possible to win at least (n/4)-1 style points
b) Describe an efficient algorithm to find the maximum number of style points that you can get in one game. You start with an array A [1...n] that contains the sequence of arrows.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started