Knowee
Questions
Features
Study Tools

Collegues and Movie    N colleague are planning to go to a movie. One among them suggested few movies and all others started to discuss and finally they selected a movie. One among them quickly booked their tickets online, to their surprise they are unable to select their seats. All of them got confused. Then any how, decided to go to the movie. They rushed to reach the theater on time. Again they are surprised that no one was there in the theater. They are the only people about to watch the movie. There is 'r' number of seats in which, 'n' number persons should sit. In how many ways they can sit inside the theater?    Given the number of people 'n' and the number of seats 'r' as  input. The task is to find the different number of ways in which 'n' number of people can be seated in those 'r' number of seats.Constraints:NAExample:Sample Input:5 3Sample Output:60Explanation: 60 is the total number of ways in which ‘n’ people can be seated  in ‘r’ seats.P(n,r) =P(5,3) = 5! /(5-3)!  =  5! / ( 5 - 3 )! = 120 / 2 = 60

Question

Collegues and Movie    N colleague are planning to go to a movie. One among them suggested few movies and all others started to discuss and finally they selected a movie. One among them quickly booked their tickets online, to their surprise they are unable to select their seats. All of them got confused. Then any how, decided to go to the movie. They rushed to reach the theater on time. Again they are surprised that no one was there in the theater. They are the only people about to watch the movie. There is 'r' number of seats in which, 'n' number persons should sit. In how many ways they can sit inside the theater?    Given the number of people 'n' and the number of seats 'r' as  input. The task is to find the different number of ways in which 'n' number of people can be seated in those 'r' number of seats.Constraints:NAExample:Sample Input:5 3Sample Output:60Explanation: 60 is the total number of ways in which ‘n’ people can be seated  in ‘r’ seats.P(n,r) =P(5,3) = 5! /(5-3)!  =  5! / ( 5 - 3 )! = 120 / 2 = 60

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

The problem is asking for the number of ways 'n' people can be seated in 'r' seats. This is a permutation problem, where the order of arrangement matters.

The formula for permutations is P(n, r) = n! / (n - r)!, where 'n' is the total number of items, 'r' is the number of items to choose, and '!' denotes factorial, which is the product of all positive integers up to that number.

Given the example with 5 people and 3 seats:

Step 1: Calculate the factorial of 'n' (5 in this case). 5! = 5 * 4 * 3 * 2 * 1 = 120.

Step 2: Subtract 'r' from 'n' (5 - 3 = 2) and calculate the factorial of the result. 2! = 2 * 1 = 2.

Step 3: Divide the result from step 1 by the result from step 2. 120 / 2 = 60.

So, there are 60 different ways the 5 people can be seated in 3 seats.

This problem has been solved

Similar Questions

A group of 6 friends goes to the movies, but when they get into the theater there are only 3 seats left in the front row. In how many ways can the friends fill the seats in the front row?

7 people (A, B, C, D, E, F and G) go to a movie and sit next to each other in 7 adjacent seats in the front row of the theater.How many different arrangements are possible? If A will not sit to the left of F and F will not sit to the left of E. How many different arrangements are possible.

Problem Statement:- In a Conference ,attendees are invited for a dinner after the conference.TheCo-ordinator,Sagar arranged around round tables for dinner and want to have an impactfulseating experience for the attendees.Before finalizing the seating arrangement,he wants toanalyze all the possible arrangements.These are R round tables and N attendees.In case where Nis an exact multiple of R,the number of attendees must be exactly N//R,,If N is not an exactmultiple of R, then the distribution of attendees must be as equal as possible.Please refer to theexample section before for better understanding.For example, R = 2 and N = 3All possible seating arrangements are(1,2) & (3)(1,3) & (2)(2,3) & (1)Attendees are numbered from 1 to N.Input Format:● The first line contains T denoting the number of test cases.● Each test case contains two space separated integers R and N, Where R denotes thenumber of round tables and N denotes the number of attendees.Output Format:Single Integer S denoting the number of possible unique arrangements.Constraints:● 0 <= R <= 10(Integer)● 0 < N <= 20 (Integer)Sample Input 1:12 5Sample Output 1:10Explanation:R = 2, N = 5(1,2,3) & (4,5)(1,2,4) & (3,5)(1,2,5) & (3,4)(1,3,4) & (2,5)(1,3,5) & (2,4)(1,4,5) & (2,3)(2,3,4) & (1,5)(2,3,5) & (1,4)(2,4,5) & (1,3)(3,4,5) & (1,2)Arrangements like(1,2,3) & (4,5)(2,1,3) & (4,5)(2,3,1) & (4,5) etc.But as it is a round table,all the above arrangements are same.

Six friends go to a movie theater. In how many different ways can they sit together in a row of 6 empty seats?There are  ways can they sit together in a row of 6 empty seats.

Answer the questions on the basis of the information given below.At a cinema, four movies are being screened - Pilgrim, Quota, Ratatouille, and Scream - not necessarily in this order, during four time slots - 9 AM to 11 AM, 11 AM to 1 PM, 1 PM to 3 PM, and 3 PM to 5 PM. A group of 8 people - A, B, C, D, E, F, G, and H - went to watch these movies. Each movie is screened exactly once and watched by at least one person. Each person watches one movie, and none of the movies was watched by more than three people.These eight people reach the cinema hall just before the time slot of the movie they intend to watch. If more than one person is going to watch the same movie, they reach the cinema hall in the alphabetical order of their names. For example, if both A and C are going to watch the same movie, then A will reach first, followed by C.It is further known that:(i) A and E do not watch the movies screened at 1 PM to 3 PM and 11 AM to 1 PM respectively.(ii) A did not watch Pilgrim whereas G did not watch Quota.(iii) Scream was watched by three people but not by H whereas E watched Ratatouille.(iv) A was the third person to reach the cinema hall, and E arrived in the cinema hall after A.(v) B and D were the sixth and last to reach the cinema hall respectively.Question No 38.For how many people can we definitely know the slots they watched movies in?

1/2

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.