-
Advertisement
Hello,
I got this puzzle asked to me in a recent interview in an MNC company.
Suppose you are working in a tv channel and your job is to schedule the advertisements in between the TV program breaks.
Now there are 2 types of advertisements: Advt A and Advt B.
You have to show Advt A 6 times and Advt B 2 times in 30 minutes slot.
Suppose both advt are 1 minute each.
Now you have to schedule these advt such that the advt of same kind are as far as possible. No more clues and no more clarification I can provide more than what I have given because this is what I was asked exactly.
And this is the problem the company is working on and trying to find an algorith for this.
-
Re: Advertisement
I have a question here,
How many advertisement breaks would be there?
-
Re: Advertisement
only 8 breaks. you have to schedule six A advt and two B advt in 30 minutes.
-
Re: Advertisement
I prefer to go for only 6 breaks,
Here is my Answer,
Let us say the program starts at 8 AM and ends at 8:30 AM
8:00:00 - 01:00 Add A
01:00 - 02:00 Add B
8:05:48 - 06:48 Add A
8:11:36 - 12:36 Add A
8:16:24 - 17:24 Add A
8:22:12 - 23:12 Add A
8:28:00 - 29:00 Add B
29:00 - 30:00 Add A
There are 26 mins between two B Advertisements.
and 4 mins and 48 secs between each A Advertisements.
Awaiting you comments;)
-
Re: Advertisement
Hi james,
Look I dont have the correct solution with me but I would like to know that how you came up with this solution and is this the optimum solution?
-
Re: Advertisement
[QUOTE=jamesravid;12546]I prefer to go for only 6 breaks,
Here is my Answer,
Let us say the program starts at 8 AM and ends at 8:30 AM
8:00:00 - 01:00 Add A
01:00 - 02:00 Add B
8:05:48 - 06:48 Add A
8:11:36 - 12:36 Add A
8:16:24 - 17:24 Add A
8:22:12 - 23:12 Add A
8:28:00 - 29:00 Add B
29:00 - 30:00 Add A
There are 26 mins between two B Advertisements.
and 4 mins and 48 secs between each A Advertisements.
Awaiting you comments;)[/QUOTE]
[B]What's about this optimization?[/B]
8:00:00 - 01:00 Add A
8:05:48 - 06:48 Add A
06:48 - 07:48 Add B
8:11:36 - 12:36 Add A
8:16:24 - 17:24 Add A
18:24 - 19:24 Add B
8:22:12 - 23:12 Add A
29:00 - 30:00 Add A
for better user experience.Add "b" should in b/w add"A", add "A" should not be in every break continuously?
-
Re: Advertisement
There are few things I would like to speak about this puzzle.
First, the puzzle clearly states that two ads of the same type should be as far as possible.
So this clearly means that 1st B type ad should be before program begins and last B type ad should be when program ends.
Secondly, the rest of the ads should be kept at similar distance.
Thirdly, 1st A type ad can be at the beginning along with 1st B type of ad.
Fourthly, last A type ad should be placed along with last B type ad after program ends.
The remaining 4 A type ads can be scattered in between.