there is bar with 21 seats in a line .the people there are anti social so when they walk in bar ,they always try to find a seat farthest away from others .if one person walk in and findthere is not seat adjacent to nobody ,that person will walk away.the bar owner wants as many peope as possible.the owner can tell the first
Answers
Answer:
Step-by-step explanation:
9 or 17
Answer:
Concept:
Simply put, the probability is the likelihood that something will occur. When we don't know how an event will turn out, we can discuss the likelihood or likelihood of several outcomes. Statistics is the study of events that follow a probability distribution.
Step-by-step explanation:
Consider a case. If the number of seats is n = (2^k)+1 for some k, then, the maximum possible seating of (n/2)+1 can be achieved by having the first person sitting at position 1 or n or ceil(n/2).
This is true since when n=(2^k)+1, then, when someone sits in the first or middle or the last seat then all the other gaps are of length in powers of 2 (as suggested above by Vinay).
This implies that for this problem, with n=21, we need to split it into n1 and n2 such that: n1 = (2^k1)+1 and n2 = (2^k2)+1, for some k1, k2. Note that n1+n2 = n+1 = 22 (since they both share a common seat).
Thus, the only possible values are 9 or 17.
#SPJ2