# Trainings

The table contains tennis training schedule for Saturday's younger students during the winter indoor season. Before the start of the summer season is preparing a new training schedule. Tomas Kucera will be able to practice only in the morning, sisters Kovacova will have to train in any order only one after one. Other students meet all times.

How many different schedules tennis training under these conditions can be created for these eight students?

9:00 to 9:55 Jana Abrahámová
10:00 to 10:55 Tomas Kucera
11:00 to 11:55 Beata Gross
12:00 to 12:55 Dana Ihringová
13:00 to 13:55 Ingrid Hájková
14:00 to 14:55 Katarina Kovacova
15:00 to 15:55 Zuzana Kovacova
16:00 to 16:55 Peter Valent

Result

x =  4080

#### Solution:

Program in PHP:
for(\$a=1;\$a<=8;\$a++) {
for(\$b=1;\$b<=8;\$b++) {
for(\$c=1;\$c<=8;\$c++) {
for(\$d=1;\$d<=8;\$d++) {
for(\$e=1;\$e<=8;\$e++) {
for(\$f=1;\$f<=8 ;\$f++) {
for(\$g=1;\$g<=8;\$g++) {
for(\$h=1;\$h<=8;\$h++) {

if(\$a != 1 && \$b != 1 && \$c != 1)
{
continue;
}

if(\$a==2 && \$b!=3 || \$b==2 && \$c!=3
|| \$c==2 && \$d!=3 || \$d==2 && \$e!=3 ||
\$e==2 && \$f!=3 || \$f==2 && \$g!=3 ||
\$g==2 && \$h!=3)
{
continue;
}

\$aa = array(\$a, \$b, \$c, \$d, \$e, \$f, \$g, \$h);
if(count(\$aa) != count(array_unique(\$aa)))
{
continue;
}
\$cnt++;

}}}}}}}}
echo 'count of permutations: '.\$cnt;

Leave us a comment of example and its solution (i.e. if it is still somewhat unclear...):

Be the first to comment!

## Next similar examples:

1. Each with each
Five pupils from 3A class played table tennis. How many matches did they play with each other?
2. Ten boys
Ten boys chose to go to the supermarket. Six boys bought gum and nine boys bought a lollipop. How many boys bought gum and a lollipop?
3. 600 pencils
600 pencils we want to be divided into three groups. The biggest groups have ten pens more than the smallest. How many ways can this be done?
4. Boys and girls
There are 11 boys and 18 girls in the classroom. Three pupils will answer. What is the probability that two boys will be among them?
5. Three numbers
We have three different non-zero digits. We will create all 3 digits numbers from them to use all 3 figures in each number. We add all the created numbers, and we get the sum of 1554. What were the numbers?
6. Find the sum
Find the sum of all natural numbers from 1 and 100, which are divisible by 2 or 5
7. Ribbon on the cube
A cubical gift box is tied with a piece of ribbon. If the total length of the free ends and the bow is 18 inches, what is the length of the ribbon used? (Each side of the cube is 6 inches).
8. Lake or pond
The landlord has a square lake. Trees grow around this lake. The lake wants to enlarge the pond twice and does not want to cut down or flood any tree. How will he do that?
9. Tangent spheres
A sphere with a radius of 1 m is placed in the corner of the room. What is the largest sphere size that fits into the corner behind it? Additional info: Two spheres are placed in a corner of a room. The spheres are each tangent to the walls and floor and
10. Three shooters
Three shooters shoot, each one time, on the same target. The first hit the target with a probability of 0.7; second with a probability of 0.8 and a third with a probability of 0.9. What is the probability to hit the target: a) just once b) at least once c
11. Hens and pigs
Hens and pigs have 46 feet in total. At least how much can heads have?
12. Eggs
3400 eggs sliced hens for February and March. We have to calculate how many hens can make 3400 eggs when one hen give 2 eggs a day for 59 days.
13. Three painters
One painter would have painted the fence for 15 hours, the second in 12 hours. The plot had to be painted in four hours, so they called the third one, and all worked together. For what time would the third painter paint fence the fence alone?
14. Reminder and quotient
There are given the number C = 281, D = 201. Find the highest natural number S so that the C:S, D:S are with the remainder of 1,
15. Collection of stamps
Jano, Rado, and Fero have created a collection of stamps in a ratio of 5: 6: 9. Two of them had 429 stamps together. How many stamps did their shared collection have?
16. Two pipes
How long will the pool be filled with a double supply pipe if it takes the pool to fill the first pipe by 4 hours longer and the second pipe 9 hours longer than both pipes open at the same time?
17. Brick
One brick is 6 kg and half a brick heavy. What is the weight of one brick?