## Function Transformations

View as PDF

Points: 3
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type

Timmy is learning about function transformations! For a function , is the graph of , but

1. Vertically stretched by a factor of
2. Horizontally compressed by a factor of
3. Horizontally translated by units right
4. Vertically translated units up

For this problem, you can assume that , , and are all nonnegative integers, and is a positive integer. Additionally, the numbers will always be present (even if they are redundant, such as when ).

Can you help Timmy with his homework?

#### Input Specification

One line with one string, a function of the form

#### Output Specification

4 lines of the following form:

Vertically stretched by a factor of [a]
Horizontally compressed by a factor of 1/[k]
Horizontally translated by [d] units right
Vertically translated [c] units up

Where each square bracket ([n]) means that the number n replaces the bracket (we do not include the square brackets)

#### Sample Input

10f(3(x-4))+5

#### Sample Output

Vertically stretched by a factor of 10
Horizontally compressed by a factor of 1/3
Horizontally translated by 4 units right
Vertically translated 5 units up