You can define the function relating the number of people \( n \) to the cost \( c \) based on the pricing structure provided. Here's the breakdown:
-
If \( n \) (the number of people) is between 1 and 9 (inclusive), the cost is calculated as: \[ c(n) = 5n \]
-
If \( n \) is 10 or more, the cost is a fixed rate of: \[ c(n) = 50 \]
Using this information, you can define the function \( c(n) \) mathematically as:
\[ c(n) = \begin{cases} 5n & \text{if } 1 \leq n \leq 9 \ 50 & \text{if } n \geq 10 \ 0 & \text{if } n < 1 \quad \text{(assuming no cost for 0 people)} \end{cases} \]
In a programming context, the function can be implemented in Python, for example, as follows:
def calculate_cost(n):
if n < 1:
return 0 # Assuming no cost for 0 people
elif 1 <= n <= 9:
return 5 * n
else: # n >= 10
return 50
# Example usage:
number_of_people = 7
cost = calculate_cost(number_of_people)
print(f"The cost for {number_of_people} people is: {cost}")
This function will calculate the cost based on the number of people in the group according to the pricing structure described.